diff --git a/.buildkite/ftr_configs.yml b/.buildkite/ftr_configs.yml index c5028cd30ea29..c6817a53b08a8 100644 --- a/.buildkite/ftr_configs.yml +++ b/.buildkite/ftr_configs.yml @@ -462,6 +462,9 @@ enabled: - x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/actions/configs/ess.config.ts - x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/alerts/configs/serverless.config.ts - x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/alerts/configs/ess.config.ts + - x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/configs/serverless.config.ts + - x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/configs/ess.config.ts + diff --git a/.buildkite/pipelines/es_serverless/emergency_relelease_branch_testing.yml b/.buildkite/pipelines/es_serverless/emergency_relelease_branch_testing.yml new file mode 100644 index 0000000000000..8fc5da666d56b --- /dev/null +++ b/.buildkite/pipelines/es_serverless/emergency_relelease_branch_testing.yml @@ -0,0 +1,17 @@ +# https://buildkite.com/elastic/kibana-serverless-emergency-release-branch-testing + +## Triggers the artifacts container image build for emergency releases +agents: + queue: kibana-default + +notify: + - slack: "#kibana-mission-control" + if: "build.state == 'passed' || build.state == 'failed' || build.state == 'scheduled'" + +steps: + - trigger: "kibana-artifacts-container-image" + label: ":docker: Build Kibana Artifacts Container Image" + build: + branch: $BUILDKITE_BRANCH + commit: $BUILDKITE_COMMIT + message: Running PR build for $BUILDKITE_BRANCH diff --git a/.buildkite/pipelines/security_solution/base.yml b/.buildkite/pipelines/security_solution/security_solution_cypress.yml similarity index 79% rename from .buildkite/pipelines/security_solution/base.yml rename to .buildkite/pipelines/security_solution/security_solution_cypress.yml index 337c44ccdcc7e..247505ef1c85a 100644 --- a/.buildkite/pipelines/security_solution/base.yml +++ b/.buildkite/pipelines/security_solution/security_solution_cypress.yml @@ -1,5 +1,5 @@ steps: - - command: .buildkite/scripts/pipelines/security_solution_quality_gate/mki_security_solution_cypress.sh cypress:run:qa:serverless + - command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless label: 'Serverless MKI QA Security Cypress Tests' agents: queue: n2-4-spot @@ -11,7 +11,7 @@ steps: - exit_status: '*' limit: 1 - - command: .buildkite/scripts/pipelines/security_solution_quality_gate/mki_security_solution_cypress.sh cypress:run:qa:serverless:explore + - command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:explore label: 'Serverless MKI QA Explore - Security Solution Cypress Tests' agents: queue: n2-4-spot @@ -23,7 +23,7 @@ steps: - exit_status: '*' limit: 1 - - command: .buildkite/scripts/pipelines/security_solution_quality_gate/mki_security_solution_cypress.sh cypress:run:qa:serverless:investigations + - command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:investigations label: 'Serverless MKI QA Investigations - Security Solution Cypress Tests' agents: queue: n2-4-spot diff --git a/.buildkite/scripts/pipelines/security_solution_quality_gate/edr_workflows/pipeline.sh b/.buildkite/scripts/pipelines/security_solution_quality_gate/edr_workflows/pipeline.sh new file mode 100755 index 0000000000000..807ec48ab48ed --- /dev/null +++ b/.buildkite/scripts/pipelines/security_solution_quality_gate/edr_workflows/pipeline.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +set -euo pipefail + +echo "Running the EDR-Workflows testing for Kibana" \ No newline at end of file diff --git a/.buildkite/scripts/pipelines/security_solution_quality_gate/mki_security_solution_cypress.sh b/.buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh similarity index 100% rename from .buildkite/scripts/pipelines/security_solution_quality_gate/mki_security_solution_cypress.sh rename to .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh diff --git a/.buildkite/scripts/pipelines/security_solution_quality_gate/pipeline.sh b/.buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/pipeline.sh similarity index 69% rename from .buildkite/scripts/pipelines/security_solution_quality_gate/pipeline.sh rename to .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/pipeline.sh index 3f4b2093b807e..b3d93e083fa41 100755 --- a/.buildkite/scripts/pipelines/security_solution_quality_gate/pipeline.sh +++ b/.buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/pipeline.sh @@ -2,4 +2,4 @@ set -euo pipefail -ts-node .buildkite/scripts/pipelines/security_solution_quality_gate/pipeline.ts +ts-node .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/pipeline.ts diff --git a/.buildkite/scripts/pipelines/security_solution_quality_gate/pipeline.ts b/.buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/pipeline.ts similarity index 90% rename from .buildkite/scripts/pipelines/security_solution_quality_gate/pipeline.ts rename to .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/pipeline.ts index 4084696d5c21c..fb9ec67fba888 100644 --- a/.buildkite/scripts/pipelines/security_solution_quality_gate/pipeline.ts +++ b/.buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/pipeline.ts @@ -28,7 +28,9 @@ const uploadPipeline = (pipelineContent: string | object) => { try { const pipeline = []; - pipeline.push(getPipeline('.buildkite/pipelines/security_solution/base.yml', false)); + pipeline.push( + getPipeline('.buildkite/pipelines/security_solution/security_solution_cypress.yml', false) + ); // remove duplicated steps uploadPipeline([...new Set(pipeline)].join('\n')); } catch (ex) { diff --git a/.buildkite/scripts/steps/serverless/build_and_deploy.sh b/.buildkite/scripts/steps/serverless/build_and_deploy.sh index 41a8880706b3d..6c5b72a0b4922 100644 --- a/.buildkite/scripts/steps/serverless/build_and_deploy.sh +++ b/.buildkite/scripts/steps/serverless/build_and_deploy.sh @@ -6,91 +6,102 @@ set -euo pipefail source .buildkite/scripts/common/util.sh source .buildkite/scripts/steps/artifacts/docker_image.sh -PROJECT_TYPE="" -is_pr_with_label "ci:project-deploy-elasticsearch" && PROJECT_TYPE="elasticsearch" -is_pr_with_label "ci:project-deploy-observability" && PROJECT_TYPE="observability" -is_pr_with_label "ci:project-deploy-security" && PROJECT_TYPE="security" -if [ -z "${PROJECT_TYPE}" ]; then - echo "Mising project type" - exit 10 -fi - -PROJECT_NAME="kibana-pr-$BUILDKITE_PULL_REQUEST-$PROJECT_TYPE" -PROJECT_CREATE_CONFIGURATION='{ - "name": "'"$PROJECT_NAME"'", - "region_id": "aws-eu-west-1", - "overrides": { - "kibana": { - "docker_image": "'"$KIBANA_IMAGE"'" - } - } -}' -PROJECT_UPDATE_CONFIGURATION='{ - "name": "'"$PROJECT_NAME"'", - "overrides": { - "kibana": { - "docker_image": "'"$KIBANA_IMAGE"'" - } - } -}' - -echo "--- Create project" -DEPLOY_LOGS=$(mktemp --suffix ".json") - -echo "Checking if project already exists..." -curl -s \ - -H "Authorization: ApiKey $PROJECT_API_KEY" \ - "${PROJECT_API_DOMAIN}/api/v1/serverless/projects/${PROJECT_TYPE}" \ - -XGET &>> $DEPLOY_LOGS - -PROJECT_ID=$(jq -r --slurp '[.[0].items[] | select(.name == "'$PROJECT_NAME'")] | .[0].id' $DEPLOY_LOGS) -if [ -z "${PROJECT_ID}" ] || [ "$PROJECT_ID" = 'null' ]; then - echo "Creating project..." - curl -s \ - -H "Authorization: ApiKey $PROJECT_API_KEY" \ - -H "Content-Type: application/json" \ - "${PROJECT_API_DOMAIN}/api/v1/serverless/projects/${PROJECT_TYPE}" \ - -XPOST -d "$PROJECT_CREATE_CONFIGURATION" &>> $DEPLOY_LOGS - - PROJECT_ID=$(jq -r --slurp '.[1].id' $DEPLOY_LOGS) - echo "Get credentials..." - curl -s -XPOST -H "Authorization: ApiKey $PROJECT_API_KEY" \ - "${PROJECT_API_DOMAIN}/api/v1/serverless/projects/${PROJECT_TYPE}/${PROJECT_ID}/_reset-credentials" &>> $DEPLOY_LOGS - - PROJECT_USERNAME=$(jq -r --slurp '.[2].username' $DEPLOY_LOGS) - PROJECT_PASSWORD=$(jq -r --slurp '.[2].password' $DEPLOY_LOGS) - - echo "Write to vault..." - VAULT_ROLE_ID="$(retry 5 15 gcloud secrets versions access latest --secret=kibana-buildkite-vault-role-id)" - VAULT_SECRET_ID="$(retry 5 15 gcloud secrets versions access latest --secret=kibana-buildkite-vault-secret-id)" - VAULT_TOKEN=$(retry 5 30 vault write -field=token auth/approle/login role_id="$VAULT_ROLE_ID" secret_id="$VAULT_SECRET_ID") - retry 5 30 vault login -no-print "$VAULT_TOKEN" - retry 5 5 vault write "secret/kibana-issues/dev/cloud-deploy/$PROJECT_NAME" username="$PROJECT_USERNAME" password="$PROJECT_PASSWORD" id="$PROJECT_ID" -else - echo "Updating project..." +deploy() { + PROJECT_TYPE=$1 + case $PROJECT_TYPE in + elasticsearch) + PROJECT_TYPE_LABEL='Elasticsearch Serverless' + ;; + observability) + PROJECT_TYPE_LABEL='Observability' + ;; + security) + PROJECT_TYPE_LABEL='Security' + ;; + esac + + PROJECT_NAME="kibana-pr-$BUILDKITE_PULL_REQUEST-$PROJECT_TYPE" + PROJECT_CREATE_CONFIGURATION='{ + "name": "'"$PROJECT_NAME"'", + "region_id": "aws-eu-west-1", + "overrides": { + "kibana": { + "docker_image": "'"$KIBANA_IMAGE"'" + } + } + }' + PROJECT_UPDATE_CONFIGURATION='{ + "name": "'"$PROJECT_NAME"'", + "overrides": { + "kibana": { + "docker_image": "'"$KIBANA_IMAGE"'" + } + } + }' + + echo "--- Create $PROJECT_TYPE_LABEL project" + DEPLOY_LOGS=$(mktemp --suffix ".json") + + echo "Checking if project already exists..." curl -s \ -H "Authorization: ApiKey $PROJECT_API_KEY" \ - -H "Content-Type: application/json" \ - "${PROJECT_API_DOMAIN}/api/v1/serverless/projects/${PROJECT_TYPE}/${PROJECT_ID}" \ - -XPUT -d "$PROJECT_UPDATE_CONFIGURATION" &>> $DEPLOY_LOGS -fi - -PROJECT_KIBANA_URL=$(jq -r --slurp '.[1].endpoints.kibana' $DEPLOY_LOGS) -PROJECT_KIBANA_LOGIN_URL="${PROJECT_KIBANA_URL}/login" -PROJECT_ELASTICSEARCH_URL=$(jq -r --slurp '.[1].endpoints.elasticsearch' $DEPLOY_LOGS) - -cat << EOF | buildkite-agent annotate --style "info" --context project - ### Project Deployment - - Kibana: $PROJECT_KIBANA_LOGIN_URL - - Elasticsearch: $PROJECT_ELASTICSEARCH_URL - - Credentials: \`vault read secret/kibana-issues/dev/cloud-deploy/$PROJECT_NAME\` - - Kibana image: \`$KIBANA_IMAGE\` + "${PROJECT_API_DOMAIN}/api/v1/serverless/projects/${PROJECT_TYPE}" \ + -XGET &>> $DEPLOY_LOGS + + PROJECT_ID=$(jq -r --slurp '[.[0].items[] | select(.name == "'$PROJECT_NAME'")] | .[0].id' $DEPLOY_LOGS) + if [ -z "${PROJECT_ID}" ] || [ "$PROJECT_ID" = 'null' ]; then + echo "Creating project..." + curl -s \ + -H "Authorization: ApiKey $PROJECT_API_KEY" \ + -H "Content-Type: application/json" \ + "${PROJECT_API_DOMAIN}/api/v1/serverless/projects/${PROJECT_TYPE}" \ + -XPOST -d "$PROJECT_CREATE_CONFIGURATION" &>> $DEPLOY_LOGS + + PROJECT_ID=$(jq -r --slurp '.[1].id' $DEPLOY_LOGS) + + echo "Get credentials..." + curl -s -XPOST -H "Authorization: ApiKey $PROJECT_API_KEY" \ + "${PROJECT_API_DOMAIN}/api/v1/serverless/projects/${PROJECT_TYPE}/${PROJECT_ID}/_reset-credentials" &>> $DEPLOY_LOGS + + PROJECT_USERNAME=$(jq -r --slurp '.[2].username' $DEPLOY_LOGS) + PROJECT_PASSWORD=$(jq -r --slurp '.[2].password' $DEPLOY_LOGS) + + echo "Write to vault..." + VAULT_ROLE_ID="$(retry 5 15 gcloud secrets versions access latest --secret=kibana-buildkite-vault-role-id)" + VAULT_SECRET_ID="$(retry 5 15 gcloud secrets versions access latest --secret=kibana-buildkite-vault-secret-id)" + VAULT_TOKEN=$(retry 5 30 vault write -field=token auth/approle/login role_id="$VAULT_ROLE_ID" secret_id="$VAULT_SECRET_ID") + retry 5 30 vault login -no-print "$VAULT_TOKEN" + retry 5 5 vault write "secret/kibana-issues/dev/cloud-deploy/$PROJECT_NAME" username="$PROJECT_USERNAME" password="$PROJECT_PASSWORD" id="$PROJECT_ID" + else + echo "Updating project..." + curl -s \ + -H "Authorization: ApiKey $PROJECT_API_KEY" \ + -H "Content-Type: application/json" \ + "${PROJECT_API_DOMAIN}/api/v1/serverless/projects/${PROJECT_TYPE}/${PROJECT_ID}" \ + -XPUT -d "$PROJECT_UPDATE_CONFIGURATION" &>> $DEPLOY_LOGS + fi + + PROJECT_KIBANA_URL=$(jq -r --slurp '.[1].endpoints.kibana' $DEPLOY_LOGS) + PROJECT_KIBANA_LOGIN_URL="${PROJECT_KIBANA_URL}/login" + PROJECT_ELASTICSEARCH_URL=$(jq -r --slurp '.[1].endpoints.elasticsearch' $DEPLOY_LOGS) + + cat << EOF | buildkite-agent annotate --style "info" --context "project-$PROJECT_TYPE" +### $PROJECT_TYPE_LABEL Deployment + +Kibana: $PROJECT_KIBANA_LOGIN_URL + +Elasticsearch: $PROJECT_ELASTICSEARCH_URL + +Credentials: \`vault read secret/kibana-issues/dev/cloud-deploy/$PROJECT_NAME\` + +Kibana image: \`$KIBANA_IMAGE\` EOF -buildkite-agent meta-data set pr_comment:deploy_project:head "* [Project Deployment](${PROJECT_KIBANA_LOGIN_URL})" -buildkite-agent meta-data set pr_comment:early_comment_job_id "$BUILDKITE_JOB_ID" + buildkite-agent meta-data set "pr_comment:deploy_project_$PROJECT_TYPE:head" "* [$PROJECT_TYPE_LABEL Deployment](${PROJECT_KIBANA_LOGIN_URL})" + buildkite-agent meta-data set pr_comment:early_comment_job_id "$BUILDKITE_JOB_ID" +} + +is_pr_with_label "ci:project-deploy-elasticsearch" && deploy "elasticsearch" +is_pr_with_label "ci:project-deploy-observability" && deploy "observability" +is_pr_with_label "ci:project-deploy-security" && deploy "security" diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 1dc3be1a66d6d..c51318721ba81 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -36,14 +36,14 @@ packages/analytics/shippers/elastic_v3/server @elastic/kibana-core packages/analytics/shippers/fullstory @elastic/kibana-core packages/analytics/shippers/gainsight @elastic/kibana-core packages/kbn-apm-config-loader @elastic/kibana-core @vigneshshanmugam -x-pack/plugins/apm_data_access @elastic/apm-ui -x-pack/plugins/apm @elastic/apm-ui -packages/kbn-apm-synthtrace @elastic/apm-ui -packages/kbn-apm-synthtrace-client @elastic/apm-ui -packages/kbn-apm-utils @elastic/apm-ui +x-pack/plugins/apm_data_access @elastic/obs-knowledge-team @elastic/obs-ux-infra_services-team +x-pack/plugins/apm @elastic/obs-ux-infra_services-team +packages/kbn-apm-synthtrace @elastic/obs-ux-infra_services-team +packages/kbn-apm-synthtrace-client @elastic/obs-ux-infra_services-team +packages/kbn-apm-utils @elastic/obs-ux-infra_services-team test/plugin_functional/plugins/app_link_test @elastic/kibana-core x-pack/test/usage_collection/plugins/application_usage_test @elastic/kibana-core -x-pack/plugins/asset_manager @elastic/infra-monitoring-ui +x-pack/plugins/asset_manager @elastic/obs-knowledge-team x-pack/test/security_api_integration/plugins/audit_log @elastic/kibana-security packages/kbn-axe-config @elastic/kibana-qa packages/kbn-babel-preset @elastic/kibana-operations @@ -300,7 +300,7 @@ x-pack/plugins/cross_cluster_replication @elastic/platform-deployment-management packages/kbn-crypto @elastic/kibana-security packages/kbn-crypto-browser @elastic/kibana-core x-pack/plugins/custom_branding @elastic/appex-sharedux -packages/kbn-custom-integrations @elastic/infra-monitoring-ui +packages/kbn-custom-integrations @elastic/obs-ux-logs-team src/plugins/custom_integrations @elastic/fleet packages/kbn-cypress-config @elastic/kibana-operations x-pack/plugins/dashboard_enhanced @elastic/kibana-presentation @@ -319,7 +319,7 @@ packages/deeplinks/analytics @elastic/kibana-data-discovery @elastic/kibana-pres packages/deeplinks/devtools @elastic/platform-deployment-management packages/deeplinks/management @elastic/platform-deployment-management packages/deeplinks/ml @elastic/ml-ui -packages/deeplinks/observability @elastic/apm-ui +packages/deeplinks/observability @elastic/obs-ux-logs-team packages/deeplinks/search @elastic/enterprise-search-frontend packages/default-nav/analytics @elastic/kibana-data-discovery @elastic/kibana-presentation @elastic/kibana-visualizations packages/default-nav/devtools @elastic/platform-deployment-management @@ -353,18 +353,19 @@ src/plugins/embeddable @elastic/kibana-presentation x-pack/examples/embedded_lens_example @elastic/kibana-visualizations x-pack/plugins/encrypted_saved_objects @elastic/kibana-security x-pack/plugins/enterprise_search @elastic/enterprise-search-frontend +examples/error_boundary @elastic/appex-sharedux packages/kbn-es @elastic/kibana-operations packages/kbn-es-archiver @elastic/kibana-operations @elastic/appex-qa packages/kbn-es-errors @elastic/kibana-core packages/kbn-es-query @elastic/kibana-data-discovery -packages/kbn-es-types @elastic/kibana-core @elastic/apm-ui +packages/kbn-es-types @elastic/kibana-core @elastic/obs-knowledge-team src/plugins/es_ui_shared @elastic/platform-deployment-management packages/kbn-eslint-config @elastic/kibana-operations packages/kbn-eslint-plugin-disable @elastic/kibana-operations packages/kbn-eslint-plugin-eslint @elastic/kibana-operations -packages/kbn-eslint-plugin-i18n @elastic/actionable-observability +packages/kbn-eslint-plugin-i18n @elastic/obs-knowledge-team packages/kbn-eslint-plugin-imports @elastic/kibana-operations -packages/kbn-eslint-plugin-telemetry @elastic/actionable-observability +packages/kbn-eslint-plugin-telemetry @elastic/obs-knowledge-team x-pack/test/encrypted_saved_objects_api_integration/plugins/api_consumer_plugin @elastic/kibana-security packages/kbn-event-annotation-common @elastic/kibana-visualizations packages/kbn-event-annotation-components @elastic/kibana-visualizations @@ -374,8 +375,8 @@ x-pack/test/plugin_api_integration/plugins/event_log @elastic/response-ops x-pack/plugins/event_log @elastic/response-ops packages/kbn-expandable-flyout @elastic/security-threat-hunting-investigations packages/kbn-expect @elastic/kibana-operations @elastic/appex-qa -x-pack/examples/exploratory_view_example @elastic/uptime -x-pack/plugins/exploratory_view @elastic/uptime +x-pack/examples/exploratory_view_example @elastic/obs-ux-infra_services-team +x-pack/plugins/exploratory_view @elastic/obs-ux-infra_services-team src/plugins/expression_error @elastic/kibana-presentation src/plugins/chart_expressions/expression_gauge @elastic/kibana-visualizations src/plugins/chart_expressions/expression_heatmap @elastic/kibana-visualizations @@ -444,15 +445,15 @@ packages/kbn-import-resolver @elastic/kibana-operations x-pack/plugins/index_lifecycle_management @elastic/platform-deployment-management x-pack/plugins/index_management @elastic/platform-deployment-management test/plugin_functional/plugins/index_patterns @elastic/kibana-data-discovery -x-pack/packages/kbn-infra-forge @elastic/actionable-observability -x-pack/plugins/infra @elastic/infra-monitoring-ui +x-pack/packages/kbn-infra-forge @elastic/obs-ux-management-team +x-pack/plugins/infra @elastic/infra-monitoring-ui @elastic/obs-ux-logs-team @elastic/obs-ux-infra_services-team x-pack/plugins/ingest_pipelines @elastic/platform-deployment-management src/plugins/input_control_vis @elastic/kibana-presentation src/plugins/inspector @elastic/kibana-presentation src/plugins/interactive_setup @elastic/kibana-security test/interactive_setup_api_integration/plugins/test_endpoints @elastic/kibana-security packages/kbn-interpreter @elastic/kibana-visualizations -packages/kbn-io-ts-utils @elastic/apm-ui +packages/kbn-io-ts-utils @elastic/obs-knowledge-team packages/kbn-jest-serializers @elastic/kibana-operations packages/kbn-journeys @elastic/kibana-operations @elastic/appex-qa packages/kbn-json-ast @elastic/kibana-operations @@ -469,7 +470,7 @@ src/plugins/kibana_usage_collection @elastic/kibana-core src/plugins/kibana_utils @elastic/appex-sharedux x-pack/plugins/kubernetes_security @elastic/kibana-cloud-security-posture packages/kbn-language-documentation-popover @elastic/kibana-visualizations -packages/kbn-lens-embeddable-utils @elastic/infra-monitoring-ui +packages/kbn-lens-embeddable-utils @elastic/obs-ux-infra_services-team x-pack/plugins/lens @elastic/kibana-visualizations x-pack/plugins/license_api_guard @elastic/platform-deployment-management x-pack/plugins/license_management @elastic/platform-deployment-management @@ -480,10 +481,10 @@ packages/kbn-lint-ts-projects-cli @elastic/kibana-operations x-pack/plugins/lists @elastic/security-detection-engine examples/locator_examples @elastic/appex-sharedux examples/locator_explorer @elastic/appex-sharedux -x-pack/plugins/log_explorer @elastic/infra-monitoring-ui +x-pack/plugins/log_explorer @elastic/obs-ux-logs-team packages/kbn-logging @elastic/kibana-core packages/kbn-logging-mocks @elastic/kibana-core -x-pack/plugins/logs_shared @elastic/infra-monitoring-ui +x-pack/plugins/logs_shared @elastic/obs-ux-logs-team x-pack/plugins/logstash @elastic/logstash packages/kbn-managed-vscode-config @elastic/kibana-operations packages/kbn-managed-vscode-config-cli @elastic/kibana-operations @@ -506,7 +507,7 @@ x-pack/examples/third_party_maps_source_example @elastic/kibana-gis src/plugins/maps_ems @elastic/kibana-gis x-pack/plugins/maps @elastic/kibana-gis x-pack/packages/maps/vector_tile_utils @elastic/kibana-gis -x-pack/plugins/metrics_data_access @elastic/infra-monitoring-ui +x-pack/plugins/metrics_data_access @elastic/obs-knowledge-team x-pack/packages/ml/agg_utils @elastic/ml-ui x-pack/packages/ml/anomaly_utils @elastic/ml-ui x-pack/packages/ml/category_validator @elastic/ml-ui @@ -533,24 +534,24 @@ x-pack/packages/ml/string_hash @elastic/ml-ui x-pack/packages/ml/trained_models_utils @elastic/ml-ui x-pack/packages/ml/url_state @elastic/ml-ui packages/kbn-monaco @elastic/appex-sharedux -x-pack/plugins/monitoring_collection @elastic/infra-monitoring-ui -x-pack/plugins/monitoring @elastic/infra-monitoring-ui +x-pack/plugins/monitoring_collection @elastic/obs-ux-infra_services-team +x-pack/plugins/monitoring @elastic/obs-ux-infra_services-team src/plugins/navigation @elastic/appex-sharedux src/plugins/newsfeed @elastic/kibana-core test/common/plugins/newsfeed @elastic/kibana-core src/plugins/no_data_page @elastic/appex-sharedux x-pack/plugins/notifications @elastic/appex-sharedux packages/kbn-object-versioning @elastic/appex-sharedux -x-pack/plugins/observability_ai_assistant @elastic/obs-ai-assistant +x-pack/plugins/observability_ai_assistant @elastic/obs-knowledge-team x-pack/packages/observability/alert_details @elastic/actionable-observability x-pack/packages/observability/alerting_test_data @elastic/actionable-observability x-pack/test/cases_api_integration/common/plugins/observability @elastic/response-ops -x-pack/plugins/observability_log_explorer @elastic/infra-monitoring-ui -x-pack/plugins/observability_onboarding @elastic/apm-ui -x-pack/plugins/observability @elastic/actionable-observability +x-pack/plugins/observability_log_explorer @elastic/obs-ux-logs-team +x-pack/plugins/observability_onboarding @elastic/obs-ux-logs-team +x-pack/plugins/observability @elastic/obs-ux-management-team x-pack/plugins/observability_shared @elastic/observability-ui x-pack/test/security_api_integration/plugins/oidc_provider @elastic/kibana-security -test/common/plugins/otel_metrics @elastic/infra-monitoring-ui +test/common/plugins/otel_metrics @elastic/obs-ux-infra_services-team packages/kbn-openapi-generator @elastic/security-detection-rule-management packages/kbn-optimizer @elastic/kibana-operations packages/kbn-optimizer-webpack-helpers @elastic/kibana-operations @@ -567,9 +568,9 @@ packages/kbn-plugin-helpers @elastic/kibana-operations examples/portable_dashboards_example @elastic/kibana-presentation examples/preboot_example @elastic/kibana-security @elastic/kibana-core src/plugins/presentation_util @elastic/kibana-presentation -x-pack/plugins/profiling_data_access @elastic/profiling-ui -x-pack/plugins/profiling @elastic/profiling-ui -packages/kbn-profiling-utils @elastic/profiling-ui +x-pack/plugins/profiling_data_access @elastic/obs-ux-infra_services-team +x-pack/plugins/profiling @elastic/obs-ux-infra_services-team +packages/kbn-profiling-utils @elastic/obs-ux-infra_services-team x-pack/packages/kbn-random-sampling @elastic/kibana-visualizations packages/kbn-react-field @elastic/kibana-data-discovery packages/react/kibana_context/common @elastic/appex-sharedux @@ -598,8 +599,8 @@ packages/kbn-rison @elastic/kibana-operations x-pack/plugins/rollup @elastic/platform-deployment-management examples/routing_example @elastic/kibana-core packages/kbn-rrule @elastic/response-ops -packages/kbn-rule-data-utils @elastic/security-detections-response @elastic/actionable-observability @elastic/response-ops -x-pack/plugins/rule_registry @elastic/response-ops @elastic/actionable-observability +packages/kbn-rule-data-utils @elastic/security-detections-response @elastic/response-ops @elastic/obs-ux-management-team +x-pack/plugins/rule_registry @elastic/response-ops @elastic/obs-ux-management-team x-pack/plugins/runtime_fields @elastic/platform-deployment-management packages/kbn-safer-lodash-set @elastic/kibana-security x-pack/test/security_api_integration/plugins/saml_provider @elastic/kibana-security @@ -656,11 +657,11 @@ packages/kbn-securitysolution-rules @elastic/security-detection-engine packages/kbn-securitysolution-t-grid @elastic/security-detection-engine packages/kbn-securitysolution-utils @elastic/security-detection-engine packages/kbn-server-http-tools @elastic/kibana-core -packages/kbn-server-route-repository @elastic/apm-ui +packages/kbn-server-route-repository @elastic/obs-knowledge-team @elastic/obs-ux-management-team x-pack/plugins/serverless @elastic/appex-sharedux packages/serverless/settings/common @elastic/appex-sharedux @elastic/platform-deployment-management -x-pack/plugins/serverless_observability @elastic/appex-sharedux @elastic/apm-ui -packages/serverless/settings/observability_project @elastic/appex-sharedux @elastic/apm-ui @elastic/platform-deployment-management +x-pack/plugins/serverless_observability @elastic/appex-sharedux @elastic/obs-ux-management-team +packages/serverless/settings/observability_project @elastic/appex-sharedux @elastic/platform-deployment-management @elastic/obs-ux-management-team packages/serverless/project_switcher @elastic/appex-sharedux x-pack/plugins/serverless_search @elastic/enterprise-search-frontend packages/serverless/settings/search_project @elastic/enterprise-search-frontend @elastic/platform-deployment-management @@ -672,7 +673,7 @@ x-pack/plugins/session_view @elastic/kibana-cloud-security-posture packages/kbn-set-map @elastic/kibana-operations examples/share_examples @elastic/appex-sharedux src/plugins/share @elastic/appex-sharedux -packages/kbn-shared-svg @elastic/apm-ui +packages/kbn-shared-svg @elastic/obs-ux-infra_services-team packages/shared-ux/avatar/solution @elastic/appex-sharedux packages/shared-ux/button/exit_full_screen @elastic/appex-sharedux packages/shared-ux/button_toolbar @elastic/appex-sharedux @@ -721,7 +722,7 @@ packages/shared-ux/router/types @elastic/appex-sharedux packages/shared-ux/storybook/config @elastic/appex-sharedux packages/shared-ux/storybook/mock @elastic/appex-sharedux packages/kbn-shared-ux-utility @elastic/appex-sharedux -x-pack/packages/kbn-slo-schema @elastic/actionable-observability +x-pack/packages/kbn-slo-schema @elastic/obs-ux-management-team x-pack/plugins/snapshot_restore @elastic/platform-deployment-management packages/kbn-some-dev-log @elastic/kibana-operations packages/kbn-sort-package-json @elastic/kibana-operations @@ -738,7 +739,7 @@ packages/kbn-std @elastic/kibana-core packages/kbn-stdio-dev-helpers @elastic/kibana-operations packages/kbn-storybook @elastic/kibana-operations packages/kbn-subscription-tracking @elastic/security-threat-hunting-investigations -x-pack/plugins/synthetics @elastic/uptime +x-pack/plugins/synthetics @elastic/obs-ux-infra_services-team x-pack/test/alerting_api_integration/common/plugins/task_manager_fixture @elastic/response-ops x-pack/test/plugin_api_perf/plugins/task_manager_performance @elastic/response-ops x-pack/plugins/task_manager @elastic/response-ops @@ -768,7 +769,7 @@ x-pack/examples/triggers_actions_ui_example @elastic/response-ops x-pack/plugins/triggers_actions_ui @elastic/response-ops packages/kbn-ts-projects @elastic/kibana-operations packages/kbn-ts-type-check-cli @elastic/kibana-operations -packages/kbn-typed-react-router-config @elastic/apm-ui +packages/kbn-typed-react-router-config @elastic/obs-knowledge-team @elastic/obs-ux-management-team packages/kbn-ui-actions-browser @elastic/appex-sharedux x-pack/examples/ui_actions_enhanced_examples @elastic/appex-sharedux src/plugins/ui_actions_enhanced @elastic/appex-sharedux @@ -788,20 +789,20 @@ examples/unified_field_list_examples @elastic/kibana-data-discovery src/plugins/unified_histogram @elastic/kibana-data-discovery src/plugins/unified_search @elastic/kibana-visualizations x-pack/plugins/upgrade_assistant @elastic/platform-deployment-management -x-pack/plugins/uptime @elastic/uptime +x-pack/plugins/uptime @elastic/obs-ux-infra_services-team x-pack/plugins/drilldowns/url_drilldown @elastic/appex-sharedux src/plugins/url_forwarding @elastic/kibana-visualizations packages/kbn-url-state @elastic/security-threat-hunting-investigations src/plugins/usage_collection @elastic/kibana-core test/plugin_functional/plugins/usage_collection @elastic/kibana-core -packages/kbn-use-tracked-promise @elastic/infra-monitoring-ui +packages/kbn-use-tracked-promise @elastic/obs-ux-logs-team packages/kbn-user-profile-components @elastic/kibana-security examples/user_profile_examples @elastic/kibana-security x-pack/test/security_api_integration/plugins/user_profiles_consumer @elastic/kibana-security packages/kbn-utility-types @elastic/kibana-core packages/kbn-utility-types-jest @elastic/kibana-operations packages/kbn-utils @elastic/kibana-operations -x-pack/plugins/ux @elastic/uptime +x-pack/plugins/ux @elastic/obs-ux-infra_services-team examples/v8_profiler_examples @elastic/response-ops packages/kbn-validate-next-docs-cli @elastic/kibana-operations src/plugins/vis_default_editor @elastic/kibana-visualizations @@ -822,7 +823,7 @@ src/plugins/visualizations @elastic/kibana-visualizations x-pack/plugins/watcher @elastic/platform-deployment-management packages/kbn-web-worker-stub @elastic/kibana-operations packages/kbn-whereis-pkg-cli @elastic/kibana-operations -packages/kbn-xstate-utils @elastic/infra-monitoring-ui +packages/kbn-xstate-utils @elastic/obs-ux-logs-team packages/kbn-yarn-lock-validator @elastic/kibana-operations packages/kbn-zod-helpers @elastic/security-detection-rule-management #### @@ -926,25 +927,79 @@ packages/kbn-monaco/src/esql @elastic/kibana-visualizations ### Observability Plugins -# Actionable observability -x-pack/packages/observability/alert_details @elastic/actionable-observability -x-pack/test/observability_functional @elastic/actionable-observability -x-pack/plugins/infra/public/alerting @elastic/actionable-observability -x-pack/plugins/infra/server/lib/alerting @elastic/actionable-observability - # Observability robots /.github/workflows/deploy-my-kibana.yml @elastic/observablt-robots /.github/workflows/oblt-github-commands @elastic/observablt-robots # Infra Monitoring -/x-pack/test/functional/apps/infra @elastic/infra-monitoring-ui -/x-pack/test/api_integration/apis/infra @elastic/infra-monitoring-ui +/x-pack/plugins/infra/server/routes @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/server/routes/log_analysis @elastic/obs-ux-logs-team +/x-pack/plugins/infra/server/routes/log_alerts @elastic/obs-ux-logs-team +/x-pack/plugins/infra/server/saved_objects/metrics_explorer_view @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/server/saved_objects/inventory_view @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/server/services @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/server/services/rules @elastic/obs-ux-infra_services-team @elastic/obs-ux-logs-team +/x-pack/plugins/infra/server/lib @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/server/lib/log_analysis @elastic/obs-ux-logs-team +/x-pack/plugins/infra/docs/state_machines @elastic/obs-ux-logs-team +/x-pack/plugins/infra/common/inventory_models @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/common/http_api/metrics_api.ts @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/common/http_api/snapshot_api.ts @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/common/http_api/log_analysis @elastic/obs-ux-logs-team +/x-pack/plugins/infra/common/http_api/metrics_explorer_views @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/common/http_api/host_details @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/common/http_api/log_alerts @elastic/obs-ux-logs-team +/x-pack/plugins/infra/common/snapshot_metric_i18n.ts @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/common/inventory_views @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/common/color_palette.test.ts @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/common/performance_tracing.ts @elastic/obs-ux-logs-team +/x-pack/plugins/infra/common/log_search_summary @elastic/obs-ux-logs-team +/x-pack/plugins/infra/common/metrics_sources @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/common/saved_views @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/common/infra_ml @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/common/formatters @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/common/log_text_scale @elastic/obs-ux-logs-team +/x-pack/plugins/infra/common/log_analysis @elastic/obs-ux-logs-team +/x-pack/plugins/infra/common/search_strategies/log_entries @elastic/obs-ux-logs-team +/x-pack/plugins/infra/common/metrics_explorer_views @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/common/source_configuration @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/common/color_palette.ts @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/common/log_search_result @elastic/obs-ux-logs-team +/x-pack/plugins/infra/public/apps/logs_app.tsx @elastic/obs-ux-logs-team +/x-pack/plugins/infra/public/apps/metrics_app.tsx @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/public/components/lens @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/public/components/try_it_button.tsx @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/public/components/fixed_datepicker.tsx +/x-pack/plugins/infra/public/components/logging @elastic/obs-ux-logs-team +/x-pack/plugins/infra/public/components/infrastructure_node_metrics_tables @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/public/components/saved_views @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/public/components/feature_feedback_button.tsx @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/public/components/log_stream @elastic/obs-ux-logs-team +/x-pack/plugins/infra/public/components/source_configuration @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/public/components/asset_details @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/public/containers/logs @elastic/obs-ux-logs-team +/x-pack/plugins/infra/public/containers/metrics_source @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/public/containers/metrics_explorer @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/public/containers/ml @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/public/pages/logs @elastic/obs-ux-logs-team +/x-pack/plugins/infra/public/pages/metrics @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/public/common @elastic/obs-ux-infra_services-team +/x-pack/plugins/infra/public/observability_logs @elastic/obs-ux-logs-team +/x-pack/plugins/infra/public/services @elastic/obs-ux-infra_services-team +/x-pack/test/functional/apps/infra @elastic/infra-monitoring-ui @elastic/obs-ux-infra_services-team @elastic/obs-ux-logs-team +/x-pack/test/api_integration/apis/infra @elastic/infra-monitoring-ui @elastic/obs-ux-infra_services-team + +# Actionable observability +x-pack/packages/observability/alert_details @elastic/obs-ux-management-team +x-pack/test/observability_functional @elastic/obs-ux-management-team +x-pack/plugins/infra/public/alerting @elastic/obs-ux-management-team +x-pack/plugins/infra/server/lib/alerting @elastic/obs-ux-management-team # Elastic Stack Monitoring -/x-pack/test/functional/apps/monitoring @elastic/infra-monitoring-ui -/x-pack/test/api_integration/apis/monitoring @elastic/infra-monitoring-ui -/x-pack/test/api_integration/apis/monitoring_collection @elastic/infra-monitoring-ui -/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer @elastic/infra-monitoring-ui +/x-pack/test/functional/apps/monitoring @elastic/obs-ux-infra_services-team +/x-pack/test/api_integration/apis/monitoring @elastic/obs-ux-infra_services-team +/x-pack/test/api_integration/apis/monitoring_collection @elastic/obs-ux-infra_services-team +/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer @elastic/obs-ux-logs-team # Fleet /fleet_packages.json @elastic/fleet @@ -955,29 +1010,27 @@ x-pack/plugins/infra/server/lib/alerting @elastic/actionable-observability /x-pack/plugins/fleet/server/services/elastic_agent_manifest.ts @elastic/fleet @elastic/obs-cloudnative-monitoring # APM -/x-pack/test/functional/apps/apm/ @elastic/apm-ui -/x-pack/test/apm_api_integration/ @elastic/apm-ui +/x-pack/test/functional/apps/apm/ @elastic/obs-ux-infra_services-team +/x-pack/test/apm_api_integration/ @elastic/obs-ux-infra_services-team /src/apm.js @elastic/kibana-core @vigneshshanmugam -/src/core/types/elasticsearch @elastic/apm-ui /packages/kbn-utility-types/src/dot.ts @dgieselaar /packages/kbn-utility-types/src/dot_test.ts @dgieselaar #CC# /src/plugins/apm_oss/ @elastic/apm-ui #CC# /x-pack/plugins/observability/ @elastic/apm-ui # Uptime -/x-pack/test/functional_with_es_ssl/apps/discover_ml_uptime/uptime/ @elastic/uptime -/x-pack/test/functional/apps/uptime @elastic/uptime -/x-pack/test/functional/es_archives/uptime @elastic/uptime -/x-pack/test/functional/services/uptime @elastic/uptime -/x-pack/test/api_integration/apis/uptime @elastic/uptime -/x-pack/test/api_integration/apis/synthetics @elastic/uptime -/x-pack/test/alerting_api_integration/observability/synthetics_rule.ts @elastic/uptime -/x-pack/test/alerting_api_integration/observability/index.ts @elastic/uptime - -# Client Side Monitoring / Uptime (lives in APM directories but owned by Uptime) -/x-pack/plugins/apm/public/application/uxApp.tsx @elastic/uptime -/x-pack/plugins/apm/public/components/app/rum_dashboard @elastic/uptime -/x-pack/test/apm_api_integration/tests/csm/ @elastic/uptime +/x-pack/test/functional_with_es_ssl/apps/discover_ml_uptime/uptime/ @elastic/obs-ux-infra_services-team +/x-pack/test/functional/apps/uptime @elastic/obs-ux-infra_services-team +/x-pack/test/functional/es_archives/uptime @elastic/obs-ux-infra_services-team +/x-pack/test/functional/services/uptime @elastic/obs-ux-infra_services-team +/x-pack/test/api_integration/apis/uptime @elastic/obs-ux-infra_services-team +/x-pack/test/api_integration/apis/synthetics @elastic/obs-ux-infra_services-team +/x-pack/test/alerting_api_integration/observability/synthetics_rule.ts @elastic/obs-ux-infra_services-team +/x-pack/test/alerting_api_integration/observability/index.ts @elastic/obs-ux-management-team + +# Logs +/x-pack/test/api_integration/apis/logs_ui @elastic/obs-ux-logs-team +/x-pack/test/functional/apps/observability_log_explorer @elastic/obs-ux-logs-team # Observability onboarding tour /x-pack/plugins/observability_shared/public/components/tour @elastic/platform-onboarding @@ -1118,7 +1171,7 @@ x-pack/plugins/cloud_integrations/cloud_full_story/server/config.ts @elastic/kib # Response Ops team /x-pack/test/alerting_api_integration/ @elastic/response-ops -/x-pack/test/alerting_api_integration/observability @elastic/actionable-observability +/x-pack/test/alerting_api_integration/observability @elastic/obs-ux-management-team /x-pack/test/plugin_api_integration/test_suites/task_manager/ @elastic/response-ops /x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/ @elastic/response-ops /docs/user/alerting/ @elastic/response-ops @@ -1383,9 +1436,9 @@ x-pack/plugins/security_solution/public/entity_analytics @elastic/security-entit x-pack/plugins/security_solution/public/explore/components/risk_score @elastic/security-entity-analytics x-pack/plugins/security_solution/public/overview/pages/entity_analytics.tsx @elastic/security-entity-analytics x-pack/plugins/security_solution/public/overview/components/entity_analytics -x-pack/plugins/security_solution/server/lib/risk_engine @elastic/security-entity-analytics +x-pack/plugins/security_solution/server/lib/entity_analytics @elastic/security-entity-analytics x-pack/plugins/security_solution/server/lib/risk_score @elastic/security-entity-analytics -x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine @elastic/security-entity-analytics +x-pack/test/security_solution_api_integration/test_suites/entity_analytics @elastic/security-entity-analytics # Security Defend Workflows - OSQuery Ownership /x-pack/plugins/security_solution/common/api/detection_engine/model/rule_response_actions @elastic/security-defend-workflows @@ -1440,10 +1493,10 @@ x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_en x-pack/plugins/translations/translations # Profiling api integration testing -x-pack/test/profiling_api_integration @elastic/profiling-ui +x-pack/test/profiling_api_integration @elastic/obs-ux-infra_services-team # Observability shared profiling -x-pack/plugins/observability_shared/public/components/profiling @elastic/profiling-ui +x-pack/plugins/observability_shared/public/components/profiling @elastic/obs-ux-infra_services-team # Shared UX packages/react @elastic/appex-sharedux diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index 79d6bd0fa60b9..344807ea5132d 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions'] --- import actionsObj from './actions.devdocs.json'; diff --git a/api_docs/advanced_settings.mdx b/api_docs/advanced_settings.mdx index 44a00f0166f0f..a2a6b40a9ccdd 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings'] --- import advancedSettingsObj from './advanced_settings.devdocs.json'; diff --git a/api_docs/aiops.mdx b/api_docs/aiops.mdx index e422de610d73c..b46a05e2363df 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops'] --- import aiopsObj from './aiops.devdocs.json'; diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx index 1859dd5070ab5..49ca7191cd276 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting'] --- import alertingObj from './alerting.devdocs.json'; diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx index 34d364d5c708f..36f382bc36132 100644 --- a/api_docs/apm.mdx +++ b/api_docs/apm.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/apm title: "apm" image: https://source.unsplash.com/400x175/?github description: API docs for the apm plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm'] --- import apmObj from './apm.devdocs.json'; The user interface for Elastic APM -Contact [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) for questions regarding this plugin. +Contact [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/apm_data_access.mdx b/api_docs/apm_data_access.mdx index 4c55ddbef4a6d..43d328df9039b 100644 --- a/api_docs/apm_data_access.mdx +++ b/api_docs/apm_data_access.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/apmDataAccess title: "apmDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the apmDataAccess plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apmDataAccess'] --- import apmDataAccessObj from './apm_data_access.devdocs.json'; -Contact [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) for questions regarding this plugin. +Contact [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/asset_manager.mdx b/api_docs/asset_manager.mdx index 9568bf251bc9e..4e295dca50997 100644 --- a/api_docs/asset_manager.mdx +++ b/api_docs/asset_manager.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/assetManager title: "assetManager" image: https://source.unsplash.com/400x175/?github description: API docs for the assetManager plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'assetManager'] --- import assetManagerObj from './asset_manager.devdocs.json'; Asset manager plugin for entity assets (inventory, topology, etc) -Contact [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) for questions regarding this plugin. +Contact [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/banners.mdx b/api_docs/banners.mdx index 2dd3a8887fbb3..ec9c5e5473002 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: 2023-11-08 +date: 2023-11-09 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 d01a5bc56ceb2..89cf976b4622f 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: 2023-11-08 +date: 2023-11-09 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 07a40c88b70ff..060faaa44edc3 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: 2023-11-08 +date: 2023-11-09 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 f56bf681095d5..fb10c175a2302 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: 2023-11-08 +date: 2023-11-09 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 d83fd0a309ebb..629ce39be1ef5 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: 2023-11-08 +date: 2023-11-09 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 b9ad19ac77d87..cb2127c8505ea 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: 2023-11-08 +date: 2023-11-09 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 169fc52d24c6e..f8abeae02963f 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: 2023-11-08 +date: 2023-11-09 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 0d68c1ca6b37d..09026ff0f4476 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDefend'] --- import cloudDefendObj from './cloud_defend.devdocs.json'; diff --git a/api_docs/cloud_experiments.mdx b/api_docs/cloud_experiments.mdx index fdb390397d55d..81474e3ab7ca8 100644 --- a/api_docs/cloud_experiments.mdx +++ b/api_docs/cloud_experiments.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudExperiments title: "cloudExperiments" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudExperiments plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudExperiments'] --- import cloudExperimentsObj from './cloud_experiments.devdocs.json'; diff --git a/api_docs/cloud_security_posture.mdx b/api_docs/cloud_security_posture.mdx index ba43b8f94128a..fe937c723cc0a 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: 2023-11-08 +date: 2023-11-09 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 5e8772c46442e..f0d0e702a2b4d 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: 2023-11-08 +date: 2023-11-09 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 7c252dda48602..db12cae107313 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: 2023-11-08 +date: 2023-11-09 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 f71b80f9e3133..7572819ba54e9 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: 2023-11-08 +date: 2023-11-09 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 ea304526bc949..8d6cfaa78fa05 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'customIntegrations'] --- import customIntegrationsObj from './custom_integrations.devdocs.json'; diff --git a/api_docs/dashboard.mdx b/api_docs/dashboard.mdx index b1a644f20ecea..6536f0bb6f0e0 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboard'] --- import dashboardObj from './dashboard.devdocs.json'; diff --git a/api_docs/dashboard_enhanced.mdx b/api_docs/dashboard_enhanced.mdx index 09fcce9230843..4d436399dd6ff 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: 2023-11-08 +date: 2023-11-09 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 c18cddf26542a..16b5857c07cf0 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data'] --- import dataObj from './data.devdocs.json'; diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx index f6ce269957b10..be2d9d8750f93 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: 2023-11-08 +date: 2023-11-09 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 415ada7e5549a..df638dcf093d7 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.search'] --- import dataSearchObj from './data_search.devdocs.json'; diff --git a/api_docs/data_view_editor.mdx b/api_docs/data_view_editor.mdx index ec50a49ed74a2..3d2e9d06d22b2 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: 2023-11-08 +date: 2023-11-09 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 9d6d93896bbd1..8a627881d8e25 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: 2023-11-08 +date: 2023-11-09 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 0605f38e81386..86532f795550d 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: 2023-11-08 +date: 2023-11-09 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 ca93120bad1d7..6a72170ca2eb8 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: 2023-11-08 +date: 2023-11-09 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 a5e2190da91db..d11bb66eedd7c 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataVisualizer'] --- import dataVisualizerObj from './data_visualizer.devdocs.json'; diff --git a/api_docs/deprecations_by_api.mdx b/api_docs/deprecations_by_api.mdx index 78ea09c4352cc..995d749149255 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index 50b5e97ce8b63..f528f151cc6b3 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index 30026b7232aca..9a9ef2e3a32af 100644 --- a/api_docs/deprecations_by_team.mdx +++ b/api_docs/deprecations_by_team.mdx @@ -7,22 +7,11 @@ 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- -## @elastic/apm-ui - -| Plugin | Deprecated API | Reference location(s) | Remove By | -| --------|-------|-----------|-----------| -| apm | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/public/plugin.ts#:~:text=environment) | 8.8.0 | -| apm | | [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode)+ 2 more | 8.8.0 | -| apm | | [license_context.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/public/context/license/license_context.tsx#:~:text=license%24) | 8.8.0 | -| apm | | [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode)+ 2 more | 8.8.0 | - - - ## @elastic/appex-sharedux | Plugin | Deprecated API | Reference location(s) | Remove By | @@ -124,21 +113,24 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ -## @elastic/platform-deployment-management +## @elastic/obs-ux-infra_services-team | Plugin | Deprecated API | Reference location(s) | Remove By | | --------|-------|-----------|-----------| -| indexLifecycleManagement | | [license.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/index_lifecycle_management/server/services/license.ts#:~:text=license%24), [reindex_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.ts#:~:text=license%24), [reindex_service.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts#:~:text=license%24), [reindex_service.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts#:~:text=license%24), [license.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/painless_lab/server/services/license.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/remote_clusters/server/plugin.ts#:~:text=license%24), [license.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/rollup/server/services/license.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/searchprofiler/server/plugin.ts#:~:text=license%24), [license.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/snapshot_restore/server/services/license.ts#:~:text=license%24) | 8.8.0 | -| management | | [application.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/management/public/application.tsx#:~:text=appBasePath) | 8.8.0 | -| licenseManagement | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/license_management/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cross_cluster_replication/public/plugin.ts#:~:text=license%24), [plugin.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/painless_lab/public/plugin.tsx#:~:text=license%24), [plugin.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/painless_lab/public/plugin.tsx#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/searchprofiler/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/searchprofiler/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/watcher/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/watcher/public/plugin.ts#:~:text=license%24) | 8.8.0 | +| apm | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/public/plugin.ts#:~:text=environment) | 8.8.0 | +| apm | | [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode)+ 2 more | 8.8.0 | +| apm | | [license_context.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/public/context/license/license_context.tsx#:~:text=license%24), [license_context.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/profiling/public/components/contexts/license/license_context.tsx#:~:text=license%24) | 8.8.0 | +| apm | | [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/apm/common/license_check.test.ts#:~:text=mode)+ 2 more | 8.8.0 | -## @elastic/profiling-ui +## @elastic/platform-deployment-management | Plugin | Deprecated API | Reference location(s) | Remove By | | --------|-------|-----------|-----------| -| profiling | | [license_context.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/profiling/public/components/contexts/license/license_context.tsx#:~:text=license%24) | 8.8.0 | +| indexLifecycleManagement | | [license.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/index_lifecycle_management/server/services/license.ts#:~:text=license%24), [reindex_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.ts#:~:text=license%24), [reindex_service.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts#:~:text=license%24), [reindex_service.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts#:~:text=license%24), [license.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/painless_lab/server/services/license.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/remote_clusters/server/plugin.ts#:~:text=license%24), [license.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/rollup/server/services/license.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/searchprofiler/server/plugin.ts#:~:text=license%24), [license.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/snapshot_restore/server/services/license.ts#:~:text=license%24) | 8.8.0 | +| management | | [application.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/management/public/application.tsx#:~:text=appBasePath) | 8.8.0 | +| licenseManagement | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/license_management/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cross_cluster_replication/public/plugin.ts#:~:text=license%24), [plugin.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/painless_lab/public/plugin.tsx#:~:text=license%24), [plugin.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/painless_lab/public/plugin.tsx#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/searchprofiler/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/searchprofiler/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/watcher/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/watcher/public/plugin.ts#:~:text=license%24) | 8.8.0 | diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index 6656244a0d104..8d49eb79c439b 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'devTools'] --- import devToolsObj from './dev_tools.devdocs.json'; diff --git a/api_docs/discover.mdx b/api_docs/discover.mdx index 103a4765aef64..618da8875e9b3 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: 2023-11-08 +date: 2023-11-09 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 67b7c83a7d522..eee34b2859336 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverEnhanced'] --- import discoverEnhancedObj from './discover_enhanced.devdocs.json'; diff --git a/api_docs/ecs_data_quality_dashboard.mdx b/api_docs/ecs_data_quality_dashboard.mdx index f48f60612e27b..be96ff59a2a9a 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ecsDataQualityDashboard'] --- import ecsDataQualityDashboardObj from './ecs_data_quality_dashboard.devdocs.json'; diff --git a/api_docs/elastic_assistant.mdx b/api_docs/elastic_assistant.mdx index cd980e046c0b5..15322b822d1b7 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'elasticAssistant'] --- import elasticAssistantObj from './elastic_assistant.devdocs.json'; diff --git a/api_docs/embeddable.mdx b/api_docs/embeddable.mdx index 761f141445842..67453a2a6274a 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: 2023-11-08 +date: 2023-11-09 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 3c59f403f5dba..79ecd24c1f144 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: 2023-11-08 +date: 2023-11-09 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 cab0585e6f537..2a8eb0f2160f0 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: 2023-11-08 +date: 2023-11-09 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 a48018513198b..a4eb4e7f8058c 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'enterpriseSearch'] --- import enterpriseSearchObj from './enterprise_search.devdocs.json'; diff --git a/api_docs/es_ui_shared.mdx b/api_docs/es_ui_shared.mdx index 11688ce74c56b..9979fcc1f61f3 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esUiShared'] --- import esUiSharedObj from './es_ui_shared.devdocs.json'; diff --git a/api_docs/event_annotation.mdx b/api_docs/event_annotation.mdx index 78a694fa803ca..0be3ead51ad11 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: 2023-11-08 +date: 2023-11-09 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 64c97d517c370..77cb65e69eb63 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotationListing'] --- import eventAnnotationListingObj from './event_annotation_listing.devdocs.json'; diff --git a/api_docs/event_log.mdx b/api_docs/event_log.mdx index 8cd31aeb6d5fb..e298adbb072d3 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: 2023-11-08 +date: 2023-11-09 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 f9297e12ab770..3975741a49658 100644 --- a/api_docs/exploratory_view.mdx +++ b/api_docs/exploratory_view.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/exploratoryView title: "exploratoryView" image: https://source.unsplash.com/400x175/?github description: API docs for the exploratoryView plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'exploratoryView'] --- import exploratoryViewObj from './exploratory_view.devdocs.json'; -Contact [@elastic/uptime](https://github.com/orgs/elastic/teams/uptime) for questions regarding this plugin. +Contact [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/expression_error.mdx b/api_docs/expression_error.mdx index 6745796a8aa5e..a53b896de90c4 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: 2023-11-08 +date: 2023-11-09 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 764e58d2003fd..e10c8812bc694 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: 2023-11-08 +date: 2023-11-09 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 85bf89ece8e81..4f529919ee788 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: 2023-11-08 +date: 2023-11-09 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 adac11ffaecf4..21ede27908cd7 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: 2023-11-08 +date: 2023-11-09 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 7326d0fdf5254..d718a25a26886 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: 2023-11-08 +date: 2023-11-09 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 a97eb757de584..ca69ef9c730d7 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: 2023-11-08 +date: 2023-11-09 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 983544c21cbc2..4ad0d0a4b033e 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: 2023-11-08 +date: 2023-11-09 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 bb7c2b81099fe..1819769eca519 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: 2023-11-08 +date: 2023-11-09 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 b4e3e9c43d205..3b7997d5148be 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: 2023-11-08 +date: 2023-11-09 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 1ed61db0bee17..80b6090ec9bf5 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: 2023-11-08 +date: 2023-11-09 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 13b1d9d3eae4e..7c9035dc1a25c 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: 2023-11-08 +date: 2023-11-09 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 c8da9bcbc5653..23217edcda655 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: 2023-11-08 +date: 2023-11-09 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 8884fde4b0f67..f2936e776b367 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: 2023-11-08 +date: 2023-11-09 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 c1553755bfd99..70bcc3329a001 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressions'] --- import expressionsObj from './expressions.devdocs.json'; diff --git a/api_docs/features.mdx b/api_docs/features.mdx index e46a389eb5773..8ea88f0467676 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'features'] --- import featuresObj from './features.devdocs.json'; diff --git a/api_docs/field_formats.mdx b/api_docs/field_formats.mdx index 7f14f33cdb14c..014df4a3c1505 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldFormats'] --- import fieldFormatsObj from './field_formats.devdocs.json'; diff --git a/api_docs/file_upload.mdx b/api_docs/file_upload.mdx index e980892f16f03..5ba13004e76a8 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: 2023-11-08 +date: 2023-11-09 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 30db3006ece2f..7c95c19951cd1 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: 2023-11-08 +date: 2023-11-09 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 f8533e2f32778..805bdaedf80fa 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'filesManagement'] --- import filesManagementObj from './files_management.devdocs.json'; diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index 862b1632b122e..2f28930fda786 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fleet'] --- import fleetObj from './fleet.devdocs.json'; diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx index 251cfddacc854..4e352ea4f03fa 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: 2023-11-08 +date: 2023-11-09 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 e219e64d767f7..dfb72c9c2c124 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: 2023-11-08 +date: 2023-11-09 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 37cd4ae02e441..b2f93eb65a44a 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: 2023-11-08 +date: 2023-11-09 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 3c969b2ab4ad2..3a530c412f322 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: 2023-11-08 +date: 2023-11-09 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 58b67e713ea3e..85294a9426301 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: 2023-11-08 +date: 2023-11-09 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 a34321ff0f302..876f2111604fd 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexManagement'] --- import indexManagementObj from './index_management.devdocs.json'; diff --git a/api_docs/infra.mdx b/api_docs/infra.mdx index 4a367d304312d..957dc08aa1338 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'infra'] --- import infraObj from './infra.devdocs.json'; diff --git a/api_docs/inspector.mdx b/api_docs/inspector.mdx index 0c87a6b713ba3..b019ca0c0d407 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'inspector'] --- import inspectorObj from './inspector.devdocs.json'; diff --git a/api_docs/interactive_setup.mdx b/api_docs/interactive_setup.mdx index c26104ac0a39f..a48ffe71377ff 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'interactiveSetup'] --- import interactiveSetupObj from './interactive_setup.devdocs.json'; diff --git a/api_docs/kbn_ace.mdx b/api_docs/kbn_ace.mdx index ad0216b320304..a2c63e47c48bc 100644 --- a/api_docs/kbn_ace.mdx +++ b/api_docs/kbn_ace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ace title: "@kbn/ace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ace plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ace'] --- import kbnAceObj from './kbn_ace.devdocs.json'; diff --git a/api_docs/kbn_aiops_components.mdx b/api_docs/kbn_aiops_components.mdx index 6f604c920df97..15311fe69a911 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-components'] --- import kbnAiopsComponentsObj from './kbn_aiops_components.devdocs.json'; diff --git a/api_docs/kbn_aiops_utils.mdx b/api_docs/kbn_aiops_utils.mdx index 98ea735696860..c5dd7d818cbfa 100644 --- a/api_docs/kbn_aiops_utils.mdx +++ b/api_docs/kbn_aiops_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-utils title: "@kbn/aiops-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-utils plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-utils'] --- import kbnAiopsUtilsObj from './kbn_aiops_utils.devdocs.json'; diff --git a/api_docs/kbn_alerting_api_integration_helpers.mdx b/api_docs/kbn_alerting_api_integration_helpers.mdx index 12045a0c02eb3..ce2735b7c321f 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-api-integration-helpers'] --- import kbnAlertingApiIntegrationHelpersObj from './kbn_alerting_api_integration_helpers.devdocs.json'; diff --git a/api_docs/kbn_alerting_state_types.mdx b/api_docs/kbn_alerting_state_types.mdx index db10981e828b7..e4298d6fbd707 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-state-types'] --- import kbnAlertingStateTypesObj from './kbn_alerting_state_types.devdocs.json'; diff --git a/api_docs/kbn_alerts_as_data_utils.mdx b/api_docs/kbn_alerts_as_data_utils.mdx index 1594f03974d54..7ce321468cc4c 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-as-data-utils'] --- import kbnAlertsAsDataUtilsObj from './kbn_alerts_as_data_utils.devdocs.json'; diff --git a/api_docs/kbn_alerts_ui_shared.mdx b/api_docs/kbn_alerts_ui_shared.mdx index 28fe525991bc3..8daefe2429c8a 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-ui-shared'] --- import kbnAlertsUiSharedObj from './kbn_alerts_ui_shared.devdocs.json'; diff --git a/api_docs/kbn_analytics.mdx b/api_docs/kbn_analytics.mdx index 92bcb7a2c96ce..a033763e6e021 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics'] --- import kbnAnalyticsObj from './kbn_analytics.devdocs.json'; diff --git a/api_docs/kbn_analytics_client.mdx b/api_docs/kbn_analytics_client.mdx index b4db143e0a9fe..c5c36dbcbe364 100644 --- a/api_docs/kbn_analytics_client.mdx +++ b/api_docs/kbn_analytics_client.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-client title: "@kbn/analytics-client" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-client plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-client'] --- import kbnAnalyticsClientObj from './kbn_analytics_client.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx index 3a13d48ee8e29..b2a3e70841ff3 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-browser title: "@kbn/analytics-shippers-elastic-v3-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-browser plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-browser'] --- import kbnAnalyticsShippersElasticV3BrowserObj from './kbn_analytics_shippers_elastic_v3_browser.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx index 281da92f3e3c8..5d8d8c8b4dd2c 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-common title: "@kbn/analytics-shippers-elastic-v3-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-common plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-common'] --- import kbnAnalyticsShippersElasticV3CommonObj from './kbn_analytics_shippers_elastic_v3_common.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx index 48d7861866496..5115b70e1e2da 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-server title: "@kbn/analytics-shippers-elastic-v3-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-server plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-server'] --- import kbnAnalyticsShippersElasticV3ServerObj from './kbn_analytics_shippers_elastic_v3_server.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_fullstory.mdx b/api_docs/kbn_analytics_shippers_fullstory.mdx index d6229e94c02c5..05425f0e2d101 100644 --- a/api_docs/kbn_analytics_shippers_fullstory.mdx +++ b/api_docs/kbn_analytics_shippers_fullstory.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-fullstory title: "@kbn/analytics-shippers-fullstory" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-fullstory plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-fullstory'] --- import kbnAnalyticsShippersFullstoryObj from './kbn_analytics_shippers_fullstory.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_gainsight.mdx b/api_docs/kbn_analytics_shippers_gainsight.mdx index 197bb74e250f7..0437ad348e7cf 100644 --- a/api_docs/kbn_analytics_shippers_gainsight.mdx +++ b/api_docs/kbn_analytics_shippers_gainsight.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-gainsight title: "@kbn/analytics-shippers-gainsight" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-gainsight plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-gainsight'] --- import kbnAnalyticsShippersGainsightObj from './kbn_analytics_shippers_gainsight.devdocs.json'; diff --git a/api_docs/kbn_apm_config_loader.mdx b/api_docs/kbn_apm_config_loader.mdx index 86ea8741dddee..625ef98fdb119 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-config-loader'] --- import kbnApmConfigLoaderObj from './kbn_apm_config_loader.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace.mdx b/api_docs/kbn_apm_synthtrace.mdx index 168efcb3f2e39..1b2fb81f2a42f 100644 --- a/api_docs/kbn_apm_synthtrace.mdx +++ b/api_docs/kbn_apm_synthtrace.mdx @@ -8,14 +8,14 @@ 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace'] --- import kbnApmSynthtraceObj from './kbn_apm_synthtrace.devdocs.json'; -Contact [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) for questions regarding this plugin. +Contact [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_apm_synthtrace_client.mdx b/api_docs/kbn_apm_synthtrace_client.mdx index d7c2d33f3bf52..4d61c4f6fab18 100644 --- a/api_docs/kbn_apm_synthtrace_client.mdx +++ b/api_docs/kbn_apm_synthtrace_client.mdx @@ -8,14 +8,14 @@ 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace-client'] --- import kbnApmSynthtraceClientObj from './kbn_apm_synthtrace_client.devdocs.json'; -Contact [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) for questions regarding this plugin. +Contact [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_apm_utils.mdx b/api_docs/kbn_apm_utils.mdx index 0aaac9c80ad79..b832156bd1b61 100644 --- a/api_docs/kbn_apm_utils.mdx +++ b/api_docs/kbn_apm_utils.mdx @@ -8,14 +8,14 @@ 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-utils'] --- import kbnApmUtilsObj from './kbn_apm_utils.devdocs.json'; -Contact [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) for questions regarding this plugin. +Contact [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_axe_config.mdx b/api_docs/kbn_axe_config.mdx index ca790ede16899..27dbdcf751ae2 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/axe-config'] --- import kbnAxeConfigObj from './kbn_axe_config.devdocs.json'; diff --git a/api_docs/kbn_cases_components.mdx b/api_docs/kbn_cases_components.mdx index 35e560b489fa5..8701661ecf467 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cases-components'] --- import kbnCasesComponentsObj from './kbn_cases_components.devdocs.json'; diff --git a/api_docs/kbn_cell_actions.mdx b/api_docs/kbn_cell_actions.mdx index ff1d8867ba8a5..37f2a6d0685e0 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: 2023-11-08 +date: 2023-11-09 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 108e0b9677253..53739bec858cc 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: 2023-11-08 +date: 2023-11-09 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 5bd4eb8a09f47..4d85786eb2778 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: 2023-11-08 +date: 2023-11-09 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 48deda4b55534..66699c022bf2e 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: 2023-11-08 +date: 2023-11-09 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 43471c74fa4ed..72d6458a84cbb 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: 2023-11-08 +date: 2023-11-09 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 19825ff1f7f95..88cd260cdba64 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: 2023-11-08 +date: 2023-11-09 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 75c795f3d4acf..25001d7c88932 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cli-dev-mode'] --- import kbnCliDevModeObj from './kbn_cli_dev_mode.devdocs.json'; diff --git a/api_docs/kbn_code_editor.mdx b/api_docs/kbn_code_editor.mdx index 08c9371334837..06e29d0b56bdc 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-editor'] --- import kbnCodeEditorObj from './kbn_code_editor.devdocs.json'; diff --git a/api_docs/kbn_coloring.mdx b/api_docs/kbn_coloring.mdx index b157724e74836..4c6dfc56b99a1 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: 2023-11-08 +date: 2023-11-09 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 1fce8782a8b23..94475d709e84f 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: 2023-11-08 +date: 2023-11-09 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 b7770f070b0de..64c3cc5137f45 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: 2023-11-08 +date: 2023-11-09 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 9d451640efb4d..beaa056668544 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: 2023-11-08 +date: 2023-11-09 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 6e027fc66b3f0..3e3e8f72664ae 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-content-editor'] --- import kbnContentManagementContentEditorObj from './kbn_content_management_content_editor.devdocs.json'; diff --git a/api_docs/kbn_content_management_tabbed_table_list_view.mdx b/api_docs/kbn_content_management_tabbed_table_list_view.mdx index 76949a818d230..5c86d95ce6cd5 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: 2023-11-08 +date: 2023-11-09 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 c183348f78a88..e4232cd65aea9 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: 2023-11-08 +date: 2023-11-09 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_table.mdx b/api_docs/kbn_content_management_table_list_view_table.mdx index b247c70d504a2..09291f5c2e352 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view-table'] --- import kbnContentManagementTableListViewTableObj from './kbn_content_management_table_list_view_table.devdocs.json'; diff --git a/api_docs/kbn_content_management_utils.mdx b/api_docs/kbn_content_management_utils.mdx index 318efaf95edf3..4697952a480bb 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-utils'] --- import kbnContentManagementUtilsObj from './kbn_content_management_utils.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser.mdx b/api_docs/kbn_core_analytics_browser.mdx index b6993c5dd6235..f03f1cba601c7 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: 2023-11-08 +date: 2023-11-09 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 21b96743400fa..4585636c2c211 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: 2023-11-08 +date: 2023-11-09 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 8fd52869f10f7..0a3597f9d0a24 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-mocks'] --- import kbnCoreAnalyticsBrowserMocksObj from './kbn_core_analytics_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server.mdx b/api_docs/kbn_core_analytics_server.mdx index 720686d39ecf2..f4b16d2ddc9d8 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: 2023-11-08 +date: 2023-11-09 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 820084b6f71d9..2d8b9ea7d93e1 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: 2023-11-08 +date: 2023-11-09 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 7bb49b7dd5fe2..309cf898aa2e4 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-mocks'] --- import kbnCoreAnalyticsServerMocksObj from './kbn_core_analytics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser.mdx b/api_docs/kbn_core_application_browser.mdx index 06487d7ef5fdf..b228a4e9f74a4 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: 2023-11-08 +date: 2023-11-09 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 9aee23e8863ad..8edef60f40ef1 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: 2023-11-08 +date: 2023-11-09 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 7e85a42cef8cb..c2124609bfbab 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: 2023-11-08 +date: 2023-11-09 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 a9cedab78adfc..3d2224725e3ca 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: 2023-11-08 +date: 2023-11-09 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 eabc8a5cfef54..2113da00397ae 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: 2023-11-08 +date: 2023-11-09 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 2ad3bd563556a..207fd4ce683fb 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: 2023-11-08 +date: 2023-11-09 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 445af76da653f..ed4d7be1c47a7 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: 2023-11-08 +date: 2023-11-09 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 360d67cbf935e..8c3b2296b760d 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: 2023-11-08 +date: 2023-11-09 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 af28a47c6f7b7..3258c12ad837e 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: 2023-11-08 +date: 2023-11-09 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 19132a817b6f0..226b664174e92 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: 2023-11-08 +date: 2023-11-09 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 b02e22ea97295..251378b2b4e09 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: 2023-11-08 +date: 2023-11-09 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 43339f74622b9..dde66329fb6b1 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: 2023-11-08 +date: 2023-11-09 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 59e11f0fd8c4e..3a8dbb54075e8 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: 2023-11-08 +date: 2023-11-09 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 0f6258cb2016c..e749a37ace742 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: 2023-11-08 +date: 2023-11-09 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 b9239326dd787..190228528e7e9 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server-mocks'] --- import kbnCoreCapabilitiesServerMocksObj from './kbn_core_capabilities_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser.mdx b/api_docs/kbn_core_chrome_browser.mdx index e4d2da5afb2b1..c5954ad61a0ec 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: 2023-11-08 +date: 2023-11-09 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 df3f158fbc6d2..11cbf264304a2 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: 2023-11-08 +date: 2023-11-09 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 4fce0e412c7e1..429593f78c724 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: 2023-11-08 +date: 2023-11-09 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 3c331525f6809..5aaf838342d34 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: 2023-11-08 +date: 2023-11-09 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 1a185fec94c7c..25d3faad0703d 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: 2023-11-08 +date: 2023-11-09 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 f3752b9d4225c..5bd0dbea761bd 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: 2023-11-08 +date: 2023-11-09 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 f6376e4546fe2..080a8fdce04f0 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: 2023-11-08 +date: 2023-11-09 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 898ce905acd3e..e93316cc35426 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: 2023-11-08 +date: 2023-11-09 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 5e1641b3b4ce5..46b6f7575f58a 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: 2023-11-08 +date: 2023-11-09 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 9c49112e25eb4..37ec8ad4f5499 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: 2023-11-08 +date: 2023-11-09 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 52fbc00a463e4..61f0b0dc8e2c0 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: 2023-11-08 +date: 2023-11-09 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 f70d8cd177327..2fc417d17b8be 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: 2023-11-08 +date: 2023-11-09 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 d7d419049e986..07c42501f61cd 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: 2023-11-08 +date: 2023-11-09 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 8c66e31679dd6..44bd5f23b2bb7 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: 2023-11-08 +date: 2023-11-09 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 a04eec2e92756..93633492d4228 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: 2023-11-08 +date: 2023-11-09 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 0705fbc91ac14..692a0e89b64df 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: 2023-11-08 +date: 2023-11-09 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 f7c350cceef81..42794fb65bbde 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: 2023-11-08 +date: 2023-11-09 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 a48105d6c1def..6ad48246e6314 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: 2023-11-08 +date: 2023-11-09 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 15737ed45ca32..635ad66568bdb 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: 2023-11-08 +date: 2023-11-09 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 e940f9c36bc1c..92987ba43d591 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: 2023-11-08 +date: 2023-11-09 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 a11a18a78927d..edfe0586a4ace 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: 2023-11-08 +date: 2023-11-09 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 f6a1de48a3a2f..91236179b066a 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: 2023-11-08 +date: 2023-11-09 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 3db04e475fe16..df2e2045c3235 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-mocks'] --- import kbnCoreElasticsearchClientServerMocksObj from './kbn_core_elasticsearch_client_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server.mdx b/api_docs/kbn_core_elasticsearch_server.mdx index bdc93099433aa..cf4e0a5bc2f0a 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: 2023-11-08 +date: 2023-11-09 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 5b5f1885bd4f7..e268cce98dab0 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: 2023-11-08 +date: 2023-11-09 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 8c53db8ab16de..2b8f0360f08f6 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: 2023-11-08 +date: 2023-11-09 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 a905ad90009e6..c31fe4d79fc8d 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: 2023-11-08 +date: 2023-11-09 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 7e2dc38cf39ba..35437dde95171 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: 2023-11-08 +date: 2023-11-09 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 6ec1c848a1f65..eea3f43d0a6fa 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: 2023-11-08 +date: 2023-11-09 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 d69ae9d51c8d0..405e300256fb4 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: 2023-11-08 +date: 2023-11-09 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 36ba5fd37735c..ad6333fe15333 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: 2023-11-08 +date: 2023-11-09 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 d94e85a4bbe86..ae89b5cf1f34e 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: 2023-11-08 +date: 2023-11-09 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 9f6f369cb1972..467dd5ecf0ddf 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: 2023-11-08 +date: 2023-11-09 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 e9faf33a59e14..1f5b0c1ff55fe 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: 2023-11-08 +date: 2023-11-09 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 b73a910433022..89815876f5e6d 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: 2023-11-08 +date: 2023-11-09 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 c2a7abefd9840..80e7d4a98e8a8 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: 2023-11-08 +date: 2023-11-09 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 85f47ce51191d..e72d91c4c4c5f 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser-mocks'] --- import kbnCoreFatalErrorsBrowserMocksObj from './kbn_core_fatal_errors_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser.mdx b/api_docs/kbn_core_http_browser.mdx index c75ce0f5d0eb4..29a11eb7c331b 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: 2023-11-08 +date: 2023-11-09 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 d3d2f417ec826..18c7fa52fe179 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: 2023-11-08 +date: 2023-11-09 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 8edcbc801a845..9fd700842c09b 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: 2023-11-08 +date: 2023-11-09 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 e056393523f12..26a2d106a963c 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: 2023-11-08 +date: 2023-11-09 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 e275039ec9dd1..8e5d98c54213f 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: 2023-11-08 +date: 2023-11-09 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 5e42ba2adb3ad..91eff09d50d38 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: 2023-11-08 +date: 2023-11-09 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 7cb9b3f4c43c2..74c361a888122 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: 2023-11-08 +date: 2023-11-09 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 c5b8eb9691b3f..48615d2a8dfab 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: 2023-11-08 +date: 2023-11-09 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 5ca730bd160c8..8aed458d214d9 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: 2023-11-08 +date: 2023-11-09 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 3ffc8b3a40ace..385daee249506 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: 2023-11-08 +date: 2023-11-09 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 0b87716d3456b..b2a59e0bcb5e0 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: 2023-11-08 +date: 2023-11-09 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.mdx b/api_docs/kbn_core_http_server.mdx index 887fb1948733a..b5a6ed17e9528 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: 2023-11-08 +date: 2023-11-09 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 32aa75e78a3ac..1a321803586a3 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: 2023-11-08 +date: 2023-11-09 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 f8b1715a07cee..592a487137d7c 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-mocks'] --- import kbnCoreHttpServerMocksObj from './kbn_core_http_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_browser.mdx b/api_docs/kbn_core_i18n_browser.mdx index 9d425fba47514..4fd9d08f9048e 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: 2023-11-08 +date: 2023-11-09 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 000e1f4ad4a83..6c59ee7599e21 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: 2023-11-08 +date: 2023-11-09 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 43caace10e66a..a58614974cf24 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: 2023-11-08 +date: 2023-11-09 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 84b82148c8811..5d0a734d1b2c3 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: 2023-11-08 +date: 2023-11-09 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 6a8d8ae1df4d6..24b0478a8aa73 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: 2023-11-08 +date: 2023-11-09 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 3878f4e4a96bd..ffada5d962a97 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: 2023-11-08 +date: 2023-11-09 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 d456155e56941..c09b4ee600d1f 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: 2023-11-08 +date: 2023-11-09 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 36a6abca5a436..b5e6516038802 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: 2023-11-08 +date: 2023-11-09 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 ab04ddf9a64c9..11d14be91b38d 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: 2023-11-08 +date: 2023-11-09 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 4898e64944c2c..23308f7893c9a 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: 2023-11-08 +date: 2023-11-09 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 d5246151aa7a4..88f1f242d9b8d 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: 2023-11-08 +date: 2023-11-09 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 46d3f3371c556..3cdf970e13a61 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: 2023-11-08 +date: 2023-11-09 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 ad6e89d7c74a0..1435a3b8801a7 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: 2023-11-08 +date: 2023-11-09 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 4e21f4a5ac946..d70a9d0840daf 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: 2023-11-08 +date: 2023-11-09 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 269b53c80f27c..c95657c8f9cb9 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: 2023-11-08 +date: 2023-11-09 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 aaf8ee0a2fbb5..99d1cc738688f 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: 2023-11-08 +date: 2023-11-09 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 dab3d30bc864c..480dda23e0e6e 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: 2023-11-08 +date: 2023-11-09 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 e96f50fb4ca83..d7beed8118214 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: 2023-11-08 +date: 2023-11-09 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 25b363454cf5a..d8e4327951340 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: 2023-11-08 +date: 2023-11-09 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 7748399fa5f78..79fedf5392ea3 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: 2023-11-08 +date: 2023-11-09 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 a1bf7011c0d56..692fcb3d4a911 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: 2023-11-08 +date: 2023-11-09 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 c4f03c8095bc5..2a600df292c2d 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: 2023-11-08 +date: 2023-11-09 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 c74d96659a3fb..b69b9f631f062 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: 2023-11-08 +date: 2023-11-09 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 e86898b07e98e..b1ca302842941 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: 2023-11-08 +date: 2023-11-09 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 8f761ad9f0683..02b282f2f033b 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: 2023-11-08 +date: 2023-11-09 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 84fe11dc540e9..781da4845e02f 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: 2023-11-08 +date: 2023-11-09 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 19d6f406b8bfd..d6337b83c13dc 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: 2023-11-08 +date: 2023-11-09 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 f9d25a4dcee42..800a3fb3d73bc 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: 2023-11-08 +date: 2023-11-09 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 3277bf01e2fa2..25e8a18ef474d 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: 2023-11-08 +date: 2023-11-09 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 2c69933c0b735..78b799734d2f3 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: 2023-11-08 +date: 2023-11-09 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 2674634a617ad..8d4e9411e5381 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: 2023-11-08 +date: 2023-11-09 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 e58442e08efca..859828d6f64a3 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: 2023-11-08 +date: 2023-11-09 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 c25380c04384b..cdfe21e88848e 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: 2023-11-08 +date: 2023-11-09 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 1c58cca9a11e4..79f333e28c616 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: 2023-11-08 +date: 2023-11-09 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 30ed63bab1822..b10478d876d27 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: 2023-11-08 +date: 2023-11-09 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 28bab30dce5cf..9014806598a62 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: 2023-11-08 +date: 2023-11-09 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 30b2d43304b6d..87a01f07b32da 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: 2023-11-08 +date: 2023-11-09 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 04cf6c17985db..7f85d09a9395d 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: 2023-11-08 +date: 2023-11-09 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 122004ad3981b..d0a262e2a55df 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: 2023-11-08 +date: 2023-11-09 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 50aa9328dc8d1..762b4d0d17ca7 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server-mocks'] --- import kbnCorePrebootServerMocksObj from './kbn_core_preboot_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_browser_mocks.mdx b/api_docs/kbn_core_rendering_browser_mocks.mdx index f6405ee7549a2..ac60d73d17db0 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: 2023-11-08 +date: 2023-11-09 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 1bfab0b145962..07219474b2b0a 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: 2023-11-08 +date: 2023-11-09 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 866389f9d2e23..63ee8075087d6 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: 2023-11-08 +date: 2023-11-09 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 5062d43925dc5..0bb5e523a3f7a 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: 2023-11-08 +date: 2023-11-09 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 2a27057448908..6fbc4a9898fd3 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: 2023-11-08 +date: 2023-11-09 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 afd5aa03b645b..981d23a6e54fc 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: 2023-11-08 +date: 2023-11-09 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 6c23da75e7b71..cf3aa89e27729 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: 2023-11-08 +date: 2023-11-09 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 9594cf99e1f80..41242f7e42e6f 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: 2023-11-08 +date: 2023-11-09 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 aa8f72a0f4c4c..a31114b190341 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: 2023-11-08 +date: 2023-11-09 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 c844745679a3a..33ecafd8a2f88 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: 2023-11-08 +date: 2023-11-09 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 8815a87f2283f..2c58d47cd0780 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: 2023-11-08 +date: 2023-11-09 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 f1cd4f81f240f..e99b3eda698e4 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-mocks'] --- import kbnCoreSavedObjectsBrowserMocksObj from './kbn_core_saved_objects_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_common.mdx b/api_docs/kbn_core_saved_objects_common.mdx index 5ed640fa21782..c47cfaa541254 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: 2023-11-08 +date: 2023-11-09 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 7c4fce3446526..da54e0839ac0a 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: 2023-11-08 +date: 2023-11-09 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 bacfe3767ab4c..75e2c7938710e 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: 2023-11-08 +date: 2023-11-09 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 b6972bd5e2b6b..874ef35853c40 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: 2023-11-08 +date: 2023-11-09 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 0549f5ba24520..7c1f0a84a4b82 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: 2023-11-08 +date: 2023-11-09 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 d3a0d567278fc..18f9948a40385 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: 2023-11-08 +date: 2023-11-09 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 d08c4f2c4b94f..ae89cf3a98457 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: 2023-11-08 +date: 2023-11-09 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 0a4380ca56aa1..19cf620c10cdd 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: 2023-11-08 +date: 2023-11-09 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 af6f99c2484eb..7f8baf121215f 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: 2023-11-08 +date: 2023-11-09 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_status_common.mdx b/api_docs/kbn_core_status_common.mdx index 6cc65d41c4195..bd2c8161f22fa 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common'] --- import kbnCoreStatusCommonObj from './kbn_core_status_common.devdocs.json'; diff --git a/api_docs/kbn_core_status_common_internal.mdx b/api_docs/kbn_core_status_common_internal.mdx index d1aba02e41355..f65f5b44702b3 100644 --- a/api_docs/kbn_core_status_common_internal.mdx +++ b/api_docs/kbn_core_status_common_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common-internal title: "@kbn/core-status-common-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common-internal plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common-internal'] --- import kbnCoreStatusCommonInternalObj from './kbn_core_status_common_internal.devdocs.json'; diff --git a/api_docs/kbn_core_status_server.mdx b/api_docs/kbn_core_status_server.mdx index 5901aaf1f0cd1..b6fe72d41cbe9 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: 2023-11-08 +date: 2023-11-09 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 e7f510246535f..1c89712b97770 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: 2023-11-08 +date: 2023-11-09 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 eab3ba41e0180..2f91a6bbd321a 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: 2023-11-08 +date: 2023-11-09 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 433273d1d1c58..324036600778a 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: 2023-11-08 +date: 2023-11-09 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 a88b019022f70..c5ac2de0d44c9 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: 2023-11-08 +date: 2023-11-09 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 701dfd478b3b9..71aa4202e64e4 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: 2023-11-08 +date: 2023-11-09 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 859eaee6a1937..b364600190736 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: 2023-11-08 +date: 2023-11-09 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 30c2072734aa3..41a80549ed4a7 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: 2023-11-08 +date: 2023-11-09 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 b3adcc6683828..b474db754102a 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: 2023-11-08 +date: 2023-11-09 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 47ddf93ddfa92..7e0524e0b4e24 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: 2023-11-08 +date: 2023-11-09 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 3017e5cd19d48..e36fe42be9c8f 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: 2023-11-08 +date: 2023-11-09 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 26268bfcb3e1a..1b7eb9df4f5ae 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: 2023-11-08 +date: 2023-11-09 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 dce9956fe6907..052412b877fd3 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: 2023-11-08 +date: 2023-11-09 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 18143920c7907..4974df0266f2f 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-mocks'] --- import kbnCoreUiSettingsBrowserMocksObj from './kbn_core_ui_settings_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_common.mdx b/api_docs/kbn_core_ui_settings_common.mdx index 134488dca2650..df5a9e4609162 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: 2023-11-08 +date: 2023-11-09 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 1ff09d1d4d78e..d2090ee39a84b 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: 2023-11-08 +date: 2023-11-09 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 8f18b912ae975..5429bc8d8d372 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: 2023-11-08 +date: 2023-11-09 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 bb3af7b9503e6..db298418a1472 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: 2023-11-08 +date: 2023-11-09 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 6105ca324856d..c69c42d7f1d64 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: 2023-11-08 +date: 2023-11-09 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 b7402f15bb751..0cb78a8d62341 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: 2023-11-08 +date: 2023-11-09 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 ff0a567c8074b..9dd0a5ac598ed 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-mocks'] --- import kbnCoreUsageDataServerMocksObj from './kbn_core_usage_data_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server.mdx b/api_docs/kbn_core_user_settings_server.mdx index e915b7f34e75a..c022b8fcb4da2 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-settings-server'] --- import kbnCoreUserSettingsServerObj from './kbn_core_user_settings_server.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server_internal.mdx b/api_docs/kbn_core_user_settings_server_internal.mdx index a7c4f1d6e7120..63256de70c435 100644 --- a/api_docs/kbn_core_user_settings_server_internal.mdx +++ b/api_docs/kbn_core_user_settings_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-settings-server-internal title: "@kbn/core-user-settings-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-settings-server-internal plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-settings-server-internal'] --- import kbnCoreUserSettingsServerInternalObj from './kbn_core_user_settings_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server_mocks.mdx b/api_docs/kbn_core_user_settings_server_mocks.mdx index 4fadd67ce1fc7..72f0067780b71 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: 2023-11-08 +date: 2023-11-09 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 67b836359a58b..9c7a65a3f50fa 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: 2023-11-08 +date: 2023-11-09 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 4bd349f3de587..86512f12aa6db 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto-browser'] --- import kbnCryptoBrowserObj from './kbn_crypto_browser.devdocs.json'; diff --git a/api_docs/kbn_custom_integrations.mdx b/api_docs/kbn_custom_integrations.mdx index 3fe1b0eed5069..2a7d7cfc9a2f3 100644 --- a/api_docs/kbn_custom_integrations.mdx +++ b/api_docs/kbn_custom_integrations.mdx @@ -8,14 +8,14 @@ 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/custom-integrations'] --- import kbnCustomIntegrationsObj from './kbn_custom_integrations.devdocs.json'; -Contact [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) for questions regarding this plugin. +Contact [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_cypress_config.mdx b/api_docs/kbn_cypress_config.mdx index a3afdeaad02e1..2a89e71bd1453 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cypress-config'] --- import kbnCypressConfigObj from './kbn_cypress_config.devdocs.json'; diff --git a/api_docs/kbn_data_service.mdx b/api_docs/kbn_data_service.mdx index c7ea9616e4f59..a27761f9af1d3 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-service'] --- import kbnDataServiceObj from './kbn_data_service.devdocs.json'; diff --git a/api_docs/kbn_datemath.mdx b/api_docs/kbn_datemath.mdx index 0568c0f3bcdc4..6c718af09f897 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: 2023-11-08 +date: 2023-11-09 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 fe32464a50260..ffeb2daeeb780 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: 2023-11-08 +date: 2023-11-09 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 4f2520d3d0b98..9f6281b9f1e79 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-devtools'] --- import kbnDeeplinksDevtoolsObj from './kbn_deeplinks_devtools.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_management.mdx b/api_docs/kbn_deeplinks_management.mdx index 11f7868fc42ce..54fa9230107c0 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: 2023-11-08 +date: 2023-11-09 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 b6d7cdafdf68f..64cde7b8b9f64 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: 2023-11-08 +date: 2023-11-09 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 cb7bc21a167f0..7ed0fb4cdd708 100644 --- a/api_docs/kbn_deeplinks_observability.mdx +++ b/api_docs/kbn_deeplinks_observability.mdx @@ -8,14 +8,14 @@ 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-observability'] --- import kbnDeeplinksObservabilityObj from './kbn_deeplinks_observability.devdocs.json'; -Contact [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) for questions regarding this plugin. +Contact [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_deeplinks_search.mdx b/api_docs/kbn_deeplinks_search.mdx index 88efedef7468d..bfc0a00c94a8c 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-search'] --- import kbnDeeplinksSearchObj from './kbn_deeplinks_search.devdocs.json'; diff --git a/api_docs/kbn_default_nav_analytics.mdx b/api_docs/kbn_default_nav_analytics.mdx index 51f1bb14d960a..3564a72b28b3b 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: 2023-11-08 +date: 2023-11-09 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 b56317003cc5c..baef54341310e 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: 2023-11-08 +date: 2023-11-09 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 4d60e923a1924..57a8cdcf25502 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: 2023-11-08 +date: 2023-11-09 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 18a40c945e946..43604425a269a 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: 2023-11-08 +date: 2023-11-09 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 bb409e0ab60b3..0772384e49b5f 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: 2023-11-08 +date: 2023-11-09 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 9e86b9fd56748..78bfb054d9de1 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: 2023-11-08 +date: 2023-11-09 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 98323049223a7..c1e919c94c392 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: 2023-11-08 +date: 2023-11-09 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 33a49a8eb1d40..af90c9cbb0e69 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-utils'] --- import kbnDevUtilsObj from './kbn_dev_utils.devdocs.json'; diff --git a/api_docs/kbn_discover_utils.mdx b/api_docs/kbn_discover_utils.mdx index 59bd05e52b2ee..9e7882dc21ea6 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/discover-utils'] --- import kbnDiscoverUtilsObj from './kbn_discover_utils.devdocs.json'; diff --git a/api_docs/kbn_doc_links.mdx b/api_docs/kbn_doc_links.mdx index a6b844ecb2c7e..9e4ac47a3d42a 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: 2023-11-08 +date: 2023-11-09 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 701acd2db161a..79135a09c4981 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: 2023-11-08 +date: 2023-11-09 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 deb2dffe0c509..7147130f2c737 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: 2023-11-08 +date: 2023-11-09 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 bc638ff758be0..5cd81716d3510 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ebt-tools'] --- import kbnEbtToolsObj from './kbn_ebt_tools.devdocs.json'; diff --git a/api_docs/kbn_ecs.mdx b/api_docs/kbn_ecs.mdx index 7f372a2861437..023dec8e101c5 100644 --- a/api_docs/kbn_ecs.mdx +++ b/api_docs/kbn_ecs.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ecs title: "@kbn/ecs" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ecs plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ecs'] --- import kbnEcsObj from './kbn_ecs.devdocs.json'; diff --git a/api_docs/kbn_ecs_data_quality_dashboard.mdx b/api_docs/kbn_ecs_data_quality_dashboard.mdx index 0f799e1de81af..9aff00c50b610 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: 2023-11-08 +date: 2023-11-09 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_assistant.mdx b/api_docs/kbn_elastic_assistant.mdx index aaf8d0984646c..8f9ad3312abef 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-assistant'] --- import kbnElasticAssistantObj from './kbn_elastic_assistant.devdocs.json'; diff --git a/api_docs/kbn_es.mdx b/api_docs/kbn_es.mdx index 8c943d3b493fc..c15a006b986f3 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: 2023-11-08 +date: 2023-11-09 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 5b7a1dbc559b2..acafd621938b4 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: 2023-11-08 +date: 2023-11-09 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 3639a0d26346f..7e93f07ecf8e4 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: 2023-11-08 +date: 2023-11-09 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 c0df38148db3e..21fbf44d6fd8b 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: 2023-11-08 +date: 2023-11-09 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 d62985dfd7f6a..71d80dbbaeab2 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: 2023-11-08 +date: 2023-11-09 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 2dd9d91dc5458..7f965e23722ec 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/eslint-plugin-imports'] --- import kbnEslintPluginImportsObj from './kbn_eslint_plugin_imports.devdocs.json'; diff --git a/api_docs/kbn_event_annotation_common.mdx b/api_docs/kbn_event_annotation_common.mdx index 8ee78d7ed3078..797b7eaa04704 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: 2023-11-08 +date: 2023-11-09 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 ca66104a17d5c..61cb22977f866 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: 2023-11-08 +date: 2023-11-09 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 71f35c33fb24d..498826cd816a6 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: 2023-11-08 +date: 2023-11-09 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 5942741073a49..4fdfeedcedbd7 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: 2023-11-08 +date: 2023-11-09 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 1432c8e6c190a..b4476fbe97ac3 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: 2023-11-08 +date: 2023-11-09 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 4f01caae82aa6..e1cf8f12472d8 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: 2023-11-08 +date: 2023-11-09 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_ftr_common_functional_services.mdx b/api_docs/kbn_ftr_common_functional_services.mdx index 0c039b55f8212..c1df79c08b05d 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: 2023-11-08 +date: 2023-11-09 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_generate.mdx b/api_docs/kbn_generate.mdx index 85dd015f6d898..369182b8e471c 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: 2023-11-08 +date: 2023-11-09 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 0f77ad571695c..85cfae687c98a 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: 2023-11-08 +date: 2023-11-09 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 3ca1a8041f8bb..24f3f32e470ae 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate-csv'] --- import kbnGenerateCsvObj from './kbn_generate_csv.devdocs.json'; diff --git a/api_docs/kbn_generate_csv_types.mdx b/api_docs/kbn_generate_csv_types.mdx index d91b1be1a69af..dc47b2c7bf6d5 100644 --- a/api_docs/kbn_generate_csv_types.mdx +++ b/api_docs/kbn_generate_csv_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate-csv-types title: "@kbn/generate-csv-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate-csv-types plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate-csv-types'] --- import kbnGenerateCsvTypesObj from './kbn_generate_csv_types.devdocs.json'; diff --git a/api_docs/kbn_guided_onboarding.mdx b/api_docs/kbn_guided_onboarding.mdx index 6163541650729..043110457fcd8 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: 2023-11-08 +date: 2023-11-09 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 7cd2e415cb5ce..b95afc2f00419 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: 2023-11-08 +date: 2023-11-09 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 fee7b2349b33b..09f62942cb7c5 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: 2023-11-08 +date: 2023-11-09 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 76edaacf1fa44..bcdeeeb934193 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: 2023-11-08 +date: 2023-11-09 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 f122259677fdb..a308cec0df168 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: 2023-11-08 +date: 2023-11-09 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 887669dd7dc82..f21779633d2f1 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: 2023-11-08 +date: 2023-11-09 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 4215068b0e66f..2adf6f95a4ce9 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: 2023-11-08 +date: 2023-11-09 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 1f9208f6a7188..0bf27604f0f52 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: 2023-11-08 +date: 2023-11-09 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 98eb9a65bb892..fb00b83b24036 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/import-resolver'] --- import kbnImportResolverObj from './kbn_import_resolver.devdocs.json'; diff --git a/api_docs/kbn_infra_forge.mdx b/api_docs/kbn_infra_forge.mdx index ac6c06c6c981f..ec28ed86bc40e 100644 --- a/api_docs/kbn_infra_forge.mdx +++ b/api_docs/kbn_infra_forge.mdx @@ -8,14 +8,14 @@ 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/infra-forge'] --- import kbnInfraForgeObj from './kbn_infra_forge.devdocs.json'; -Contact [@elastic/actionable-observability](https://github.com/orgs/elastic/teams/actionable-observability) for questions regarding this plugin. +Contact [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_interpreter.mdx b/api_docs/kbn_interpreter.mdx index f11396a09a7db..0c0ca1f109dc7 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/interpreter'] --- import kbnInterpreterObj from './kbn_interpreter.devdocs.json'; diff --git a/api_docs/kbn_io_ts_utils.mdx b/api_docs/kbn_io_ts_utils.mdx index f8a4d3ce649de..c1aad9862892c 100644 --- a/api_docs/kbn_io_ts_utils.mdx +++ b/api_docs/kbn_io_ts_utils.mdx @@ -8,14 +8,14 @@ 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/io-ts-utils'] --- import kbnIoTsUtilsObj from './kbn_io_ts_utils.devdocs.json'; -Contact [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) for questions regarding this plugin. +Contact [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_jest_serializers.mdx b/api_docs/kbn_jest_serializers.mdx index 7a0d4830906ae..e1cdc50df24a7 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: 2023-11-08 +date: 2023-11-09 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 86af1e84a1d25..d4a3d6a00e037 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: 2023-11-08 +date: 2023-11-09 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 f7eafdb308342..196a10ce672bf 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/json-ast'] --- import kbnJsonAstObj from './kbn_json_ast.devdocs.json'; diff --git a/api_docs/kbn_kibana_manifest_schema.mdx b/api_docs/kbn_kibana_manifest_schema.mdx index 35b177852a474..e6b680f0c091d 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/kibana-manifest-schema'] --- import kbnKibanaManifestSchemaObj from './kbn_kibana_manifest_schema.devdocs.json'; diff --git a/api_docs/kbn_language_documentation_popover.mdx b/api_docs/kbn_language_documentation_popover.mdx index 2deb7a2fa3ab0..3424b3a134228 100644 --- a/api_docs/kbn_language_documentation_popover.mdx +++ b/api_docs/kbn_language_documentation_popover.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-language-documentation-popover title: "@kbn/language-documentation-popover" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/language-documentation-popover plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/language-documentation-popover'] --- import kbnLanguageDocumentationPopoverObj from './kbn_language_documentation_popover.devdocs.json'; diff --git a/api_docs/kbn_lens_embeddable_utils.mdx b/api_docs/kbn_lens_embeddable_utils.mdx index 095ab28b577a9..ae6fc24cf04e2 100644 --- a/api_docs/kbn_lens_embeddable_utils.mdx +++ b/api_docs/kbn_lens_embeddable_utils.mdx @@ -8,14 +8,14 @@ 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/lens-embeddable-utils'] --- import kbnLensEmbeddableUtilsObj from './kbn_lens_embeddable_utils.devdocs.json'; -Contact [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) for questions regarding this plugin. +Contact [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_logging.mdx b/api_docs/kbn_logging.mdx index abd249b9861f6..ae9fc1be9b75b 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: 2023-11-08 +date: 2023-11-09 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 46c44d5194b9d..af35dffb4465d 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging-mocks'] --- import kbnLoggingMocksObj from './kbn_logging_mocks.devdocs.json'; diff --git a/api_docs/kbn_managed_vscode_config.mdx b/api_docs/kbn_managed_vscode_config.mdx index 77d0231d9136b..5fffd9dbcd279 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/managed-vscode-config'] --- import kbnManagedVscodeConfigObj from './kbn_managed_vscode_config.devdocs.json'; diff --git a/api_docs/kbn_management_cards_navigation.mdx b/api_docs/kbn_management_cards_navigation.mdx index 9a5b2107084c2..c8017ae261963 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: 2023-11-08 +date: 2023-11-09 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 25a1f4c0eee36..e5e1801782e8d 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: 2023-11-08 +date: 2023-11-09 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 51cea3f0354cf..c536c9bd8e5cb 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: 2023-11-08 +date: 2023-11-09 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 4b3e8b1d11ecd..3c50689b4a31c 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: 2023-11-08 +date: 2023-11-09 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 8073070c26cdc..0c51b436c9783 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: 2023-11-08 +date: 2023-11-09 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 72de35943576d..97453d0a366a9 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: 2023-11-08 +date: 2023-11-09 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 c9d6d1273a059..ecddc06a4a595 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-field-definition'] --- import kbnManagementSettingsFieldDefinitionObj from './kbn_management_settings_field_definition.devdocs.json'; diff --git a/api_docs/kbn_management_settings_ids.mdx b/api_docs/kbn_management_settings_ids.mdx index 093f00a741a76..42a30037b9320 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-ids'] --- import kbnManagementSettingsIdsObj from './kbn_management_settings_ids.devdocs.json'; diff --git a/api_docs/kbn_management_settings_section_registry.mdx b/api_docs/kbn_management_settings_section_registry.mdx index 1da482465a39a..0b326ed7a74ce 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: 2023-11-08 +date: 2023-11-09 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 fb9d2e6df2c3e..d51f4f7b070d4 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: 2023-11-08 +date: 2023-11-09 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 8d897d09d1bce..cb635bd73b33f 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: 2023-11-08 +date: 2023-11-09 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 446e951b5c819..860646468f35e 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-storybook-config'] --- import kbnManagementStorybookConfigObj from './kbn_management_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_mapbox_gl.mdx b/api_docs/kbn_mapbox_gl.mdx index 6c0ab70d88f5e..41004ca090223 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: 2023-11-08 +date: 2023-11-09 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 81ceb5c22c163..ca80e400ea05a 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: 2023-11-08 +date: 2023-11-09 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 3390f2aa29ae8..95659db6c6412 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: 2023-11-08 +date: 2023-11-09 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 868dd6f63164d..b2e0c3fae7de3 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: 2023-11-08 +date: 2023-11-09 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_category_validator.mdx b/api_docs/kbn_ml_category_validator.mdx index 18d2649ac7898..e81b3714f2a4e 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: 2023-11-08 +date: 2023-11-09 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 6fd835578117f..35b68daf75f80 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: 2023-11-08 +date: 2023-11-09 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 a4d36a1a7dd17..f393988640f3a 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: 2023-11-08 +date: 2023-11-09 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 62f91772c4620..12114392bbd54 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: 2023-11-08 +date: 2023-11-09 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 744369231b0d4..c88adac289e1d 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: 2023-11-08 +date: 2023-11-09 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 023c7f1a65524..9a31262324cf5 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: 2023-11-08 +date: 2023-11-09 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 f479e3f74bc3b..775b02f93dbbd 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-error-utils'] --- import kbnMlErrorUtilsObj from './kbn_ml_error_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_in_memory_table.mdx b/api_docs/kbn_ml_in_memory_table.mdx index 14bc890beed39..cebadc630cc61 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: 2023-11-08 +date: 2023-11-09 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 f6a2a1a05afc0..3584886326327 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: 2023-11-08 +date: 2023-11-09 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 5b7695907d09d..b37ba6c830c89 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: 2023-11-08 +date: 2023-11-09 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 ed416849c10d1..ff83a10ec6746 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: 2023-11-08 +date: 2023-11-09 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 f9cff23934535..4f7cc343cc372 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: 2023-11-08 +date: 2023-11-09 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 e745c7676de39..1c067471841a1 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: 2023-11-08 +date: 2023-11-09 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 4fe451eec3af0..569c9d6e3075c 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-number-utils'] --- import kbnMlNumberUtilsObj from './kbn_ml_number_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_query_utils.mdx b/api_docs/kbn_ml_query_utils.mdx index 3b8fedf36224e..851e1d6531088 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: 2023-11-08 +date: 2023-11-09 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 fba05a0aa55e0..fc7d88ce69d78 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: 2023-11-08 +date: 2023-11-09 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 c42f3b4ef0369..2eda7fdcea06a 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: 2023-11-08 +date: 2023-11-09 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 6ba50731ad3c1..67b2b74ab291d 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: 2023-11-08 +date: 2023-11-09 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 0251140055373..5b3723deab5da 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-string-hash'] --- import kbnMlStringHashObj from './kbn_ml_string_hash.devdocs.json'; diff --git a/api_docs/kbn_ml_trained_models_utils.mdx b/api_docs/kbn_ml_trained_models_utils.mdx index 7ccabe6a642fb..c17bc909615a7 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: 2023-11-08 +date: 2023-11-09 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_url_state.mdx b/api_docs/kbn_ml_url_state.mdx index 7d3ad89c97e16..caa68e2868c33 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-url-state'] --- import kbnMlUrlStateObj from './kbn_ml_url_state.devdocs.json'; diff --git a/api_docs/kbn_monaco.mdx b/api_docs/kbn_monaco.mdx index 591cca7c47f1c..ae1eb3b17ade9 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: 2023-11-08 +date: 2023-11-09 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 0589f62bcb40e..c330d60337324 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/object-versioning'] --- import kbnObjectVersioningObj from './kbn_object_versioning.devdocs.json'; diff --git a/api_docs/kbn_observability_alert_details.mdx b/api_docs/kbn_observability_alert_details.mdx index a3062145c75e0..7de49dba3bbb3 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-alert-details'] --- import kbnObservabilityAlertDetailsObj from './kbn_observability_alert_details.devdocs.json'; diff --git a/api_docs/kbn_observability_alerting_test_data.mdx b/api_docs/kbn_observability_alerting_test_data.mdx index 4beb02219d6c9..2b516711627c0 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: 2023-11-08 +date: 2023-11-09 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_openapi_generator.mdx b/api_docs/kbn_openapi_generator.mdx index 48da152f6d22a..f60244fdeaf78 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: 2023-11-08 +date: 2023-11-09 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 6a5a0dac93cb0..eb9b6bbb50c6e 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: 2023-11-08 +date: 2023-11-09 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 a4e6f0b6fabe0..c40d043aebd25 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: 2023-11-08 +date: 2023-11-09 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 8e61584fa1f3e..48339da270407 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: 2023-11-08 +date: 2023-11-09 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_performance_testing_dataset_extractor.mdx b/api_docs/kbn_performance_testing_dataset_extractor.mdx index 90348167e8150..6f54e9722e0bd 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: 2023-11-08 +date: 2023-11-09 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_generator.mdx b/api_docs/kbn_plugin_generator.mdx index 1de0809809e3c..5a0d5740a19ce 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: 2023-11-08 +date: 2023-11-09 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 46ccc94006147..e3052a337b23c 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-helpers'] --- import kbnPluginHelpersObj from './kbn_plugin_helpers.devdocs.json'; diff --git a/api_docs/kbn_profiling_utils.mdx b/api_docs/kbn_profiling_utils.mdx index 48576fbc7a32f..08b72c563bc34 100644 --- a/api_docs/kbn_profiling_utils.mdx +++ b/api_docs/kbn_profiling_utils.mdx @@ -8,14 +8,14 @@ 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/profiling-utils'] --- import kbnProfilingUtilsObj from './kbn_profiling_utils.devdocs.json'; -Contact [@elastic/profiling-ui](https://github.com/orgs/elastic/teams/profiling-ui) for questions regarding this plugin. +Contact [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_random_sampling.mdx b/api_docs/kbn_random_sampling.mdx index df3be15b566b9..1d5572853c156 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: 2023-11-08 +date: 2023-11-09 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 e64ea0608ca6f..a48119d797489 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-field'] --- import kbnReactFieldObj from './kbn_react_field.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_common.mdx b/api_docs/kbn_react_kibana_context_common.mdx index 013b5c79a4187..81efb4c6a95d2 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: 2023-11-08 +date: 2023-11-09 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 a6082fdcfa91f..f2298c403a79b 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: 2023-11-08 +date: 2023-11-09 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 bfa3dfe2acc2b..1fda93bf012e7 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: 2023-11-08 +date: 2023-11-09 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 364a64350d3bf..70a092abe7311 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: 2023-11-08 +date: 2023-11-09 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 f61655e4cc153..bc274810cd408 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: 2023-11-08 +date: 2023-11-09 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 fad1d2eb0ad65..b970d2578b763 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-mount'] --- import kbnReactKibanaMountObj from './kbn_react_kibana_mount.devdocs.json'; diff --git a/api_docs/kbn_repo_file_maps.mdx b/api_docs/kbn_repo_file_maps.mdx index 6e2c60e772bfb..416ffd7b763a9 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: 2023-11-08 +date: 2023-11-09 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 01e29f3224da3..b38795b5653d5 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: 2023-11-08 +date: 2023-11-09 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 a66d9c7330bc6..81a98f5955e24 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: 2023-11-08 +date: 2023-11-09 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 02a1d10a6ca30..272dd4c4e3737 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: 2023-11-08 +date: 2023-11-09 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 b2de84a316a81..8f95c65a46a7d 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-common'] --- import kbnReportingCommonObj from './kbn_reporting_common.devdocs.json'; diff --git a/api_docs/kbn_resizable_layout.mdx b/api_docs/kbn_resizable_layout.mdx index c721543728b6e..850de40565d32 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/resizable-layout'] --- import kbnResizableLayoutObj from './kbn_resizable_layout.devdocs.json'; diff --git a/api_docs/kbn_rison.mdx b/api_docs/kbn_rison.mdx index 59dc0964a4e02..8dfb0d4b9e96b 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rison'] --- import kbnRisonObj from './kbn_rison.devdocs.json'; diff --git a/api_docs/kbn_rrule.mdx b/api_docs/kbn_rrule.mdx index b7fe68e229c2d..ab217896fcc0f 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rrule'] --- import kbnRruleObj from './kbn_rrule.devdocs.json'; diff --git a/api_docs/kbn_rule_data_utils.mdx b/api_docs/kbn_rule_data_utils.mdx index e2d4a20e28804..e429a9e4fa4da 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rule-data-utils'] --- import kbnRuleDataUtilsObj from './kbn_rule_data_utils.devdocs.json'; diff --git a/api_docs/kbn_saved_objects_settings.mdx b/api_docs/kbn_saved_objects_settings.mdx index 8dc883f660aea..5ea6e6109dcfd 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/saved-objects-settings'] --- import kbnSavedObjectsSettingsObj from './kbn_saved_objects_settings.devdocs.json'; diff --git a/api_docs/kbn_search_api_panels.mdx b/api_docs/kbn_search_api_panels.mdx index 2cdbca5cf9a87..db2e8743e143a 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: 2023-11-08 +date: 2023-11-09 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 05597b410d69d..486d13deb0eee 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-connectors'] --- import kbnSearchConnectorsObj from './kbn_search_connectors.devdocs.json'; diff --git a/api_docs/kbn_search_response_warnings.mdx b/api_docs/kbn_search_response_warnings.mdx index 22971865dffdf..58302b3b1dab7 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-response-warnings'] --- import kbnSearchResponseWarningsObj from './kbn_search_response_warnings.devdocs.json'; diff --git a/api_docs/kbn_security_solution_features.mdx b/api_docs/kbn_security_solution_features.mdx index 0c34855f8b729..108c56eab0389 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: 2023-11-08 +date: 2023-11-09 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 9e9bded1356e2..b502143cbcac9 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: 2023-11-08 +date: 2023-11-09 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 095f7e2482f56..12b83d62f51e2 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: 2023-11-08 +date: 2023-11-09 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 7658198f9eb18..614f57ad2a42d 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-storybook-config'] --- import kbnSecuritySolutionStorybookConfigObj from './kbn_security_solution_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_autocomplete.mdx b/api_docs/kbn_securitysolution_autocomplete.mdx index 16bbc27043155..a3fe74b32ba53 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: 2023-11-08 +date: 2023-11-09 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 356e58f57b2b8..37a20446489b6 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: 2023-11-08 +date: 2023-11-09 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 d4d144344f10b..7dff81a34f9a7 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: 2023-11-08 +date: 2023-11-09 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 ebdd2db31506f..7b72047d8282c 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: 2023-11-08 +date: 2023-11-09 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 b8d583ea15bfa..9ac5ac2967f28 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-exception-list-components'] --- import kbnSecuritysolutionExceptionListComponentsObj from './kbn_securitysolution_exception_list_components.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_grouping.mdx b/api_docs/kbn_securitysolution_grouping.mdx index b5bfffd4723f8..8ef35b4f9bffb 100644 --- a/api_docs/kbn_securitysolution_grouping.mdx +++ b/api_docs/kbn_securitysolution_grouping.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-grouping title: "@kbn/securitysolution-grouping" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-grouping plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-grouping'] --- import kbnSecuritysolutionGroupingObj from './kbn_securitysolution_grouping.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_hook_utils.mdx b/api_docs/kbn_securitysolution_hook_utils.mdx index 0af6bbe1a240e..dc92634e276aa 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: 2023-11-08 +date: 2023-11-09 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 8229f99be8a33..bdda07d0d50db 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: 2023-11-08 +date: 2023-11-09 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 c3afbcfc88864..a3286883b72ef 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: 2023-11-08 +date: 2023-11-09 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 1a8cd30377829..0fd917a5ae11e 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: 2023-11-08 +date: 2023-11-09 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 1b121a8af5b73..8e18001fdee75 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: 2023-11-08 +date: 2023-11-09 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 76b31ec1fc2ec..eba1068653b56 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: 2023-11-08 +date: 2023-11-09 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 a2a636dfcfed0..fc2bbbc628a44 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: 2023-11-08 +date: 2023-11-09 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 33ee4721a4e5f..be1e14a30b908 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: 2023-11-08 +date: 2023-11-09 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 99c05769469d8..971006815395b 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-utils'] --- import kbnSecuritysolutionListUtilsObj from './kbn_securitysolution_list_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_rules.mdx b/api_docs/kbn_securitysolution_rules.mdx index 8bde93fe251bc..1988226db6a9c 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-rules'] --- import kbnSecuritysolutionRulesObj from './kbn_securitysolution_rules.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_t_grid.mdx b/api_docs/kbn_securitysolution_t_grid.mdx index ed278f21d54d0..9fec5f7b068d7 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: 2023-11-08 +date: 2023-11-09 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 40449d44b77e0..2eef3c7f77e89 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: 2023-11-08 +date: 2023-11-09 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 5700ce78a734e..fcb6c1b95d840 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: 2023-11-08 +date: 2023-11-09 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 de330ec1cc27a..2d8491f1a9db9 100644 --- a/api_docs/kbn_server_route_repository.mdx +++ b/api_docs/kbn_server_route_repository.mdx @@ -8,14 +8,14 @@ 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository'] --- import kbnServerRouteRepositoryObj from './kbn_server_route_repository.devdocs.json'; -Contact [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) for questions regarding this plugin. +Contact [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_serverless_common_settings.mdx b/api_docs/kbn_serverless_common_settings.mdx index f95afa09fc191..f100f3549a49d 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: 2023-11-08 +date: 2023-11-09 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 be23f4cf70326..de992b35b41bd 100644 --- a/api_docs/kbn_serverless_observability_settings.mdx +++ b/api_docs/kbn_serverless_observability_settings.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/kbn-serverless-observability-settings title: "@kbn/serverless-observability-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-observability-settings plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-observability-settings'] --- import kbnServerlessObservabilitySettingsObj from './kbn_serverless_observability_settings.devdocs.json'; -Contact [@elastic/appex-sharedux @elastic/apm-ui @elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/appex-sharedux ) for questions regarding this plugin. +Contact [@elastic/appex-sharedux @elastic/platform-deployment-management @elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/appex-sharedux ) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_serverless_project_switcher.mdx b/api_docs/kbn_serverless_project_switcher.mdx index 7fac78a9bb564..67a32fe45fe0c 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: 2023-11-08 +date: 2023-11-09 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 ca9700a614db7..69de44d8b9cc8 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: 2023-11-08 +date: 2023-11-09 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 a35895b0064e8..cf1574a8bb80f 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: 2023-11-08 +date: 2023-11-09 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 c6229651ac711..c43f03aff7b2f 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: 2023-11-08 +date: 2023-11-09 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 d123dce4c6f90..83394a64ab98b 100644 --- a/api_docs/kbn_shared_svg.mdx +++ b/api_docs/kbn_shared_svg.mdx @@ -8,14 +8,14 @@ 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-svg'] --- import kbnSharedSvgObj from './kbn_shared_svg.devdocs.json'; -Contact [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) for questions regarding this plugin. +Contact [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_shared_ux_avatar_solution.mdx b/api_docs/kbn_shared_ux_avatar_solution.mdx index f3eeeb44351c3..186e686dee278 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: 2023-11-08 +date: 2023-11-09 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 182c3a25dfe55..566f5d536fd02 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: 2023-11-08 +date: 2023-11-09 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 0d7234decfc7f..60a220b649057 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: 2023-11-08 +date: 2023-11-09 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 b14c67e7bb373..74a0ca81726a0 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: 2023-11-08 +date: 2023-11-09 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 d3326928c3b76..8e1771c21abbf 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: 2023-11-08 +date: 2023-11-09 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 1a9304dc02e81..614fdd5fd3510 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: 2023-11-08 +date: 2023-11-09 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 2c0b00734e8ed..9c6709b1bc192 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: 2023-11-08 +date: 2023-11-09 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 b5df255dc6b0d..2cf8f5ff61597 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: 2023-11-08 +date: 2023-11-09 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 377c45c300fbb..540e82ad00fc4 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: 2023-11-08 +date: 2023-11-09 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 92e686be4e3d4..587abaad862f9 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: 2023-11-08 +date: 2023-11-09 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 d1b6eeb07f5ea..cec7fa8b80fd8 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: 2023-11-08 +date: 2023-11-09 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 a26a1c60e853f..2c157dabb2e34 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: 2023-11-08 +date: 2023-11-09 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 5d65e7ad38c18..1db76063af305 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: 2023-11-08 +date: 2023-11-09 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 2a72af7fd8b6d..8cfba30237699 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: 2023-11-08 +date: 2023-11-09 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 d7522d4d80438..ae2c444598010 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: 2023-11-08 +date: 2023-11-09 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 4e1a3e6075aa4..2c5c99c7f42ec 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: 2023-11-08 +date: 2023-11-09 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 ab46b7f9c0e41..4b50ad5292780 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: 2023-11-08 +date: 2023-11-09 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 486fafde66755..0abcbcc8a2336 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: 2023-11-08 +date: 2023-11-09 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 eaf99d1e22552..cadc78dd3a2ef 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: 2023-11-08 +date: 2023-11-09 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 d796247eded57..57c4187f3c736 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: 2023-11-08 +date: 2023-11-09 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 a996f8a427ad3..3468f5455e114 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: 2023-11-08 +date: 2023-11-09 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 a6eaf67ff7989..4426f9b62e59b 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: 2023-11-08 +date: 2023-11-09 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 f4875283dd1ad..ea4964774591d 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: 2023-11-08 +date: 2023-11-09 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 7998a5f67ce51..c8f111729c83b 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: 2023-11-08 +date: 2023-11-09 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 008e4a42ed3b6..875dbe31dce9a 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: 2023-11-08 +date: 2023-11-09 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 5daa87a2702f3..8f2ac04d85ad5 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: 2023-11-08 +date: 2023-11-09 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 9c5d9c657a3f0..303b1347b41ea 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: 2023-11-08 +date: 2023-11-09 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 04446b52002b2..60c1e4628f4d1 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: 2023-11-08 +date: 2023-11-09 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 cf3e33531aace..a6e7e60d6b2cc 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: 2023-11-08 +date: 2023-11-09 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 51f5f3a07c49d..cd8d9d9795acf 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: 2023-11-08 +date: 2023-11-09 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 1482c714a4c2b..b5ac636bc8456 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: 2023-11-08 +date: 2023-11-09 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 e5de125c294aa..2e6214f4582a7 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: 2023-11-08 +date: 2023-11-09 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 5fd7eda65f903..9b31fa1e2b0d4 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: 2023-11-08 +date: 2023-11-09 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 3daeaebda9713..56ee6c64a7ba4 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: 2023-11-08 +date: 2023-11-09 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 1598ae3876775..119adaf54c563 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: 2023-11-08 +date: 2023-11-09 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 d7ead4950fb8a..595c91e63e455 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: 2023-11-08 +date: 2023-11-09 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 eaf36f4f961ac..b762ba946e38f 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-mock'] --- import kbnSharedUxStorybookMockObj from './kbn_shared_ux_storybook_mock.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_utility.mdx b/api_docs/kbn_shared_ux_utility.mdx index 4d64731d7aa84..ac66676fb7fe1 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-utility'] --- import kbnSharedUxUtilityObj from './kbn_shared_ux_utility.devdocs.json'; diff --git a/api_docs/kbn_slo_schema.mdx b/api_docs/kbn_slo_schema.mdx index ac1a5b68ebbf4..d24724b3e7859 100644 --- a/api_docs/kbn_slo_schema.mdx +++ b/api_docs/kbn_slo_schema.mdx @@ -8,14 +8,14 @@ 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/slo-schema'] --- import kbnSloSchemaObj from './kbn_slo_schema.devdocs.json'; -Contact [@elastic/actionable-observability](https://github.com/orgs/elastic/teams/actionable-observability) for questions regarding this plugin. +Contact [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_some_dev_log.mdx b/api_docs/kbn_some_dev_log.mdx index 8cd27c028c974..4d0e133285caf 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/some-dev-log'] --- import kbnSomeDevLogObj from './kbn_some_dev_log.devdocs.json'; diff --git a/api_docs/kbn_std.mdx b/api_docs/kbn_std.mdx index 11f0cef2b3d4b..b62b9e3e164e4 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: 2023-11-08 +date: 2023-11-09 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 6dd67f31b194e..1aaacdaffd811 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: 2023-11-08 +date: 2023-11-09 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 eacecaf19be82..45dc120a15bb4 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/storybook'] --- import kbnStorybookObj from './kbn_storybook.devdocs.json'; diff --git a/api_docs/kbn_subscription_tracking.mdx b/api_docs/kbn_subscription_tracking.mdx index 40630d5fe3a36..531fbc6f5653d 100644 --- a/api_docs/kbn_subscription_tracking.mdx +++ b/api_docs/kbn_subscription_tracking.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-subscription-tracking title: "@kbn/subscription-tracking" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/subscription-tracking plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/subscription-tracking'] --- import kbnSubscriptionTrackingObj from './kbn_subscription_tracking.devdocs.json'; diff --git a/api_docs/kbn_telemetry_tools.mdx b/api_docs/kbn_telemetry_tools.mdx index 256b391a1d218..73cc2b44e84a5 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/telemetry-tools'] --- import kbnTelemetryToolsObj from './kbn_telemetry_tools.devdocs.json'; diff --git a/api_docs/kbn_test.mdx b/api_docs/kbn_test.mdx index 65c19d00f5606..b6b3866a7b711 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test'] --- import kbnTestObj from './kbn_test.devdocs.json'; diff --git a/api_docs/kbn_test_jest_helpers.mdx b/api_docs/kbn_test_jest_helpers.mdx index d7ac3de8c5edc..6fa4571742c68 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-jest-helpers'] --- import kbnTestJestHelpersObj from './kbn_test_jest_helpers.devdocs.json'; diff --git a/api_docs/kbn_test_subj_selector.mdx b/api_docs/kbn_test_subj_selector.mdx index 16d945be03279..f9eb7fbe61b99 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-subj-selector'] --- import kbnTestSubjSelectorObj from './kbn_test_subj_selector.devdocs.json'; diff --git a/api_docs/kbn_text_based_editor.mdx b/api_docs/kbn_text_based_editor.mdx index 855250440a526..681b1c3751c70 100644 --- a/api_docs/kbn_text_based_editor.mdx +++ b/api_docs/kbn_text_based_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-text-based-editor title: "@kbn/text-based-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/text-based-editor plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/text-based-editor'] --- import kbnTextBasedEditorObj from './kbn_text_based_editor.devdocs.json'; diff --git a/api_docs/kbn_tooling_log.mdx b/api_docs/kbn_tooling_log.mdx index 46f5ca54a06dc..c0c610ab4af84 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/tooling-log'] --- import kbnToolingLogObj from './kbn_tooling_log.devdocs.json'; diff --git a/api_docs/kbn_ts_projects.mdx b/api_docs/kbn_ts_projects.mdx index c458fbcca3621..bff45de4cf6b2 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: 2023-11-08 +date: 2023-11-09 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 5af49a8a89d65..a1d61e47a4706 100644 --- a/api_docs/kbn_typed_react_router_config.mdx +++ b/api_docs/kbn_typed_react_router_config.mdx @@ -8,14 +8,14 @@ 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/typed-react-router-config'] --- import kbnTypedReactRouterConfigObj from './kbn_typed_react_router_config.devdocs.json'; -Contact [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) for questions regarding this plugin. +Contact [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_ui_actions_browser.mdx b/api_docs/kbn_ui_actions_browser.mdx index 3595d9a5bf56a..55fcf8055bae5 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: 2023-11-08 +date: 2023-11-09 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 9a1f7b71479d2..6b762d38358be 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: 2023-11-08 +date: 2023-11-09 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 22ab2668a15aa..27d57ca5190d2 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: 2023-11-08 +date: 2023-11-09 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 93b16354a5a63..78471dc41276f 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: 2023-11-08 +date: 2023-11-09 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 c1a77c0fe7583..cf4ce3779c9a0 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: 2023-11-08 +date: 2023-11-09 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 cb332ab65b48c..adbc9f4911b7f 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-field-list'] --- import kbnUnifiedFieldListObj from './kbn_unified_field_list.devdocs.json'; diff --git a/api_docs/kbn_url_state.mdx b/api_docs/kbn_url_state.mdx index 1a5f5e8e55f8f..01c08c77b269c 100644 --- a/api_docs/kbn_url_state.mdx +++ b/api_docs/kbn_url_state.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-url-state title: "@kbn/url-state" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/url-state plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/url-state'] --- import kbnUrlStateObj from './kbn_url_state.devdocs.json'; diff --git a/api_docs/kbn_use_tracked_promise.mdx b/api_docs/kbn_use_tracked_promise.mdx index 6101e37fbe13d..081e72351b312 100644 --- a/api_docs/kbn_use_tracked_promise.mdx +++ b/api_docs/kbn_use_tracked_promise.mdx @@ -8,14 +8,14 @@ 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/use-tracked-promise'] --- import kbnUseTrackedPromiseObj from './kbn_use_tracked_promise.devdocs.json'; -Contact [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) for questions regarding this plugin. +Contact [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_user_profile_components.mdx b/api_docs/kbn_user_profile_components.mdx index 9f11b02cf4498..81e8636adbdfe 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: 2023-11-08 +date: 2023-11-09 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 c4734fefd337f..a92d2b393861e 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: 2023-11-08 +date: 2023-11-09 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 e6f81e2132798..48e1fa438c454 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: 2023-11-08 +date: 2023-11-09 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 ee7c0d8e6a9b9..d70fb4d6e7ad7 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: 2023-11-08 +date: 2023-11-09 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 4847f2d418035..269b5630aa125 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/visualization-ui-components'] --- import kbnVisualizationUiComponentsObj from './kbn_visualization_ui_components.devdocs.json'; diff --git a/api_docs/kbn_xstate_utils.mdx b/api_docs/kbn_xstate_utils.mdx index dc30fb8f702a2..86603c8ce76d7 100644 --- a/api_docs/kbn_xstate_utils.mdx +++ b/api_docs/kbn_xstate_utils.mdx @@ -8,14 +8,14 @@ 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/xstate-utils'] --- import kbnXstateUtilsObj from './kbn_xstate_utils.devdocs.json'; -Contact [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) for questions regarding this plugin. +Contact [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/kbn_yarn_lock_validator.mdx b/api_docs/kbn_yarn_lock_validator.mdx index ab36fa7eaeb4a..90ea9da16ea1b 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/yarn-lock-validator'] --- import kbnYarnLockValidatorObj from './kbn_yarn_lock_validator.devdocs.json'; diff --git a/api_docs/kbn_zod_helpers.devdocs.json b/api_docs/kbn_zod_helpers.devdocs.json index aea5a227f726a..2001282ced394 100644 --- a/api_docs/kbn_zod_helpers.devdocs.json +++ b/api_docs/kbn_zod_helpers.devdocs.json @@ -19,6 +19,45 @@ "common": { "classes": [], "functions": [ + { + "parentPluginId": "@kbn/zod-helpers", + "id": "def-common.ArrayFromString", + "type": "Function", + "tags": [], + "label": "ArrayFromString", + "description": [ + "\nThis is a helper schema to convert comma separated strings to arrays. Useful\nfor processing query params.\n" + ], + "signature": [ + "(schema: T) => Zod.ZodEffects, T[\"_output\"][], unknown>" + ], + "path": "packages/kbn-zod-helpers/src/array_from_string.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/zod-helpers", + "id": "def-common.ArrayFromString.$1", + "type": "Uncategorized", + "tags": [], + "label": "schema", + "description": [ + "Array items schema" + ], + "signature": [ + "T" + ], + "path": "packages/kbn-zod-helpers/src/array_from_string.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [ + "Array schema that accepts a comma-separated string as input" + ], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/zod-helpers", "id": "def-common.expectParseError", @@ -180,6 +219,62 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/zod-helpers", + "id": "def-common.safeParseResult", + "type": "Function", + "tags": [], + "label": "safeParseResult", + "description": [ + "\nSafely parse a payload against a schema, returning the output or undefined.\nThis method does not throw validation errors and is useful for validating\noptional objects when we don't care about errors.\n" + ], + "signature": [ + "(payload: unknown, schema: T) => T[\"_output\"] | undefined" + ], + "path": "packages/kbn-zod-helpers/src/safe_parse_result.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/zod-helpers", + "id": "def-common.safeParseResult.$1", + "type": "Unknown", + "tags": [], + "label": "payload", + "description": [ + "Schema payload" + ], + "signature": [ + "unknown" + ], + "path": "packages/kbn-zod-helpers/src/safe_parse_result.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/zod-helpers", + "id": "def-common.safeParseResult.$2", + "type": "Uncategorized", + "tags": [], + "label": "schema", + "description": [ + "Validation schema" + ], + "signature": [ + "T" + ], + "path": "packages/kbn-zod-helpers/src/safe_parse_result.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [ + "Schema output or undefined" + ], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/zod-helpers", "id": "def-common.stringifyZodError", @@ -237,6 +332,24 @@ "initialIsOpen": false } ], - "objects": [] + "objects": [ + { + "parentPluginId": "@kbn/zod-helpers", + "id": "def-common.BooleanFromString", + "type": "Object", + "tags": [], + "label": "BooleanFromString", + "description": [ + "\nThis is a helper schema to convert a boolean string (\"true\" or \"false\") to a\nboolean. Useful for processing query params.\n\nAccepts \"true\" or \"false\" as strings, or a boolean." + ], + "signature": [ + "Zod.ZodEffects, Zod.ZodBoolean]>, boolean, boolean | \"true\" | \"false\">" + ], + "path": "packages/kbn-zod-helpers/src/boolean_from_string.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ] } } \ No newline at end of file diff --git a/api_docs/kbn_zod_helpers.mdx b/api_docs/kbn_zod_helpers.mdx index 8de510a043a6c..5418192352c30 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/zod-helpers'] --- import kbnZodHelpersObj from './kbn_zod_helpers.devdocs.json'; @@ -21,10 +21,13 @@ Contact [@elastic/security-detection-rule-management](https://github.com/orgs/el | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 12 | 0 | 9 | 0 | +| 18 | 0 | 9 | 0 | ## Common +### Objects + + ### Functions diff --git a/api_docs/kibana_overview.mdx b/api_docs/kibana_overview.mdx index a38c271a1362b..acda13eec48f9 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: 2023-11-08 +date: 2023-11-09 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 eb013397ce6ad..148e2fd1ff899 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: 2023-11-08 +date: 2023-11-09 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 b1050eb29ebb0..5b2c927e52ab3 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: 2023-11-08 +date: 2023-11-09 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 f32ca38f7e803..7398253f9ec4b 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kubernetesSecurity'] --- import kubernetesSecurityObj from './kubernetes_security.devdocs.json'; diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx index 73e8c9ca0b144..4c425c02c4b0f 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: 2023-11-08 +date: 2023-11-09 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 52e82f34dd57e..2389f1fc1ab89 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: 2023-11-08 +date: 2023-11-09 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 f38b0f2cd7c44..30828241be287 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: 2023-11-08 +date: 2023-11-09 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 40987eef022ec..f0b23f27f3769 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: 2023-11-08 +date: 2023-11-09 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 030db9e1bef80..f40501769034f 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: 2023-11-08 +date: 2023-11-09 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 2c4d6431a3ee5..675946f917b11 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lists'] --- import listsObj from './lists.devdocs.json'; diff --git a/api_docs/log_explorer.devdocs.json b/api_docs/log_explorer.devdocs.json index 238163290a823..783b558b4505e 100644 --- a/api_docs/log_explorer.devdocs.json +++ b/api_docs/log_explorer.devdocs.json @@ -4,6 +4,64 @@ "classes": [], "functions": [], "interfaces": [ + { + "parentPluginId": "logExplorer", + "id": "def-public.LogExplorerCustomizations", + "type": "Interface", + "tags": [], + "label": "LogExplorerCustomizations", + "description": [], + "path": "x-pack/plugins/log_explorer/public/components/log_explorer/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "logExplorer", + "id": "def-public.LogExplorerCustomizations.flyout", + "type": "Object", + "tags": [], + "label": "flyout", + "description": [], + "signature": [ + "{ renderContent?: ", + "FlyoutRenderContent", + " | undefined; } | undefined" + ], + "path": "x-pack/plugins/log_explorer/public/components/log_explorer/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "logExplorer", + "id": "def-public.LogExplorerFlyoutContentProps", + "type": "Interface", + "tags": [], + "label": "LogExplorerFlyoutContentProps", + "description": [], + "path": "x-pack/plugins/log_explorer/public/components/log_explorer/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "logExplorer", + "id": "def-public.LogExplorerFlyoutContentProps.doc", + "type": "Object", + "tags": [], + "label": "doc", + "description": [], + "signature": [ + "DataTableRecord" + ], + "path": "x-pack/plugins/log_explorer/public/components/log_explorer/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "logExplorer", "id": "def-public.LogExplorerStateContainer", diff --git a/api_docs/log_explorer.mdx b/api_docs/log_explorer.mdx index a611058166269..21bba29b8d30c 100644 --- a/api_docs/log_explorer.mdx +++ b/api_docs/log_explorer.mdx @@ -8,20 +8,20 @@ slug: /kibana-dev-docs/api/logExplorer title: "logExplorer" image: https://source.unsplash.com/400x175/?github description: API docs for the logExplorer plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logExplorer'] --- import logExplorerObj from './log_explorer.devdocs.json'; This plugin provides a LogExplorer component using the Discover customization framework, offering several affordances specifically designed for log consumption. -Contact [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) for questions regarding this plugin. +Contact [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) for questions regarding this plugin. **Code health stats** | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 22 | 0 | 22 | 7 | +| 26 | 0 | 26 | 8 | ## Client diff --git a/api_docs/logs_shared.devdocs.json b/api_docs/logs_shared.devdocs.json index 38c6515cf1aa6..7bb6418a73bc7 100644 --- a/api_docs/logs_shared.devdocs.json +++ b/api_docs/logs_shared.devdocs.json @@ -2580,10 +2580,10 @@ "interfaces": [ { "parentPluginId": "logsShared", - "id": "def-public.LogAIAssistantProps", + "id": "def-public.LogAIAssistantDocument", "type": "Interface", "tags": [], - "label": "LogAIAssistantProps", + "label": "LogAIAssistantDocument", "description": [], "path": "x-pack/plugins/logs_shared/public/components/log_ai_assistant/log_ai_assistant.tsx", "deprecated": false, @@ -2591,24 +2591,40 @@ "children": [ { "parentPluginId": "logsShared", - "id": "def-public.LogAIAssistantProps.aiAssistant", - "type": "Object", + "id": "def-public.LogAIAssistantDocument.fields", + "type": "Array", "tags": [], - "label": "aiAssistant", + "label": "fields", "description": [], "signature": [ + "{ field: string; value: ", { - "pluginId": "observabilityAIAssistant", - "scope": "public", - "docId": "kibObservabilityAIAssistantPluginApi", - "section": "def-public.ObservabilityAIAssistantPluginStart", - "text": "ObservabilityAIAssistantPluginStart" - } + "pluginId": "@kbn/utility-types", + "scope": "common", + "docId": "kibKbnUtilityTypesPluginApi", + "section": "def-common.JsonArray", + "text": "JsonArray" + }, + "; }[]" ], "path": "x-pack/plugins/logs_shared/public/components/log_ai_assistant/log_ai_assistant.tsx", "deprecated": false, "trackAdoption": false - }, + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "logsShared", + "id": "def-public.LogAIAssistantProps", + "type": "Interface", + "tags": [], + "label": "LogAIAssistantProps", + "description": [], + "path": "x-pack/plugins/logs_shared/public/components/log_ai_assistant/log_ai_assistant.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ { "parentPluginId": "logsShared", "id": "def-public.LogAIAssistantProps.doc", @@ -2617,7 +2633,13 @@ "label": "doc", "description": [], "signature": [ - "LogAIAssistantDocument", + { + "pluginId": "logsShared", + "scope": "public", + "docId": "kibLogsSharedPluginApi", + "section": "def-public.LogAIAssistantDocument", + "text": "LogAIAssistantDocument" + }, " | undefined" ], "path": "x-pack/plugins/logs_shared/public/components/log_ai_assistant/log_ai_assistant.tsx", @@ -3283,6 +3305,28 @@ "path": "x-pack/plugins/logs_shared/public/types.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "logsShared", + "id": "def-public.LogsSharedClientStartExports.LogAIAssistant", + "type": "CompoundType", + "tags": [], + "label": "LogAIAssistant", + "description": [], + "signature": [ + "React.ComponentClass<", + "Optional", + "<", + "LogAIAssistantDeps", + ", \"observabilityAIAssistant\">, any> | React.FunctionComponent<", + "Optional", + "<", + "LogAIAssistantDeps", + ", \"observabilityAIAssistant\">>" + ], + "path": "x-pack/plugins/logs_shared/public/types.ts", + "deprecated": false, + "trackAdoption": false } ], "lifecycle": "start", diff --git a/api_docs/logs_shared.mdx b/api_docs/logs_shared.mdx index db509274dddc4..07c5395ae596c 100644 --- a/api_docs/logs_shared.mdx +++ b/api_docs/logs_shared.mdx @@ -8,20 +8,20 @@ slug: /kibana-dev-docs/api/logsShared title: "logsShared" image: https://source.unsplash.com/400x175/?github description: API docs for the logsShared plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsShared'] --- import logsSharedObj from './logs_shared.devdocs.json'; Exposes the shared components and APIs to access and visualize logs. -Contact [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) for questions regarding this plugin. +Contact [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) for questions regarding this plugin. **Code health stats** | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 285 | 11 | 270 | 28 | +| 287 | 11 | 272 | 28 | ## Client diff --git a/api_docs/management.mdx b/api_docs/management.mdx index becb863e7f7f0..7070c3891da91 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'management'] --- import managementObj from './management.devdocs.json'; diff --git a/api_docs/maps.mdx b/api_docs/maps.mdx index dc5cc8b17031d..94e4f40853f92 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: 2023-11-08 +date: 2023-11-09 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 226f35ef00c13..0d88f2fddfbb9 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: 2023-11-08 +date: 2023-11-09 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 ed30c0408d076..def0fc90c6bf2 100644 --- a/api_docs/metrics_data_access.mdx +++ b/api_docs/metrics_data_access.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/metricsDataAccess title: "metricsDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the metricsDataAccess plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'metricsDataAccess'] --- import metricsDataAccessObj from './metrics_data_access.devdocs.json'; Exposes utilities for accessing metrics data -Contact [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) for questions regarding this plugin. +Contact [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/ml.mdx b/api_docs/ml.mdx index 4d24b29d60728..fafff77be6326 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ml'] --- import mlObj from './ml.devdocs.json'; diff --git a/api_docs/monitoring.mdx b/api_docs/monitoring.mdx index d285e875528d6..0d90802e1d002 100644 --- a/api_docs/monitoring.mdx +++ b/api_docs/monitoring.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/monitoring title: "monitoring" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoring plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoring'] --- import monitoringObj from './monitoring.devdocs.json'; -Contact [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) for questions regarding this plugin. +Contact [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/monitoring_collection.mdx b/api_docs/monitoring_collection.mdx index 35896402f756c..40177041b010c 100644 --- a/api_docs/monitoring_collection.mdx +++ b/api_docs/monitoring_collection.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/monitoringCollection title: "monitoringCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoringCollection plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoringCollection'] --- import monitoringCollectionObj from './monitoring_collection.devdocs.json'; -Contact [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) for questions regarding this plugin. +Contact [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/navigation.mdx b/api_docs/navigation.mdx index cfddc6104ff07..57cbeac274314 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: 2023-11-08 +date: 2023-11-09 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 a8b52be88372a..0cbffc666898a 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: 2023-11-08 +date: 2023-11-09 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 6886646e95d92..c3ab370fade51 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: 2023-11-08 +date: 2023-11-09 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 3768e2039b10b..78e6044611743 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'notifications'] --- import notificationsObj from './notifications.devdocs.json'; diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index 583578dcba391..2045af15dd41b 100644 --- a/api_docs/observability.mdx +++ b/api_docs/observability.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/observability title: "observability" image: https://source.unsplash.com/400x175/?github description: API docs for the observability plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observability'] --- import observabilityObj from './observability.devdocs.json'; -Contact [@elastic/actionable-observability](https://github.com/orgs/elastic/teams/actionable-observability) for questions regarding this plugin. +Contact [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/observability_a_i_assistant.mdx b/api_docs/observability_a_i_assistant.mdx index 52c4508d1c26b..cab458c4a6bd2 100644 --- a/api_docs/observability_a_i_assistant.mdx +++ b/api_docs/observability_a_i_assistant.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/observabilityAIAssistant title: "observabilityAIAssistant" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityAIAssistant plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAIAssistant'] --- import observabilityAIAssistantObj from './observability_a_i_assistant.devdocs.json'; -Contact [@elastic/obs-ai-assistant](https://github.com/orgs/elastic/teams/obs-ai-assistant) for questions regarding this plugin. +Contact [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/observability_log_explorer.mdx b/api_docs/observability_log_explorer.mdx index f736c55c923b1..28bf25c745233 100644 --- a/api_docs/observability_log_explorer.mdx +++ b/api_docs/observability_log_explorer.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/observabilityLogExplorer title: "observabilityLogExplorer" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityLogExplorer plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityLogExplorer'] --- import observabilityLogExplorerObj from './observability_log_explorer.devdocs.json'; This plugin exposes and registers observability log consumption features. -Contact [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) for questions regarding this plugin. +Contact [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/observability_onboarding.mdx b/api_docs/observability_onboarding.mdx index 082e2d93d41c2..93737144855d0 100644 --- a/api_docs/observability_onboarding.mdx +++ b/api_docs/observability_onboarding.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/observabilityOnboarding title: "observabilityOnboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityOnboarding plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityOnboarding'] --- import observabilityOnboardingObj from './observability_onboarding.devdocs.json'; -Contact [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) for questions regarding this plugin. +Contact [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/observability_shared.mdx b/api_docs/observability_shared.mdx index d60a6bee07678..15f0bd436fa67 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: 2023-11-08 +date: 2023-11-09 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 db5498030bfa7..60b55c41fab64 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: 2023-11-08 +date: 2023-11-09 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 2f7be82d8cf73..e23405ae26578 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: 2023-11-08 +date: 2023-11-09 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 daee76beae7a4..e282bac34027d 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -21,7 +21,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 76070 | 233 | 65040 | 1596 | +| 76082 | 233 | 65046 | 1597 | ## Plugin Directory @@ -31,9 +31,9 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/appex-sharedux @elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/appex-sharedux ) | - | 17 | 1 | 15 | 2 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | AIOps plugin maintained by ML team. | 69 | 1 | 4 | 1 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 809 | 1 | 778 | 50 | -| | [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) | The user interface for Elastic APM | 29 | 0 | 29 | 120 | -| | [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) | - | 9 | 0 | 9 | 0 | -| | [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) | Asset manager plugin for entity assets (inventory, topology, etc) | 9 | 0 | 9 | 2 | +| | [@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 | 120 | +| | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 9 | 0 | 9 | 0 | +| | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | Asset manager plugin for entity assets (inventory, topology, etc) | 9 | 0 | 9 | 2 | | | [@elastic/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. | 91 | 1 | 75 | 2 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds Canvas application to Kibana | 9 | 0 | 8 | 3 | @@ -75,7 +75,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | The Event Annotation service contains expressions for event annotations | 201 | 0 | 201 | 6 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | The listing page for event annotations. | 15 | 0 | 15 | 0 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 111 | 0 | 111 | 11 | -| | [@elastic/uptime](https://github.com/orgs/elastic/teams/uptime) | - | 131 | 1 | 131 | 14 | +| | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 131 | 1 | 131 | 14 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds 'error' renderer to expressions | 17 | 0 | 15 | 2 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Expression Gauge plugin adds a `gauge` renderer and function to the expression plugin. The renderer will display the `gauge` chart. | 59 | 0 | 59 | 2 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Expression Heatmap plugin adds a `heatmap` renderer and function to the expression plugin. The renderer will display the `heatmap` chart. | 112 | 0 | 108 | 2 | @@ -123,30 +123,30 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 117 | 0 | 42 | 10 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | A dashboard panel for creating links to dashboards or external links. | 64 | 0 | 62 | 7 | | | [@elastic/security-detection-engine](https://github.com/orgs/elastic/teams/security-detection-engine) | - | 224 | 0 | 96 | 51 | -| | [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) | This plugin provides a LogExplorer component using the Discover customization framework, offering several affordances specifically designed for log consumption. | 22 | 0 | 22 | 7 | -| | [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) | Exposes the shared components and APIs to access and visualize logs. | 285 | 11 | 270 | 28 | +| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | This plugin provides a LogExplorer component using the Discover customization framework, offering several affordances specifically designed for log consumption. | 26 | 0 | 26 | 8 | +| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | Exposes the shared components and APIs to access and visualize logs. | 287 | 11 | 272 | 28 | | logstash | [@elastic/logstash](https://github.com/orgs/elastic/teams/logstash) | - | 0 | 0 | 0 | 0 | | | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 45 | 0 | 45 | 7 | | | [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | - | 260 | 0 | 259 | 29 | | | [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | - | 68 | 0 | 68 | 0 | -| | [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) | Exposes utilities for accessing metrics data | 104 | 8 | 104 | 4 | +| | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | Exposes utilities for accessing metrics data | 104 | 8 | 104 | 4 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | This plugin provides access to the machine learning features provided by Elastic. | 150 | 3 | 64 | 33 | -| | [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) | - | 15 | 3 | 13 | 1 | -| | [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) | - | 9 | 0 | 9 | 0 | +| | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 15 | 3 | 13 | 1 | +| | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 9 | 0 | 9 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 34 | 0 | 34 | 2 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 17 | 0 | 17 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 3 | 0 | 3 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 2 | 0 | 2 | 1 | -| | [@elastic/actionable-observability](https://github.com/orgs/elastic/teams/actionable-observability) | - | 580 | 2 | 571 | 17 | -| | [@elastic/obs-ai-assistant](https://github.com/orgs/elastic/teams/obs-ai-assistant) | - | 42 | 0 | 39 | 7 | -| | [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) | This plugin exposes and registers observability log consumption features. | 15 | 0 | 15 | 1 | -| | [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) | - | 14 | 0 | 14 | 0 | +| | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 580 | 2 | 571 | 17 | +| | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 42 | 0 | 39 | 7 | +| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | This plugin exposes and registers observability log consumption features. | 15 | 0 | 15 | 1 | +| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 14 | 0 | 14 | 0 | | | [@elastic/observability-ui](https://github.com/orgs/elastic/teams/observability-ui) | - | 292 | 1 | 289 | 15 | | | [@elastic/security-defend-workflows](https://github.com/orgs/elastic/teams/security-defend-workflows) | - | 24 | 0 | 24 | 7 | | | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 2 | 0 | 2 | 0 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | The Presentation Utility Plugin is a set of common, shared components and toolkits for solutions within the Presentation space, (e.g. Dashboards, Canvas). | 219 | 2 | 164 | 11 | -| | [@elastic/profiling-ui](https://github.com/orgs/elastic/teams/profiling-ui) | - | 16 | 1 | 16 | 0 | -| | [@elastic/profiling-ui](https://github.com/orgs/elastic/teams/profiling-ui) | - | 22 | 0 | 22 | 7 | +| | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 16 | 1 | 16 | 0 | +| | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 22 | 0 | 22 | 7 | | | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 23 | 0 | 23 | 0 | | | [@elastic/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. | 42 | 0 | 22 | 5 | | | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 21 | 0 | 21 | 0 | @@ -174,7 +174,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides the Spaces feature, which allows saved objects to be organized into meaningful categories. | 256 | 0 | 65 | 0 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 23 | 0 | 23 | 3 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 4 | 0 | 4 | 1 | -| synthetics | [@elastic/uptime](https://github.com/orgs/elastic/teams/uptime) | This plugin visualizes data from Synthetics and Heartbeat, and integrates with other Observability solutions. | 0 | 0 | 0 | 0 | +| synthetics | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | This plugin visualizes data from Synthetics and Heartbeat, and integrates with other Observability solutions. | 0 | 0 | 0 | 0 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 96 | 0 | 53 | 6 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 45 | 0 | 1 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 31 | 0 | 26 | 6 | @@ -192,11 +192,11 @@ 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. | 55 | 0 | 23 | 2 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Contains all the key functionality of Kibana's unified search experience.Contains all the key functionality of Kibana's unified search experience. | 148 | 2 | 110 | 23 | | upgradeAssistant | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 0 | 0 | 0 | 0 | -| | [@elastic/uptime](https://github.com/orgs/elastic/teams/uptime) | This plugin visualizes data from Heartbeat, and integrates with other Observability solutions. | 1 | 0 | 1 | 0 | +| | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | This plugin visualizes data from Heartbeat, and integrates with other Observability solutions. | 1 | 0 | 1 | 0 | | urlDrilldown | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Adds drilldown implementations to Kibana | 0 | 0 | 0 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 12 | 0 | 12 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 55 | 0 | 16 | 2 | -| | [@elastic/uptime](https://github.com/orgs/elastic/teams/uptime) | - | 2 | 0 | 2 | 0 | +| | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 2 | 0 | 2 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | The default editor used in most aggregation-based visualizations. | 56 | 0 | 49 | 4 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Contains the gauge chart implementation using the elastic-charts library. The goal is to eventually deprecate the old implementation and keep only this. Until then, the library used is defined by the Legacy charts library advanced setting. | 7 | 0 | 7 | 2 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Contains the heatmap implementation using the elastic-charts library. The goal is to eventually deprecate the old implementation and keep only this. Until then, the library used is defined by the Legacy heatmap charts library advanced setting. | 3 | 0 | 3 | 2 | @@ -232,9 +232,9 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 21 | 0 | 0 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 18 | 0 | 2 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 17 | 0 | 17 | 0 | -| | [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) | - | 31 | 0 | 31 | 7 | -| | [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) | - | 181 | 0 | 181 | 27 | -| | [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) | - | 11 | 0 | 11 | 0 | +| | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 31 | 0 | 31 | 7 | +| | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 181 | 0 | 181 | 27 | +| | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 11 | 0 | 11 | 0 | | | [@elastic/kibana-qa](https://github.com/orgs/elastic/teams/kibana-qa) | - | 12 | 0 | 12 | 0 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 19 | 0 | 16 | 0 | | | [@elastic/security-threat-hunting-explore](https://github.com/orgs/elastic/teams/security-threat-hunting-explore) | - | 62 | 1 | 44 | 3 | @@ -415,7 +415,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | - | 3 | 0 | 3 | 0 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | - | 13 | 0 | 7 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 10 | 0 | 10 | 0 | -| | [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) | - | 19 | 0 | 17 | 6 | +| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 19 | 0 | 17 | 6 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 2 | 0 | 2 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 14 | 0 | 9 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 44 | 0 | 43 | 0 | @@ -423,7 +423,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 5 | 0 | 5 | 0 | | | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 4 | 0 | 4 | 0 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 3 | 0 | 3 | 0 | -| | [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) | - | 26 | 0 | 16 | 0 | +| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 26 | 0 | 16 | 0 | | | [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | - | 4 | 0 | 4 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 8 | 0 | 8 | 0 | | | [@elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/platform-deployment-management) | - | 8 | 0 | 8 | 0 | @@ -467,15 +467,15 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 51 | 0 | 48 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 61 | 0 | 1 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 47 | 0 | 40 | 0 | -| | [@elastic/actionable-observability](https://github.com/orgs/elastic/teams/actionable-observability) | - | 9 | 0 | 9 | 0 | +| | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 9 | 0 | 9 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 52 | 12 | 43 | 0 | -| | [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) | - | 52 | 0 | 52 | 4 | +| | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 52 | 0 | 52 | 4 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 13 | 0 | 13 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 85 | 0 | 77 | 6 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 41 | 2 | 35 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 108 | 0 | 107 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 7 | 0 | 5 | 0 | -| | [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) | - | 158 | 0 | 155 | 0 | +| | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 158 | 0 | 155 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 27 | 0 | 1 | 2 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 8 | 0 | 8 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 6 | 0 | 1 | 1 | @@ -527,7 +527,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-performance-testing](https://github.com/orgs/elastic/teams/kibana-performance-testing) | - | 3 | 0 | 3 | 1 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 1 | 0 | 1 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 1 | 0 | 1 | 0 | -| | [@elastic/profiling-ui](https://github.com/orgs/elastic/teams/profiling-ui) | - | 171 | 0 | 28 | 0 | +| | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 171 | 0 | 28 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 13 | 0 | 7 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 22 | 0 | 9 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 8 | 0 | 2 | 0 | @@ -572,14 +572,14 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@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) | - | 37 | 0 | 32 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 54 | 0 | 51 | 1 | -| | [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) | - | 31 | 0 | 30 | 1 | +| | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 31 | 0 | 30 | 1 | | | [@elastic/appex-sharedux @elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/appex-sharedux ) | - | 1 | 0 | 1 | 0 | -| | [@elastic/appex-sharedux @elastic/apm-ui @elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/appex-sharedux ) | - | 1 | 0 | 1 | 0 | +| | [@elastic/appex-sharedux @elastic/platform-deployment-management @elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/appex-sharedux ) | - | 1 | 0 | 1 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 10 | 0 | 7 | 1 | | | [@elastic/enterprise-search-frontend @elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/enterprise-search-frontend ) | - | 1 | 0 | 1 | 0 | | | [@elastic/security-solution @elastic/platform-deployment-management](https://github.com/orgs/elastic/teams/security-solution ) | - | 1 | 0 | 1 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 2 | 0 | 0 | 0 | -| | [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) | - | 4 | 0 | 4 | 0 | +| | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 4 | 0 | 4 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 3 | 0 | 2 | 2 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 8 | 0 | 2 | 1 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 28 | 0 | 10 | 0 | @@ -618,7 +618,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 2 | 0 | 0 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 15 | 0 | 4 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 11 | 0 | 3 | 0 | -| | [@elastic/actionable-observability](https://github.com/orgs/elastic/teams/actionable-observability) | - | 129 | 0 | 126 | 0 | +| | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 129 | 0 | 126 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 20 | 0 | 12 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 102 | 2 | 65 | 1 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 4 | 0 | 2 | 0 | @@ -631,7 +631,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 22 | 0 | 21 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 72 | 0 | 55 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 39 | 0 | 25 | 1 | -| | [@elastic/apm-ui](https://github.com/orgs/elastic/teams/apm-ui) | - | 86 | 0 | 86 | 1 | +| | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 86 | 0 | 86 | 1 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 49 | 0 | 35 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 53 | 0 | 44 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 7 | 0 | 6 | 0 | @@ -639,13 +639,13 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 10 | 0 | 7 | 7 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Contains functionality for the field list and field stats which can be integrated into apps | 285 | 0 | 261 | 9 | | | [@elastic/security-threat-hunting-investigations](https://github.com/orgs/elastic/teams/security-threat-hunting-investigations) | - | 4 | 0 | 0 | 0 | -| | [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) | - | 3 | 0 | 2 | 1 | +| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 3 | 0 | 2 | 1 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | - | 80 | 1 | 21 | 2 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 37 | 0 | 16 | 1 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 2 | 0 | 2 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 24 | 0 | 14 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 156 | 0 | 152 | 3 | -| | [@elastic/infra-monitoring-ui](https://github.com/orgs/elastic/teams/infra-monitoring-ui) | - | 12 | 0 | 12 | 0 | +| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 12 | 0 | 12 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 6 | 0 | 2 | 0 | -| | [@elastic/security-detection-rule-management](https://github.com/orgs/elastic/teams/security-detection-rule-management) | - | 12 | 0 | 9 | 0 | +| | [@elastic/security-detection-rule-management](https://github.com/orgs/elastic/teams/security-detection-rule-management) | - | 18 | 0 | 9 | 0 | diff --git a/api_docs/presentation_util.mdx b/api_docs/presentation_util.mdx index cad15788af386..6fafaebb019af 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationUtil'] --- import presentationUtilObj from './presentation_util.devdocs.json'; diff --git a/api_docs/profiling.mdx b/api_docs/profiling.mdx index 65c39106f3c7d..c8aa1e8ba86f9 100644 --- a/api_docs/profiling.mdx +++ b/api_docs/profiling.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/profiling title: "profiling" image: https://source.unsplash.com/400x175/?github description: API docs for the profiling plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profiling'] --- import profilingObj from './profiling.devdocs.json'; -Contact [@elastic/profiling-ui](https://github.com/orgs/elastic/teams/profiling-ui) for questions regarding this plugin. +Contact [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/profiling_data_access.mdx b/api_docs/profiling_data_access.mdx index c933df9b7a3b1..7339d402d4812 100644 --- a/api_docs/profiling_data_access.mdx +++ b/api_docs/profiling_data_access.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/profilingDataAccess title: "profilingDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the profilingDataAccess plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profilingDataAccess'] --- import profilingDataAccessObj from './profiling_data_access.devdocs.json'; -Contact [@elastic/profiling-ui](https://github.com/orgs/elastic/teams/profiling-ui) for questions regarding this plugin. +Contact [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/remote_clusters.mdx b/api_docs/remote_clusters.mdx index 8b1b854c25b95..e3a2975e71a79 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: 2023-11-08 +date: 2023-11-09 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 b06e42765a180..3ea1700a77434 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'reporting'] --- import reportingObj from './reporting.devdocs.json'; diff --git a/api_docs/rollup.mdx b/api_docs/rollup.mdx index aa8e5f403cdb8..6a64d6ac1575e 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'rollup'] --- import rollupObj from './rollup.devdocs.json'; diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index 6cd95161b2d1e..6056b7f00fd5c 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ruleRegistry'] --- import ruleRegistryObj from './rule_registry.devdocs.json'; diff --git a/api_docs/runtime_fields.mdx b/api_docs/runtime_fields.mdx index cc5d1473023dd..96f5504d74d7c 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: 2023-11-08 +date: 2023-11-09 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 c4ff0314c0942..efe2afd257e77 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: 2023-11-08 +date: 2023-11-09 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 cf43f50e2e5de..08722ac7171b6 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: 2023-11-08 +date: 2023-11-09 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 711e48ed70b84..d025a862f60cd 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: 2023-11-08 +date: 2023-11-09 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 a32b3df0e2e16..f47c7dd2b25a7 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: 2023-11-08 +date: 2023-11-09 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 319a378a5e20f..a499008d9a782 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: 2023-11-08 +date: 2023-11-09 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 7391c7a13327e..28bc3a72a472d 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: 2023-11-08 +date: 2023-11-09 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 bd2d600f360d0..7f7102506320a 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: 2023-11-08 +date: 2023-11-09 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 9894eacfe9b02..81374d6c55653 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotting'] --- import screenshottingObj from './screenshotting.devdocs.json'; diff --git a/api_docs/security.mdx b/api_docs/security.mdx index cc464e41d7d4a..672ca2128baa4 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'security'] --- import securityObj from './security.devdocs.json'; diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx index b4f32f39b3aca..699574fab35e2 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: 2023-11-08 +date: 2023-11-09 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 9ab8031f4b959..e347cd66d4b40 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: 2023-11-08 +date: 2023-11-09 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 fc8302b016670..37414db4c395e 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: 2023-11-08 +date: 2023-11-09 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 e731388bcece3..51d33d2367c61 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: 2023-11-08 +date: 2023-11-09 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 c266672321e10..7391544ff8663 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: 2023-11-08 +date: 2023-11-09 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 3392af32c8ef0..dc8fbfe48556e 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: 2023-11-08 +date: 2023-11-09 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 0f3bc5a320aff..d331e1c9e78c7 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: 2023-11-08 +date: 2023-11-09 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 9b005f0621e36..db9678e4f9498 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'share'] --- import shareObj from './share.devdocs.json'; diff --git a/api_docs/snapshot_restore.mdx b/api_docs/snapshot_restore.mdx index d7b8c4809b756..b64a746e6b2d4 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: 2023-11-08 +date: 2023-11-09 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 614d651ed4f7b..9aec3b6727545 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: 2023-11-08 +date: 2023-11-09 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 c735c9c9c4647..b1baae66b6c3c 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: 2023-11-08 +date: 2023-11-09 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 69a87f0fd3b7a..71302d492d6b2 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackConnectors'] --- import stackConnectorsObj from './stack_connectors.devdocs.json'; diff --git a/api_docs/task_manager.mdx b/api_docs/task_manager.mdx index ec02a9a86be92..87e0b6ebda619 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: 2023-11-08 +date: 2023-11-09 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 bd1953bb1d203..131742d7aa7a9 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: 2023-11-08 +date: 2023-11-09 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 5d0131727876a..07198ec59ae8c 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionManager'] --- import telemetryCollectionManagerObj from './telemetry_collection_manager.devdocs.json'; diff --git a/api_docs/telemetry_collection_xpack.mdx b/api_docs/telemetry_collection_xpack.mdx index bbd273aa304ca..3610ff9250a8b 100644 --- a/api_docs/telemetry_collection_xpack.mdx +++ b/api_docs/telemetry_collection_xpack.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionXpack title: "telemetryCollectionXpack" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionXpack plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionXpack'] --- import telemetryCollectionXpackObj from './telemetry_collection_xpack.devdocs.json'; diff --git a/api_docs/telemetry_management_section.mdx b/api_docs/telemetry_management_section.mdx index 541d51e4e4889..55119da9d38db 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryManagementSection'] --- import telemetryManagementSectionObj from './telemetry_management_section.devdocs.json'; diff --git a/api_docs/text_based_languages.mdx b/api_docs/text_based_languages.mdx index 2017b997085be..1ab1aec171c8d 100644 --- a/api_docs/text_based_languages.mdx +++ b/api_docs/text_based_languages.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/textBasedLanguages title: "textBasedLanguages" image: https://source.unsplash.com/400x175/?github description: API docs for the textBasedLanguages plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'textBasedLanguages'] --- import textBasedLanguagesObj from './text_based_languages.devdocs.json'; diff --git a/api_docs/threat_intelligence.mdx b/api_docs/threat_intelligence.mdx index 69d95f9175a00..8a72db2d58893 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: 2023-11-08 +date: 2023-11-09 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 1191d658adf4c..cfa2b74f8abcf 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: 2023-11-08 +date: 2023-11-09 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 8627127fa1b1f..584484ffd70e1 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'transform'] --- import transformObj from './transform.devdocs.json'; diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx index 0de8be7789564..4670b9bcfd53c 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: 2023-11-08 +date: 2023-11-09 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 ea54386cd97bd..dbb5318f9ea6e 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: 2023-11-08 +date: 2023-11-09 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 c44c1c4aadfed..1ad622851630a 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: 2023-11-08 +date: 2023-11-09 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 8761f7cb54937..febe3a84e4a06 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: 2023-11-08 +date: 2023-11-09 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 46ab457726c0a..c9d326d7babb2 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: 2023-11-08 +date: 2023-11-09 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 302257f89efbf..693a43ffa73e7 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: 2023-11-08 +date: 2023-11-09 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 20d559e9f80d1..7e5808a1a4083 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch.autocomplete'] --- import unifiedSearchAutocompleteObj from './unified_search_autocomplete.devdocs.json'; diff --git a/api_docs/uptime.mdx b/api_docs/uptime.mdx index fbb328b3be339..536073b7a449d 100644 --- a/api_docs/uptime.mdx +++ b/api_docs/uptime.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/uptime title: "uptime" image: https://source.unsplash.com/400x175/?github description: API docs for the uptime plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uptime'] --- import uptimeObj from './uptime.devdocs.json'; This plugin visualizes data from Heartbeat, and integrates with other Observability solutions. -Contact [@elastic/uptime](https://github.com/orgs/elastic/teams/uptime) for questions regarding this plugin. +Contact [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/url_forwarding.mdx b/api_docs/url_forwarding.mdx index c8d2192b75ff7..fca96973e7d69 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: 2023-11-08 +date: 2023-11-09 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 415698c06c32e..6d61d40f1b1b1 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: 2023-11-08 +date: 2023-11-09 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 b4d56592ee6f5..2f02e1cf2d3d9 100644 --- a/api_docs/ux.mdx +++ b/api_docs/ux.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/ux title: "ux" image: https://source.unsplash.com/400x175/?github description: API docs for the ux plugin -date: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ux'] --- import uxObj from './ux.devdocs.json'; -Contact [@elastic/uptime](https://github.com/orgs/elastic/teams/uptime) for questions regarding this plugin. +Contact [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/vis_default_editor.mdx b/api_docs/vis_default_editor.mdx index 91f8599224c79..bad86282b61d9 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: 2023-11-08 +date: 2023-11-09 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 2369294e8f9cb..16d0a8b7b848c 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: 2023-11-08 +date: 2023-11-09 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 b89d17f073342..681470f8991ac 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: 2023-11-08 +date: 2023-11-09 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 5e8e770b74460..164bb2345ebd5 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: 2023-11-08 +date: 2023-11-09 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 ab11707fec3d6..0acaca2ab1f5f 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: 2023-11-08 +date: 2023-11-09 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 2a47fcea37acd..d142d0ae25da8 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: 2023-11-08 +date: 2023-11-09 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 3881e77aa37e0..9538ee36852c6 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: 2023-11-08 +date: 2023-11-09 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 1fc50e7629f9e..8d984e502640c 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: 2023-11-08 +date: 2023-11-09 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 f50198bc12991..80799364b2c58 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: 2023-11-08 +date: 2023-11-09 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 38029a048569c..0bc6246152ee6 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: 2023-11-08 +date: 2023-11-09 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 a81f10ae8474b..58cdbe5bced47 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: 2023-11-08 +date: 2023-11-09 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations'] --- import visualizationsObj from './visualizations.devdocs.json'; diff --git a/config/serverless.yml b/config/serverless.yml index e830bb33e6fa9..a6aba80736f2d 100644 --- a/config/serverless.yml +++ b/config/serverless.yml @@ -146,6 +146,7 @@ xpack.task_manager.requeue_invalid_tasks.enabled: true # Reporting feature xpack.screenshotting.enabled: false +xpack.reporting.queue.pollInterval: 3m xpack.reporting.roles.enabled: false xpack.reporting.statefulSettings.enabled: false diff --git a/examples/error_boundary/README.md b/examples/error_boundary/README.md new file mode 100755 index 0000000000000..3a293c9a7b465 --- /dev/null +++ b/examples/error_boundary/README.md @@ -0,0 +1,3 @@ +## Error Boundary Example + +A very simple example plugin for testing Kibana Error Boundary. diff --git a/examples/error_boundary/kibana.jsonc b/examples/error_boundary/kibana.jsonc new file mode 100644 index 0000000000000..3acabfbb5006c --- /dev/null +++ b/examples/error_boundary/kibana.jsonc @@ -0,0 +1,14 @@ +{ + "type": "plugin", + "id": "@kbn/error-boundary-example-plugin", + "owner": "@elastic/appex-sharedux", + "description": "A plugin which exemplifes the KibanaErrorBoundary", + "plugin": { + "id": "error_boundary_example", + "server": false, + "browser": true, + "requiredPlugins": [ + "developerExamples" + ] + } +} diff --git a/examples/error_boundary/public/index.ts b/examples/error_boundary/public/index.ts new file mode 100755 index 0000000000000..41d35a8f5bec1 --- /dev/null +++ b/examples/error_boundary/public/index.ts @@ -0,0 +1,12 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ +import { ErrorBoundaryExamplePlugin } from './plugin'; + +export function plugin() { + return new ErrorBoundaryExamplePlugin(); +} diff --git a/examples/error_boundary/public/plugin.tsx b/examples/error_boundary/public/plugin.tsx new file mode 100755 index 0000000000000..2c5d4e7487005 --- /dev/null +++ b/examples/error_boundary/public/plugin.tsx @@ -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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ +import { EuiButton } from '@elastic/eui'; + +import React, { useState } from 'react'; +import ReactDOM from 'react-dom'; + +import { AppMountParameters, CoreSetup, CoreStart, Plugin } from '@kbn/core/public'; +import { DeveloperExamplesSetup } from '@kbn/developer-examples-plugin/public'; +import { KibanaErrorBoundary, KibanaErrorBoundaryProvider } from '@kbn/shared-ux-error-boundary'; +import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template'; + +interface SetupDeps { + developerExamples: DeveloperExamplesSetup; +} + +const useErrors = () => { + return useState(false); +}; + +export const FatalComponent = () => { + const [hasError, setHasError] = useErrors(); + + if (hasError) { + const fatalError = new Error('Example of unknown error type'); + throw fatalError; + } + + return ( + { + setHasError(true); + }} + data-test-subj="fatalErrorBtn" + > + Click for fatal error + + ); +}; + +export const RecoverableComponent = () => { + const [hasError, setHasError] = useErrors(); + + if (hasError) { + // FIXME: use network interception to disable responses + // for chunk requests and attempt to lazy-load a component + // https://github.com/elastic/kibana/issues/170777 + const upgradeError = new Error('ChunkLoadError'); + upgradeError.name = 'ChunkLoadError'; + throw upgradeError; + } + + return ( + { + setHasError(true); + }} + data-test-subj="recoverableErrorBtn" + > + Click for recoverable error + + ); +}; + +export class ErrorBoundaryExamplePlugin implements Plugin { + public setup(core: CoreSetup, deps: SetupDeps) { + // Register an application into the side navigation menu + core.application.register({ + id: 'errorBoundaryExample', + title: 'Error Boundary Example', + async mount({ element }: AppMountParameters) { + ReactDOM.render( + + + + + + + + + + + + + , + element + ); + return () => ReactDOM.unmountComponentAtNode(element); + }, + }); + + // This section is only needed to get this example plugin to show up in our Developer Examples. + deps.developerExamples.register({ + appId: 'errorBoundaryExample', + title: 'Error Boundary Example Application', + description: `Build a plugin that registers an application that simply says "Error Boundary Example"`, + }); + } + public start(_core: CoreStart) { + return {}; + } + public stop() {} +} diff --git a/examples/error_boundary/tsconfig.json b/examples/error_boundary/tsconfig.json new file mode 100644 index 0000000000000..2df5023cbdadb --- /dev/null +++ b/examples/error_boundary/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "outDir": "target/types" + }, + "include": [ + "index.ts", + "common/**/*.ts", + "public/**/*.ts", + "public/**/*.tsx", + "../../typings/**/*" + ], + "exclude": [ + "target/**/*" + ], + "kbn_references": [ + "@kbn/core", + "@kbn/developer-examples-plugin", + "@kbn/shared-ux-error-boundary", + "@kbn/shared-ux-page-kibana-template" + ] +} diff --git a/package.json b/package.json index 3f3a05f840cb0..4e4c2441fe9fc 100644 --- a/package.json +++ b/package.json @@ -398,6 +398,7 @@ "@kbn/embedded-lens-example-plugin": "link:x-pack/examples/embedded_lens_example", "@kbn/encrypted-saved-objects-plugin": "link:x-pack/plugins/encrypted_saved_objects", "@kbn/enterprise-search-plugin": "link:x-pack/plugins/enterprise_search", + "@kbn/error-boundary-example-plugin": "link:examples/error_boundary", "@kbn/es-errors": "link:packages/kbn-es-errors", "@kbn/es-query": "link:packages/kbn-es-query", "@kbn/es-types": "link:packages/kbn-es-types", @@ -937,7 +938,7 @@ "json-stringify-safe": "5.0.1", "jsonwebtoken": "^9.0.0", "jsts": "^1.6.2", - "kea": "^2.4.2", + "kea": "^2.6.0", "langchain": "^0.0.151", "launchdarkly-js-client-sdk": "^3.1.4", "launchdarkly-node-server-sdk": "^7.0.3", @@ -1276,7 +1277,6 @@ "@storybook/react-docgen-typescript-plugin": "^1.0.1", "@storybook/testing-react": "^1.3.0", "@storybook/theming": "^6.5.16", - "@testing-library/dom": "^8.19.0", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^12.1.5", "@testing-library/react-hooks": "^8.0.1", diff --git a/packages/core/capabilities/core-capabilities-server-internal/src/capabilities_service.test.ts b/packages/core/capabilities/core-capabilities-server-internal/src/capabilities_service.test.ts index 29e6c5a937898..23e2e06c02c1f 100644 --- a/packages/core/capabilities/core-capabilities-server-internal/src/capabilities_service.test.ts +++ b/packages/core/capabilities/core-capabilities-server-internal/src/capabilities_service.test.ts @@ -8,6 +8,7 @@ import { mockCoreContext } from '@kbn/core-base-server-mocks'; import { mockRouter, RouterMock } from '@kbn/core-http-router-server-mocks'; +import type { KibanaRequest } from '@kbn/core-http-server'; import { httpServiceMock, InternalHttpServicePrebootMock, @@ -16,6 +17,8 @@ import { import type { CapabilitiesSetup } from '@kbn/core-capabilities-server'; import { CapabilitiesService } from './capabilities_service'; +const fakeRequest = {} as KibanaRequest; + describe('CapabilitiesService', () => { let http: InternalHttpServiceSetupMock; let service: CapabilitiesService; @@ -71,7 +74,8 @@ describe('CapabilitiesService', () => { catalogue: { myPlugin: true }, })); const start = service.start(); - expect(await start.resolveCapabilities({} as any)).toMatchInlineSnapshot(` + expect(await start.resolveCapabilities(fakeRequest, { capabilityPath: '*' })) + .toMatchInlineSnapshot(` Object { "catalogue": Object { "myPlugin": true, @@ -100,7 +104,8 @@ describe('CapabilitiesService', () => { }, })); const start = service.start(); - expect(await start.resolveCapabilities({} as any)).toMatchInlineSnapshot(` + expect(await start.resolveCapabilities(fakeRequest, { capabilityPath: '*' })) + .toMatchInlineSnapshot(` Object { "catalogue": Object { "A": true, @@ -123,17 +128,21 @@ describe('CapabilitiesService', () => { setup.registerProvider(() => ({ catalogue: { a: true, b: true, c: true }, })); - setup.registerSwitcher((req, capabilities) => { - return { - ...capabilities, - catalogue: { - ...capabilities.catalogue, - b: false, - }, - }; - }); + setup.registerSwitcher( + (req, capabilities) => { + return { + ...capabilities, + catalogue: { + ...capabilities.catalogue, + b: false, + }, + }; + }, + { capabilityPath: '*' } + ); const start = service.start(); - expect(await start.resolveCapabilities({} as any)).toMatchInlineSnapshot(` + expect(await start.resolveCapabilities(fakeRequest, { capabilityPath: '*' })) + .toMatchInlineSnapshot(` Object { "catalogue": Object { "a": true, @@ -162,29 +171,39 @@ describe('CapabilitiesService', () => { c: true, }, })); - setup.registerSwitcher((req, capabilities) => { - return { - catalogue: { - b: false, - }, - }; - }); - - setup.registerSwitcher((req, capabilities) => { - return { - navLinks: { c: false }, - }; - }); - setup.registerSwitcher((req, capabilities) => { - return { - customSection: { - c: false, - }, - }; - }); + setup.registerSwitcher( + (req, capabilities) => { + return { + catalogue: { + b: false, + }, + }; + }, + { capabilityPath: '*' } + ); + + setup.registerSwitcher( + (req, capabilities) => { + return { + navLinks: { c: false }, + }; + }, + { capabilityPath: '*' } + ); + setup.registerSwitcher( + (req, capabilities) => { + return { + customSection: { + c: false, + }, + }; + }, + { capabilityPath: '*' } + ); const start = service.start(); - expect(await start.resolveCapabilities({} as any)).toMatchInlineSnapshot(` + expect(await start.resolveCapabilities(fakeRequest, { capabilityPath: '*' })) + .toMatchInlineSnapshot(` Object { "catalogue": Object { "a": true, @@ -206,12 +225,15 @@ describe('CapabilitiesService', () => { it('allows to indicate that default capabilities should be returned', async () => { setup.registerProvider(() => ({ customSection: { isDefault: true } })); - setup.registerSwitcher((req, capabilities, useDefaultCapabilities) => - useDefaultCapabilities ? capabilities : { customSection: { isDefault: false } } + setup.registerSwitcher( + (req, capabilities, useDefaultCapabilities) => + useDefaultCapabilities ? capabilities : { customSection: { isDefault: false } }, + { capabilityPath: '*' } ); const start = service.start(); - expect(await start.resolveCapabilities({} as any)).toMatchInlineSnapshot(` + expect(await start.resolveCapabilities(fakeRequest, { capabilityPath: '*' })) + .toMatchInlineSnapshot(` Object { "catalogue": Object {}, "customSection": Object { @@ -221,8 +243,12 @@ describe('CapabilitiesService', () => { "navLinks": Object {}, } `); - expect(await start.resolveCapabilities({} as any, { useDefaultCapabilities: false })) - .toMatchInlineSnapshot(` + expect( + await start.resolveCapabilities({} as any, { + useDefaultCapabilities: false, + capabilityPath: '*', + }) + ).toMatchInlineSnapshot(` Object { "catalogue": Object {}, "customSection": Object { @@ -232,8 +258,12 @@ describe('CapabilitiesService', () => { "navLinks": Object {}, } `); - expect(await start.resolveCapabilities({} as any, { useDefaultCapabilities: true })) - .toMatchInlineSnapshot(` + expect( + await start.resolveCapabilities({} as any, { + useDefaultCapabilities: true, + capabilityPath: '*', + }) + ).toMatchInlineSnapshot(` Object { "catalogue": Object {}, "customSection": Object { diff --git a/packages/core/capabilities/core-capabilities-server-internal/src/capabilities_service.ts b/packages/core/capabilities/core-capabilities-server-internal/src/capabilities_service.ts index 4abb13eb03b82..bdcaad897f9aa 100644 --- a/packages/core/capabilities/core-capabilities-server-internal/src/capabilities_service.ts +++ b/packages/core/capabilities/core-capabilities-server-internal/src/capabilities_service.ts @@ -18,7 +18,9 @@ import type { CapabilitiesSwitcher, CapabilitiesStart, CapabilitiesSetup, + CapabilitiesSwitcherOptions, } from '@kbn/core-capabilities-server'; +import type { SwitcherWithOptions } from './types'; import { mergeCapabilities } from './merge_capabilities'; import { getCapabilitiesResolver, CapabilitiesResolver } from './resolve_capabilities'; import { registerRoutes } from './routes'; @@ -41,8 +43,9 @@ const defaultCapabilities: Capabilities = { export class CapabilitiesService { private readonly logger: Logger; private readonly capabilitiesProviders: CapabilitiesProvider[] = []; - private readonly capabilitiesSwitchers: CapabilitiesSwitcher[] = []; + private readonly capabilitiesSwitchers: SwitcherWithOptions[] = []; private readonly resolveCapabilities: CapabilitiesResolver; + private started = false; constructor(core: CoreContext) { this.logger = core.logger.get('capabilities-service'); @@ -73,18 +76,38 @@ export class CapabilitiesService { return { registerProvider: (provider: CapabilitiesProvider) => { + if (this.started) { + throw new Error('registerProvider cannot be called after #start'); + } this.capabilitiesProviders.push(provider); }, - registerSwitcher: (switcher: CapabilitiesSwitcher) => { - this.capabilitiesSwitchers.push(switcher); + registerSwitcher: (switcher: CapabilitiesSwitcher, options: CapabilitiesSwitcherOptions) => { + if (this.started) { + throw new Error('registerSwitcher cannot be called after #start'); + } + this.capabilitiesSwitchers.push({ + switcher, + capabilityPath: Array.isArray(options.capabilityPath) + ? options.capabilityPath + : [options.capabilityPath], + }); }, }; } public start(): CapabilitiesStart { + this.started = true; + return { resolveCapabilities: (request, options) => - this.resolveCapabilities(request, [], options?.useDefaultCapabilities ?? false), + this.resolveCapabilities({ + request, + capabilityPath: Array.isArray(options.capabilityPath) + ? options.capabilityPath + : [options.capabilityPath], + useDefaultCapabilities: options.useDefaultCapabilities ?? false, + applications: [], + }), }; } } diff --git a/packages/core/capabilities/core-capabilities-server-internal/src/resolve_capabilities.test.mocks.ts b/packages/core/capabilities/core-capabilities-server-internal/src/resolve_capabilities.test.mocks.ts new file mode 100644 index 0000000000000..9724732917b76 --- /dev/null +++ b/packages/core/capabilities/core-capabilities-server-internal/src/resolve_capabilities.test.mocks.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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +const actualHelpers = jest.requireActual('./resolve_helpers'); + +export const splitIntoBucketsMock = jest.fn().mockImplementation(actualHelpers.splitIntoBuckets); + +jest.doMock('./resolve_helpers', () => { + return { + ...actualHelpers, + splitIntoBuckets: splitIntoBucketsMock, + }; +}); diff --git a/packages/core/capabilities/core-capabilities-server-internal/src/resolve_capabilities.test.ts b/packages/core/capabilities/core-capabilities-server-internal/src/resolve_capabilities.test.ts index 12589890f32e5..7bd1e0e6d3832 100644 --- a/packages/core/capabilities/core-capabilities-server-internal/src/resolve_capabilities.test.ts +++ b/packages/core/capabilities/core-capabilities-server-internal/src/resolve_capabilities.test.ts @@ -6,16 +6,20 @@ * Side Public License, v 1. */ +import { splitIntoBucketsMock } from './resolve_capabilities.test.mocks'; import type { KibanaRequest } from '@kbn/core-http-server'; import { httpServerMock } from '@kbn/core-http-server-mocks'; import type { Capabilities } from '@kbn/core-capabilities-common'; -import { resolveCapabilities } from './resolve_capabilities'; +import { getCapabilitiesResolver } from './resolve_capabilities'; +import type { SwitcherWithOptions } from './types'; describe('resolveCapabilities', () => { let defaultCaps: Capabilities; let request: KibanaRequest; beforeEach(() => { + splitIntoBucketsMock.mockClear(); + defaultCaps = { navLinks: {}, catalogue: {}, @@ -24,28 +28,53 @@ describe('resolveCapabilities', () => { request = httpServerMock.createKibanaRequest(); }); - it('returns the initial capabilities if no switcher are used', async () => { - const result = await resolveCapabilities(defaultCaps, [], request, [], true); - expect(result).toEqual(defaultCaps); - }); + describe('base feature', () => { + it('returns the initial capabilities if no switcher are used', async () => { + const result = await getCapabilitiesResolver( + () => defaultCaps, + () => [] + )({ + request, + capabilityPath: ['*'], + applications: [], + useDefaultCapabilities: false, + }); - it('applies the switcher to the capabilities ', async () => { - const caps = { - ...defaultCaps, - catalogue: { - A: true, - B: true, - }, - }; - const switcher = (req: KibanaRequest, capabilities: Capabilities) => ({ - ...capabilities, - catalogue: { - ...capabilities.catalogue, - A: false, - }, + expect(result).toEqual(defaultCaps); }); - const result = await resolveCapabilities(caps, [switcher], request, [], true); - expect(result).toMatchInlineSnapshot(` + + it('applies the switcher to the capabilities ', async () => { + const caps = { + ...defaultCaps, + catalogue: { + A: true, + B: true, + }, + }; + const switcher = (req: KibanaRequest, capabilities: Capabilities) => ({ + ...capabilities, + catalogue: { + ...capabilities.catalogue, + A: false, + }, + }); + + const result = await getCapabilitiesResolver( + () => caps, + () => [ + { + switcher, + capabilityPath: ['*'], + }, + ] + )({ + request, + capabilityPath: ['*'], + applications: [], + useDefaultCapabilities: false, + }); + + expect(result).toMatchInlineSnapshot(` Object { "catalogue": Object { "A": false, @@ -55,99 +84,423 @@ describe('resolveCapabilities', () => { "navLinks": Object {}, } `); - }); + }); + + it('does not mutate the input capabilities', async () => { + const caps = { + ...defaultCaps, + catalogue: { + A: true, + B: true, + }, + }; + const switcher = (req: KibanaRequest, capabilities: Capabilities) => ({ + ...capabilities, + catalogue: { + ...capabilities.catalogue, + A: false, + }, + }); + + await getCapabilitiesResolver( + () => caps, + () => [ + { + switcher, + capabilityPath: ['*'], + }, + ] + )({ + request, + capabilityPath: ['*'], + applications: [], + useDefaultCapabilities: false, + }); - it('does not mutate the input capabilities', async () => { - const caps = { - ...defaultCaps, - catalogue: { + expect(caps.catalogue).toEqual({ A: true, B: true, - }, - }; - const switcher = (req: KibanaRequest, capabilities: Capabilities) => ({ - ...capabilities, - catalogue: { - ...capabilities.catalogue, - A: false, - }, - }); - await resolveCapabilities(caps, [switcher], request, [], true); - expect(caps.catalogue).toEqual({ - A: true, - B: true, + }); }); - }); - it('ignores any added capability from the switcher', async () => { - const caps = { - ...defaultCaps, - catalogue: { + it('ignores any added capability from the switcher', async () => { + const caps = { + ...defaultCaps, + catalogue: { + A: true, + B: true, + }, + }; + const switcher = (req: KibanaRequest, capabilities: Capabilities) => ({ + ...capabilities, + catalogue: { + ...capabilities.catalogue, + C: false, + }, + }); + + const result = await getCapabilitiesResolver( + () => caps, + () => [ + { + switcher, + capabilityPath: ['*'], + }, + ] + )({ + request, + capabilityPath: ['*'], + applications: [], + useDefaultCapabilities: false, + }); + + expect(result.catalogue).toEqual({ A: true, B: true, - }, - }; - const switcher = (req: KibanaRequest, capabilities: Capabilities) => ({ - ...capabilities, - catalogue: { - ...capabilities.catalogue, - C: false, - }, + }); }); - const result = await resolveCapabilities(caps, [switcher], request, [], true); - expect(result.catalogue).toEqual({ - A: true, - B: true, - }); - }); - it('ignores any removed capability from the switcher', async () => { - const caps = { - ...defaultCaps, - catalogue: { + it('ignores any removed capability from the switcher', async () => { + const caps = { + ...defaultCaps, + catalogue: { + A: true, + B: true, + C: true, + }, + }; + const switcher = (req: KibanaRequest, capabilities: Capabilities) => ({ + ...capabilities, + catalogue: Object.entries(capabilities.catalogue) + .filter(([key]) => key !== 'B') + .reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {}), + }); + const result = await getCapabilitiesResolver( + () => caps, + () => [ + { + switcher, + capabilityPath: ['*'], + }, + ] + )({ + request, + capabilityPath: ['*'], + applications: [], + useDefaultCapabilities: false, + }); + expect(result.catalogue).toEqual({ A: true, B: true, C: true, - }, - }; - const switcher = (req: KibanaRequest, capabilities: Capabilities) => ({ - ...capabilities, - catalogue: Object.entries(capabilities.catalogue) - .filter(([key]) => key !== 'B') - .reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {}), - }); - const result = await resolveCapabilities(caps, [switcher], request, [], true); - expect(result.catalogue).toEqual({ - A: true, - B: true, - C: true, + }); }); - }); - it('ignores any capability type mutation from the switcher', async () => { - const caps = { - ...defaultCaps, - section: { + it('ignores any capability type mutation from the switcher', async () => { + const caps = { + ...defaultCaps, + section: { + boolean: true, + record: { + entry: true, + }, + }, + }; + const switcher = (req: KibanaRequest, capabilities: Capabilities) => ({ + section: { + boolean: { + entry: false, + }, + record: false, + }, + }); + const result = await getCapabilitiesResolver( + () => caps, + () => [ + { + switcher, + capabilityPath: ['*'], + }, + ] + )({ + request, + capabilityPath: ['*'], + applications: [], + useDefaultCapabilities: false, + }); + expect(result.section).toEqual({ boolean: true, record: { entry: true, }, - }, + }); + }); + }); + + describe('multiple switchers', () => { + const getCapabilities = (overrides: Partial): Capabilities => { + return { + ...defaultCaps, + ...overrides, + } as Capabilities; }; - const switcher = (req: KibanaRequest, capabilities: Capabilities) => ({ - section: { - boolean: { - entry: false, + + it('applies multiple switchers', async () => { + const caps = getCapabilities({ + section: { + entryA: true, + entryB: true, + entryC: true, + }, + }); + + const switcherA: SwitcherWithOptions = { + switcher: (req: KibanaRequest, capabilities: Capabilities) => ({ + section: { + entryA: false, + }, + }), + capabilityPath: ['*'], + }; + const switcherB: SwitcherWithOptions = { + switcher: (req: KibanaRequest, capabilities: Capabilities) => ({ + section: { + entryB: false, + }, + }), + capabilityPath: ['*'], + }; + + const result = await getCapabilitiesResolver( + () => caps, + () => [switcherA, switcherB] + )({ + request, + capabilityPath: ['*'], + applications: [], + useDefaultCapabilities: false, + }); + + expect(result.section).toEqual({ + entryA: false, + entryB: false, + entryC: true, + }); + }); + + it('only applies the switchers intersecting with the requested paths', async () => { + const caps = getCapabilities({ + section: { + entryA: true, + entryB: true, + entryC: true, }, - record: false, - }, + }); + + const switcherAFunc = jest.fn().mockResolvedValue({}); + const switcherBFunc = jest.fn().mockResolvedValue({}); + const switcherCFunc = jest.fn().mockResolvedValue({}); + + const switcherA: SwitcherWithOptions = { + switcher: switcherAFunc, + capabilityPath: ['*'], + }; + const switcherB: SwitcherWithOptions = { + switcher: switcherBFunc, + capabilityPath: ['ml.*'], + }; + const switcherC: SwitcherWithOptions = { + switcher: switcherCFunc, + capabilityPath: ['fileUpload.*'], + }; + + await getCapabilitiesResolver( + () => caps, + () => [switcherA, switcherB, switcherC] + )({ + request, + capabilityPath: ['ml.*'], + applications: [], + useDefaultCapabilities: false, + }); + + expect(switcherAFunc).toHaveBeenCalledTimes(1); + expect(switcherBFunc).toHaveBeenCalledTimes(1); + expect(switcherCFunc).toHaveBeenCalledTimes(0); + }); + + it('returns full capabilities even if not all switchers were applied', async () => { + const caps = getCapabilities({ + section: { + entryA: true, + entryB: true, + entryC: true, + }, + }); + + const switcherA: SwitcherWithOptions = { + switcher: (req: KibanaRequest, capabilities: Capabilities) => ({ + section: { + entryA: false, + }, + }), + capabilityPath: ['section.entryA'], + }; + const switcherB: SwitcherWithOptions = { + switcher: (req: KibanaRequest, capabilities: Capabilities) => ({ + section: { + entryB: false, + }, + }), + capabilityPath: ['section.entryB'], + }; + + const result = await getCapabilitiesResolver( + () => caps, + () => [switcherA, switcherB] + )({ + request, + capabilityPath: ['section.entryA'], + applications: [], + useDefaultCapabilities: false, + }); + + expect(result.section).toEqual({ + entryA: false, + entryB: true, + entryC: true, + }); }); - const result = await resolveCapabilities(caps, [switcher], request, [], true); - expect(result.section).toEqual({ - boolean: true, - record: { - entry: true, - }, + }); + + describe('caching behavior', () => { + it('caches results between calls for the same capability path', async () => { + const resolver = getCapabilitiesResolver( + () => defaultCaps, + () => [] + ); + + await resolver({ + request, + capabilityPath: ['*'], + applications: [], + useDefaultCapabilities: false, + }); + + expect(splitIntoBucketsMock).toHaveBeenCalledTimes(1); + + await resolver({ + request, + capabilityPath: ['*'], + applications: [], + useDefaultCapabilities: false, + }); + + expect(splitIntoBucketsMock).toHaveBeenCalledTimes(1); + }); + + it('does not cache results between calls for different capability path', async () => { + const resolver = getCapabilitiesResolver( + () => defaultCaps, + () => [] + ); + + await resolver({ + request, + capabilityPath: ['*'], + applications: [], + useDefaultCapabilities: false, + }); + + expect(splitIntoBucketsMock).toHaveBeenCalledTimes(1); + + await resolver({ + request, + capabilityPath: ['ml.*'], + applications: [], + useDefaultCapabilities: false, + }); + + expect(splitIntoBucketsMock).toHaveBeenCalledTimes(2); + }); + + it('caches results between calls for the same capability paths', async () => { + const resolver = getCapabilitiesResolver( + () => defaultCaps, + () => [] + ); + + await resolver({ + request, + capabilityPath: ['ml.*', 'file.*'], + applications: [], + useDefaultCapabilities: false, + }); + + expect(splitIntoBucketsMock).toHaveBeenCalledTimes(1); + + await resolver({ + request, + capabilityPath: ['ml.*', 'file.*'], + applications: [], + useDefaultCapabilities: false, + }); + + expect(splitIntoBucketsMock).toHaveBeenCalledTimes(1); + }); + + it('does not cache results between calls for different capability paths', async () => { + const resolver = getCapabilitiesResolver( + () => defaultCaps, + () => [] + ); + + await resolver({ + request, + capabilityPath: ['ml.*', 'file.*'], + applications: [], + useDefaultCapabilities: false, + }); + + expect(splitIntoBucketsMock).toHaveBeenCalledTimes(1); + + await resolver({ + request, + capabilityPath: ['ml.*', 'not-file.*'], + applications: [], + useDefaultCapabilities: false, + }); + + expect(splitIntoBucketsMock).toHaveBeenCalledTimes(2); + }); + + it('does not cache results between calls from different resolvers', async () => { + const resolverA = getCapabilitiesResolver( + () => defaultCaps, + () => [] + ); + const resolverB = getCapabilitiesResolver( + () => defaultCaps, + () => [] + ); + + await resolverA({ + request, + capabilityPath: ['*'], + applications: [], + useDefaultCapabilities: false, + }); + + expect(splitIntoBucketsMock).toHaveBeenCalledTimes(1); + + await resolverB({ + request, + capabilityPath: ['*'], + applications: [], + useDefaultCapabilities: false, + }); + + expect(splitIntoBucketsMock).toHaveBeenCalledTimes(2); }); }); }); diff --git a/packages/core/capabilities/core-capabilities-server-internal/src/resolve_capabilities.ts b/packages/core/capabilities/core-capabilities-server-internal/src/resolve_capabilities.ts index f30392a2213ba..b1dc24ef64d06 100644 --- a/packages/core/capabilities/core-capabilities-server-internal/src/resolve_capabilities.ts +++ b/packages/core/capabilities/core-capabilities-server-internal/src/resolve_capabilities.ts @@ -6,46 +6,92 @@ * Side Public License, v 1. */ -import { cloneDeep } from 'lodash'; +import { cloneDeep, memoize, uniqueId } from 'lodash'; import { withSpan } from '@kbn/apm-utils'; +import type { CapabilitiesSwitcher } from '@kbn/core-capabilities-server'; import type { KibanaRequest } from '@kbn/core-http-server'; import type { Capabilities } from '@kbn/core-capabilities-common'; -import type { CapabilitiesSwitcher } from '@kbn/core-capabilities-server'; +import type { SwitcherWithOptions, SwitcherWithId } from './types'; +import { pathsIntersect, splitIntoBuckets, convertBucketToSwitcher } from './resolve_helpers'; -export type CapabilitiesResolver = ( - request: KibanaRequest, - applications: string[], - useDefaultCapabilities: boolean -) => Promise; +export type CapabilitiesResolver = ({ + request, + capabilityPath, + applications, + useDefaultCapabilities, +}: { + request: KibanaRequest; + capabilityPath: string[]; + applications: string[]; + useDefaultCapabilities: boolean; +}) => Promise; + +type ForPathSwitcherResolver = (path: string, switchers: SwitcherWithId[]) => string[]; +type AggregatedSwitchersResolver = (capabilityPaths: string[]) => CapabilitiesSwitcher[]; + +export const getCapabilitiesResolver = ( + getCapabilities: () => Capabilities, + getSwitchers: () => SwitcherWithOptions[] +): CapabilitiesResolver => { + let initialized = false; + let capabilities: Capabilities; + let switchers: Map; + // memoize is on the first argument only by default, which is what we want here + const getSwitcherForPath: ForPathSwitcherResolver = memoize(getSwitchersToUseForPath); + let getAggregatedSwitchers: AggregatedSwitchersResolver; + + return async ({ + request, + capabilityPath, + applications, + useDefaultCapabilities, + }): Promise => { + // initialize on first call (can't do it before as we need to wait plugins start to complete) + if (!initialized) { + capabilities = getCapabilities(); + switchers = new Map(); + getSwitchers().forEach((switcher) => { + const switcherId = uniqueId('s-'); + switchers.set(switcherId, { + id: switcherId, + ...switcher, + }); + }); + getAggregatedSwitchers = memoize( + buildGetAggregatedSwitchers(getSwitcherForPath, switchers), + (capabilityPaths: string[]) => capabilityPaths.join('|') + ); + initialized = true; + } -export const getCapabilitiesResolver = - ( - capabilities: () => Capabilities, - switchers: () => CapabilitiesSwitcher[] - ): CapabilitiesResolver => - async ( - request: KibanaRequest, - applications: string[], - useDefaultCapabilities: boolean - ): Promise => { return withSpan({ name: 'resolve capabilities', type: 'capabilities' }, () => - resolveCapabilities( - capabilities(), - switchers(), + resolveCapabilities({ + capabilities, request, + capabilityPath, applications, - useDefaultCapabilities - ) + useDefaultCapabilities, + getAggregatedSwitchers, + }) ); }; +}; -export const resolveCapabilities = async ( - capabilities: Capabilities, - switchers: CapabilitiesSwitcher[], - request: KibanaRequest, - applications: string[], - useDefaultCapabilities: boolean -): Promise => { +const resolveCapabilities = async ({ + capabilities, + request, + capabilityPath, + applications, + useDefaultCapabilities, + getAggregatedSwitchers, +}: { + capabilities: Capabilities; + request: KibanaRequest; + applications: string[]; + capabilityPath: string[]; + useDefaultCapabilities: boolean; + getAggregatedSwitchers: AggregatedSwitchersResolver; +}): Promise => { const mergedCaps: Capabilities = cloneDeep({ ...capabilities, navLinks: applications.reduce((acc, app) => { @@ -54,6 +100,8 @@ export const resolveCapabilities = async ( }, capabilities.navLinks), }); + const switchers = getAggregatedSwitchers(capabilityPath); + return switchers.reduce(async (caps, switcher) => { const resolvedCaps = await caps; const changes = await switcher(request, resolvedCaps, useDefaultCapabilities); @@ -82,3 +130,38 @@ function recursiveApplyChanges< return acc; }, {} as TDestination); } + +const getSwitchersToUseForPath = (path: string, switchers: SwitcherWithId[]): string[] => { + const switcherIds: string[] = []; + switchers.forEach((switcher) => { + if (switcher.capabilityPath.some((switcherPath) => pathsIntersect(path, switcherPath))) { + switcherIds.push(switcher.id); + } + }); + return switcherIds; +}; + +const buildGetAggregatedSwitchers = + ( + getSwitcherForPath: ForPathSwitcherResolver, + switcherMap: Map + ): AggregatedSwitchersResolver => + (capabilityPaths: string[]): CapabilitiesSwitcher[] => { + // find switchers that should be applied for the provided capabilityPaths + const allSwitchers = [...switcherMap.values()]; + const switcherIdsToApply = new Set(); + capabilityPaths.forEach((path) => { + getSwitcherForPath(path, allSwitchers).forEach((switcherId) => + switcherIdsToApply.add(switcherId) + ); + }); + const switchersToApply = [...switcherIdsToApply].map( + (switcherId) => switcherMap.get(switcherId)! + ); + + // split the switchers into buckets for parallel execution + const switcherBuckets = splitIntoBuckets(switchersToApply); + + // convert the multi-switcher buckets into switchers + return switcherBuckets.map(convertBucketToSwitcher); + }; diff --git a/packages/core/capabilities/core-capabilities-server-internal/src/resolve_helpers.test.ts b/packages/core/capabilities/core-capabilities-server-internal/src/resolve_helpers.test.ts new file mode 100644 index 0000000000000..6e3e6164505d0 --- /dev/null +++ b/packages/core/capabilities/core-capabilities-server-internal/src/resolve_helpers.test.ts @@ -0,0 +1,172 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { httpServerMock } from '@kbn/core-http-server-mocks'; +import type { Capabilities } from '@kbn/core-capabilities-common'; +import type { CapabilitiesSwitcher } from '@kbn/core-capabilities-server'; +import { pathsIntersect, splitIntoBuckets, convertBucketToSwitcher } from './resolve_helpers'; +import type { SwitcherWithId, SwitcherBucket } from './types'; + +describe('pathsIntersect', () => { + test.each([ + ['*', '*', true], + ['foo', 'foo', true], + ['foo.*', '*', true], + ['bar', '*', true], + ['foo.bar', '*', true], + ['foo.bar', 'foo.*', true], + ['foo.bar', 'foo.bar', true], + ['foo', 'bar', false], + ['foo.*', 'bar.*', false], + ['foo.bar', 'bar.*', false], + ['common.foo', 'common.bar', false], + ['common.foo.*', 'common.bar.*', false], + ])('%p and %p returns %p', (pathA, pathB, expected) => { + expect(pathsIntersect(pathA, pathB)).toBe(expected); + expect(pathsIntersect(pathB, pathA)).toBe(expected); + }); +}); + +describe('splitIntoBuckets', () => { + const extractIds = (buckets: SwitcherBucket[]): string[][] => { + return buckets.map((bucket) => bucket.switchers.map((switcher) => switcher.id)); + }; + + const switcherWithId = (id: string, paths: string | string[]): SwitcherWithId => { + return { + id, + capabilityPath: Array.isArray(paths) ? paths : [paths], + switcher: jest.fn(), + }; + }; + + it('properly dispatch the switchers, simple case', () => { + const switchers = [ + switcherWithId('1', ['*']), + switcherWithId('2', ['foo.*']), + switcherWithId('3', ['*']), + switcherWithId('4', ['bar.*']), + ]; + + const result = splitIntoBuckets(switchers); + expect(extractIds(result)).toEqual([['1'], ['2', '4'], ['3']]); + }); + + it('properly dispatch the switchers, more advanced case', () => { + const switchers = [ + switcherWithId('1', ['*']), + switcherWithId('2', ['foo.*']), + switcherWithId('3', ['foo.hello.*']), + switcherWithId('4', ['bar.*']), + switcherWithId('5', ['*']), + switcherWithId('6', ['bar.*']), + ]; + + const result = splitIntoBuckets(switchers); + expect(extractIds(result)).toEqual([['1'], ['2', '4'], ['3', '6'], ['5']]); + }); +}); + +describe('convertBucketToSwitcher', () => { + const switcherFromFn = (fn: CapabilitiesSwitcher): SwitcherWithId => { + return { + id: '42', + capabilityPath: ['*'], + switcher: fn, + }; + }; + + test('the underlying switchers are all called', async () => { + const switcher1 = jest.fn(); + const switcher2 = jest.fn(); + const switcher3 = jest.fn(); + + const bucket: SwitcherBucket = { + bucketPaths: new Set(['*']), + switchers: [switcherFromFn(switcher1), switcherFromFn(switcher2), switcherFromFn(switcher3)], + }; + + const switcher = convertBucketToSwitcher(bucket); + + const request = httpServerMock.createKibanaRequest(); + await switcher(request, {} as Capabilities, false); + + expect(switcher1).toHaveBeenCalledTimes(1); + expect(switcher2).toHaveBeenCalledTimes(1); + expect(switcher3).toHaveBeenCalledTimes(1); + }); + + test('the underlying switchers are called with the correct arguments', async () => { + const switcher1 = jest.fn(); + const switcher2 = jest.fn(); + const switcher3 = jest.fn(); + + const bucket: SwitcherBucket = { + bucketPaths: new Set(['*']), + switchers: [switcherFromFn(switcher1), switcherFromFn(switcher2), switcherFromFn(switcher3)], + }; + + const switcher = convertBucketToSwitcher(bucket); + + const request = httpServerMock.createKibanaRequest(); + const capabilities = { navLinks: { bar: false } } as unknown as Capabilities; + await switcher(request, capabilities, false); + + expect(switcher1).toHaveBeenCalledWith(request, capabilities, false); + expect(switcher2).toHaveBeenCalledWith(request, capabilities, false); + expect(switcher3).toHaveBeenCalledWith(request, capabilities, false); + }); + + test('returns the aggregated result from all the underlying switchers', async () => { + const switcher1 = jest.fn().mockResolvedValue({ foo: { bar: 1 } }); + const switcher2 = jest.fn().mockResolvedValue({ bar: { hello: 2 } }); + const switcher3 = jest.fn().mockResolvedValue({ hello: { dolly: 3 } }); + + const bucket: SwitcherBucket = { + bucketPaths: new Set(['*']), + switchers: [switcherFromFn(switcher1), switcherFromFn(switcher2), switcherFromFn(switcher3)], + }; + + const switcher = convertBucketToSwitcher(bucket); + + const request = httpServerMock.createKibanaRequest(); + const capabilities = { navLinks: { bar: false } } as unknown as Capabilities; + const changes = await switcher(request, capabilities, false); + + expect(changes).toEqual({ + foo: { bar: 1 }, + bar: { hello: 2 }, + hello: { dolly: 3 }, + }); + }); + + test('result aggregation works even for non-intersecting nested values', async () => { + const switcher1 = jest.fn().mockResolvedValue({ nested: { foo: 1 } }); + const switcher2 = jest.fn().mockResolvedValue({ nested: { bar: 2 } }); + const switcher3 = jest.fn().mockResolvedValue({ nested: { dolly: 3 } }); + + const bucket: SwitcherBucket = { + bucketPaths: new Set(['*']), + switchers: [switcherFromFn(switcher1), switcherFromFn(switcher2), switcherFromFn(switcher3)], + }; + + const switcher = convertBucketToSwitcher(bucket); + + const request = httpServerMock.createKibanaRequest(); + const capabilities = { navLinks: { bar: false } } as unknown as Capabilities; + const changes = await switcher(request, capabilities, false); + + expect(changes).toEqual({ + nested: { + foo: 1, + bar: 2, + dolly: 3, + }, + }); + }); +}); diff --git a/packages/core/capabilities/core-capabilities-server-internal/src/resolve_helpers.ts b/packages/core/capabilities/core-capabilities-server-internal/src/resolve_helpers.ts new file mode 100644 index 0000000000000..5b183ec52b530 --- /dev/null +++ b/packages/core/capabilities/core-capabilities-server-internal/src/resolve_helpers.ts @@ -0,0 +1,117 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { merge } from 'lodash'; +import type { CapabilitiesSwitcher } from '@kbn/core-capabilities-server'; +import type { SwitcherWithId, SwitcherBucket } from './types'; + +/** + * Returns true if the two globing paths can intersect. + * + * @example + * ```ts + * pathsIntersect('*', '*'); // true + * pathsIntersect('*', 'foo.bar'); // true + * pathsIntersect('foo.*', 'bar.*'); // false + * ``` + * + * @internal + */ +export const pathsIntersect = (pathA: string, pathB: string): boolean => { + const splitA = pathA.split('.'); + const splitB = pathB.split('.'); + const minLength = Math.min(splitA.length, splitB.length); + + for (let i = 0; i < minLength; i++) { + const segA = splitA[i]; + const segB = splitB[i]; + if (segA === '*' || segB === '*') { + return true; + } + if (segA !== segB) { + return false; + } + } + return splitA.length === splitB.length; +}; + +/** + * Splits the provided switchers into buckets so that switchers allocated + * into a given buckets can all be executed in parallel. + * (each switcher in a given bucket doesn't intersect with any other switcher of the same bucket) + * + * @internal + */ +export const splitIntoBuckets = (switchers: SwitcherWithId[]): SwitcherBucket[] => { + const buckets: SwitcherBucket[] = []; + + const canBeAddedToBucket = (switcher: SwitcherWithId, bucket: SwitcherBucket): boolean => { + const bucketPaths = [...bucket.bucketPaths]; + for (const switcherPath of switcher.capabilityPath) { + for (const bucketPath of bucketPaths) { + if (pathsIntersect(switcherPath, bucketPath)) { + return false; + } + } + } + return true; + }; + + const addIntoBucket = (switcher: SwitcherWithId, bucket: SwitcherBucket) => { + bucket.switchers.push(switcher); + switcher.capabilityPath.forEach((path) => { + bucket.bucketPaths.add(path); + }); + }; + + for (const switcher of switchers) { + let added = false; + for (const bucket of buckets) { + // switcher can be added -> we do and we break + if (canBeAddedToBucket(switcher, bucket)) { + addIntoBucket(switcher, bucket); + added = true; + break; + } + } + // could not find a bucket to add the switch to -> creating a new one + if (!added) { + buckets.push({ + switchers: [switcher], + bucketPaths: new Set(switcher.capabilityPath), + }); + } + } + + return buckets; +}; + +/** + * Aggregates all the switchers of the given bucket to a single switcher function. + * Only works under the assumption that the switchers in the bucket don't intersect + * (But that's the definition of a switcher bucket) + * + * @internal + */ +export const convertBucketToSwitcher = (bucket: SwitcherBucket): CapabilitiesSwitcher => { + // only one switcher in the bucket -> no need to wrap + if (bucket.switchers.length === 1) { + return bucket.switchers[0].switcher; + } + + const switchers = bucket.switchers.map((switcher) => switcher.switcher); + + return async (request, uiCapabilities, useDefaultCapabilities) => { + const allChanges = await Promise.all( + switchers.map((switcher) => { + return switcher(request, uiCapabilities, useDefaultCapabilities); + }) + ); + return merge({}, ...allChanges); + }; +}; diff --git a/packages/core/capabilities/core-capabilities-server-internal/src/routes/resolve_capabilities.ts b/packages/core/capabilities/core-capabilities-server-internal/src/routes/resolve_capabilities.ts index 1b29473801e49..48b182aa61016 100644 --- a/packages/core/capabilities/core-capabilities-server-internal/src/routes/resolve_capabilities.ts +++ b/packages/core/capabilities/core-capabilities-server-internal/src/routes/resolve_capabilities.ts @@ -39,7 +39,12 @@ export function registerCapabilitiesRoutes(router: IRouter, resolver: Capabiliti async (ctx, req, res) => { const { useDefaultCapabilities } = req.query; const { applications } = req.body; - const capabilities = await resolver(req, applications, useDefaultCapabilities); + const capabilities = await resolver({ + request: req, + applications, + useDefaultCapabilities, + capabilityPath: ['*'], + }); return res.ok({ body: capabilities, }); diff --git a/packages/core/capabilities/core-capabilities-server-internal/src/types.ts b/packages/core/capabilities/core-capabilities-server-internal/src/types.ts new file mode 100644 index 0000000000000..dcf8b03d57c50 --- /dev/null +++ b/packages/core/capabilities/core-capabilities-server-internal/src/types.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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import type { CapabilitiesSwitcher } from '@kbn/core-capabilities-server'; + +export interface SwitcherWithOptions { + switcher: CapabilitiesSwitcher; + capabilityPath: string[]; +} + +export interface SwitcherWithId extends SwitcherWithOptions { + id: string; +} + +export interface SwitcherBucket { + switchers: SwitcherWithId[]; + bucketPaths: Set; +} diff --git a/packages/core/capabilities/core-capabilities-server/index.ts b/packages/core/capabilities/core-capabilities-server/index.ts index 16fe575072521..286fa8e80e907 100644 --- a/packages/core/capabilities/core-capabilities-server/index.ts +++ b/packages/core/capabilities/core-capabilities-server/index.ts @@ -11,4 +11,5 @@ export type { CapabilitiesSetup, CapabilitiesStart, ResolveCapabilitiesOptions, + CapabilitiesSwitcherOptions, } from './src/contracts'; diff --git a/packages/core/capabilities/core-capabilities-server/src/contracts.ts b/packages/core/capabilities/core-capabilities-server/src/contracts.ts index 8f89b2fc777d4..9dfc5995dd7d5 100644 --- a/packages/core/capabilities/core-capabilities-server/src/contracts.ts +++ b/packages/core/capabilities/core-capabilities-server/src/contracts.ts @@ -61,7 +61,7 @@ export interface CapabilitiesSetup { * ```ts * // my-plugin/server/plugin.ts * public setup(core: CoreSetup, deps: {}) { - * core.capabilities.registerSwitcher((request, capabilities, useDefaultCapabilities) => { + * core.capabilities.registerSwitcher(async (request, capabilities, useDefaultCapabilities) => { * // useDefaultCapabilities is a special case that switchers typically don't have to concern themselves with. * // The default capabilities are typically the ones you provide in your CapabilitiesProvider, but this flag * // gives each switcher an opportunity to change the default capabilities of other plugins' capabilities. @@ -74,7 +74,7 @@ export interface CapabilitiesSetup { * } * } * } - * if(myPluginApi.shouldRestrictSomePluginBecauseOf(request)) { + * if(await myPluginApi.shouldRestrictSomePluginBecauseOf(request)) { * return { * somePlugin: { * featureEnabledByDefault: false // `featureEnabledByDefault` will be disabled. All other capabilities will remain unchanged. @@ -82,36 +82,73 @@ export interface CapabilitiesSetup { * } * } * return {}; // All capabilities will remain unchanged. + * }, { + * // the switcher only toggles capabilities under the 'somePlugin' path + * capabilityPath: 'somePlugin', * }); * } * ``` */ - registerSwitcher(switcher: CapabilitiesSwitcher): void; + registerSwitcher(switcher: CapabilitiesSwitcher, options: CapabilitiesSwitcherOptions): void; } /** - * Defines a set of additional options for the `resolveCapabilities` method of {@link CapabilitiesStart}. + * APIs to access the application {@link Capabilities}. + * + * @public + */ +export interface CapabilitiesStart { + /** + * Resolve the {@link Capabilities} to be used for given request + * + * @param request The request to resolve capabilities for + * @param options.capabilityPath The path(s) of the capabilities that needs to be retrieved. Use '*' to retrieve all paths. + * Used to avoid unnecessarily running switched on parts of the capabilities that won't be used by the API consumer. + * + * @example + * ```ts + * const mlCapabilities = (await coreStart.capabilities.resolveCapabilities(request, 'ml')).ml; + * ``` + */ + resolveCapabilities( + request: KibanaRequest, + options: ResolveCapabilitiesOptions + ): Promise; +} + +/** + * Options for {@link CapabilitiesStart.resolveCapabilities}. * * @public */ export interface ResolveCapabilitiesOptions { + /** + * The path(s) of capabilities that the API consumer is interested in. The '*' wildcard is supported as a suffix only. + * + * E.g. capabilityPath: "*" or capabilityPath: "myPlugin.*" or capabilityPath: "myPlugin.myKey" + * + * @remark All the capabilities will be returned, but the ones not matching the specified path(s) may not have been processed + * by the capability switchers and should not be used. + */ + capabilityPath: string | string[]; /** * Indicates if capability switchers are supposed to return a default set of capabilities. + * + * Defaults to `false` */ - useDefaultCapabilities: boolean; + useDefaultCapabilities?: boolean; } /** - * APIs to access the application {@link Capabilities}. + * Options for the {@link CapabilitiesSetup.registerSwitcher} API. * * @public */ -export interface CapabilitiesStart { +export interface CapabilitiesSwitcherOptions { /** - * Resolve the {@link Capabilities} to be used for given request + * The path(s) of capabilities the switcher may alter. The '*' wildcard is supported as a suffix only. + * + * E.g. capabilityPath: "myPlugin.*" or capabilityPath: "myPlugin.myKey" */ - resolveCapabilities( - request: KibanaRequest, - options?: ResolveCapabilitiesOptions - ): Promise; + capabilityPath: string | string[]; } diff --git a/packages/core/chrome/core-chrome-browser-internal/src/ui/project/header.tsx b/packages/core/chrome/core-chrome-browser-internal/src/ui/project/header.tsx index 0892b0c363911..30fe35be0b551 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/ui/project/header.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/project/header.tsx @@ -196,10 +196,6 @@ export const ProjectHeader = ({ /> - - - - diff --git a/packages/core/logging/core-logging-common-internal/src/layouts/conversions/message.test.ts b/packages/core/logging/core-logging-common-internal/src/layouts/conversions/message.test.ts index cf16b57c92782..2c84635d6711c 100644 --- a/packages/core/logging/core-logging-common-internal/src/layouts/conversions/message.test.ts +++ b/packages/core/logging/core-logging-common-internal/src/layouts/conversions/message.test.ts @@ -62,4 +62,52 @@ describe('MessageConversion', () => { '\\u001b\\u0000[31mESC-INJECTION-LFUNICODE:\\u001b[32mSUCCESSFUL\\u001b[0m\\u0007\n\nInjecting 10.000 lols 😂\\u001b[10000;b\\u0007' ); }); + + test('it should encode/escape ANSI chars lines from the message when not a string', () => { + expect( + MessageConversion.convert( + { + ...baseRecord, + // @ts-expect-error message is supposed to be a string + message: { + toString: () => 'toString...\u001b[5;7;6mThis is Fine\u001b[27m', + }, + }, + false + ) + ).toEqual('toString...\\u001b[5;7;6mThis is Fine\\u001b[27m'); + }); + + test('it should encode/escape ANSI chars lines from the error stack', () => { + const error = new Error('Something went bad'); + error.stack = 'stack...\u001b[5;7;6mThis is Fine\u001b[27m'; + expect( + MessageConversion.convert( + { + ...baseRecord, + message: 'Some message that will be ignored', + error, + }, + false + ) + ).toEqual('stack...\\u001b[5;7;6mThis is Fine\\u001b[27m'); + }); + + test('it should encode/escape ANSI chars lines from the error stack when not a string', () => { + expect( + MessageConversion.convert( + { + ...baseRecord, + message: 'Some message that will be ignored', + error: { + // @ts-expect-error message is supposed to be a string + stack: { + toString: () => 'stackToString...\u001b[5;7;6mThis is Fine\u001b[27m', + }, + }, + }, + false + ) + ).toEqual('stackToString...\\u001b[5;7;6mThis is Fine\\u001b[27m'); + }); }); diff --git a/packages/core/logging/core-logging-common-internal/src/layouts/conversions/message.ts b/packages/core/logging/core-logging-common-internal/src/layouts/conversions/message.ts index 706aa478d992b..1d0dd15373aaf 100644 --- a/packages/core/logging/core-logging-common-internal/src/layouts/conversions/message.ts +++ b/packages/core/logging/core-logging-common-internal/src/layouts/conversions/message.ts @@ -17,17 +17,19 @@ export const MessageConversion: Conversion = { pattern: /%message/g, convert(record: LogRecord) { // Error stack is much more useful than just the message. - const str = record.error?.stack || record.message; + let str = record.error?.stack || record.message; + // typings may be wrong, there's scenarios where the message is not a plain string (e.g error stacks from the ES client) + if (typeof str !== 'string') { + str = String(str); + } - return typeof str === 'string' // We need to validate it's a string because, despite types, there are use case where it's not a string :/ - ? str.replace( - CONTROL_CHAR_REGEXP, - // Escaping control chars via JSON.stringify to maintain consistency with `meta` and the JSON layout. - // This way, post analysis of the logs is easier as we can search the same patterns. - // Our benchmark didn't show a big difference in performance between custom-escaping vs. JSON.stringify one. - // The slice is removing the double-quotes. - (substr) => JSON.stringify(substr).slice(1, -1) - ) - : str; + return str.replace( + CONTROL_CHAR_REGEXP, + // Escaping control chars via JSON.stringify to maintain consistency with `meta` and the JSON layout. + // This way, post analysis of the logs is easier as we can search the same patterns. + // Our benchmark didn't show a big difference in performance between custom-escaping vs. JSON.stringify one. + // The slice is removing the double-quotes. + (substr) => JSON.stringify(substr).slice(1, -1) + ); }, }; diff --git a/packages/deeplinks/observability/kibana.jsonc b/packages/deeplinks/observability/kibana.jsonc index 4a93ff4427da8..bc014b05aa407 100644 --- a/packages/deeplinks/observability/kibana.jsonc +++ b/packages/deeplinks/observability/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/deeplinks-observability", - "owner": "@elastic/apm-ui" + "owner": "@elastic/obs-ux-logs-team" } diff --git a/packages/kbn-apm-synthtrace-client/kibana.jsonc b/packages/kbn-apm-synthtrace-client/kibana.jsonc index b9f2d79601d6d..99055f3da4fe9 100644 --- a/packages/kbn-apm-synthtrace-client/kibana.jsonc +++ b/packages/kbn-apm-synthtrace-client/kibana.jsonc @@ -2,5 +2,5 @@ "type": "shared-common", "id": "@kbn/apm-synthtrace-client", "devOnly": true, - "owner": "@elastic/apm-ui" + "owner": "@elastic/obs-ux-infra_services-team" } diff --git a/packages/kbn-apm-synthtrace/kibana.jsonc b/packages/kbn-apm-synthtrace/kibana.jsonc index c1efc5fd09c00..1b3ef5b846149 100644 --- a/packages/kbn-apm-synthtrace/kibana.jsonc +++ b/packages/kbn-apm-synthtrace/kibana.jsonc @@ -2,5 +2,5 @@ "type": "shared-server", "id": "@kbn/apm-synthtrace", "devOnly": true, - "owner": "@elastic/apm-ui" + "owner": "@elastic/obs-ux-infra_services-team" } diff --git a/packages/kbn-apm-utils/kibana.jsonc b/packages/kbn-apm-utils/kibana.jsonc index 950a5dacb9ba8..2ee2a3b45335a 100644 --- a/packages/kbn-apm-utils/kibana.jsonc +++ b/packages/kbn-apm-utils/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/apm-utils", - "owner": "@elastic/apm-ui" + "owner": "@elastic/obs-ux-infra_services-team" } diff --git a/packages/kbn-cell-actions/src/hooks/use_data_grid_column_cell_actions.test.tsx b/packages/kbn-cell-actions/src/hooks/use_data_grid_column_cell_actions.test.tsx index 136ca441588f4..014cb526c81fe 100644 --- a/packages/kbn-cell-actions/src/hooks/use_data_grid_column_cell_actions.test.tsx +++ b/packages/kbn-cell-actions/src/hooks/use_data_grid_column_cell_actions.test.tsx @@ -13,8 +13,8 @@ import { EuiDataGridRefProps, type EuiDataGridColumnCellAction, } from '@elastic/eui'; -import { render, waitFor } from '@testing-library/react'; -import { act, renderHook } from '@testing-library/react-hooks'; +import { render, waitFor, act } from '@testing-library/react'; +import { renderHook } from '@testing-library/react-hooks'; import { makeAction } from '../mocks/helpers'; import { useDataGridColumnsCellActions, diff --git a/packages/kbn-custom-integrations/kibana.jsonc b/packages/kbn-custom-integrations/kibana.jsonc index 61c9067c7e659..995d5bb4ef69d 100644 --- a/packages/kbn-custom-integrations/kibana.jsonc +++ b/packages/kbn-custom-integrations/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/custom-integrations", - "owner": "@elastic/infra-monitoring-ui" + "owner": "@elastic/obs-ux-logs-team" } diff --git a/packages/kbn-es-types/kibana.jsonc b/packages/kbn-es-types/kibana.jsonc index 1c00cab81d2c4..2435d7666cf9a 100644 --- a/packages/kbn-es-types/kibana.jsonc +++ b/packages/kbn-es-types/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/es-types", - "owner": ["@elastic/kibana-core", "@elastic/apm-ui"] + "owner": ["@elastic/kibana-core", "@elastic/obs-knowledge-team"] } diff --git a/packages/kbn-eslint-plugin-i18n/kibana.jsonc b/packages/kbn-eslint-plugin-i18n/kibana.jsonc index 7d8c994400108..72e051941db68 100644 --- a/packages/kbn-eslint-plugin-i18n/kibana.jsonc +++ b/packages/kbn-eslint-plugin-i18n/kibana.jsonc @@ -1,6 +1,6 @@ { "type": "shared-common", "id": "@kbn/eslint-plugin-i18n", - "owner": "@elastic/actionable-observability", + "owner": "@elastic/obs-knowledge-team", "devOnly": true } diff --git a/packages/kbn-eslint-plugin-telemetry/kibana.jsonc b/packages/kbn-eslint-plugin-telemetry/kibana.jsonc index 79c8fbf8adb2b..e3c245a5275d8 100644 --- a/packages/kbn-eslint-plugin-telemetry/kibana.jsonc +++ b/packages/kbn-eslint-plugin-telemetry/kibana.jsonc @@ -1,6 +1,6 @@ { "type": "shared-common", "id": "@kbn/eslint-plugin-telemetry", - "owner": "@elastic/actionable-observability", + "owner": "@elastic/obs-knowledge-team", "devOnly": true } diff --git a/packages/kbn-io-ts-utils/kibana.jsonc b/packages/kbn-io-ts-utils/kibana.jsonc index 7d03717a53153..ea3032a472dc6 100644 --- a/packages/kbn-io-ts-utils/kibana.jsonc +++ b/packages/kbn-io-ts-utils/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/io-ts-utils", - "owner": "@elastic/apm-ui" + "owner": "@elastic/obs-knowledge-team" } diff --git a/packages/kbn-lens-embeddable-utils/kibana.jsonc b/packages/kbn-lens-embeddable-utils/kibana.jsonc index d637ea2f24ccb..9dc67508d99e9 100644 --- a/packages/kbn-lens-embeddable-utils/kibana.jsonc +++ b/packages/kbn-lens-embeddable-utils/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-browser", "id": "@kbn/lens-embeddable-utils", - "owner": "@elastic/infra-monitoring-ui" + "owner": "@elastic/obs-ux-infra_services-team" } diff --git a/packages/kbn-openapi-generator/src/template_service/templates/zod_operation_schema.handlebars b/packages/kbn-openapi-generator/src/template_service/templates/zod_operation_schema.handlebars index 6bb6fccf7d3b3..5395edbcf5f25 100644 --- a/packages/kbn-openapi-generator/src/template_service/templates/zod_operation_schema.handlebars +++ b/packages/kbn-openapi-generator/src/template_service/templates/zod_operation_schema.handlebars @@ -6,7 +6,7 @@ */ import { z } from "zod"; -import { requiredOptional, isValidDateMath } from "@kbn/zod-helpers" +import { requiredOptional, isValidDateMath, ArrayFromString, BooleanFromString } from "@kbn/zod-helpers" {{> disclaimer}} diff --git a/packages/kbn-openapi-generator/src/template_service/templates/zod_query_item.handlebars b/packages/kbn-openapi-generator/src/template_service/templates/zod_query_item.handlebars index 7fa146cd783e4..ad51f934b7fde 100644 --- a/packages/kbn-openapi-generator/src/template_service/templates/zod_query_item.handlebars +++ b/packages/kbn-openapi-generator/src/template_service/templates/zod_query_item.handlebars @@ -19,10 +19,7 @@ {{~/if~}} {{~#if (eq type "array")}} - z.preprocess( - (value: unknown) => (typeof value === "string") ? value === '' ? [] : value.split(",") : value, - z.array({{~> zod_schema_item items ~}}) - ) + ArrayFromString({{~> zod_schema_item items ~}}) {{~#if minItems}}.min({{minItems}}){{/if~}} {{~#if maxItems}}.max({{maxItems}}){{/if~}} {{~#if (eq requiredBool false)}}.optional(){{/if~}} @@ -30,12 +27,9 @@ {{~/if~}} {{~#if (eq type "boolean")}} - z.preprocess( - (value: unknown) => (typeof value === "boolean") ? String(value) : value, - z.enum(["true", "false"]) - {{~#if (defined default)}}.default("{{{toJSON default}}}"){{/if~}} - .transform((value) => value === "true") - ) + BooleanFromString + {{~#if (eq requiredBool false)}}.optional(){{/if~}} + {{~#if (defined default)}}.default({{{toJSON default}}}){{/if~}} {{~/if~}} {{~#if (eq type "string")}} diff --git a/packages/kbn-profiling-utils/kibana.jsonc b/packages/kbn-profiling-utils/kibana.jsonc index dc45e822e620b..d41a4db71299d 100644 --- a/packages/kbn-profiling-utils/kibana.jsonc +++ b/packages/kbn-profiling-utils/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/profiling-utils", - "owner": "@elastic/profiling-ui" + "owner": "@elastic/obs-ux-infra_services-team" } diff --git a/packages/kbn-resizable-layout/src/panels_resizable.test.tsx b/packages/kbn-resizable-layout/src/panels_resizable.test.tsx index 3ea2ccc87aaeb..f3ebde2aa73ed 100644 --- a/packages/kbn-resizable-layout/src/panels_resizable.test.tsx +++ b/packages/kbn-resizable-layout/src/panels_resizable.test.tsx @@ -24,7 +24,7 @@ jest.mock('@elastic/eui', () => ({ })); import * as eui from '@elastic/eui'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { ResizableLayoutDirection } from '../types'; describe('Panels resizable', () => { diff --git a/packages/kbn-rule-data-utils/kibana.jsonc b/packages/kbn-rule-data-utils/kibana.jsonc index 6650a9b1d67f0..4d9d77fbeeb72 100644 --- a/packages/kbn-rule-data-utils/kibana.jsonc +++ b/packages/kbn-rule-data-utils/kibana.jsonc @@ -3,7 +3,7 @@ "id": "@kbn/rule-data-utils", "owner": [ "@elastic/security-detections-response", - "@elastic/actionable-observability", - "@elastic/response-ops" + "@elastic/response-ops", + "@elastic/obs-ux-management-team" ] } 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 b88e0f708a980..844c8e994947c 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,6 +8,8 @@ export const OBSERVABILITY_THRESHOLD_RULE_TYPE_ID = 'observability.rules.custom_threshold'; +export const METRIC_INVENTORY_THRESHOLD_ALERT_TYPE_ID = 'metrics.alert.inventory.threshold'; + export enum ApmRuleType { ErrorCount = 'apm.error_rate', // ErrorRate was renamed to ErrorCount but the key is kept as `error_rate` for backwards-compat. TransactionErrorRate = 'apm.transaction_error_rate', diff --git a/packages/kbn-securitysolution-exception-list-components/src/list_header/use_list_header.test.ts b/packages/kbn-securitysolution-exception-list-components/src/list_header/use_list_header.test.ts index 9ddd782e132cd..867ad6ce8e3e6 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/list_header/use_list_header.test.ts +++ b/packages/kbn-securitysolution-exception-list-components/src/list_header/use_list_header.test.ts @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { act, renderHook } from '@testing-library/react-hooks'; import { useExceptionListHeader } from './use_list_header'; diff --git a/packages/kbn-server-route-repository/kibana.jsonc b/packages/kbn-server-route-repository/kibana.jsonc index 8161be4b80951..dbf7fc396428c 100644 --- a/packages/kbn-server-route-repository/kibana.jsonc +++ b/packages/kbn-server-route-repository/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/server-route-repository", - "owner": "@elastic/apm-ui" + "owner": ["@elastic/obs-knowledge-team", "@elastic/obs-ux-management-team"] } diff --git a/packages/kbn-shared-svg/kibana.jsonc b/packages/kbn-shared-svg/kibana.jsonc index 6634bd9dffc5d..89949f5b7d276 100644 --- a/packages/kbn-shared-svg/kibana.jsonc +++ b/packages/kbn-shared-svg/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/shared-svg", - "owner": "@elastic/apm-ui" + "owner": "@elastic/obs-ux-infra_services-team" } diff --git a/packages/kbn-typed-react-router-config/kibana.jsonc b/packages/kbn-typed-react-router-config/kibana.jsonc index f508346f8c26e..0462d28238890 100644 --- a/packages/kbn-typed-react-router-config/kibana.jsonc +++ b/packages/kbn-typed-react-router-config/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/typed-react-router-config", - "owner": "@elastic/apm-ui" + "owner": ["@elastic/obs-knowledge-team", "@elastic/obs-ux-management-team"] } diff --git a/packages/kbn-use-tracked-promise/kibana.jsonc b/packages/kbn-use-tracked-promise/kibana.jsonc index a7b90045c462a..959dda0d05a66 100644 --- a/packages/kbn-use-tracked-promise/kibana.jsonc +++ b/packages/kbn-use-tracked-promise/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/use-tracked-promise", - "owner": "@elastic/infra-monitoring-ui" + "owner": "@elastic/obs-ux-logs-team" } diff --git a/packages/kbn-xstate-utils/kibana.jsonc b/packages/kbn-xstate-utils/kibana.jsonc index 086bce23401aa..cd1151a3f2103 100644 --- a/packages/kbn-xstate-utils/kibana.jsonc +++ b/packages/kbn-xstate-utils/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/xstate-utils", - "owner": "@elastic/infra-monitoring-ui" + "owner": "@elastic/obs-ux-logs-team" } diff --git a/packages/kbn-zod-helpers/index.ts b/packages/kbn-zod-helpers/index.ts index f1062064dc5cf..d8a62f58686b2 100644 --- a/packages/kbn-zod-helpers/index.ts +++ b/packages/kbn-zod-helpers/index.ts @@ -6,8 +6,11 @@ * Side Public License, v 1. */ +export * from './src/array_from_string'; +export * from './src/boolean_from_string'; export * from './src/expect_parse_error'; export * from './src/expect_parse_success'; export * from './src/is_valid_date_math'; export * from './src/required_optional'; +export * from './src/safe_parse_result'; export * from './src/stringify_zod_error'; diff --git a/packages/kbn-zod-helpers/src/array_from_string.test.ts b/packages/kbn-zod-helpers/src/array_from_string.test.ts new file mode 100644 index 0000000000000..ba27fddb0c9b5 --- /dev/null +++ b/packages/kbn-zod-helpers/src/array_from_string.test.ts @@ -0,0 +1,34 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { ArrayFromString } from './array_from_string'; +import * as z from 'zod'; + +describe('ArrayFromString', () => { + const itemsSchema = z.string(); + + it('should return an array when input is a string', () => { + const result = ArrayFromString(itemsSchema).parse('a,b,c'); + expect(result).toEqual(['a', 'b', 'c']); + }); + + it('should return an empty array when input is an empty string', () => { + const result = ArrayFromString(itemsSchema).parse(''); + expect(result).toEqual([]); + }); + + it('should return the input as is when it is not a string', () => { + const input = ['a', 'b', 'c']; + const result = ArrayFromString(itemsSchema).parse(input); + expect(result).toEqual(input); + }); + + it('should throw an error when input is not a string or an array', () => { + expect(() => ArrayFromString(itemsSchema).parse(123)).toThrow(); + }); +}); diff --git a/packages/kbn-zod-helpers/src/array_from_string.ts b/packages/kbn-zod-helpers/src/array_from_string.ts new file mode 100644 index 0000000000000..24247e2d14c40 --- /dev/null +++ b/packages/kbn-zod-helpers/src/array_from_string.ts @@ -0,0 +1,24 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import * as z from 'zod'; + +/** + * This is a helper schema to convert comma separated strings to arrays. Useful + * for processing query params. + * + * @param schema Array items schema + * @returns Array schema that accepts a comma-separated string as input + */ +export function ArrayFromString(schema: T) { + return z.preprocess( + (value: unknown) => + typeof value === 'string' ? (value === '' ? [] : value.split(',')) : value, + z.array(schema) + ); +} diff --git a/packages/kbn-zod-helpers/src/boolean_from_string.test.ts b/packages/kbn-zod-helpers/src/boolean_from_string.test.ts new file mode 100644 index 0000000000000..842eda2d6e9a2 --- /dev/null +++ b/packages/kbn-zod-helpers/src/boolean_from_string.test.ts @@ -0,0 +1,32 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { BooleanFromString } from './boolean_from_string'; + +describe('BooleanFromString', () => { + it('should return true when input is "true"', () => { + expect(BooleanFromString.parse('true')).toBe(true); + }); + + it('should return false when input is "false"', () => { + expect(BooleanFromString.parse('false')).toBe(false); + }); + + it('should return true when input is true', () => { + expect(BooleanFromString.parse(true)).toBe(true); + }); + + it('should return false when input is false', () => { + expect(BooleanFromString.parse(false)).toBe(false); + }); + + it('should throw an error when input is not a boolean or "true" or "false"', () => { + expect(() => BooleanFromString.parse('not a boolean')).toThrow(); + expect(() => BooleanFromString.parse(42)).toThrow(); + }); +}); diff --git a/packages/kbn-zod-helpers/src/boolean_from_string.ts b/packages/kbn-zod-helpers/src/boolean_from_string.ts new file mode 100644 index 0000000000000..d73e77ea1bddc --- /dev/null +++ b/packages/kbn-zod-helpers/src/boolean_from_string.ts @@ -0,0 +1,24 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ +import * as z from 'zod'; + +/** + * This is a helper schema to convert a boolean string ("true" or "false") to a + * boolean. Useful for processing query params. + * + * Accepts "true" or "false" as strings, or a boolean. + */ +export const BooleanFromString = z + .enum(['true', 'false']) + .or(z.boolean()) + .transform((value) => { + if (typeof value === 'boolean') { + return value; + } + return value === 'true'; + }); diff --git a/packages/kbn-zod-helpers/src/expect_parse_success.ts b/packages/kbn-zod-helpers/src/expect_parse_success.ts index 4fc4a74047933..8c9e518c27b87 100644 --- a/packages/kbn-zod-helpers/src/expect_parse_success.ts +++ b/packages/kbn-zod-helpers/src/expect_parse_success.ts @@ -7,9 +7,14 @@ */ import type { SafeParseReturnType, SafeParseSuccess } from 'zod'; +import { stringifyZodError } from './stringify_zod_error'; export function expectParseSuccess( result: SafeParseReturnType ): asserts result is SafeParseSuccess { - expect(result.success).toEqual(true); + if (!result.success) { + // We are throwing here instead of using assertions because we want to show + // the stringified error to assist with debugging. + throw new Error(`Expected parse success, got error: ${stringifyZodError(result.error)}`); + } } diff --git a/packages/kbn-zod-helpers/src/safe_parse_result.ts b/packages/kbn-zod-helpers/src/safe_parse_result.ts new file mode 100644 index 0000000000000..4e9b701a18faf --- /dev/null +++ b/packages/kbn-zod-helpers/src/safe_parse_result.ts @@ -0,0 +1,28 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import * as z from 'zod'; + +/** + * Safely parse a payload against a schema, returning the output or undefined. + * This method does not throw validation errors and is useful for validating + * optional objects when we don't care about errors. + * + * @param payload Schema payload + * @param schema Validation schema + * @returns Schema output or undefined + */ +export function safeParseResult( + payload: unknown, + schema: T +): T['_output'] | undefined { + const result = schema.safeParse(payload); + if (result.success) { + return result.data; + } +} diff --git a/packages/kbn-zod-helpers/src/stringify_zod_error.ts b/packages/kbn-zod-helpers/src/stringify_zod_error.ts index b873870f99381..1fbaec8bbac85 100644 --- a/packages/kbn-zod-helpers/src/stringify_zod_error.ts +++ b/packages/kbn-zod-helpers/src/stringify_zod_error.ts @@ -6,16 +6,41 @@ * Side Public License, v 1. */ -import { ZodError } from 'zod'; +import { ZodError, ZodIssue } from 'zod'; + +const MAX_ERRORS = 5; export function stringifyZodError(err: ZodError) { - return err.issues - .map((issue) => { - // If the path is empty, the error is for the root object - if (issue.path.length === 0) { - return issue.message; - } - return `${issue.path.join('.')}: ${issue.message}`; - }) - .join(', '); + const errorMessages: string[] = []; + + const issues = err.issues; + + // Recursively traverse all issues + while (issues.length > 0) { + const issue = issues.shift()!; + + // If the issue is an invalid union, we need to traverse all issues in the + // "unionErrors" array + if (issue.code === 'invalid_union') { + issues.push(...issue.unionErrors.flatMap((e) => e.issues)); + continue; + } + + errorMessages.push(stringifyIssue(issue)); + } + + const extraErrorCount = errorMessages.length - MAX_ERRORS; + if (extraErrorCount > 0) { + errorMessages.splice(MAX_ERRORS); + errorMessages.push(`and ${extraErrorCount} more`); + } + + return errorMessages.join(', '); +} + +function stringifyIssue(issue: ZodIssue) { + if (issue.path.length === 0) { + return issue.message; + } + return `${issue.path.join('.')}: ${issue.message}`; } diff --git a/packages/serverless/settings/observability_project/kibana.jsonc b/packages/serverless/settings/observability_project/kibana.jsonc index 4df29091e6619..e2db00d894bcf 100644 --- a/packages/serverless/settings/observability_project/kibana.jsonc +++ b/packages/serverless/settings/observability_project/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/serverless-observability-settings", - "owner": "@elastic/appex-sharedux @elastic/apm-ui @elastic/platform-deployment-management" + "owner": "@elastic/appex-sharedux @elastic/platform-deployment-management @elastic/obs-ux-management-team" } diff --git a/packages/shared-ux/error_boundary/src/ui/error_boundary.test.tsx b/packages/shared-ux/error_boundary/src/ui/error_boundary.test.tsx index ed5d4a60534c0..05a69a7ccab9e 100644 --- a/packages/shared-ux/error_boundary/src/ui/error_boundary.test.tsx +++ b/packages/shared-ux/error_boundary/src/ui/error_boundary.test.tsx @@ -49,7 +49,7 @@ describe('', () => { expect(await findByText(strings.recoverable.callout.title())).toBeVisible(); expect(await findByText(strings.recoverable.callout.pageReloadButton())).toBeVisible(); - (await findByTestId('recoverablePromptReloadBtn')).click(); + (await findByTestId('errorBoundaryRecoverablePromptReloadBtn')).click(); expect(reloadSpy).toHaveBeenCalledTimes(1); }); @@ -69,7 +69,7 @@ describe('', () => { expect(await findByText(strings.fatal.callout.showDetailsButton())).toBeVisible(); expect(await findByText(strings.fatal.callout.pageReloadButton())).toBeVisible(); - (await findByTestId('fatalPromptReloadBtn')).click(); + (await findByTestId('errorBoundaryFatalPromptReloadBtn')).click(); expect(reloadSpy).toHaveBeenCalledTimes(1); }); diff --git a/packages/shared-ux/error_boundary/src/ui/message_components.tsx b/packages/shared-ux/error_boundary/src/ui/message_components.tsx index 6e481cb5d8216..1e44fa68141bc 100644 --- a/packages/shared-ux/error_boundary/src/ui/message_components.tsx +++ b/packages/shared-ux/error_boundary/src/ui/message_components.tsx @@ -55,7 +55,7 @@ const CodePanel: React.FC void }> = (props) - +

{(error.stack ?? error.toString()) + '\n\n'}

{errorName} @@ -93,25 +93,29 @@ export const FatalPrompt: React.FC = (props) => { return ( {strings.fatal.callout.title()}} + title={

{strings.fatal.callout.title()}

} color="danger" iconType="error" body={ <> -

{strings.fatal.callout.body()}

+

{strings.fatal.callout.body()}

{strings.fatal.callout.pageReloadButton()}

- setIsFlyoutVisible(true)}> + setIsFlyoutVisible(true)} + data-test-subj="errorBoundaryFatalShowDetailsBtn" + > {strings.fatal.callout.showDetailsButton()} {isFlyoutVisible ? ( @@ -128,17 +132,25 @@ export const RecoverablePrompt = (props: ErrorCalloutProps) => { const { onClickRefresh } = props; return ( {strings.recoverable.callout.title()}} - body={

{strings.recoverable.callout.body()}

} + title={ +

+ {strings.recoverable.callout.title()} +

+ } color="warning" + iconType="warning" + body={ +

+ {strings.recoverable.callout.body()} +

+ } actions={ {strings.recoverable.callout.pageReloadButton()} diff --git a/src/cli/dist.js b/src/cli/dist.js index 9bd7696a44561..5551c4e5c7774 100644 --- a/src/cli/dist.js +++ b/src/cli/dist.js @@ -9,4 +9,5 @@ require('../setup_node_env/dist'); require('./apm')(); require('../setup_node_env/root'); +require('../setup_node_env/mute_libraries'); require('./cli'); diff --git a/src/core/server/integration_tests/capabilities/capabilities_service.test.ts b/src/core/server/integration_tests/capabilities/capabilities_service.test.ts index 23a8905bcb565..6ee87dc5a7931 100644 --- a/src/core/server/integration_tests/capabilities/capabilities_service.test.ts +++ b/src/core/server/integration_tests/capabilities/capabilities_service.test.ts @@ -82,7 +82,7 @@ describe('CapabilitiesService', () => { serviceSetup.registerProvider(() => getInitialCapabilities()); const switcher = jest.fn((_, capabilities) => capabilities); - serviceSetup.registerSwitcher(switcher); + serviceSetup.registerSwitcher(switcher, { capabilityPath: '*' }); const result = await supertest(httpSetup.server.listener) .post('/api/core/capabilities') @@ -113,7 +113,7 @@ describe('CapabilitiesService', () => { serviceSetup.registerProvider(() => getInitialCapabilities()); const switcher = jest.fn((_, capabilities) => capabilities); - serviceSetup.registerSwitcher(switcher); + serviceSetup.registerSwitcher(switcher, { capabilityPath: '*' }); const result = await supertest(httpSetup.server.listener) .post('/api/core/capabilities?useDefaultCapabilities=true') diff --git a/src/dev/build/tasks/os_packages/docker_generator/templates/base/Dockerfile b/src/dev/build/tasks/os_packages/docker_generator/templates/base/Dockerfile index 8db4b419a184a..25f4345ffbcc3 100644 --- a/src/dev/build/tasks/os_packages/docker_generator/templates/base/Dockerfile +++ b/src/dev/build/tasks/os_packages/docker_generator/templates/base/Dockerfile @@ -128,6 +128,7 @@ COPY --chown=1000:0 config/serverless.oblt.yml /usr/share/kibana/config/serverle COPY --chown=1000:0 config/serverless.security.yml /usr/share/kibana/config/serverless.security.yml # Supportability enhancement: enable capturing heap snapshots. See https://nodejs.org/api/cli.html#--heapsnapshot-signalsignal RUN echo '\n--heapsnapshot-signal=SIGUSR2' >> config/node.options +RUN echo '--diagnostic-dir=./data' >> config/node.options {{/serverless}} {{^opensslLegacyProvider}} RUN sed 's/\(--openssl-legacy-provider\)/#\1/' -i config/node.options diff --git a/src/dev/build/tasks/os_packages/docker_generator/templates/ironbank/Dockerfile b/src/dev/build/tasks/os_packages/docker_generator/templates/ironbank/Dockerfile index b68130f1d201c..7fbba7d72ea78 100644 --- a/src/dev/build/tasks/os_packages/docker_generator/templates/ironbank/Dockerfile +++ b/src/dev/build/tasks/os_packages/docker_generator/templates/ironbank/Dockerfile @@ -4,7 +4,7 @@ ################################################################################ ARG BASE_REGISTRY=registry1.dso.mil ARG BASE_IMAGE=redhat/ubi/ubi9 -ARG BASE_TAG=9.2 +ARG BASE_TAG=9.3 FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} as prep_files diff --git a/src/dev/build/tasks/os_packages/docker_generator/templates/ironbank/hardening_manifest.yaml b/src/dev/build/tasks/os_packages/docker_generator/templates/ironbank/hardening_manifest.yaml index 3bbd4d7f31d12..43800a045da9c 100644 --- a/src/dev/build/tasks/os_packages/docker_generator/templates/ironbank/hardening_manifest.yaml +++ b/src/dev/build/tasks/os_packages/docker_generator/templates/ironbank/hardening_manifest.yaml @@ -14,7 +14,7 @@ tags: # Build args passed to Dockerfile ARGs args: BASE_IMAGE: 'redhat/ubi/ubi9' - BASE_TAG: '9.2' + BASE_TAG: '9.3' # Docker image labels labels: diff --git a/src/plugins/data_views/server/data_views_service_factory.ts b/src/plugins/data_views/server/data_views_service_factory.ts index e5324b2eb02d2..430ebd36489b6 100644 --- a/src/plugins/data_views/server/data_views_service_factory.ts +++ b/src/plugins/data_views/server/data_views_service_factory.ts @@ -63,13 +63,21 @@ export const dataViewsServiceFactory = (deps: DataViewsServiceFactoryDeps) => byPassCapabilities ? true : request - ? (await capabilities.resolveCapabilities(request)).indexPatterns.save === true + ? ( + await capabilities.resolveCapabilities(request, { + capabilityPath: 'indexPatterns.save', + }) + ).indexPatterns.save === true : false, getCanSaveAdvancedSettings: async () => byPassCapabilities ? true : request - ? (await capabilities.resolveCapabilities(request)).advancedSettings.save === true + ? ( + await capabilities.resolveCapabilities(request, { + capabilityPath: 'advancedSettings.save', + }) + ).advancedSettings.save === true : false, scriptedFieldsEnabled: deps.scriptedFieldsEnabled, }); diff --git a/src/plugins/embeddable/public/lib/embeddables/embeddable_renderer.test.tsx b/src/plugins/embeddable/public/lib/embeddables/embeddable_renderer.test.tsx index b919672ad01e3..a1be9c560bf3c 100644 --- a/src/plugins/embeddable/public/lib/embeddables/embeddable_renderer.test.tsx +++ b/src/plugins/embeddable/public/lib/embeddables/embeddable_renderer.test.tsx @@ -7,7 +7,7 @@ */ import React from 'react'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { render } from '@testing-library/react'; import { renderHook } from '@testing-library/react-hooks'; import { diff --git a/src/plugins/ui_actions/public/context_menu/open_context_menu.test.ts b/src/plugins/ui_actions/public/context_menu/open_context_menu.test.ts index f8b54fb33e122..ddd7d77812add 100644 --- a/src/plugins/ui_actions/public/context_menu/open_context_menu.test.ts +++ b/src/plugins/ui_actions/public/context_menu/open_context_menu.test.ts @@ -7,7 +7,7 @@ */ import { createInteractionPositionTracker } from './open_context_menu'; -import { fireEvent } from '@testing-library/dom'; +import { fireEvent } from '@testing-library/react'; let targetEl: Element; const top = 100; diff --git a/src/plugins/ui_actions/public/tests/execute_trigger_actions.test.ts b/src/plugins/ui_actions/public/tests/execute_trigger_actions.test.ts index 950c70ec7c60d..ea9d343845442 100644 --- a/src/plugins/ui_actions/public/tests/execute_trigger_actions.test.ts +++ b/src/plugins/ui_actions/public/tests/execute_trigger_actions.test.ts @@ -10,7 +10,7 @@ import { ActionDefinition } from '../actions'; import { openContextMenu } from '../context_menu'; import { uiActionsPluginMock } from '../mocks'; import type { Trigger } from '@kbn/ui-actions-browser'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; jest.mock('../context_menu'); diff --git a/src/plugins/unified_histogram/public/chart/hooks/use_total_hits.test.ts b/src/plugins/unified_histogram/public/chart/hooks/use_total_hits.test.ts index e6f3aeaa3a002..3135f3c86f465 100644 --- a/src/plugins/unified_histogram/public/chart/hooks/use_total_hits.test.ts +++ b/src/plugins/unified_histogram/public/chart/hooks/use_total_hits.test.ts @@ -15,7 +15,7 @@ import { renderHook } from '@testing-library/react-hooks'; import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import { searchSourceInstanceMock } from '@kbn/data-plugin/common/search/search_source/mocks'; import { of, Subject, throwError } from 'rxjs'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { RequestAdapter } from '@kbn/inspector-plugin/common'; import { DataViewType, SearchSourceSearchOptions } from '@kbn/data-plugin/common'; import { expressionsPluginMock } from '@kbn/expressions-plugin/public/mocks'; diff --git a/src/plugins/unified_search/public/query_string_input/query_string_input.test.tsx b/src/plugins/unified_search/public/query_string_input/query_string_input.test.tsx index 8e60c720e1154..aa348d59d85f4 100644 --- a/src/plugins/unified_search/public/query_string_input/query_string_input.test.tsx +++ b/src/plugins/unified_search/public/query_string_input/query_string_input.test.tsx @@ -15,8 +15,7 @@ import { import React from 'react'; import { I18nProvider } from '@kbn/i18n-react'; import { mount } from 'enzyme'; -import { waitFor } from '@testing-library/dom'; -import { render } from '@testing-library/react'; +import { waitFor, render } from '@testing-library/react'; import { EuiTextArea, EuiIcon } from '@elastic/eui'; diff --git a/src/setup_node_env/heap_snapshot.js b/src/setup_node_env/heap_snapshot.js new file mode 100644 index 0000000000000..94e4b35e2f887 --- /dev/null +++ b/src/setup_node_env/heap_snapshot.js @@ -0,0 +1,46 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +var getopts = require('getopts'); +var path = require('path'); +var v8 = require('node:v8'); +var worker = require('node:worker_threads'); + +var execOpts = getopts(process.execArgv); +var envOpts = getopts(process.env.NODE_OPTIONS ? process.env.NODE_OPTIONS.split(/\s+/) : []); +var diagnosticDir = execOpts['diagnostic-dir'] || envOpts['diagnostic-dir']; +var heapSnapshotSignal = execOpts['heapsnapshot-signal'] || envOpts['heapsnapshot-signal']; +var heapSnapshotSerial = 0; + +function getHeapSnapshotPath() { + var now = new Date(); + + var year = now.getFullYear(); + var month = String(now.getMonth() + 1).padStart(2, '0'); + var day = String(now.getDate()).padStart(2, '0'); + var hours = String(now.getHours()).padStart(2, '0'); + var minutes = String(now.getMinutes()).padStart(2, '0'); + var seconds = String(now.getSeconds()).padStart(2, '0'); + + var date = `${year}${month}${day}`; + var time = `${hours}${minutes}${seconds}`; + var pid = process.pid; + var threadId = worker.threadId; + var serial = (++heapSnapshotSerial).toString().padStart(3, '0'); + + return path.join(diagnosticDir, `Heap.${date}.${time}.${pid}.${threadId}.${serial}.heapsnapshot`); +} + +if (diagnosticDir && heapSnapshotSignal) { + process.removeAllListeners(heapSnapshotSignal); + + process.on(heapSnapshotSignal, function () { + var heapSnapshotPath = getHeapSnapshotPath(); + v8.writeHeapSnapshot(heapSnapshotPath); + }); +} diff --git a/src/setup_node_env/mute_libraries.js b/src/setup_node_env/mute_libraries.js new file mode 100644 index 0000000000000..defb6347d80f7 --- /dev/null +++ b/src/setup_node_env/mute_libraries.js @@ -0,0 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +// disable moment deprecation warnings +var moment = require('moment'); +moment.suppressDeprecationWarnings = true; diff --git a/src/setup_node_env/setup_env.js b/src/setup_node_env/setup_env.js index 7b37d98011cfb..d3076a2c3b9cf 100644 --- a/src/setup_node_env/setup_env.js +++ b/src/setup_node_env/setup_env.js @@ -11,6 +11,8 @@ require('./exit_on_warning'); require('./harden'); // The following require statements MUST be executed before any others - END +// @todo Remove when migrated to Node 20 (#162696) +require('./heap_snapshot'); require('symbol-observable'); require('source-map-support').install(); require('./node_version_validator'); diff --git a/test/common/plugins/otel_metrics/kibana.jsonc b/test/common/plugins/otel_metrics/kibana.jsonc index 0b25b57d06a53..e64546f446052 100644 --- a/test/common/plugins/otel_metrics/kibana.jsonc +++ b/test/common/plugins/otel_metrics/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/open-telemetry-instrumented-plugin", - "owner": "@elastic/infra-monitoring-ui", + "owner": "@elastic/obs-ux-infra_services-team", "plugin": { "id": "openTelemetryInstrumentedPlugin", "server": true, diff --git a/test/examples/config.js b/test/examples/config.js index 36f4a007b7983..dbc9d32055cc7 100644 --- a/test/examples/config.js +++ b/test/examples/config.js @@ -31,6 +31,7 @@ export default async function ({ readConfigFile }) { require.resolve('./content_management'), require.resolve('./unified_field_list_examples'), require.resolve('./discover_customization_examples'), + require.resolve('./error_boundary'), ], services: { ...functionalConfig.get('services'), diff --git a/test/examples/error_boundary/index.ts b/test/examples/error_boundary/index.ts new file mode 100644 index 0000000000000..f240ebd1442b2 --- /dev/null +++ b/test/examples/error_boundary/index.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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../../functional/ftr_provider_context'; + +// eslint-disable-next-line import/no-default-export +export default function ({ getService, getPageObjects }: FtrProviderContext) { + const retry = getService('retry'); + const testSubjects = getService('testSubjects'); + const PageObjects = getPageObjects(['common']); + const log = getService('log'); + + describe('Error Boundary Examples', () => { + before(async () => { + await PageObjects.common.navigateToApp('errorBoundaryExample'); + await testSubjects.existOrFail('errorBoundaryExampleHeader'); + }); + + it('fatal error', async () => { + log.debug('clicking button for fatal error'); + await testSubjects.click('fatalErrorBtn'); + const errorHeader = await testSubjects.getVisibleText('errorBoundaryFatalHeader'); + expect(errorHeader).to.not.be(undefined); + + log.debug('checking that the error has taken over the page'); + await testSubjects.missingOrFail('errorBoundaryExampleHeader'); + + await testSubjects.click('errorBoundaryFatalShowDetailsBtn'); + const errorString = await testSubjects.getVisibleText('errorBoundaryFatalDetailsErrorString'); + expect(errorString).to.match(/Error: Example of unknown error type/); + + log.debug('closing error flyout'); + await testSubjects.click('euiFlyoutCloseButton'); + + log.debug('clicking page refresh'); + await testSubjects.click('errorBoundaryFatalPromptReloadBtn'); + + await retry.try(async () => { + log.debug('checking for page refresh'); + await testSubjects.existOrFail('errorBoundaryExampleHeader'); + }); + }); + + it('recoverable error', async () => { + log.debug('clicking button for recoverable error'); + await testSubjects.click('recoverableErrorBtn'); + const errorHeader = await testSubjects.getVisibleText('errorBoundaryRecoverableHeader'); + expect(errorHeader).to.not.be(undefined); + + log.debug('checking that the error has taken over the page'); + await testSubjects.missingOrFail('errorBoundaryExampleHeader'); + + log.debug('clicking page refresh'); + await testSubjects.click('errorBoundaryRecoverablePromptReloadBtn'); + + await retry.try(async () => { + log.debug('checking for page refresh'); + await testSubjects.existOrFail('errorBoundaryExampleHeader'); + }); + }); + }); +} diff --git a/test/functional/apps/visualize/group3/_annotation_listing.ts b/test/functional/apps/visualize/group3/_annotation_listing.ts index 71489388b54b5..53ae9d48e2b5c 100644 --- a/test/functional/apps/visualize/group3/_annotation_listing.ts +++ b/test/functional/apps/visualize/group3/_annotation_listing.ts @@ -18,8 +18,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const retry = getService('retry'); const log = getService('log'); - // Failing: See https://github.com/elastic/kibana/issues/170578 - describe.skip('annotation listing page', function () { + describe('annotation listing page', function () { before(async function () { await kibanaServer.importExport.load( 'test/functional/fixtures/kbn_archiver/annotation_listing_page_search' @@ -122,8 +121,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await listingTable.expectItemsCount('eventAnnotation', 1); }); - // FLAKY: https://github.com/elastic/kibana/issues/170568 - describe.skip('individual annotations', () => { + describe('individual annotations', () => { it('edits an existing annotation', async function () { await listingTable.clickItemLink('eventAnnotation', 'edited title'); expect(await PageObjects.annotationEditor.getAnnotationCount()).to.be(1); @@ -156,11 +154,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); await PageObjects.annotationEditor.saveGroup(); - await listingTable.clearSearchFilter(); }); }); describe('data view switching', () => { + before(async () => { + await listingTable.clearSearchFilter(); + }); + it('recovers from missing data view', async () => { await listingTable.clickItemLink('eventAnnotation', 'missing data view'); diff --git a/test/functional/page_objects/annotation_library_editor_page.ts b/test/functional/page_objects/annotation_library_editor_page.ts index f5c66b9f6c1e9..2a031d98429b3 100644 --- a/test/functional/page_objects/annotation_library_editor_page.ts +++ b/test/functional/page_objects/annotation_library_editor_page.ts @@ -10,6 +10,7 @@ import { FtrService } from '../ftr_provider_context'; export class AnnotationEditorPageObject extends FtrService { private readonly testSubjects = this.ctx.getService('testSubjects'); + private readonly find = this.ctx.getService('find'); private readonly retry = this.ctx.getService('retry'); /** @@ -56,12 +57,20 @@ export class AnnotationEditorPageObject extends FtrService { const queryInput = await this.testSubjects.find('annotation-query-based-query-input'); await queryInput.type(config.query); - await this.testSubjects.setValue('lnsXYThickness', '' + config.lineThickness); + const titles = await this.find.allByCssSelector( + '.euiFlyout h3.lnsDimensionEditorSection__heading' + ); + const lastTitle = titles[titles.length - 1]; + await lastTitle.click(); // close query input pop-up + await lastTitle.focus(); // scroll down to the bottom of the section await this.testSubjects.setValue( 'euiColorPickerAnchor indexPattern-dimension-colorPicker', config.color ); + await lastTitle.click(); // close color picker pop-up + + await this.testSubjects.setValue('lnsXYThickness', '' + config.lineThickness); await this.retry.waitFor('annotation editor UI to close', async () => { await this.testSubjects.click('backToGroupSettings'); diff --git a/tsconfig.base.json b/tsconfig.base.json index 107b8e1f6ff46..40b1ede664328 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -700,6 +700,8 @@ "@kbn/encrypted-saved-objects-plugin/*": ["x-pack/plugins/encrypted_saved_objects/*"], "@kbn/enterprise-search-plugin": ["x-pack/plugins/enterprise_search"], "@kbn/enterprise-search-plugin/*": ["x-pack/plugins/enterprise_search/*"], + "@kbn/error-boundary-example-plugin": ["examples/error_boundary"], + "@kbn/error-boundary-example-plugin/*": ["examples/error_boundary/*"], "@kbn/es": ["packages/kbn-es"], "@kbn/es/*": ["packages/kbn-es/*"], "@kbn/es-archiver": ["packages/kbn-es-archiver"], diff --git a/x-pack/examples/exploratory_view_example/kibana.jsonc b/x-pack/examples/exploratory_view_example/kibana.jsonc index c524e4fda32f7..6cf8fa64983ac 100644 --- a/x-pack/examples/exploratory_view_example/kibana.jsonc +++ b/x-pack/examples/exploratory_view_example/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/exploratory-view-example-plugin", - "owner": "@elastic/uptime", + "owner": "@elastic/obs-ux-infra_services-team", "plugin": { "id": "exploratoryViewExample", "server": false, diff --git a/x-pack/packages/kbn-infra-forge/kibana.jsonc b/x-pack/packages/kbn-infra-forge/kibana.jsonc index a66a733662735..a450d148358a9 100644 --- a/x-pack/packages/kbn-infra-forge/kibana.jsonc +++ b/x-pack/packages/kbn-infra-forge/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/infra-forge", - "owner": "@elastic/actionable-observability" + "owner": "@elastic/obs-ux-management-team" } diff --git a/x-pack/packages/kbn-slo-schema/kibana.jsonc b/x-pack/packages/kbn-slo-schema/kibana.jsonc index 2d12cd108585c..b4ca324fc112b 100644 --- a/x-pack/packages/kbn-slo-schema/kibana.jsonc +++ b/x-pack/packages/kbn-slo-schema/kibana.jsonc @@ -1,5 +1,5 @@ { "type": "shared-common", "id": "@kbn/slo-schema", - "owner": "@elastic/actionable-observability", + "owner": "@elastic/obs-ux-management-team" } 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 ab9ab891aaef8..a4290563476ea 100644 --- a/x-pack/packages/security-solution/navigation/src/navigation.test.ts +++ b/x-pack/packages/security-solution/navigation/src/navigation.test.ts @@ -7,7 +7,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/dom'; +import { fireEvent } from '@testing-library/react'; jest.mock('./context'); diff --git a/x-pack/plugins/alerting/public/hooks/use_archive_maintenance_window.test.tsx b/x-pack/plugins/alerting/public/hooks/use_archive_maintenance_window.test.tsx index e6bd2a4071b27..d72f0bda9dc93 100644 --- a/x-pack/plugins/alerting/public/hooks/use_archive_maintenance_window.test.tsx +++ b/x-pack/plugins/alerting/public/hooks/use_archive_maintenance_window.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ import { act, renderHook } from '@testing-library/react-hooks/dom'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { MaintenanceWindow } from '../pages/maintenance_windows/types'; import { AppMockRenderer, createAppMockRenderer } from '../lib/test_utils'; diff --git a/x-pack/plugins/alerting/public/hooks/use_create_maintenance_window.test.tsx b/x-pack/plugins/alerting/public/hooks/use_create_maintenance_window.test.tsx index 195af1bb083e5..f827287532445 100644 --- a/x-pack/plugins/alerting/public/hooks/use_create_maintenance_window.test.tsx +++ b/x-pack/plugins/alerting/public/hooks/use_create_maintenance_window.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ import { act, renderHook } from '@testing-library/react-hooks/dom'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { MaintenanceWindow } from '../pages/maintenance_windows/types'; import { AppMockRenderer, createAppMockRenderer } from '../lib/test_utils'; diff --git a/x-pack/plugins/alerting/public/hooks/use_find_maintenance_windows.test.tsx b/x-pack/plugins/alerting/public/hooks/use_find_maintenance_windows.test.tsx index 2080b9ff39d43..d21b145aea937 100644 --- a/x-pack/plugins/alerting/public/hooks/use_find_maintenance_windows.test.tsx +++ b/x-pack/plugins/alerting/public/hooks/use_find_maintenance_windows.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ import { renderHook } from '@testing-library/react-hooks/dom'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { AppMockRenderer, createAppMockRenderer } from '../lib/test_utils'; import { useFindMaintenanceWindows } from './use_find_maintenance_windows'; diff --git a/x-pack/plugins/alerting/public/hooks/use_finish_and_archive_maintenance_window.test.tsx b/x-pack/plugins/alerting/public/hooks/use_finish_and_archive_maintenance_window.test.tsx index b80dbbae355bc..453a3b88cef8f 100644 --- a/x-pack/plugins/alerting/public/hooks/use_finish_and_archive_maintenance_window.test.tsx +++ b/x-pack/plugins/alerting/public/hooks/use_finish_and_archive_maintenance_window.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ import { act, renderHook } from '@testing-library/react-hooks/dom'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { MaintenanceWindow } from '../pages/maintenance_windows/types'; import { AppMockRenderer, createAppMockRenderer } from '../lib/test_utils'; diff --git a/x-pack/plugins/alerting/public/hooks/use_finish_maintenance_window.test.tsx b/x-pack/plugins/alerting/public/hooks/use_finish_maintenance_window.test.tsx index ed534cb835c8d..06608125fd836 100644 --- a/x-pack/plugins/alerting/public/hooks/use_finish_maintenance_window.test.tsx +++ b/x-pack/plugins/alerting/public/hooks/use_finish_maintenance_window.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ import { act, renderHook } from '@testing-library/react-hooks/dom'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { MaintenanceWindow } from '../pages/maintenance_windows/types'; import { AppMockRenderer, createAppMockRenderer } from '../lib/test_utils'; diff --git a/x-pack/plugins/alerting/public/hooks/use_get_maintenance_window.test.tsx b/x-pack/plugins/alerting/public/hooks/use_get_maintenance_window.test.tsx index eaef1f4fc4b99..3003f1003ce12 100644 --- a/x-pack/plugins/alerting/public/hooks/use_get_maintenance_window.test.tsx +++ b/x-pack/plugins/alerting/public/hooks/use_get_maintenance_window.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ import { renderHook } from '@testing-library/react-hooks/dom'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { AppMockRenderer, createAppMockRenderer } from '../lib/test_utils'; import { useGetMaintenanceWindow } from './use_get_maintenance_window'; diff --git a/x-pack/plugins/alerting/public/hooks/use_update_maintenance_window.test.tsx b/x-pack/plugins/alerting/public/hooks/use_update_maintenance_window.test.tsx index 897b44295d8c0..b29161f0e006d 100644 --- a/x-pack/plugins/alerting/public/hooks/use_update_maintenance_window.test.tsx +++ b/x-pack/plugins/alerting/public/hooks/use_update_maintenance_window.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ import { act, renderHook } from '@testing-library/react-hooks/dom'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { MaintenanceWindow } from '../pages/maintenance_windows/types'; import { AppMockRenderer, createAppMockRenderer } from '../lib/test_utils'; diff --git a/x-pack/plugins/alerting/public/pages/maintenance_windows/components/status_filter.test.tsx b/x-pack/plugins/alerting/public/pages/maintenance_windows/components/status_filter.test.tsx index f7cb8023323ef..3875545e36df4 100644 --- a/x-pack/plugins/alerting/public/pages/maintenance_windows/components/status_filter.test.tsx +++ b/x-pack/plugins/alerting/public/pages/maintenance_windows/components/status_filter.test.tsx @@ -6,7 +6,7 @@ */ import { Query } from '@elastic/eui'; -import { fireEvent } from '@testing-library/dom'; +import { fireEvent } from '@testing-library/react'; import React from 'react'; import { AppMockRenderer, createAppMockRenderer } from '../../../lib/test_utils'; diff --git a/x-pack/plugins/alerting/public/pages/maintenance_windows/components/table_actions_popover.test.tsx b/x-pack/plugins/alerting/public/pages/maintenance_windows/components/table_actions_popover.test.tsx index 2b1a1057084f5..8da3e12847e3a 100644 --- a/x-pack/plugins/alerting/public/pages/maintenance_windows/components/table_actions_popover.test.tsx +++ b/x-pack/plugins/alerting/public/pages/maintenance_windows/components/table_actions_popover.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { fireEvent } from '@testing-library/dom'; +import { fireEvent } from '@testing-library/react'; import React from 'react'; import { AppMockRenderer, createAppMockRenderer } from '../../../lib/test_utils'; diff --git a/x-pack/plugins/alerting/server/task_runner/execution_handler.test.ts b/x-pack/plugins/alerting/server/task_runner/execution_handler.test.ts index 3b3cd3a972825..0c032dd6a3e92 100644 --- a/x-pack/plugins/alerting/server/task_runner/execution_handler.test.ts +++ b/x-pack/plugins/alerting/server/task_runner/execution_handler.test.ts @@ -301,6 +301,7 @@ describe('Execution Handler', () => { foo: true, stateVal: 'My goes here', }, + ruleName: rule.name, }); expect(ruleRunMetricsStore.getTriggeredActionsStatus()).toBe(ActionsCompletion.COMPLETE); @@ -1988,6 +1989,7 @@ describe('Execution Handler', () => { "val": "rule url: http://localhost:12345/s/test1/app/management/insightsAndAlerting/triggersActions/rule/1", }, "actionTypeId": "test", + "ruleName": "name-of-alert", "ruleUrl": Object { "absoluteUrl": "http://localhost:12345/s/test1/app/management/insightsAndAlerting/triggersActions/rule/1", "basePathname": "", @@ -2060,6 +2062,7 @@ describe('Execution Handler', () => { "val": "rule url: http://localhost:12345/basePath/s/test1/app/test/rule/1?start=30000&end=90000", }, "actionTypeId": "test", + "ruleName": "name-of-alert", "ruleUrl": Object { "absoluteUrl": "http://localhost:12345/basePath/s/test1/app/test/rule/1?start=30000&end=90000", "basePathname": "/basePath", @@ -2095,6 +2098,7 @@ describe('Execution Handler', () => { "val": "rule url: http://localhost:12345/app/management/insightsAndAlerting/triggersActions/rule/1", }, "actionTypeId": "test", + "ruleName": "name-of-alert", "ruleUrl": Object { "absoluteUrl": "http://localhost:12345/app/management/insightsAndAlerting/triggersActions/rule/1", "basePathname": "", @@ -2127,6 +2131,7 @@ describe('Execution Handler', () => { "val": "rule url: http://localhost:12345/s/test1/app/management/insightsAndAlerting/triggersActions/rule/1", }, "actionTypeId": "test", + "ruleName": "name-of-alert", "ruleUrl": Object { "absoluteUrl": "http://localhost:12345/s/test1/app/management/insightsAndAlerting/triggersActions/rule/1", "basePathname": "", @@ -2159,6 +2164,7 @@ describe('Execution Handler', () => { "val": "rule url: ", }, "actionTypeId": "test", + "ruleName": "name-of-alert", "ruleUrl": undefined, }, ] @@ -2188,6 +2194,7 @@ describe('Execution Handler', () => { "val": "rule url: ", }, "actionTypeId": "test", + "ruleName": "name-of-alert", "ruleUrl": undefined, }, ] @@ -2217,6 +2224,7 @@ describe('Execution Handler', () => { "val": "rule url: ", }, "actionTypeId": "test", + "ruleName": "name-of-alert", "ruleUrl": undefined, }, ] @@ -2249,6 +2257,7 @@ describe('Execution Handler', () => { "val": "rule url: http://localhost:12345/s/test1/app/management/some/other/place", }, "actionTypeId": "test", + "ruleName": "name-of-alert", "ruleUrl": Object { "absoluteUrl": "http://localhost:12345/s/test1/app/management/some/other/place", "basePathname": "", diff --git a/x-pack/plugins/alerting/server/task_runner/execution_handler.ts b/x-pack/plugins/alerting/server/task_runner/execution_handler.ts index 33c4c93abe111..288a4126c25a2 100644 --- a/x-pack/plugins/alerting/server/task_runner/execution_handler.ts +++ b/x-pack/plugins/alerting/server/task_runner/execution_handler.ts @@ -256,6 +256,7 @@ export class ExecutionHandler< params: injectActionParams({ actionTypeId, ruleUrl, + ruleName: this.rule.name, actionParams: transformSummaryActionParams({ alerts: summarizedAlerts, rule: this.rule, @@ -296,6 +297,7 @@ export class ExecutionHandler< params: injectActionParams({ actionTypeId, ruleUrl, + ruleName: this.rule.name, actionParams: transformActionParams({ actionsPlugin, alertId: ruleId, diff --git a/x-pack/plugins/alerting/server/task_runner/inject_action_params.test.ts b/x-pack/plugins/alerting/server/task_runner/inject_action_params.test.ts index 9964f5f848b2d..d099c16bf52ed 100644 --- a/x-pack/plugins/alerting/server/task_runner/inject_action_params.test.ts +++ b/x-pack/plugins/alerting/server/task_runner/inject_action_params.test.ts @@ -8,14 +8,16 @@ import { injectActionParams } from './inject_action_params'; describe('injectActionParams', () => { - test(`passes through when actionTypeId isn't .email`, () => { + test(`passes through when actionTypeId isn't .email or .pagerduty`, () => { const actionParams = { message: 'State: "{{state.value}}", Context: "{{context.value}}"', }; + const result = injectActionParams({ actionParams, actionTypeId: '.server-log', }); + expect(result).toMatchInlineSnapshot(` Object { "message": "State: \\"{{state.value}}\\", Context: \\"{{context.value}}\\"", @@ -55,6 +57,146 @@ describe('injectActionParams', () => { `); }); + test('injects the absoluteUrl to the links when actionTypeId is .pagerduty and there are no links', () => { + const actionParams = { + summary: 'My summary', + }; + + const ruleUrl = { + absoluteUrl: + 'http://localhost:5601/app/management/insightsAndAlerting/triggersActions/rule/1', + kibanaBaseUrl: 'http://localhost:5601', + basePathname: '', + spaceIdSegment: '', + relativePath: '/app/management/insightsAndAlerting/triggersActions/rule/1', + }; + + const result = injectActionParams({ + actionParams, + actionTypeId: '.pagerduty', + ruleUrl, + }); + + expect(result).toMatchInlineSnapshot(` + Object { + "links": Array [ + Object { + "href": "http://localhost:5601/app/management/insightsAndAlerting/triggersActions/rule/1", + "text": "Elastic Rule \\"Unknown\\"", + }, + ], + "summary": "My summary", + } + `); + }); + + test('adds the rule name if the rule is defined when actionTypeId is .pagerduty', () => { + const actionParams = { + summary: 'My summary', + }; + + const ruleUrl = { + absoluteUrl: + 'http://localhost:5601/app/management/insightsAndAlerting/triggersActions/rule/1', + kibanaBaseUrl: 'http://localhost:5601', + basePathname: '', + spaceIdSegment: '', + relativePath: '/app/management/insightsAndAlerting/triggersActions/rule/1', + }; + + const result = injectActionParams({ + actionParams, + actionTypeId: '.pagerduty', + ruleUrl, + ruleName: 'My rule', + }); + + expect(result).toMatchInlineSnapshot(` + Object { + "links": Array [ + Object { + "href": "http://localhost:5601/app/management/insightsAndAlerting/triggersActions/rule/1", + "text": "Elastic Rule \\"My rule\\"", + }, + ], + "summary": "My summary", + } + `); + }); + + test('does not produce a runtime error when the actionTypeId is .pagerduty and the links are not an array', () => { + const actionParams = { + summary: 'My summary', + links: 'error', + }; + + const ruleUrl = { + absoluteUrl: + 'http://localhost:5601/app/management/insightsAndAlerting/triggersActions/rule/1', + kibanaBaseUrl: 'http://localhost:5601', + basePathname: '', + spaceIdSegment: '', + relativePath: '/app/management/insightsAndAlerting/triggersActions/rule/1', + }; + + const result = injectActionParams({ + actionParams, + actionTypeId: '.pagerduty', + ruleUrl, + ruleName: 'My rule', + }); + + expect(result).toMatchInlineSnapshot(` + Object { + "links": Array [ + Object { + "href": "http://localhost:5601/app/management/insightsAndAlerting/triggersActions/rule/1", + "text": "Elastic Rule \\"My rule\\"", + }, + ], + "summary": "My summary", + } + `); + }); + + test('injects the absoluteUrl to the links when actionTypeId is .pagerduty with links', () => { + const actionParams = { + summary: 'My summary', + links: [{ href: 'https://example.com', text: 'My link' }], + }; + + const ruleUrl = { + absoluteUrl: + 'http://localhost:5601/app/management/insightsAndAlerting/triggersActions/rule/1', + kibanaBaseUrl: 'http://localhost:5601', + basePathname: '', + spaceIdSegment: '', + relativePath: '/app/management/insightsAndAlerting/triggersActions/rule/1', + }; + + const result = injectActionParams({ + actionParams, + actionTypeId: '.pagerduty', + ruleUrl, + }); + + expect(result).toMatchInlineSnapshot(` + Object { + "links": Array [ + Object { + "href": "http://localhost:5601/app/management/insightsAndAlerting/triggersActions/rule/1", + "text": "Elastic Rule \\"Unknown\\"", + }, + Object { + "href": "https://example.com", + "text": "My link", + }, + ], + "summary": "My summary", + } + `); + }); + test('injects viewInKibanaPath and viewInKibanaText when actionTypeId is .email with basePathname and spaceId', () => { const actionParams = { body: { @@ -88,16 +230,18 @@ describe('injectActionParams', () => { `); }); - test('injects viewInKibanaPath as empty string when the ruleUrl is undefined', () => { + test('injects viewInKibanaPath as empty string when the ruleUrl is undefined and the actionTypeId is .email', () => { const actionParams = { body: { message: 'State: "{{state.value}}", Context: "{{context.value}}"', }, }; + const result = injectActionParams({ actionParams, actionTypeId: '.email', }); + expect(result).toMatchInlineSnapshot(` Object { "body": Object { @@ -110,4 +254,21 @@ describe('injectActionParams', () => { } `); }); + + test('does not add the rule URL when the absoluteUrl is undefined and the actionTypeId is .pagerduty', () => { + const actionParams = { + summary: 'My summary', + }; + + const result = injectActionParams({ + actionParams, + actionTypeId: '.pagerduty', + }); + + expect(result).toMatchInlineSnapshot(` + Object { + "summary": "My summary", + } + `); + }); }); diff --git a/x-pack/plugins/alerting/server/task_runner/inject_action_params.ts b/x-pack/plugins/alerting/server/task_runner/inject_action_params.ts index 321819188f39a..65cb7f9e65bad 100644 --- a/x-pack/plugins/alerting/server/task_runner/inject_action_params.ts +++ b/x-pack/plugins/alerting/server/task_runner/inject_action_params.ts @@ -13,11 +13,13 @@ export interface InjectActionParamsOpts { actionTypeId: string; actionParams: RuleActionParams; ruleUrl?: RuleUrl; + ruleName?: string; } export function injectActionParams({ actionTypeId, actionParams, + ruleName, ruleUrl = {}, }: InjectActionParamsOpts) { // Inject kibanaFooterLink if action type is email. This is used by the email action type @@ -36,6 +38,33 @@ export function injectActionParams({ }; } + if (actionTypeId === '.pagerduty') { + /** + * TODO: Remove and use connector adapters + */ + const path = ruleUrl?.absoluteUrl ?? ''; + + if (path.length === 0) { + return actionParams; + } + + const links = Array.isArray(actionParams.links) ? actionParams.links : []; + + return { + ...actionParams, + links: [ + { + href: path, + text: i18n.translate('xpack.alerting.injectActionParams.pagerduty.kibanaLinkText', { + defaultMessage: 'Elastic Rule "{ruleName}"', + values: { ruleName: ruleName ?? 'Unknown' }, + }), + }, + ...links, + ], + }; + } + // Fallback, return action params unchanged return actionParams; } diff --git a/x-pack/plugins/apm/kibana.jsonc b/x-pack/plugins/apm/kibana.jsonc index 61ba6be743370..858cd142f399c 100644 --- a/x-pack/plugins/apm/kibana.jsonc +++ b/x-pack/plugins/apm/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/apm-plugin", - "owner": "@elastic/apm-ui", + "owner": "@elastic/obs-ux-infra_services-team", "description": "The user interface for Elastic APM", "plugin": { "id": "apm", diff --git a/x-pack/plugins/apm/public/components/app/mobile/service_overview/stats/stats.tsx b/x-pack/plugins/apm/public/components/app/mobile/service_overview/stats/stats.tsx index a0caf4b3002ac..85e29bbe53e39 100644 --- a/x-pack/plugins/apm/public/components/app/mobile/service_overview/stats/stats.tsx +++ b/x-pack/plugins/apm/public/components/app/mobile/service_overview/stats/stats.tsx @@ -7,9 +7,9 @@ import { MetricDatum, MetricTrendShape } from '@elastic/charts'; import { i18n } from '@kbn/i18n'; import { - EuiIcon, EuiFlexGroup, EuiFlexItem, + EuiIcon, EuiLoadingSpinner, } from '@elastic/eui'; import React, { useCallback } from 'react'; @@ -17,9 +17,9 @@ import { useTheme } from '@kbn/observability-shared-plugin/public'; import { NOT_AVAILABLE_LABEL } from '../../../../../../common/i18n'; import { useAnyOfApmParams } from '../../../../../hooks/use_apm_params'; import { - useFetcher, FETCH_STATUS, isPending, + useFetcher, } from '../../../../../hooks/use_fetcher'; import { MetricItem } from './metric_item'; import { usePreviousPeriodLabel } from '../../../../../hooks/use_previous_period_text'; @@ -120,17 +120,20 @@ export function MobileStats({ trendShape: MetricTrendShape.Area, }, { - color: euiTheme.eui.euiColorDisabled, + color: euiTheme.eui.euiColorLightestShade, title: i18n.translate('xpack.apm.mobile.metrics.load.time', { - defaultMessage: 'Slowest App load time', - }), - subtitle: i18n.translate('xpack.apm.mobile.coming.soon', { - defaultMessage: 'Coming Soon', + defaultMessage: 'Average app load time', }), icon: getIcon('visGauge'), - value: 'N/A', - valueFormatter: (value: number) => valueFormatter(value, 's'), - trend: [], + value: data?.currentPeriod?.launchTimes?.value ?? NaN, + valueFormatter: (value: number) => + Number.isNaN(value) + ? NOT_AVAILABLE_LABEL + : valueFormatter(Number(value.toFixed(1)), 'ms'), + trend: data?.currentPeriod?.launchTimes?.timeseries, + extra: getComparisonValueFormatter( + data?.previousPeriod.launchTimes?.value?.toFixed(1) + ), trendShape: MetricTrendShape.Area, }, { diff --git a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/accordion_waterfall.tsx b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/accordion_waterfall.tsx index 1aa7c9ecb127b..f705244d6963e 100644 --- a/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/accordion_waterfall.tsx +++ b/x-pack/plugins/apm/public/components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/accordion_waterfall.tsx @@ -12,11 +12,13 @@ import { EuiFlexItem, EuiIcon, EuiText, + EuiToolTip, } from '@elastic/eui'; import { euiStyled } from '@kbn/kibana-react-plugin/common'; import { groupBy } from 'lodash'; import { transparentize } from 'polished'; import React, { useState } from 'react'; +import { asBigNumber } from '../../../../../../../common/utils/formatters'; import { getCriticalPath } from '../../../../../../../common/critical_path/get_critical_path'; import { useTheme } from '../../../../../../hooks/use_theme'; import { Margins } from '../../../../../shared/charts/timeline'; @@ -148,7 +150,7 @@ export function AccordionWaterfall(props: AccordionWaterfallProps) { @@ -200,12 +202,12 @@ export function AccordionWaterfall(props: AccordionWaterfallProps) { function ToggleAccordionButton({ show, isOpen, - childrenAmount, + childrenCount, onClick, }: { show: boolean; isOpen: boolean; - childrenAmount: number; + childrenCount: number; onClick: () => void; }) { if (!show) { @@ -213,7 +215,12 @@ function ToggleAccordionButton({ } return ( -
+
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */} @@ -226,8 +233,18 @@ function ToggleAccordionButton({
- - {childrenAmount} + +
+ + {asBigNumber(childrenCount)} + +
diff --git a/x-pack/plugins/apm/server/routes/mobile/get_mobile_average_launch_time.ts b/x-pack/plugins/apm/server/routes/mobile/get_mobile_average_launch_time.ts new file mode 100644 index 0000000000000..e711d5c72fb3b --- /dev/null +++ b/x-pack/plugins/apm/server/routes/mobile/get_mobile_average_launch_time.ts @@ -0,0 +1,161 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { ProcessorEvent } from '@kbn/observability-plugin/common'; +import { + kqlQuery, + rangeQuery, + termQuery, +} from '@kbn/observability-plugin/server'; +import { offsetPreviousPeriodCoordinates } from '../../../common/utils/offset_previous_period_coordinate'; +import { APP_LAUNCH_TIME, SERVICE_NAME } from '../../../common/es_fields/apm'; +import { environmentQuery } from '../../../common/utils/environment_query'; +import { getOffsetInMs } from '../../../common/utils/get_offset_in_ms'; +import { APMEventClient } from '../../lib/helpers/create_es_client/create_apm_event_client'; +import { getBucketSize } from '../../../common/utils/get_bucket_size'; +import { Coordinate } from '../../../typings/timeseries'; +import { Maybe } from '../../../typings/common'; + +export interface AvgLaunchTimeTimeseries { + currentPeriod: { timeseries: Coordinate[]; value: Maybe }; + previousPeriod: { timeseries: Coordinate[]; value: Maybe }; +} + +interface Props { + apmEventClient: APMEventClient; + serviceName: string; + transactionName?: string; + environment: string; + start: number; + end: number; + kuery: string; + offset?: string; +} + +async function getAvgLaunchTimeTimeseries({ + apmEventClient, + serviceName, + transactionName, + environment, + start, + end, + kuery, + offset, +}: Props) { + const { startWithOffset, endWithOffset } = getOffsetInMs({ + start, + end, + offset, + }); + + const { intervalString } = getBucketSize({ + start: startWithOffset, + end: endWithOffset, + minBucketSize: 60, + }); + + const aggs = { + launchTimeAvg: { + avg: { field: APP_LAUNCH_TIME }, + }, + }; + + const response = await apmEventClient.search('get_mobile_launch_time', { + apm: { + events: [ProcessorEvent.metric], + }, + body: { + track_total_hits: false, + size: 0, + query: { + bool: { + filter: [ + ...termQuery(SERVICE_NAME, serviceName), + ...rangeQuery(startWithOffset, endWithOffset), + ...environmentQuery(environment), + ...kqlQuery(kuery), + ], + }, + }, + aggs: { + timeseries: { + date_histogram: { + field: '@timestamp', + fixed_interval: intervalString, + min_doc_count: 0, + extended_bounds: { min: startWithOffset, max: endWithOffset }, + }, + aggs, + }, + ...aggs, + }, + }, + }); + + const timeseries = + response?.aggregations?.timeseries.buckets.map((bucket) => { + return { + x: bucket.key, + y: bucket.launchTimeAvg.value, + }; + }) ?? []; + + return { + timeseries, + value: response.aggregations?.launchTimeAvg?.value, + }; +} + +export async function getMobileAvgLaunchTime({ + kuery, + apmEventClient, + serviceName, + transactionName, + environment, + start, + end, + offset, +}: Props): Promise { + const options = { + serviceName, + transactionName, + apmEventClient, + kuery, + environment, + }; + + const currentPeriodPromise = getAvgLaunchTimeTimeseries({ + ...options, + start, + end, + }); + + const previousPeriodPromise = offset + ? getAvgLaunchTimeTimeseries({ + ...options, + start, + end, + offset, + }) + : { timeseries: [], value: null }; + + const [currentPeriod, previousPeriod] = await Promise.all([ + currentPeriodPromise, + previousPeriodPromise, + ]); + + return { + currentPeriod, + previousPeriod: { + timeseries: offsetPreviousPeriodCoordinates({ + currentPeriodTimeseries: currentPeriod.timeseries, + previousPeriodTimeseries: previousPeriod.timeseries, + }), + value: previousPeriod?.value, + }, + }; +} diff --git a/x-pack/plugins/apm/server/routes/mobile/get_mobile_stats.ts b/x-pack/plugins/apm/server/routes/mobile/get_mobile_stats.ts index 071487298ab7a..116117426405c 100644 --- a/x-pack/plugins/apm/server/routes/mobile/get_mobile_stats.ts +++ b/x-pack/plugins/apm/server/routes/mobile/get_mobile_stats.ts @@ -10,16 +10,19 @@ import { getOffsetInMs } from '../../../common/utils/get_offset_in_ms'; import { getMobileSessions } from './get_mobile_sessions'; import { getMobileHttpRequests } from './get_mobile_http_requests'; import { getMobileCrashRate } from './get_mobile_crash_rate'; +import { getMobileAvgLaunchTime } from './get_mobile_average_launch_time'; import { Maybe } from '../../../typings/common'; export interface Timeseries { x: number; y: number; } + interface MobileStats { sessions: { timeseries: Timeseries[]; value: Maybe }; requests: { timeseries: Timeseries[]; value: Maybe }; crashRate: { timeseries: Timeseries[]; value: Maybe }; + launchTimes: { timeseries: Timeseries[]; value: Maybe }; } export interface MobilePeriodStats { @@ -62,10 +65,11 @@ async function getMobileStats({ offset, }; - const [sessions, httpRequests, crashes] = await Promise.all([ + const [sessions, httpRequests, crashes, launchTimeAvg] = await Promise.all([ getMobileSessions({ ...commonProps }), getMobileHttpRequests({ ...commonProps }), getMobileCrashRate({ ...commonProps }), + getMobileAvgLaunchTime({ ...commonProps }), ]); return { @@ -89,6 +93,10 @@ async function getMobileStats({ }; }) as Timeseries[], }, + launchTimes: { + value: launchTimeAvg.currentPeriod.value, + timeseries: launchTimeAvg.currentPeriod.timeseries as Timeseries[], + }, }; } @@ -123,6 +131,7 @@ export async function getMobileStatsPeriods({ sessions: { timeseries: [], value: null }, requests: { timeseries: [], value: null }, crashRate: { timeseries: [], value: null }, + launchTimes: { timeseries: [], value: null }, }; const [currentPeriod, previousPeriod] = await Promise.all([ diff --git a/x-pack/plugins/apm_data_access/kibana.jsonc b/x-pack/plugins/apm_data_access/kibana.jsonc index d0ee0befda101..ede5cd53c9a6c 100644 --- a/x-pack/plugins/apm_data_access/kibana.jsonc +++ b/x-pack/plugins/apm_data_access/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/apm-data-access-plugin", - "owner": "@elastic/apm-ui", + "owner": ["@elastic/obs-knowledge-team", "@elastic/obs-ux-infra_services-team"], "plugin": { "id": "apmDataAccess", "server": true, diff --git a/x-pack/plugins/asset_manager/kibana.jsonc b/x-pack/plugins/asset_manager/kibana.jsonc index b3fcd1b3a4fa1..1ee4b12d55ea7 100644 --- a/x-pack/plugins/asset_manager/kibana.jsonc +++ b/x-pack/plugins/asset_manager/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/assetManager-plugin", - "owner": "@elastic/infra-monitoring-ui", + "owner": "@elastic/obs-knowledge-team", "description": "Asset manager plugin for entity assets (inventory, topology, etc)", "plugin": { "id": "assetManager", diff --git a/x-pack/plugins/cases/docs/openapi/bundled.json b/x-pack/plugins/cases/docs/openapi/bundled.json index 80cdefd30e957..54a9c31d34312 100644 --- a/x-pack/plugins/cases/docs/openapi/bundled.json +++ b/x-pack/plugins/cases/docs/openapi/bundled.json @@ -1206,8 +1206,11 @@ "$ref": "#/components/schemas/case_response_properties" }, "examples": { - "getCaseResponse": { + "getDefaultCaseResponse": { "$ref": "#/components/examples/get_case_response" + }, + "getDefaultObservabilityCaseReponse": { + "$ref": "#/components/examples/get_case_observability_response" } } } @@ -3078,6 +3081,9 @@ "examples": { "getCaseResponse": { "$ref": "#/components/examples/get_case_response" + }, + "getObservabilityCaseReponse": { + "$ref": "#/components/examples/get_case_observability_response" } } } @@ -4614,13 +4620,16 @@ ], "properties": { "alertId": { - "type": "string", - "example": "6b24c4dc44bc720cfc92797f3d61fff952f2b2627db1fb4f8cc49f4530c4ff42" + "type": "array", + "items": { + "type": "string", + "example": "a6e12ac4-7bce-457b-84f6-d7ce8deb8446" + } }, "created_at": { "type": "string", "format": "date-time", - "example": "2022-03-24T02:31:03.210Z" + "example": "2023-11-06T19:29:38.424Z" }, "created_by": { "type": "object", @@ -4656,8 +4665,11 @@ "example": "73362370-ab1a-11ec-985f-97e55adae8b9" }, "index": { - "type": "string", - "example": ".internal.alerts-security.alerts-default-000001" + "type": "array", + "items": { + "type": "string", + "example": ".internal.alerts-security.alerts-default-000001" + } }, "owner": { "$ref": "#/components/schemas/owners" @@ -4723,10 +4735,11 @@ "updated_at": { "type": "string", "format": "date-time", - "example": null + "nullable": true }, "updated_by": { "type": "object", + "nullable": true, "required": [ "email", "full_name", @@ -6971,6 +6984,7 @@ "syncAlerts": true }, "owner": "cases", + "category": null, "customFields": [ { "type": "text", @@ -7017,6 +7031,104 @@ "external_service": null } }, + "get_case_observability_response": { + "summary": "Retrieves information about an Observability case including its alerts and comments.", + "value": { + "description": "An Observability case description.", + "owner": "observability", + "settings": { + "syncAlerts": false + }, + "tags": [ + "observability", + "tag 1" + ], + "title": "Observability case title 1", + "category": null, + "customFields": [], + "assignees": [ + { + "uid": "u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0" + } + ], + "connector": { + "id": "none", + "type": ".none", + "fields": null, + "name": "none" + }, + "severity": "low", + "status": "in-progress", + "duration": null, + "closed_at": null, + "closed_by": null, + "created_at": "2023-11-06T19:29:04.086Z", + "created_by": { + "username": "elastic", + "full_name": null, + "email": null + }, + "updated_at": "2023-11-06T19:47:55.662Z", + "updated_by": { + "username": "elastic", + "full_name": null, + "email": null, + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" + }, + "external_service": null, + "id": "c3ff7550-def1-4e90-b6bc-c9969a4a09b1", + "version": "WzI0NywyXQ==", + "totalComment": 1, + "totalAlerts": 1, + "comments": [ + { + "alertId": [ + "a6e12ac4-7bce-457b-84f6-d7ce8deb8446" + ], + "index": [ + ".internal.alerts-observability.logs.alerts-default-000001" + ], + "type": "alert", + "rule": { + "id": "03e4eb87-62ca-4e5d-9570-3d7625e9669d", + "name": "Observability rule" + }, + "owner": "observability", + "created_at": "2023-11-06T19:29:38.424Z", + "created_by": { + "email": null, + "full_name": null, + "username": "elastic", + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" + }, + "pushed_at": null, + "pushed_by": null, + "updated_at": null, + "updated_by": null, + "id": "59d438d0-79a9-4864-8d4b-e63adacebf6e", + "version": "WzY3LDJd" + }, + { + "comment": "The first comment.", + "type": "user", + "owner": "observability", + "created_at": "2023-11-06T19:29:57.812Z", + "created_by": { + "email": null, + "full_name": null, + "username": "elastic", + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" + }, + "pushed_at": null, + "pushed_by": null, + "updated_at": null, + "updated_by": null, + "id": "d99342d3-3aa3-4b80-90ec-a702607604f5", + "version": "WzcyLDJd" + } + ] + } + }, "get_case_alerts_response": { "summary": "Retrieves all alerts attached to a case", "value": [ diff --git a/x-pack/plugins/cases/docs/openapi/bundled.yaml b/x-pack/plugins/cases/docs/openapi/bundled.yaml index ec5c1db337f29..8347d7d85741b 100644 --- a/x-pack/plugins/cases/docs/openapi/bundled.yaml +++ b/x-pack/plugins/cases/docs/openapi/bundled.yaml @@ -811,8 +811,10 @@ paths: schema: $ref: '#/components/schemas/case_response_properties' examples: - getCaseResponse: + getDefaultCaseResponse: $ref: '#/components/examples/get_case_response' + getDefaultObservabilityCaseReponse: + $ref: '#/components/examples/get_case_observability_response' '401': description: Authorization information is missing or invalid. content: @@ -2017,6 +2019,8 @@ paths: examples: getCaseResponse: $ref: '#/components/examples/get_case_response' + getObservabilityCaseReponse: + $ref: '#/components/examples/get_case_observability_response' '401': description: Authorization information is missing or invalid. content: @@ -3068,12 +3072,14 @@ components: - type properties: alertId: - type: string - example: 6b24c4dc44bc720cfc92797f3d61fff952f2b2627db1fb4f8cc49f4530c4ff42 + type: array + items: + type: string + example: a6e12ac4-7bce-457b-84f6-d7ce8deb8446 created_at: type: string format: date-time - example: '2022-03-24T02:31:03.210Z' + example: '2023-11-06T19:29:38.424Z' created_by: type: object required: @@ -3100,8 +3106,10 @@ components: type: string example: 73362370-ab1a-11ec-985f-97e55adae8b9 index: - type: string - example: .internal.alerts-security.alerts-default-000001 + type: array + items: + type: string + example: .internal.alerts-security.alerts-default-000001 owner: $ref: '#/components/schemas/owners' pushed_at: @@ -3151,9 +3159,10 @@ components: updated_at: type: string format: date-time - example: null + nullable: true updated_by: type: object + nullable: true required: - email - full_name @@ -4769,6 +4778,7 @@ components: settings: syncAlerts: true owner: cases + category: null customFields: - type: text key: d312efda-ec2b-42ec-9e2c-84981795c581 @@ -4802,6 +4812,84 @@ components: type: .none fields: null external_service: null + get_case_observability_response: + summary: Retrieves information about an Observability case including its alerts and comments. + value: + description: An Observability case description. + owner: observability + settings: + syncAlerts: false + tags: + - observability + - tag 1 + title: Observability case title 1 + category: null + customFields: [] + assignees: + - uid: u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0 + connector: + id: none + type: .none + fields: null + name: none + severity: low + status: in-progress + duration: null + closed_at: null + closed_by: null + created_at: '2023-11-06T19:29:04.086Z' + created_by: + username: elastic + full_name: null + email: null + updated_at: '2023-11-06T19:47:55.662Z' + updated_by: + username: elastic + full_name: null + email: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + external_service: null + id: c3ff7550-def1-4e90-b6bc-c9969a4a09b1 + version: WzI0NywyXQ== + totalComment: 1 + totalAlerts: 1 + comments: + - alertId: + - a6e12ac4-7bce-457b-84f6-d7ce8deb8446 + index: + - .internal.alerts-observability.logs.alerts-default-000001 + type: alert + rule: + id: 03e4eb87-62ca-4e5d-9570-3d7625e9669d + name: Observability rule + owner: observability + created_at: '2023-11-06T19:29:38.424Z' + created_by: + email: null + full_name: null + username: elastic + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + pushed_at: null + pushed_by: null + updated_at: null + updated_by: null + id: 59d438d0-79a9-4864-8d4b-e63adacebf6e + version: WzY3LDJd + - comment: The first comment. + type: user + owner: observability + created_at: '2023-11-06T19:29:57.812Z' + created_by: + email: null + full_name: null + username: elastic + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + pushed_at: null + pushed_by: null + updated_at: null + updated_by: null + id: d99342d3-3aa3-4b80-90ec-a702607604f5 + version: WzcyLDJd get_case_alerts_response: summary: Retrieves all alerts attached to a case value: diff --git a/x-pack/plugins/cases/docs/openapi/components/examples/get_case_observability_response.yaml b/x-pack/plugins/cases/docs/openapi/components/examples/get_case_observability_response.yaml new file mode 100644 index 0000000000000..49b9aa692a335 --- /dev/null +++ b/x-pack/plugins/cases/docs/openapi/components/examples/get_case_observability_response.yaml @@ -0,0 +1,97 @@ +summary: Retrieves information about an Observability case including its alerts and comments. +value: + { + "description": "An Observability case description.", + "owner": "observability", + "settings": { + "syncAlerts": false + }, + "tags": [ + "observability", + "tag 1" + ], + "title": "Observability case title 1", + "category": null, + "customFields": [], + "assignees": [ + { + "uid": "u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0" + } + ], + "connector": { + "id": "none", + "type": ".none", + "fields": null, + "name": "none" + }, + "severity": "low", + "status": "in-progress", + "duration": null, + "closed_at": null, + "closed_by": null, + "created_at": "2023-11-06T19:29:04.086Z", + "created_by": { + "username": "elastic", + "full_name": null, + "email": null + }, + "updated_at": "2023-11-06T19:47:55.662Z", + "updated_by": { + "username": "elastic", + "full_name": null, + "email": null, + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" + }, + "external_service": null, + "id": "c3ff7550-def1-4e90-b6bc-c9969a4a09b1", + "version": "WzI0NywyXQ==", + "totalComment": 1, + "totalAlerts": 1, + "comments": [ + { + "alertId": [ + "a6e12ac4-7bce-457b-84f6-d7ce8deb8446" + ], + "index": [ + ".internal.alerts-observability.logs.alerts-default-000001" + ], + "type": "alert", + "rule": { + "id": "03e4eb87-62ca-4e5d-9570-3d7625e9669d", + "name": "Observability rule" + }, + "owner": "observability", + "created_at": "2023-11-06T19:29:38.424Z", + "created_by": { + "email": null, + "full_name": null, + "username": "elastic", + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" + }, + "pushed_at": null, + "pushed_by": null, + "updated_at": null, + "updated_by": null, + "id": "59d438d0-79a9-4864-8d4b-e63adacebf6e", + "version": "WzY3LDJd" + }, + { + "comment": "The first comment.", + "type": "user", + "owner": "observability", + "created_at": "2023-11-06T19:29:57.812Z", + "created_by": { + "email": null, + "full_name": null, + "username": "elastic", + "profile_uid": "u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0" + }, + "pushed_at": null, + "pushed_by": null, + "updated_at": null, + "updated_by": null, + "id": "d99342d3-3aa3-4b80-90ec-a702607604f5", + "version": "WzcyLDJd" + } + ] +} \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/examples/get_case_response.yaml b/x-pack/plugins/cases/docs/openapi/components/examples/get_case_response.yaml index d4fc3db97a169..50dabd2dc8a9b 100644 --- a/x-pack/plugins/cases/docs/openapi/components/examples/get_case_response.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/examples/get_case_response.yaml @@ -27,6 +27,7 @@ value: "tags":["tag 1"], "settings":{"syncAlerts":true}, "owner":"cases", + "category":null, "customFields": [ { "type": "text", diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/alert_comment_response_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/alert_comment_response_properties.yaml index aa39aad1381a0..443d9dcc55523 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/alert_comment_response_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/alert_comment_response_properties.yaml @@ -4,12 +4,14 @@ required: - type properties: alertId: - type: string - example: 6b24c4dc44bc720cfc92797f3d61fff952f2b2627db1fb4f8cc49f4530c4ff42 + type: array + items: + type: string + example: a6e12ac4-7bce-457b-84f6-d7ce8deb8446 created_at: type: string format: date-time - example: 2022-03-24T02:31:03.210Z + example: 2023-11-06T19:29:38.424Z created_by: type: object required: @@ -22,8 +24,10 @@ properties: type: string example: 73362370-ab1a-11ec-985f-97e55adae8b9 index: - type: string - example: .internal.alerts-security.alerts-default-000001 + type: array + items: + type: string + example: .internal.alerts-security.alerts-default-000001 owner: $ref: 'owners.yaml' pushed_at: @@ -52,9 +56,10 @@ properties: updated_at: type: string format: date-time - example: null + nullable: true updated_by: type: object + nullable: true required: - email - full_name diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}.yaml index 9629049c9b342..c5b52a52b741f 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}.yaml @@ -18,8 +18,10 @@ get: schema: $ref: '../components/schemas/case_response_properties.yaml' examples: - getCaseResponse: + getDefaultCaseResponse: $ref: '../components/examples/get_case_response.yaml' + getDefaultObservabilityCaseReponse: + $ref: '../components/examples/get_case_observability_response.yaml' '401': description: Authorization information is missing or invalid. content: diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}.yaml index 32e3434f15add..aecd3f6394bb7 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}.yaml @@ -21,6 +21,8 @@ get: examples: getCaseResponse: $ref: '../components/examples/get_case_response.yaml' + getObservabilityCaseReponse: + $ref: '../components/examples/get_case_observability_response.yaml' '401': description: Authorization information is missing or invalid. content: diff --git a/x-pack/plugins/cases/public/common/mock/test_providers.tsx b/x-pack/plugins/cases/public/common/mock/test_providers.tsx index 7dfed5d7188de..846ae8172b327 100644 --- a/x-pack/plugins/cases/public/common/mock/test_providers.tsx +++ b/x-pack/plugins/cases/public/common/mock/test_providers.tsx @@ -11,6 +11,7 @@ import React from 'react'; import { MemoryRouter } from 'react-router-dom'; import { ThemeProvider } from 'styled-components'; +import { render as reactRender } from '@testing-library/react'; import type { RenderOptions, RenderResult } from '@testing-library/react'; import type { ILicense } from '@kbn/licensing-plugin/public'; import type { ScopedFilesClient } from '@kbn/files-plugin/public'; @@ -20,7 +21,6 @@ import { I18nProvider } from '@kbn/i18n-react'; import { createMockFilesClient } from '@kbn/shared-ux-file-mocks'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; -import { render as reactRender } from '@testing-library/react'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { FilesContext } from '@kbn/shared-ux-file-context'; diff --git a/x-pack/plugins/cases/public/common/use_cases_toast.test.tsx b/x-pack/plugins/cases/public/common/use_cases_toast.test.tsx index d6597e31362e7..53fe9118a6aa0 100644 --- a/x-pack/plugins/cases/public/common/use_cases_toast.test.tsx +++ b/x-pack/plugins/cases/public/common/use_cases_toast.test.tsx @@ -14,7 +14,7 @@ import { alertComment, basicComment, mockCase } from '../containers/mock'; import React from 'react'; import userEvent from '@testing-library/user-event'; import type { SupportedCaseAttachment } from '../types'; -import { getByTestId } from '@testing-library/dom'; +import { getByTestId } from '@testing-library/react'; import { OWNER_INFO } from '../../common/constants'; jest.mock('./lib/kibana'); diff --git a/x-pack/plugins/cases/public/components/all_cases/selector_modal/use_cases_add_to_existing_case_modal.test.tsx b/x-pack/plugins/cases/public/components/all_cases/selector_modal/use_cases_add_to_existing_case_modal.test.tsx index 2cfaacc8383ca..a80e1935d1add 100644 --- a/x-pack/plugins/cases/public/components/all_cases/selector_modal/use_cases_add_to_existing_case_modal.test.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/selector_modal/use_cases_add_to_existing_case_modal.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { act, renderHook } from '@testing-library/react-hooks'; import userEvent from '@testing-library/user-event'; import React from 'react'; diff --git a/x-pack/plugins/cases/public/components/all_cases/severity_filter.test.tsx b/x-pack/plugins/cases/public/components/all_cases/severity_filter.test.tsx index 30d5c75e63589..26169e16c5bed 100644 --- a/x-pack/plugins/cases/public/components/all_cases/severity_filter.test.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/severity_filter.test.tsx @@ -10,7 +10,7 @@ import React from 'react'; import type { AppMockRenderer } from '../../common/mock'; import { createAppMockRenderer } from '../../common/mock'; import userEvent from '@testing-library/user-event'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { waitForEuiPopoverOpen } from '@elastic/eui/lib/test/rtl'; import { SeverityFilter } from './severity_filter'; diff --git a/x-pack/plugins/cases/public/components/all_cases/use_actions.test.tsx b/x-pack/plugins/cases/public/components/all_cases/use_actions.test.tsx index 0efc7a5862893..ecc9233fc327c 100644 --- a/x-pack/plugins/cases/public/components/all_cases/use_actions.test.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/use_actions.test.tsx @@ -6,7 +6,7 @@ */ import userEvent from '@testing-library/user-event'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { renderHook } from '@testing-library/react-hooks/dom'; import { useActions } from './use_actions'; diff --git a/x-pack/plugins/cases/public/components/case_action_bar/actions.test.tsx b/x-pack/plugins/cases/public/components/case_action_bar/actions.test.tsx index c79e88ce350ab..ef97a5f8d854d 100644 --- a/x-pack/plugins/cases/public/components/case_action_bar/actions.test.tsx +++ b/x-pack/plugins/cases/public/components/case_action_bar/actions.test.tsx @@ -13,7 +13,7 @@ import { basicCase, basicPush } from '../../containers/mock'; import { Actions } from './actions'; import * as i18n from '../case_view/translations'; import * as api from '../../containers/api'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; jest.mock('../../containers/api'); 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 cba9169590839..b85dbe7564cf9 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 @@ -6,7 +6,7 @@ */ import React from 'react'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { OBSERVABILITY_OWNER } from '../../../../common/constants'; import { alertCommentWithIndices, basicCase } from '../../../containers/mock'; import type { AppMockRenderer } from '../../../common/mock'; diff --git a/x-pack/plugins/cases/public/components/case_view/index.test.tsx b/x-pack/plugins/cases/public/components/case_view/index.test.tsx index 07b58820b52b7..13524989bc7b8 100644 --- a/x-pack/plugins/cases/public/components/case_view/index.test.tsx +++ b/x-pack/plugins/cases/public/components/case_view/index.test.tsx @@ -30,7 +30,7 @@ import { useGetSupportedActionConnectors } from '../../containers/configure/use_ import type { AppMockRenderer } from '../../common/mock'; import { createAppMockRenderer } from '../../common/mock'; import CaseView from '.'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { useGetTags } from '../../containers/use_get_tags'; import { casesQueriesKeys } from '../../containers/constants'; import { diff --git a/x-pack/plugins/cases/public/components/create/form.test.tsx b/x-pack/plugins/cases/public/components/create/form.test.tsx index e7bd2fc754f34..05e7788624800 100644 --- a/x-pack/plugins/cases/public/components/create/form.test.tsx +++ b/x-pack/plugins/cases/public/components/create/form.test.tsx @@ -7,8 +7,7 @@ import React from 'react'; import { mount } from 'enzyme'; -import { act, render, within, fireEvent } from '@testing-library/react'; -import { waitFor } from '@testing-library/dom'; +import { act, render, within, fireEvent, waitFor } from '@testing-library/react'; import { licensingMock } from '@kbn/licensing-plugin/public/mocks'; import { NONE_CONNECTOR_ID } from '../../../common/constants'; diff --git a/x-pack/plugins/cases/public/components/create/severity.test.tsx b/x-pack/plugins/cases/public/components/create/severity.test.tsx index 328b9b4cd5e00..bf81dfc357fc7 100644 --- a/x-pack/plugins/cases/public/components/create/severity.test.tsx +++ b/x-pack/plugins/cases/public/components/create/severity.test.tsx @@ -15,7 +15,7 @@ import { Severity } from './severity'; import type { FormProps } from './schema'; import { schema } from './schema'; import userEvent from '@testing-library/user-event'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { waitForEuiPopoverOpen } from '@elastic/eui/lib/test/rtl'; let globalForm: FormHook; diff --git a/x-pack/plugins/cases/public/components/custom_fields/index.test.tsx b/x-pack/plugins/cases/public/components/custom_fields/index.test.tsx index d81e31ba69d6d..7864361063b31 100644 --- a/x-pack/plugins/cases/public/components/custom_fields/index.test.tsx +++ b/x-pack/plugins/cases/public/components/custom_fields/index.test.tsx @@ -7,7 +7,7 @@ import React from 'react'; import userEvent from '@testing-library/user-event'; -import { screen, waitFor } from '@testing-library/dom'; +import { screen, waitFor } from '@testing-library/react'; import type { AppMockRenderer } from '../../common/mock'; import { createAppMockRenderer } from '../../common/mock'; diff --git a/x-pack/plugins/cases/public/components/experimental_badge/experimental_badge.test.tsx b/x-pack/plugins/cases/public/components/experimental_badge/experimental_badge.test.tsx index a13aea90e8e6e..38b5960898cf0 100644 --- a/x-pack/plugins/cases/public/components/experimental_badge/experimental_badge.test.tsx +++ b/x-pack/plugins/cases/public/components/experimental_badge/experimental_badge.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { screen } from '@testing-library/dom'; +import { screen } from '@testing-library/react'; import type { AppMockRenderer } from '../../common/mock'; import { createAppMockRenderer } from '../../common/mock'; diff --git a/x-pack/plugins/cases/public/components/visualizations/actions/add_to_existing_case.test.tsx b/x-pack/plugins/cases/public/components/visualizations/actions/add_to_existing_case.test.tsx index 9c911e5aa89b4..a32ece05eac74 100644 --- a/x-pack/plugins/cases/public/components/visualizations/actions/add_to_existing_case.test.tsx +++ b/x-pack/plugins/cases/public/components/visualizations/actions/add_to_existing_case.test.tsx @@ -24,7 +24,7 @@ import { mockTimeRange, } from './mocks'; import { useKibana } from '../../../common/lib/kibana'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { canUseCases } from '../../../client/helpers/can_use_cases'; import { getCaseOwnerByAppId } from '../../../../common/utils/owner'; diff --git a/x-pack/plugins/cases/public/components/visualizations/actions/add_to_new_case.test.tsx b/x-pack/plugins/cases/public/components/visualizations/actions/add_to_new_case.test.tsx index f55f95cbfb0ec..3549ca3301d18 100644 --- a/x-pack/plugins/cases/public/components/visualizations/actions/add_to_new_case.test.tsx +++ b/x-pack/plugins/cases/public/components/visualizations/actions/add_to_new_case.test.tsx @@ -8,7 +8,7 @@ import { LENS_EMBEDDABLE_TYPE, type Embeddable as LensEmbeddable } from '@kbn/lens-plugin/public'; import { ErrorEmbeddable } from '@kbn/embeddable-plugin/public'; import type { Action } from '@kbn/ui-actions-plugin/public'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { createAddToNewCaseLensAction } from './add_to_new_case'; import type { ActionContext } from './types'; diff --git a/x-pack/plugins/cases/public/containers/configure/use_get_case_configuration.test.tsx b/x-pack/plugins/cases/public/containers/configure/use_get_case_configuration.test.tsx index 1cb8685e26cbf..d625e247cb572 100644 --- a/x-pack/plugins/cases/public/containers/configure/use_get_case_configuration.test.tsx +++ b/x-pack/plugins/cases/public/containers/configure/use_get_case_configuration.test.tsx @@ -8,7 +8,7 @@ import { renderHook } from '@testing-library/react-hooks'; import { useGetCaseConfiguration } from './use_get_case_configuration'; import * as api from './api'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { useToasts } from '../../common/lib/kibana'; import type { AppMockRenderer } from '../../common/mock'; import { createAppMockRenderer } from '../../common/mock'; diff --git a/x-pack/plugins/cases/public/containers/use_get_case.test.tsx b/x-pack/plugins/cases/public/containers/use_get_case.test.tsx index 0514acf4a71ea..2b5082a9e22a5 100644 --- a/x-pack/plugins/cases/public/containers/use_get_case.test.tsx +++ b/x-pack/plugins/cases/public/containers/use_get_case.test.tsx @@ -8,7 +8,7 @@ import { renderHook } from '@testing-library/react-hooks'; import { useGetCase } from './use_get_case'; import * as api from './api'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import React from 'react'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { useToasts } from '../common/lib/kibana'; diff --git a/x-pack/plugins/cases/public/containers/use_get_feature_ids.test.tsx b/x-pack/plugins/cases/public/containers/use_get_feature_ids.test.tsx index fdec17c215fda..298abb5d133e7 100644 --- a/x-pack/plugins/cases/public/containers/use_get_feature_ids.test.tsx +++ b/x-pack/plugins/cases/public/containers/use_get_feature_ids.test.tsx @@ -6,7 +6,7 @@ */ import { renderHook } from '@testing-library/react-hooks'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { useToasts } from '../common/lib/kibana'; import type { AppMockRenderer } from '../common/mock'; import { createAppMockRenderer } from '../common/mock'; diff --git a/x-pack/plugins/cases/server/services/notifications/templates/assignees/renderer.test.ts b/x-pack/plugins/cases/server/services/notifications/templates/assignees/renderer.test.ts index ecd0bc08393bb..fb6509aeceeb4 100644 --- a/x-pack/plugins/cases/server/services/notifications/templates/assignees/renderer.test.ts +++ b/x-pack/plugins/cases/server/services/notifications/templates/assignees/renderer.test.ts @@ -6,7 +6,7 @@ */ import { mockCases } from '../../../../mocks'; -import { getByText } from '@testing-library/dom'; +import { getByText } from '@testing-library/react'; import { assigneesTemplateRenderer } from './renderer'; import type { CaseSavedObjectTransformed } from '../../../../common/types/case'; diff --git a/x-pack/plugins/cases/server/services/notifications/templates/assignees/template.test.ts b/x-pack/plugins/cases/server/services/notifications/templates/assignees/template.test.ts index b888cd6017b24..79589f4e58bef 100644 --- a/x-pack/plugins/cases/server/services/notifications/templates/assignees/template.test.ts +++ b/x-pack/plugins/cases/server/services/notifications/templates/assignees/template.test.ts @@ -6,7 +6,7 @@ */ import { mockCases } from '../../../../mocks'; -import { getByText } from '@testing-library/dom'; +import { getByText } from '@testing-library/react'; import { assigneesTemplateRenderer } from './renderer'; import type { CaseSavedObjectTransformed } from '../../../../common/types/case'; diff --git a/x-pack/plugins/cloud_security_posture/public/components/compliance_score_bar.tsx b/x-pack/plugins/cloud_security_posture/public/components/compliance_score_bar.tsx index 3f6c78fe6b2ef..8f866079ab160 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/compliance_score_bar.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/compliance_score_bar.tsx @@ -45,7 +45,7 @@ export const ComplianceScoreBar = ({ gutterSize="none" alignItems="center" justifyContent="flexEnd" - style={{ gap: euiTheme.size.s }} + style={{ gap: euiTheme.size.xs }} > - + - +
    +
  1. + +
  2. { return ( <> - + diff --git a/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/dashboard_sections/summary_section.test.tsx b/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/dashboard_sections/summary_section.test.tsx index 0545d4f3bb429..04c8382529593 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/dashboard_sections/summary_section.test.tsx +++ b/x-pack/plugins/cloud_security_posture/public/pages/compliance_dashboard/dashboard_sections/summary_section.test.tsx @@ -6,13 +6,12 @@ */ import React from 'react'; -import { render } from '@testing-library/react'; +import { render, screen } from '@testing-library/react'; import { expectIdsInDoc } from '../../../test/utils'; import { DASHBOARD_COUNTER_CARDS } from '../test_subjects'; import { SummarySection } from './summary_section'; import { mockDashboardData } from '../mock'; import { TestProvider } from '../../../test/test_provider'; -import { screen } from '@testing-library/react'; import { KSPM_POLICY_TEMPLATE } from '../../../../common/constants'; describe('', () => { diff --git a/x-pack/plugins/cloud_security_posture/public/pages/configurations/findings_flyout/findings_flyout.tsx b/x-pack/plugins/cloud_security_posture/public/pages/configurations/findings_flyout/findings_flyout.tsx index 524e893092e53..a6bb3b5bc08e3 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/configurations/findings_flyout/findings_flyout.tsx +++ b/x-pack/plugins/cloud_security_posture/public/pages/configurations/findings_flyout/findings_flyout.tsx @@ -22,6 +22,7 @@ import { EuiIcon, EuiPagination, EuiFlyoutFooter, + EuiToolTip, } from '@elastic/eui'; import { assertNever } from '@kbn/std'; import { i18n } from '@kbn/i18n'; @@ -98,7 +99,9 @@ export const CisKubernetesIcons = ({ }) => ( - + + + diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/role_mappings/engine_assignment_selector.test.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/role_mappings/engine_assignment_selector.test.tsx index a8f8b2af988f2..74ca02e1d91db 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/role_mappings/engine_assignment_selector.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/role_mappings/engine_assignment_selector.test.tsx @@ -13,7 +13,7 @@ import { engines } from '../../__mocks__/engines.mock'; import React from 'react'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { shallow } from 'enzyme'; import { EuiComboBox, EuiComboBoxOptionOption, EuiRadioGroup } from '@elastic/eui'; diff --git a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/role_mappings/group_assignment_selector.test.tsx b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/role_mappings/group_assignment_selector.test.tsx index 9312b1b6bbdb2..1cea94e434de1 100644 --- a/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/role_mappings/group_assignment_selector.test.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/workplace_search/views/role_mappings/group_assignment_selector.test.tsx @@ -11,7 +11,7 @@ import { setMockActions, setMockValues } from '../../../__mocks__/kea_logic'; import React from 'react'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { shallow } from 'enzyme'; import { EuiComboBox, EuiComboBoxOptionOption, EuiRadioGroup } from '@elastic/eui'; diff --git a/x-pack/plugins/enterprise_search/server/plugin.ts b/x-pack/plugins/enterprise_search/server/plugin.ts index 4a5e3689ded5c..baaa772989eb2 100644 --- a/x-pack/plugins/enterprise_search/server/plugin.ts +++ b/x-pack/plugins/enterprise_search/server/plugin.ts @@ -103,7 +103,9 @@ export interface PluginsStart { export interface RouteDependencies { config: ConfigType; enterpriseSearchRequestHandler: IEnterpriseSearchRequestHandler; + getSavedObjectsService?(): SavedObjectsServiceStart; + log: Logger; ml?: MlPluginSetup; router: IRouter; @@ -112,6 +114,7 @@ export interface RouteDependencies { export class EnterpriseSearchPlugin implements Plugin { private readonly config: ConfigType; private readonly logger: Logger; + /** * Exposed services */ @@ -177,42 +180,47 @@ export class EnterpriseSearchPlugin implements Plugin { /** * Register user access to the Enterprise Search plugins */ - capabilities.registerSwitcher(async (request: KibanaRequest) => { - const [, { spaces }] = await getStartServices(); - - const dependencies = { config, security, spaces, request, log, ml }; - - const { hasAppSearchAccess, hasWorkplaceSearchAccess } = await checkAccess(dependencies); - const showEnterpriseSearch = - hasAppSearchAccess || hasWorkplaceSearchAccess || !config.canDeployEntSearch; - - return { - navLinks: { - enterpriseSearch: showEnterpriseSearch, - enterpriseSearchContent: showEnterpriseSearch, - enterpriseSearchAnalytics: showEnterpriseSearch, - enterpriseSearchApplications: showEnterpriseSearch, - enterpriseSearchAISearch: showEnterpriseSearch, - enterpriseSearchVectorSearch: showEnterpriseSearch, - enterpriseSearchElasticsearch: showEnterpriseSearch, - appSearch: hasAppSearchAccess && config.canDeployEntSearch, - workplaceSearch: hasWorkplaceSearchAccess && config.canDeployEntSearch, - searchExperiences: showEnterpriseSearch, - }, - catalogue: { - enterpriseSearch: showEnterpriseSearch, - enterpriseSearchContent: showEnterpriseSearch, - enterpriseSearchAnalytics: showEnterpriseSearch, - enterpriseSearchApplications: showEnterpriseSearch, - enterpriseSearchAISearch: showEnterpriseSearch, - enterpriseSearchVectorSearch: showEnterpriseSearch, - enterpriseSearchElasticsearch: showEnterpriseSearch, - appSearch: hasAppSearchAccess && config.canDeployEntSearch, - workplaceSearch: hasWorkplaceSearchAccess && config.canDeployEntSearch, - searchExperiences: showEnterpriseSearch, - }, - }; - }); + capabilities.registerSwitcher( + async (request: KibanaRequest) => { + const [, { spaces }] = await getStartServices(); + + const dependencies = { config, security, spaces, request, log, ml }; + + const { hasAppSearchAccess, hasWorkplaceSearchAccess } = await checkAccess(dependencies); + const showEnterpriseSearch = + hasAppSearchAccess || hasWorkplaceSearchAccess || !config.canDeployEntSearch; + + return { + navLinks: { + enterpriseSearch: showEnterpriseSearch, + enterpriseSearchContent: showEnterpriseSearch, + enterpriseSearchAnalytics: showEnterpriseSearch, + enterpriseSearchApplications: showEnterpriseSearch, + enterpriseSearchAISearch: showEnterpriseSearch, + enterpriseSearchVectorSearch: showEnterpriseSearch, + enterpriseSearchElasticsearch: showEnterpriseSearch, + appSearch: hasAppSearchAccess && config.canDeployEntSearch, + workplaceSearch: hasWorkplaceSearchAccess && config.canDeployEntSearch, + searchExperiences: showEnterpriseSearch, + }, + catalogue: { + enterpriseSearch: showEnterpriseSearch, + enterpriseSearchContent: showEnterpriseSearch, + enterpriseSearchAnalytics: showEnterpriseSearch, + enterpriseSearchApplications: showEnterpriseSearch, + enterpriseSearchAISearch: showEnterpriseSearch, + enterpriseSearchVectorSearch: showEnterpriseSearch, + enterpriseSearchElasticsearch: showEnterpriseSearch, + appSearch: hasAppSearchAccess && config.canDeployEntSearch, + workplaceSearch: hasWorkplaceSearchAccess && config.canDeployEntSearch, + searchExperiences: showEnterpriseSearch, + }, + }; + }, + { + capabilityPath: ['navLinks.*', 'catalogue.*'], + } + ); /** * Register routes diff --git a/x-pack/plugins/exploratory_view/kibana.jsonc b/x-pack/plugins/exploratory_view/kibana.jsonc index e541ad7858650..b8041aaec89df 100644 --- a/x-pack/plugins/exploratory_view/kibana.jsonc +++ b/x-pack/plugins/exploratory_view/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/exploratory-view-plugin", - "owner": "@elastic/uptime", + "owner": "@elastic/obs-ux-infra_services-team", "plugin": { "id": "exploratoryView", "server": false, diff --git a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/components/action_menu/action_menu.test.tsx b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/components/action_menu/action_menu.test.tsx index c72899d8041c7..4e81ca840199f 100644 --- a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/components/action_menu/action_menu.test.tsx +++ b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/components/action_menu/action_menu.test.tsx @@ -6,7 +6,7 @@ */ import { render } from '../../rtl_helpers'; -import { fireEvent, screen } from '@testing-library/dom'; +import { fireEvent, screen } from '@testing-library/react'; import React from 'react'; import { sampleAttribute } from '../../configurations/test_data/sample_attribute'; import * as pluginHook from '../../../../../hooks/use_plugin_context'; diff --git a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/exploratory_view.test.tsx b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/exploratory_view.test.tsx index 443a6eb846cd8..7b4e0cb5cc57f 100644 --- a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/exploratory_view.test.tsx +++ b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/exploratory_view.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { screen } from '@testing-library/dom'; +import { screen } from '@testing-library/react'; import { render, mockAppDataView } from './rtl_helpers'; import { ExploratoryView } from './exploratory_view'; import * as obsvDataViews from '../../../utils/observability_data_views/observability_data_views'; diff --git a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/header/add_to_case_action.test.tsx b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/header/add_to_case_action.test.tsx index a4d8a88507e82..ffccfdf6db3f2 100644 --- a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/header/add_to_case_action.test.tsx +++ b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/header/add_to_case_action.test.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { render, forNearestButton } from '../rtl_helpers'; -import { fireEvent } from '@testing-library/dom'; +import { fireEvent } from '@testing-library/react'; import { AddToCaseAction } from './add_to_case_action'; import * as useCaseHook from '../hooks/use_add_to_case'; import * as datePicker from '../components/date_range_picker'; diff --git a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/header/chart_creation_info.test.tsx b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/header/chart_creation_info.test.tsx index 570362a63c33f..f8da480072ab3 100644 --- a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/header/chart_creation_info.test.tsx +++ b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/header/chart_creation_info.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { screen } from '@testing-library/dom'; +import { screen } from '@testing-library/react'; import { render } from '../rtl_helpers'; import { ChartCreationInfo } from './chart_creation_info'; diff --git a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/hooks/use_add_to_case.test.tsx b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/hooks/use_add_to_case.test.tsx index 9ab9d00d2bc82..3821c703e7cee 100644 --- a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/hooks/use_add_to_case.test.tsx +++ b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/hooks/use_add_to_case.test.tsx @@ -9,7 +9,7 @@ import { useAddToCase } from './use_add_to_case'; import React, { useEffect } from 'react'; import { render } from '../rtl_helpers'; import { EuiButton } from '@elastic/eui'; -import { fireEvent } from '@testing-library/dom'; +import { fireEvent } from '@testing-library/react'; import { act } from '@testing-library/react'; describe('useAddToCase', function () { diff --git a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/views/add_series_button.test.tsx b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/views/add_series_button.test.tsx index 978296a295efc..65f80245c2ceb 100644 --- a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/views/add_series_button.test.tsx +++ b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/views/add_series_button.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { screen, waitFor, fireEvent } from '@testing-library/dom'; +import { screen, waitFor, fireEvent } from '@testing-library/react'; import { render } from '../rtl_helpers'; import { AddSeriesButton } from './add_series_button'; import { DEFAULT_TIME, ReportTypes } from '../configurations/constants'; diff --git a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/views/view_actions.test.tsx b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/views/view_actions.test.tsx index df709c94abcde..ae2d2ce65d91c 100644 --- a/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/views/view_actions.test.tsx +++ b/x-pack/plugins/exploratory_view/public/components/shared/exploratory_view/views/view_actions.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { screen, waitFor, fireEvent } from '@testing-library/dom'; +import { screen, waitFor, fireEvent } from '@testing-library/react'; import { render } from '../rtl_helpers'; import * as hooks from '../hooks/use_series_storage'; import { ViewActions } from './view_actions'; diff --git a/x-pack/plugins/file_upload/server/capabilities.test.ts b/x-pack/plugins/file_upload/server/capabilities.test.ts index e5f0a01cd6abe..b32150b80fe6b 100644 --- a/x-pack/plugins/file_upload/server/capabilities.test.ts +++ b/x-pack/plugins/file_upload/server/capabilities.test.ts @@ -26,6 +26,16 @@ describe('setupCapabilities', () => { `); }); + it('registers a capabilities switcher with the correct options', async () => { + const coreSetup = coreMock.createSetup(); + setupCapabilities(coreSetup); + + expect(coreSetup.capabilities.registerSwitcher).toHaveBeenCalledTimes(1); + expect(coreSetup.capabilities.registerSwitcher).toHaveBeenCalledWith(expect.any(Function), { + capabilityPath: 'fileUpload.*', + }); + }); + it('registers a capabilities switcher that returns unaltered capabilities when security is disabled', async () => { const coreSetup = coreMock.createSetup(); setupCapabilities(coreSetup); diff --git a/x-pack/plugins/file_upload/server/capabilities.ts b/x-pack/plugins/file_upload/server/capabilities.ts index 9217176fb2b25..9e940a0e9a649 100644 --- a/x-pack/plugins/file_upload/server/capabilities.ts +++ b/x-pack/plugins/file_upload/server/capabilities.ts @@ -20,28 +20,33 @@ export const setupCapabilities = ( }; }); - core.capabilities.registerSwitcher(async (request, capabilities, useDefaultCapabilities) => { - if (useDefaultCapabilities) { - return {}; - } - const [, { security }] = await core.getStartServices(); + core.capabilities.registerSwitcher( + async (request, capabilities, useDefaultCapabilities) => { + if (useDefaultCapabilities) { + return {}; + } + const [, { security }] = await core.getStartServices(); - // Check the bare minimum set of privileges required to get some utility out of this feature - const { hasImportPermission } = await checkFileUploadPrivileges({ - authorization: security?.authz, - request, - checkCreateDataView: true, - checkHasManagePipeline: false, - }); + // Check the bare minimum set of privileges required to get some utility out of this feature + const { hasImportPermission } = await checkFileUploadPrivileges({ + authorization: security?.authz, + request, + checkCreateDataView: true, + checkHasManagePipeline: false, + }); - if (!hasImportPermission) { - return { - fileUpload: { - show: false, - }, - }; - } + if (!hasImportPermission) { + return { + fileUpload: { + show: false, + }, + }; + } - return {}; - }); + return {}; + }, + { + capabilityPath: 'fileUpload.*', + } + ); }; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/action_menu.test.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/action_menu.test.tsx index 2f05354b09a04..2d39700da5caa 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/action_menu.test.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/action_menu.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { fireEvent } from '@testing-library/dom'; +import { fireEvent } from '@testing-library/react'; import { createFleetTestRendererMock } from '../../../../../../mock'; import type { Agent, AgentPolicy } from '../../../../types'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/agent_upgrade_status.test.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/agent_upgrade_status.test.tsx index 9937126213c91..dffa4bc665bdb 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/agent_upgrade_status.test.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/agent_upgrade_status.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { fireEvent, waitFor } from '@testing-library/dom'; +import { fireEvent, waitFor } from '@testing-library/react'; import React from 'react'; import { createFleetTestRendererMock } from '../../../../../../mock'; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/table_row_actions.test.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/table_row_actions.test.tsx index a2fed8d3ed613..4e8d25f313ea5 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/table_row_actions.test.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/table_row_actions.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { fireEvent } from '@testing-library/dom'; +import { fireEvent } from '@testing-library/react'; import { createFleetTestRendererMock } from '../../../../../../mock'; import type { Agent, AgentPolicy } from '../../../../types'; diff --git a/x-pack/plugins/global_search/server/services/context.test.ts b/x-pack/plugins/global_search/server/services/context.test.ts index f90c0bc0f6c84..eebf583b6fc3a 100644 --- a/x-pack/plugins/global_search/server/services/context.test.ts +++ b/x-pack/plugins/global_search/server/services/context.test.ts @@ -26,7 +26,9 @@ describe('getContextFactory', () => { expect(coreStart.uiSettings.asScopedToClient).toHaveBeenCalledWith(soClient); expect(coreStart.capabilities.resolveCapabilities).toHaveBeenCalledTimes(1); - expect(coreStart.capabilities.resolveCapabilities).toHaveBeenCalledWith(request); + expect(coreStart.capabilities.resolveCapabilities).toHaveBeenCalledWith(request, { + capabilityPath: '*', + }); expect(context).toEqual({ core: { diff --git a/x-pack/plugins/global_search/server/services/context.ts b/x-pack/plugins/global_search/server/services/context.ts index 02d86c909ab72..06be3f4acd35c 100644 --- a/x-pack/plugins/global_search/server/services/context.ts +++ b/x-pack/plugins/global_search/server/services/context.ts @@ -27,7 +27,9 @@ export const getContextFactory = uiSettings: { client: coreStart.uiSettings.asScopedToClient(soClient), }, - capabilities: from(coreStart.capabilities.resolveCapabilities(request)), + capabilities: from( + coreStart.capabilities.resolveCapabilities(request, { capabilityPath: '*' }) + ), }, }; }; diff --git a/x-pack/plugins/infra/kibana.jsonc b/x-pack/plugins/infra/kibana.jsonc index debd656bddeed..b97a273b91f71 100644 --- a/x-pack/plugins/infra/kibana.jsonc +++ b/x-pack/plugins/infra/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/infra-plugin", - "owner": "@elastic/infra-monitoring-ui", + "owner": ["@elastic/infra-monitoring-ui", "@elastic/obs-ux-logs-team", "@elastic/obs-ux-infra_services-team"], "description": "This plugin visualizes data from Filebeat and Metricbeat, and integrates with other Observability solutions", "plugin": { "id": "infra", diff --git a/x-pack/plugins/infra/public/alerting/inventory/components/alert_flyout.tsx b/x-pack/plugins/infra/public/alerting/inventory/components/alert_flyout.tsx index 41fdc1b6f7d30..d3f564818f03e 100644 --- a/x-pack/plugins/infra/public/alerting/inventory/components/alert_flyout.tsx +++ b/x-pack/plugins/infra/public/alerting/inventory/components/alert_flyout.tsx @@ -41,6 +41,7 @@ export const AlertFlyout = ({ options, nodeType, filter, visible, setVisible }: filter, customMetrics, }, + useRuleProducer: true, }), // eslint-disable-next-line react-hooks/exhaustive-deps [triggersActionsUI, visible] diff --git a/x-pack/plugins/infra/public/components/asset_details/__stories__/context/fixtures/anomalies.ts b/x-pack/plugins/infra/public/components/asset_details/__stories__/context/fixtures/anomalies.ts index b49e14850f7b6..543b46ceb17b9 100644 --- a/x-pack/plugins/infra/public/components/asset_details/__stories__/context/fixtures/anomalies.ts +++ b/x-pack/plugins/infra/public/components/asset_details/__stories__/context/fixtures/anomalies.ts @@ -16,7 +16,7 @@ const anomalies: GetMetricsHostsAnomaliesSuccessResponsePayload = { actual: 758.8220213274412, anomalyScore: 0.024881740359975164, duration: 900, - startTime: 1486845000000, + startTime: 1681038638000, type: 'metrics_hosts', partitionFieldName: 'airline', partitionFieldValue: 'NKS', @@ -42,7 +42,7 @@ const anomalies: GetMetricsHostsAnomaliesSuccessResponsePayload = { actual: 758.8220213274412, anomalyScore: 100.024881740359975164, duration: 900, - startTime: 1486845000000, + startTime: 1681038638000, type: 'metrics_hosts', partitionFieldName: 'airline', partitionFieldValue: 'NKS', diff --git a/x-pack/plugins/infra/public/components/asset_details/__stories__/context/fixtures/asset_details_props.ts b/x-pack/plugins/infra/public/components/asset_details/__stories__/context/fixtures/asset_details_props.ts index 601c064471078..9d6b4efb96ec2 100644 --- a/x-pack/plugins/infra/public/components/asset_details/__stories__/context/fixtures/asset_details_props.ts +++ b/x-pack/plugins/infra/public/components/asset_details/__stories__/context/fixtures/asset_details_props.ts @@ -16,12 +16,6 @@ const tabs: Tab[] = [ defaultMessage: 'Overview', }), }, - { - id: ContentTabIds.LOGS, - name: i18n.translate('xpack.infra.nodeDetails.tabs.logs', { - defaultMessage: 'Logs', - }), - }, { id: ContentTabIds.METADATA, name: i18n.translate('xpack.infra.metrics.nodeDetails.tabs.metadata', { @@ -34,6 +28,12 @@ const tabs: Tab[] = [ defaultMessage: 'Processes', }), }, + { + id: ContentTabIds.LOGS, + name: i18n.translate('xpack.infra.nodeDetails.tabs.logs', { + defaultMessage: 'Logs', + }), + }, { id: ContentTabIds.ANOMALIES, name: i18n.translate('xpack.infra.nodeDetails.tabs.anomalies', { diff --git a/x-pack/plugins/infra/public/components/asset_details/__stories__/decorator.tsx b/x-pack/plugins/infra/public/components/asset_details/__stories__/decorator.tsx index 11401bd256feb..e779808347ec4 100644 --- a/x-pack/plugins/infra/public/components/asset_details/__stories__/decorator.tsx +++ b/x-pack/plugins/infra/public/components/asset_details/__stories__/decorator.tsx @@ -11,24 +11,33 @@ import { KibanaContextProvider, type KibanaReactContextValue, } from '@kbn/kibana-react-plugin/public'; -import { of } from 'rxjs'; +import { Observable, of } from 'rxjs'; import { action } from '@storybook/addon-actions'; import type { DecoratorFn } from '@storybook/react'; import { useParameter } from '@storybook/addons'; import type { DeepPartial } from 'utility-types'; import type { LocatorPublic } from '@kbn/share-plugin/public'; -import type { IKibanaSearchRequest, ISearchOptions } from '@kbn/data-plugin/public'; +import type { + IKibanaSearchRequest, + ISearchOptions, + SearchSessionState, +} from '@kbn/data-plugin/public'; import { AlertSummaryWidget } from '@kbn/triggers-actions-ui-plugin/public/application/sections/alert_summary_widget/alert_summary_widget'; import type { Theme } from '@elastic/charts/dist/utils/themes/theme'; import type { AlertSummaryWidgetProps } from '@kbn/triggers-actions-ui-plugin/public/application/sections/alert_summary_widget'; import { defaultLogViewAttributes } from '@kbn/logs-shared-plugin/common'; import { DataView, DataViewField } from '@kbn/data-views-plugin/common'; +import { MemoryRouter } from 'react-router-dom'; +import { ObservabilityAIAssistantProvider } from '@kbn/observability-ai-assistant-plugin/public'; +import { ObservabilityAIAssistantService } from '@kbn/observability-ai-assistant-plugin/public/types'; +import { PluginConfigProvider } from '../../../containers/plugin_config_context'; import type { PluginKibanaContextValue } from '../../../hooks/use_kibana'; import { SourceProvider } from '../../../containers/metrics_source'; import { getHttp } from './context/http'; import { assetDetailsProps, getLogEntries } from './context/fixtures'; import { ContextProviders } from '../context_providers'; import { DataViewsProvider } from '../hooks/use_data_views'; +import type { InfraConfig } from '../../../../server'; const settings: Record = { 'dateFormat:scaled': [['', 'HH:mm:ss.SSS']], @@ -58,6 +67,10 @@ export const DecorateWithKibanaContext: DecoratorFn = (story) => { search: (request: IKibanaSearchRequest, options?: ISearchOptions) => { return getLogEntries(request, options) as any; }, + session: { + start: () => 'started', + state$: { closed: false } as unknown as Observable, + }, }, query: { filterManager: { @@ -144,14 +157,64 @@ export const DecorateWithKibanaContext: DecoratorFn = (story) => { }, telemetry: { reportAssetDetailsFlyoutViewed: () => {}, + reportAssetDetailsPageViewed: () => {}, + }, + }; + + const config: InfraConfig = { + alerting: { + inventory_threshold: { + group_by_page_size: 11, + }, + metric_threshold: { + group_by_page_size: 11, + }, + }, + enabled: true, + inventory: { + compositeSize: 11, + }, + sources: { + default: { + fields: { + message: ['default'], + }, + }, + }, + featureFlags: { + customThresholdAlertsEnabled: true, + logsUIEnabled: false, + metricsExplorerEnabled: false, + osqueryEnabled: true, + inventoryThresholdAlertRuleEnabled: true, + metricThresholdAlertRuleEnabled: true, + logThresholdAlertRuleEnabled: true, + alertsAndRulesDropdownEnabled: true, }, }; return ( - - {story()} - + + + + true, + callApi: () => {}, + getCurrentUser: () => {}, + getLicense: () => {}, + getLicenseManagementLocator: () => {}, + start: {}, + } as unknown as ObservabilityAIAssistantService + } + > + {story()} + + + + ); }; diff --git a/x-pack/plugins/infra/public/components/asset_details/asset_details.stories.tsx b/x-pack/plugins/infra/public/components/asset_details/asset_details.stories.tsx index 0816e25dc800b..c85677dbace94 100644 --- a/x-pack/plugins/infra/public/components/asset_details/asset_details.stories.tsx +++ b/x-pack/plugins/infra/public/components/asset_details/asset_details.stories.tsx @@ -6,19 +6,32 @@ */ import React, { useState } from 'react'; -import { EuiButton } from '@elastic/eui'; +import { EuiButton, EuiCallOut, EuiSelect, EuiSpacer } from '@elastic/eui'; import type { Meta, Story } from '@storybook/react/types-6-0'; +import { MemoryRouter } from 'react-router-dom'; +import { useArgs } from '@storybook/addons'; import { AssetDetails } from './asset_details'; import { decorateWithGlobalStorybookThemeProviders } from '../../test_utils/use_global_storybook_theme'; -import { type AssetDetailsProps } from './types'; +import { type TabIds, type AssetDetailsProps } from './types'; import { DecorateWithKibanaContext } from './__stories__/decorator'; import { assetDetailsProps } from './__stories__/context/fixtures'; -const stories: Meta = { +interface AssetDetailsStoryArgs extends AssetDetailsProps { + tabId: TabIds; +} + +const stories: Meta = { title: 'infra/Asset Details View', decorators: [decorateWithGlobalStorybookThemeProviders, DecorateWithKibanaContext], component: AssetDetails, argTypes: { + tabId: { + options: assetDetailsProps.tabs.filter(({ id }) => id !== 'linkToApm').map(({ id }) => id), + defaultValue: 'overview', + control: { + type: 'radio', + }, + }, links: { options: assetDetailsProps.links, control: { @@ -26,20 +39,42 @@ const stories: Meta = { }, }, }, - args: { - ...assetDetailsProps, - }, + args: { ...assetDetailsProps }, }; -const PageTemplate: Story = (args) => { - return ; +const PageTabTemplate: Story = (args) => { + return ( + + + + ); }; -const FlyoutTemplate: Story = (args) => { +const FlyoutTemplate: Story = (args) => { const [isOpen, setIsOpen] = useState(false); const closeFlyout = () => setIsOpen(false); + const options = assetDetailsProps.tabs.filter(({ id }) => id !== 'linkToApm').map(({ id }) => id); + const [{ tabId }, updateArgs] = useArgs(); + return (
    + + + { + updateArgs({ tabId: e.target.value as TabIds }); + }} + options={options.map((id) => ({ + text: id, + value: id, + }))} + /> + setIsOpen(true)} @@ -47,13 +82,33 @@ const FlyoutTemplate: Story = (args) => { Open flyout
    ); }; -export const Page = PageTemplate.bind({}); +export const OverviewTab = PageTabTemplate.bind({}); +OverviewTab.args = { tabId: 'overview' }; + +export const MetadataTab = PageTabTemplate.bind({}); +MetadataTab.args = { tabId: 'metadata' }; + +export const ProcessesTab = PageTabTemplate.bind({}); +ProcessesTab.args = { tabId: 'processes' }; + +export const LogsTab = PageTabTemplate.bind({}); +LogsTab.args = { tabId: 'logs' }; + +export const AnomaliesTab = PageTabTemplate.bind({}); +AnomaliesTab.args = { tabId: 'anomalies' }; export const Flyout = FlyoutTemplate.bind({}); diff --git a/x-pack/plugins/infra/public/components/asset_details/tabs/anomalies/anomalies.stories.tsx b/x-pack/plugins/infra/public/components/asset_details/tabs/anomalies/anomalies.stories.tsx deleted file mode 100644 index 25db2ae7445d6..0000000000000 --- a/x-pack/plugins/infra/public/components/asset_details/tabs/anomalies/anomalies.stories.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 type { Meta, Story } from '@storybook/react/types-6-0'; - -import { Anomalies } from './anomalies'; -import { decorateWithGlobalStorybookThemeProviders } from '../../../../test_utils/use_global_storybook_theme'; -import { - DecorateWithKibanaContext, - DecorateWithAssetDetailsStateContext, -} from '../../__stories__/decorator'; - -const stories: Meta = { - title: 'infra/Asset Details View/Components/Anomalies', - decorators: [ - decorateWithGlobalStorybookThemeProviders, - DecorateWithKibanaContext, - DecorateWithAssetDetailsStateContext, - ], - component: Anomalies, -}; - -const Template: Story = () => { - return ; -}; - -export const Default = Template.bind({}); - -export const NoData = Template.bind({}); -NoData.parameters = { - apiResponse: { - mock: 'noData', - }, -}; - -export const LoadingState = Template.bind({}); -LoadingState.parameters = { - apiResponse: { - mock: 'loading', - }, -}; - -export default stories; diff --git a/x-pack/plugins/infra/public/components/asset_details/tabs/metadata/metadata.stories.tsx b/x-pack/plugins/infra/public/components/asset_details/tabs/metadata/metadata.stories.tsx index 4a48b63f73d41..323d3302589d9 100644 --- a/x-pack/plugins/infra/public/components/asset_details/tabs/metadata/metadata.stories.tsx +++ b/x-pack/plugins/infra/public/components/asset_details/tabs/metadata/metadata.stories.tsx @@ -18,8 +18,8 @@ const stories: Meta = { title: 'infra/Asset Details View/Components/Metadata', decorators: [ decorateWithGlobalStorybookThemeProviders, - DecorateWithKibanaContext, DecorateWithAssetDetailsStateContext, + DecorateWithKibanaContext, ], component: Metadata, }; @@ -30,11 +30,6 @@ const Template: Story = () => { export const Default = Template.bind({}); -export const WithActions = Template.bind({}); -WithActions.args = { - showActionsColumn: true, -}; - export const NoData = Template.bind({}); NoData.parameters = { apiResponse: { diff --git a/x-pack/plugins/infra/public/components/asset_details/tabs/processes/processes.stories.tsx b/x-pack/plugins/infra/public/components/asset_details/tabs/processes/processes.stories.tsx index feb055a6a14e0..94e153d1f0589 100644 --- a/x-pack/plugins/infra/public/components/asset_details/tabs/processes/processes.stories.tsx +++ b/x-pack/plugins/infra/public/components/asset_details/tabs/processes/processes.stories.tsx @@ -18,8 +18,8 @@ const stories: Meta = { title: 'infra/Asset Details View/Components/Processes', decorators: [ decorateWithGlobalStorybookThemeProviders, - DecorateWithKibanaContext, DecorateWithAssetDetailsStateContext, + DecorateWithKibanaContext, ], component: Processes, }; diff --git a/x-pack/plugins/infra/public/hooks/use_http_request.tsx b/x-pack/plugins/infra/public/hooks/use_http_request.tsx index 7e2b6f03ab916..8196677004714 100644 --- a/x-pack/plugins/infra/public/hooks/use_http_request.tsx +++ b/x-pack/plugins/infra/public/hooks/use_http_request.tsx @@ -7,8 +7,7 @@ import React, { useCallback, useEffect, useRef, useState } from 'react'; import { i18n } from '@kbn/i18n'; -import { HttpHandler } from '@kbn/core/public'; -import { ToastInput } from '@kbn/core/public'; +import { HttpHandler, ToastInput } from '@kbn/core/public'; import { useKibana } from '@kbn/kibana-react-plugin/public'; import { AbortError } from '@kbn/kibana-utils-plugin/common'; import { useTrackedPromise, CanceledPromiseError } from '../utils/use_tracked_promise'; diff --git a/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/snapshot_container.tsx b/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/snapshot_container.tsx index b22bcb59a3c12..40b41ac3a1d5e 100644 --- a/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/snapshot_container.tsx +++ b/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/snapshot_container.tsx @@ -25,7 +25,7 @@ interface Props { } export const SnapshotContainer = ({ render }: Props) => { const { sourceId } = useSourceContext(); - const { metric, groupBy, nodeType, accountId, region } = useWaffleOptionsContext(); + const { metric, groupBy, nodeType, accountId, region, view } = useWaffleOptionsContext(); const { currentTime } = useWaffleTimeContext(); const { filterQueryAsJson } = useWaffleFiltersContext(); const { @@ -33,17 +33,23 @@ export const SnapshotContainer = ({ render }: Props) => { nodes, reload, interval = '60s', - } = useSnapshot({ - filterQuery: filterQueryAsJson, - metrics: [metric], - groupBy, - nodeType, - sourceId, - currentTime, - accountId, - region, - sendRequestImmediately: false, - }); + } = useSnapshot( + { + filterQuery: filterQueryAsJson, + metrics: [metric], + groupBy, + nodeType, + sourceId, + currentTime, + accountId, + region, + sendRequestImmediately: false, + includeTimeseries: view === 'table', + }, + { + abortable: true, + } + ); return render({ loading, nodes, reload, interval }); }; diff --git a/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/__snapshots__/conditional_tooltip.test.tsx.snap b/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/__snapshots__/conditional_tooltip.test.tsx.snap index 02c8f6aa6ed3b..f3368be815f1b 100644 --- a/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/__snapshots__/conditional_tooltip.test.tsx.snap +++ b/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/__snapshots__/conditional_tooltip.test.tsx.snap @@ -6,7 +6,7 @@ exports[`ConditionalToolTip renders correctly 1`] = ` style="min-width: 200px;" >
    host-01
    diff --git a/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.test.tsx b/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.test.tsx index 66b8ff975ba30..f023cc1c5760c 100644 --- a/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.test.tsx +++ b/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.test.tsx @@ -7,7 +7,6 @@ import React from 'react'; import { mount } from 'enzyme'; -import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; import { ConditionalToolTip } from './conditional_tooltip'; import { SnapshotNodeResponse } from '../../../../../../common/http_api'; import { InfraWaffleMapNode } from '../../../../../lib/lib'; @@ -98,23 +97,25 @@ describe('ConditionalToolTip', () => { }, ]; const wrapper = mount( - - - + ); const tooltip = wrapper.find('[data-test-subj~="conditionalTooltipContent-host-01"]'); expect(tooltip.render()).toMatchSnapshot(); - expect(mockedUseSnapshot).toBeCalledWith({ - filterQuery: expectedQuery, - metrics: expectedMetrics, - groupBy: [], - nodeType: 'host', - sourceId: 'default', - currentTime, - accountId: '', - region: '', - } as UseSnapshotRequest); + expect(mockedUseSnapshot).toBeCalledWith( + { + filterQuery: expectedQuery, + metrics: expectedMetrics, + groupBy: [], + includeTimeseries: false, + nodeType: 'host', + sourceId: 'default', + currentTime, + accountId: '', + region: '', + } as UseSnapshotRequest, + { abortable: true } + ); }); }); diff --git a/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.tsx b/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.tsx index 4d82f7b7a39c8..7bbb696103cd6 100644 --- a/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.tsx +++ b/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/waffle/conditional_tooltip.tsx @@ -5,10 +5,9 @@ * 2.0. */ -import React from 'react'; -import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import React, { useRef } from 'react'; +import { EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner, useEuiTheme } from '@elastic/eui'; import { first } from 'lodash'; -import { withTheme, EuiTheme } from '@kbn/kibana-react-plugin/common'; import { findInventoryModel } from '@kbn/metrics-data-access-plugin/common'; import { InventoryItemType, @@ -29,10 +28,13 @@ export interface Props { currentTime: number; node: InfraWaffleMapNode; nodeType: InventoryItemType; - theme: EuiTheme | undefined; } -export const ConditionalToolTip = withTheme(({ theme, node, nodeType, currentTime }: Props) => { + +export const ConditionalToolTip = ({ node, nodeType, currentTime }: Props) => { + const { euiTheme } = useEuiTheme(); const { sourceId } = useSourceContext(); + // prevents auto-refresh from cancelling ongoing requests to fetch the data for the tooltip + const requestCurrentTime = useRef(currentTime); const model = findInventoryModel(nodeType); const { customMetrics } = useWaffleOptionsContext(); const requestMetrics = model.tooltipMetrics @@ -50,16 +52,22 @@ export const ConditionalToolTip = withTheme(({ theme, node, nodeType, currentTim }, }, }); - const { nodes } = useSnapshot({ - filterQuery: query, - metrics: requestMetrics, - groupBy: [], - nodeType, - sourceId, - currentTime, - accountId: '', - region: '', - }); + const { nodes, loading } = useSnapshot( + { + filterQuery: query, + metrics: requestMetrics, + groupBy: [], + nodeType, + sourceId, + currentTime: requestCurrentTime.current, + accountId: '', + region: '', + includeTimeseries: false, + }, + { + abortable: true, + } + ); const dataNode = first(nodes); const metrics = (dataNode && dataNode.metrics) || []; @@ -67,38 +75,47 @@ export const ConditionalToolTip = withTheme(({ theme, node, nodeType, currentTim
    {node.name}
    - {metrics.map((metric) => { - const metricName = SnapshotMetricTypeRT.is(metric.name) ? metric.name : 'custom'; - const name = SNAPSHOT_METRIC_TRANSLATIONS[metricName] || metricName; - // if custom metric, find field and label from waffleOptionsContext result - // because useSnapshot does not return it - const customMetric = - name === 'custom' ? customMetrics.find((item) => item.id === metric.name) : null; - const formatter = customMetric - ? createFormatterForMetric(customMetric) - : createInventoryMetricFormatter({ type: metricName }); - return ( - - - {customMetric ? getCustomMetricLabel(customMetric) : name} - - - {(metric.value && formatter(metric.value)) || '-'} - - - ); - })} + {loading ? ( + + + + + + ) : ( + metrics.map((metric) => { + const metricName = SnapshotMetricTypeRT.is(metric.name) ? metric.name : 'custom'; + const name = SNAPSHOT_METRIC_TRANSLATIONS[metricName] || metricName; + // if custom metric, find field and label from waffleOptionsContext result + // because useSnapshot does not return it + const customMetric = + name === 'custom' ? customMetrics.find((item) => item.id === metric.name) : null; + const formatter = customMetric + ? createFormatterForMetric(customMetric) + : createInventoryMetricFormatter({ type: metricName }); + return ( + + + {customMetric ? getCustomMetricLabel(customMetric) : name} + + + {(metric.value && formatter(metric.value)) || '-'} + + + ); + }) + )}
    ); -}); +}; diff --git a/x-pack/plugins/infra/public/pages/metrics/inventory_view/hooks/use_timeline.ts b/x-pack/plugins/infra/public/pages/metrics/inventory_view/hooks/use_timeline.ts index d603972743e0a..f949ee5f3a87b 100644 --- a/x-pack/plugins/infra/public/pages/metrics/inventory_view/hooks/use_timeline.ts +++ b/x-pack/plugins/infra/public/pages/metrics/inventory_view/hooks/use_timeline.ts @@ -5,21 +5,12 @@ * 2.0. */ -import { fold } from 'fp-ts/lib/Either'; -import { identity } from 'fp-ts/lib/function'; -import { pipe } from 'fp-ts/lib/pipeable'; import { first } from 'lodash'; -import { useEffect, useMemo, useCallback } from 'react'; +import { useEffect, useMemo } from 'react'; import type { InventoryItemType, SnapshotMetricType } from '@kbn/metrics-data-access-plugin/common'; import { getIntervalInSeconds } from '../../../../../common/utils/get_interval_in_seconds'; -import { throwErrors, createPlainError } from '../../../../../common/runtime_types'; -import { useHTTPRequest } from '../../../../hooks/use_http_request'; -import { - SnapshotNodeResponseRT, - SnapshotNodeResponse, - SnapshotRequest, - InfraTimerangeInput, -} from '../../../../../common/http_api/snapshot_api'; +import { InfraTimerangeInput } from '../../../../../common/http_api/snapshot_api'; +import { useSnapshot } from './use_snaphot'; const ONE_MINUTE = 60; const ONE_HOUR = ONE_MINUTE * 60; @@ -64,13 +55,6 @@ export function useTimeline( interval: string | undefined, shouldReload: boolean ) { - const decodeResponse = (response: any) => { - return pipe( - SnapshotNodeResponseRT.decode(response), - fold(throwErrors(createPlainError), identity) - ); - }; - const displayInterval = useMemo(() => getDisplayInterval(interval), [interval]); const timeLengthResult = useMemo( @@ -88,12 +72,11 @@ export function useTimeline( forceInterval: true, }; - const { error, loading, response, makeRequest } = useHTTPRequest( - '/api/metrics/snapshot', - 'POST', - JSON.stringify({ + const { nodes, error, loading, reload } = useSnapshot( + { metrics, groupBy: null, + currentTime, nodeType, timerange, filterQuery, @@ -101,33 +84,27 @@ export function useTimeline( accountId, region, includeTimeseries: true, - } as SnapshotRequest), - decodeResponse + sendRequestImmediately: false, + }, + { + abortable: true, + } ); - const loadData = useCallback(() => { - if (shouldReload) return makeRequest(); - return Promise.resolve(); - }, [makeRequest, shouldReload]); - useEffect(() => { (async () => { - if (timeLength) { - await loadData(); - } + if (shouldReload) return reload(); })(); - }, [loadData, timeLength]); + }, [reload, shouldReload]); - const timeseries = response - ? first(response.nodes.map((node) => first(node.metrics)?.timeseries)) - : null; + const timeseries = nodes ? first(nodes.map((node) => first(node.metrics)?.timeseries)) : null; return { - error: (error && error.message) || null, + error: error || null, loading: !interval ? true : loading, timeseries, startTime, endTime, - reload: makeRequest, + reload, }; } diff --git a/x-pack/plugins/infra/server/lib/adapters/framework/kibana_framework_adapter.ts b/x-pack/plugins/infra/server/lib/adapters/framework/kibana_framework_adapter.ts index 9780a7811b824..9a593af54a010 100644 --- a/x-pack/plugins/infra/server/lib/adapters/framework/kibana_framework_adapter.ts +++ b/x-pack/plugins/infra/server/lib/adapters/framework/kibana_framework_adapter.ts @@ -26,6 +26,7 @@ import { InfraServerPluginStartDeps, InfraVersionedRouteConfig, } from './adapter_types'; +import { subscribeToAborted$ } from '../../cancel_request_on_abort'; interface FrozenIndexParams { ignore_throttled?: boolean; @@ -115,42 +116,50 @@ export class KibanaFramework { callWithRequest( requestContext: InfraPluginRequestHandlerContext, endpoint: 'search', - options?: CallWithRequestParams + options?: CallWithRequestParams, + request?: KibanaRequest ): Promise>; callWithRequest( requestContext: InfraPluginRequestHandlerContext, endpoint: 'msearch', - options?: CallWithRequestParams + options?: CallWithRequestParams, + request?: KibanaRequest ): Promise>; callWithRequest( requestContext: InfraPluginRequestHandlerContext, endpoint: 'indices.existsAlias', - options?: CallWithRequestParams + options?: CallWithRequestParams, + request?: KibanaRequest ): Promise; callWithRequest( requestContext: InfraPluginRequestHandlerContext, method: 'indices.getAlias', - options?: object + options?: object, + request?: KibanaRequest ): Promise; callWithRequest( requestContext: InfraPluginRequestHandlerContext, method: 'indices.get' | 'ml.getBuckets', - options?: object + options?: object, + request?: KibanaRequest ): Promise; callWithRequest( requestContext: InfraPluginRequestHandlerContext, method: 'transport.request', - options?: CallWithRequestParams + options?: CallWithRequestParams, + request?: KibanaRequest ): Promise; callWithRequest( requestContext: InfraPluginRequestHandlerContext, endpoint: string, - options?: CallWithRequestParams + options?: CallWithRequestParams, + request?: KibanaRequest ): Promise; public async callWithRequest( requestContext: InfraPluginRequestHandlerContext, endpoint: string, - params: CallWithRequestParams + params: CallWithRequestParams, + request?: KibanaRequest ) { const { elasticsearch, uiSettings } = await requestContext.core; @@ -164,6 +173,16 @@ export class KibanaFramework { } } + function callWrapper({ + makeRequestWithSignal, + }: { + makeRequestWithSignal: (signal: AbortSignal) => Promise; + }) { + const controller = new AbortController(); + const promise = makeRequestWithSignal(controller.signal); + return request ? subscribeToAborted$(promise, request, controller) : promise; + } + // Only set the "ignore_throttled" value (to false) if the Kibana setting // for "search:includeFrozen" is true (i.e. don't ignore throttled indices, a triple negative!) // More information: @@ -179,41 +198,90 @@ export class KibanaFramework { let apiResult; switch (endpoint) { case 'search': - apiResult = elasticsearch.client.asCurrentUser.search({ - ...params, - ...frozenIndicesParams, + apiResult = callWrapper({ + makeRequestWithSignal: (signal) => + elasticsearch.client.asCurrentUser.search( + { + ...params, + ...frozenIndicesParams, + } as estypes.MsearchRequest, + { signal } + ), }); + break; case 'msearch': - apiResult = elasticsearch.client.asCurrentUser.msearch({ - ...params, - ...frozenIndicesParams, - } as estypes.MsearchRequest); + apiResult = callWrapper({ + makeRequestWithSignal: (signal) => + elasticsearch.client.asCurrentUser.msearch( + { + ...params, + ...frozenIndicesParams, + } as estypes.MsearchRequest, + { signal } + ), + }); + break; case 'indices.existsAlias': - apiResult = elasticsearch.client.asCurrentUser.indices.existsAlias({ - ...params, - } as estypes.IndicesExistsAliasRequest); + apiResult = callWrapper({ + makeRequestWithSignal: (signal) => + elasticsearch.client.asCurrentUser.indices.existsAlias( + { + ...params, + } as estypes.IndicesExistsAliasRequest, + { signal } + ), + }); + break; case 'indices.getAlias': - apiResult = elasticsearch.client.asCurrentUser.indices.getAlias({ - ...params, + apiResult = callWrapper({ + makeRequestWithSignal: (signal) => + elasticsearch.client.asCurrentUser.indices.getAlias( + { + ...params, + }, + { signal } + ), }); + break; case 'indices.get': - apiResult = elasticsearch.client.asCurrentUser.indices.get({ - ...params, - } as estypes.IndicesGetRequest); + apiResult = callWrapper({ + makeRequestWithSignal: (signal) => + elasticsearch.client.asCurrentUser.indices.get( + { + ...params, + } as estypes.IndicesGetRequest, + { signal } + ), + }); + break; case 'transport.request': - apiResult = elasticsearch.client.asCurrentUser.transport.request({ - ...params, - } as TransportRequestParams); + apiResult = callWrapper({ + makeRequestWithSignal: (signal) => + elasticsearch.client.asCurrentUser.transport.request( + { + ...params, + } as TransportRequestParams, + { signal } + ), + }); + break; case 'ml.getBuckets': - apiResult = elasticsearch.client.asCurrentUser.ml.getBuckets({ - ...params, - } as estypes.MlGetBucketsRequest); + apiResult = callWrapper({ + makeRequestWithSignal: (signal) => + elasticsearch.client.asCurrentUser.ml.getBuckets( + { + ...params, + } as estypes.MlGetBucketsRequest, + { signal } + ), + }); + break; } return apiResult ? await apiResult : undefined; diff --git a/x-pack/plugins/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.test.ts b/x-pack/plugins/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.test.ts index 29c4bfe0a159a..bd6350ba59dd0 100644 --- a/x-pack/plugins/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.test.ts +++ b/x-pack/plugins/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.test.ts @@ -90,7 +90,9 @@ const mockOptions = { }; const setEvaluationResults = (response: Record) => { - jest.requireMock('./evaluate_condition').evaluateCondition.mockImplementation(() => response); + return jest + .requireMock('./evaluate_condition') + .evaluateCondition.mockImplementation(() => response); }; const createMockStaticConfiguration = (sources: any) => ({ alerting: { @@ -192,7 +194,7 @@ const baseCriterion = { describe('The inventory threshold alert type', () => { describe('querying with Hosts and rule tags', () => { afterAll(() => clearInstances()); - const execute = (comparator: Comparator, threshold: number[], state?: any) => + const execute = (comparator: Comparator, threshold: number[], options?: any) => executor({ ...mockOptions, services, @@ -206,11 +208,12 @@ describe('The inventory threshold alert type', () => { }, ], }, - state: state ?? {}, + state: {}, rule: { ...mockOptions.rule, tags: ['ruleTag1', 'ruleTag2'], }, + ...options, }); const instanceIdA = 'host-01'; @@ -305,5 +308,39 @@ describe('The inventory threshold alert type', () => { expect(mostRecentAction(instanceIdA).action.tags).toStrictEqual(['ruleTag1', 'ruleTag2']); expect(mostRecentAction(instanceIdB).action.tags).toStrictEqual(['ruleTag1', 'ruleTag2']); }); + + test('should call evaluation query with delay', async () => { + const mockedStartDate = new Date('2023-11-06T10:04:26.465Z'); + const mockedEndDate = new Date('2023-11-06T10:05:26.465Z'); + const options = { + getTimeRange: () => { + return { dateStart: mockedStartDate, dateEnd: mockedEndDate }; + }, + }; + const evaluateConditionFn = setEvaluationResults({ + 'host-01': { + ...baseCriterion, + metric: 'count', + timeSize: 1, + timeUnit: 'm', + threshold: [0.75], + comparator: Comparator.GT, + shouldFire: true, + shouldWarn: false, + currentValue: 1.0, + isNoData: false, + isError: false, + context: { + cloud: undefined, + }, + }, + }); + await execute(Comparator.GT, [0.75], options); + expect(evaluateConditionFn).toHaveBeenCalledWith( + expect.objectContaining({ + executionTimestamp: mockedEndDate, + }) + ); + }); }); }); diff --git a/x-pack/plugins/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.ts b/x-pack/plugins/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.ts index 7e3315510feec..ce2f66645bf1d 100644 --- a/x-pack/plugins/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.ts +++ b/x-pack/plugins/infra/server/lib/alerting/inventory_metric_threshold/inventory_metric_threshold_executor.ts @@ -83,6 +83,7 @@ export const createInventoryMetricThresholdExecutor = (libs: InfraBackendLibs) = spaceId, startedAt, rule: { id: ruleId, tags: ruleTags }, + getTimeRange, }) => { const startTime = Date.now(); @@ -175,13 +176,14 @@ export const createInventoryMetricThresholdExecutor = (libs: InfraBackendLibs) = ); const compositeSize = libs.configuration.alerting.inventory_threshold.group_by_page_size; + const { dateEnd } = getTimeRange(); const results = await Promise.all( criteria.map((condition) => evaluateCondition({ compositeSize, condition, esClient, - executionTimestamp: startedAt, + executionTimestamp: new Date(dateEnd), filterQuery, logger, logQueryFields, diff --git a/x-pack/plugins/infra/server/lib/cancel_request_on_abort.ts b/x-pack/plugins/infra/server/lib/cancel_request_on_abort.ts new file mode 100644 index 0000000000000..631af6991bd09 --- /dev/null +++ b/x-pack/plugins/infra/server/lib/cancel_request_on_abort.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 { KibanaRequest } from '@kbn/core/server'; + +export function subscribeToAborted$>( + promise: T, + request: KibanaRequest, + controller: AbortController +): T { + const subscription = request.events.aborted$.subscribe(() => { + controller.abort(); + }); + + return promise.finally(() => { + subscription.unsubscribe(); + }) as T; +} diff --git a/x-pack/plugins/infra/server/lib/create_search_client.ts b/x-pack/plugins/infra/server/lib/create_search_client.ts index 6688ae1af1afc..00f89fb3c8e8b 100644 --- a/x-pack/plugins/infra/server/lib/create_search_client.ts +++ b/x-pack/plugins/infra/server/lib/create_search_client.ts @@ -5,13 +5,18 @@ * 2.0. */ +import type { KibanaRequest } from '@kbn/core/server'; import type { InfraPluginRequestHandlerContext } from '../types'; import { CallWithRequestParams, InfraDatabaseSearchResponse } from './adapters/framework'; import { KibanaFramework } from './adapters/framework/kibana_framework_adapter'; export const createSearchClient = - (requestContext: InfraPluginRequestHandlerContext, framework: KibanaFramework) => + ( + requestContext: InfraPluginRequestHandlerContext, + framework: KibanaFramework, + request?: KibanaRequest + ) => ( opts: CallWithRequestParams ): Promise> => - framework.callWithRequest(requestContext, 'search', opts); + framework.callWithRequest(requestContext, 'search', opts, request); diff --git a/x-pack/plugins/infra/server/routes/snapshot/index.ts b/x-pack/plugins/infra/server/routes/snapshot/index.ts index 085be4584e2a7..ae1f02a04ca93 100644 --- a/x-pack/plugins/infra/server/routes/snapshot/index.ts +++ b/x-pack/plugins/infra/server/routes/snapshot/index.ts @@ -53,7 +53,7 @@ export const initSnapshotRoute = (libs: InfraBackendLibs) => { ); UsageCollector.countNode(snapshotRequest.nodeType); - const client = createSearchClient(requestContext, framework); + const client = createSearchClient(requestContext, framework, request); try { const snapshotResponse = await getNodes( diff --git a/x-pack/plugins/kubernetes_security/public/components/count_widget/index.test.tsx b/x-pack/plugins/kubernetes_security/public/components/count_widget/index.test.tsx index a0fbe2c90c690..d3230a33f203e 100644 --- a/x-pack/plugins/kubernetes_security/public/components/count_widget/index.test.tsx +++ b/x-pack/plugins/kubernetes_security/public/components/count_widget/index.test.tsx @@ -10,7 +10,7 @@ import { AppContextTestRender, createAppRootMockRenderer } from '../../test'; import { GlobalFilter } from '../../types'; import { CountWidget, LOADING_TEST_ID, TOOLTIP_TEST_ID, VALUE_TEST_ID } from '.'; import { useFetchCountWidgetData } from './hooks'; -import { fireEvent, waitFor } from '@testing-library/dom'; +import { fireEvent, waitFor } from '@testing-library/react'; const TITLE = 'Count Widget Title'; const GLOBAL_FILTER: GlobalFilter = { diff --git a/x-pack/plugins/lens/public/app_plugin/app.tsx b/x-pack/plugins/lens/public/app_plugin/app.tsx index d68476598ad99..39a614b568799 100644 --- a/x-pack/plugins/lens/public/app_plugin/app.tsx +++ b/x-pack/plugins/lens/public/app_plugin/app.tsx @@ -17,7 +17,7 @@ import type { LensAppLocatorParams } from '../../common/locator/locator'; import { LensAppProps, LensAppServices } from './types'; import { LensTopNavMenu } from './lens_top_nav'; import { LensByReferenceInput } from '../embeddable'; -import { AddUserMessages, EditorFrameInstance, UserMessage, UserMessagesGetter } from '../types'; +import { AddUserMessages, EditorFrameInstance, UserMessagesGetter } from '../types'; import { Document } from '../persistence/saved_object_store'; import { @@ -28,9 +28,8 @@ import { LensAppState, selectSavedObjectFormat, updateIndexPatterns, - updateDatasourceState, selectActiveDatasourceId, - selectFrameDatasourceAPI, + selectFramePublicAPI, } from '../state_management'; import { SaveModalContainer, runSaveLensVisualization } from './save_modal_container'; import { LensInspector } from '../lens_inspector_service'; @@ -41,10 +40,7 @@ import { createIndexPatternService, } from '../data_views_service/service'; import { replaceIndexpattern } from '../state_management/lens_slice'; -import { - filterAndSortUserMessages, - getApplicationUserMessages, -} from './get_application_user_messages'; +import { useApplicationUserMessages } from './get_application_user_messages'; export type SaveProps = Omit & { returnToOrigin: boolean; @@ -509,99 +505,25 @@ export function App({ const activeDatasourceId = useLensSelector(selectActiveDatasourceId); - const frameDatasourceAPI = useLensSelector((state) => - selectFrameDatasourceAPI(state, datasourceMap) - ); - - const [userMessages, setUserMessages] = useState([]); + const framePublicAPI = useLensSelector((state) => selectFramePublicAPI(state, datasourceMap)); - useEffect(() => { - setUserMessages([ - ...(activeDatasourceId - ? datasourceMap[activeDatasourceId].getUserMessages( - datasourceStates[activeDatasourceId].state, - { - frame: frameDatasourceAPI, - setState: (newStateOrUpdater) => { - dispatch( - updateDatasourceState({ - newDatasourceState: - typeof newStateOrUpdater === 'function' - ? newStateOrUpdater(datasourceStates[activeDatasourceId].state) - : newStateOrUpdater, - datasourceId: activeDatasourceId, - }) - ); - }, - } - ) - : []), - ...(visualization.activeId && visualization.state - ? visualizationMap[visualization.activeId]?.getUserMessages?.(visualization.state, { - frame: frameDatasourceAPI, - }) ?? [] - : []), - ...getApplicationUserMessages({ - visualizationType: persistedDoc?.visualizationType, - visualizationMap, - visualization, - activeDatasource: activeDatasourceId ? datasourceMap[activeDatasourceId] : null, - activeDatasourceState: activeDatasourceId ? datasourceStates[activeDatasourceId] : null, - core: coreStart, - dataViews: frameDatasourceAPI.dataViews, - }), - ]); - }, [ - activeDatasourceId, + const { getUserMessages, addUserMessages } = useApplicationUserMessages({ coreStart, - datasourceMap, - datasourceStates, + framePublicAPI, + activeDatasourceId, + datasourceState: + activeDatasourceId && datasourceStates[activeDatasourceId] + ? datasourceStates[activeDatasourceId] + : null, + datasource: + activeDatasourceId && datasourceMap[activeDatasourceId] + ? datasourceMap[activeDatasourceId] + : null, dispatch, - frameDatasourceAPI, - persistedDoc?.visualizationType, - visualization, - visualizationMap, - ]); - - // these are messages managed from other parts of Lens - const [additionalUserMessages, setAdditionalUserMessages] = useState>( - {} - ); - - const getUserMessages: UserMessagesGetter = (locationId, filterArgs) => - filterAndSortUserMessages( - [...userMessages, ...Object.values(additionalUserMessages)], - locationId, - filterArgs ?? {} - ); - - const addUserMessages: AddUserMessages = (messages) => { - const newMessageMap = { - ...additionalUserMessages, - }; - - const addedMessageIds: string[] = []; - messages.forEach((message) => { - if (!newMessageMap[message.uniqueId]) { - addedMessageIds.push(message.uniqueId); - newMessageMap[message.uniqueId] = message; - } - }); - - if (addedMessageIds.length) { - setAdditionalUserMessages(newMessageMap); - } - - return () => { - const withMessagesRemoved = { - ...additionalUserMessages, - }; - - addedMessageIds.forEach((id) => delete withMessagesRemoved[id]); - - setAdditionalUserMessages(withMessagesRemoved); - }; - }; + visualization: visualization.activeId ? visualizationMap[visualization.activeId] : undefined, + visualizationType: visualization.activeId, + visualizationState: visualization, + }); return ( <> diff --git a/x-pack/plugins/lens/public/app_plugin/get_application_user_messages.test.tsx b/x-pack/plugins/lens/public/app_plugin/get_application_user_messages.test.tsx index fa0ed4e21a668..f511e7e59112a 100644 --- a/x-pack/plugins/lens/public/app_plugin/get_application_user_messages.test.tsx +++ b/x-pack/plugins/lens/public/app_plugin/get_application_user_messages.test.tsx @@ -25,8 +25,8 @@ describe('application-level user messages', () => { getApplicationUserMessages({ visualizationType: undefined, - visualizationMap: {}, - visualization: { activeId: '', state: {} }, + visualization: undefined, + visualizationState: { activeId: '', state: {} }, activeDatasource: {} as Datasource, activeDatasourceState: null, dataViews: {} as DataViewsState, @@ -53,8 +53,8 @@ describe('application-level user messages', () => { expect( getApplicationUserMessages({ visualizationType: '123', - visualizationMap: {}, - visualization: { activeId: 'id_for_type_that_doesnt_exist', state: {} }, + visualization: undefined, + visualizationState: { activeId: 'id_for_type_that_doesnt_exist', state: {} }, activeDatasource: {} as Datasource, activeDatasourceState: null, @@ -84,8 +84,8 @@ describe('application-level user messages', () => { activeDatasource: null, visualizationType: '123', - visualizationMap: { 'some-id': {} as Visualization }, - visualization: { activeId: 'some-id', state: {} }, + visualization: {} as Visualization, + visualizationState: { activeId: 'some-id', state: {} }, activeDatasourceState: null, dataViews: {} as DataViewsState, core: {} as CoreStart, @@ -138,8 +138,8 @@ describe('application-level user messages', () => { const irrelevantProps = { dataViews: {} as DataViewsState, - visualizationMap: { foo: {} as Visualization }, - visualization: { activeId: 'foo', state: {} }, + visualization: {} as Visualization, + visualizationState: { activeId: 'foo', state: {} }, }; it('generates error if missing an index pattern', () => { diff --git a/x-pack/plugins/lens/public/app_plugin/get_application_user_messages.tsx b/x-pack/plugins/lens/public/app_plugin/get_application_user_messages.tsx index b5a2e0fe24def..4041fce3bbd0a 100644 --- a/x-pack/plugins/lens/public/app_plugin/get_application_user_messages.tsx +++ b/x-pack/plugins/lens/public/app_plugin/get_application_user_messages.tsx @@ -5,18 +5,27 @@ * 2.0. */ -import React from 'react'; +import React, { useEffect, useState } from 'react'; import { i18n } from '@kbn/i18n'; import { RedirectAppLinks } from '@kbn/shared-ux-link-redirect-app'; import { FormattedMessage } from '@kbn/i18n-react'; import type { CoreStart } from '@kbn/core/public'; -import type { DataViewsState, VisualizationState } from '../state_management'; +import { Dispatch } from '@reduxjs/toolkit'; +import { + updateDatasourceState, + type DataViewsState, + type VisualizationState, + DatasourceState, +} from '../state_management'; import type { + AddUserMessages, Datasource, + FramePublicAPI, UserMessage, UserMessageFilters, UserMessagesDisplayLocationId, - VisualizationMap, + UserMessagesGetter, + Visualization, } from '../types'; import { getMissingIndexPattern } from '../editor_frame_service/editor_frame/state_helpers'; @@ -26,15 +35,15 @@ import { getMissingIndexPattern } from '../editor_frame_service/editor_frame/sta export const getApplicationUserMessages = ({ visualizationType, visualization, - visualizationMap, + visualizationState, activeDatasource, activeDatasourceState, dataViews, core, }: { visualizationType: string | null | undefined; - visualization: VisualizationState | undefined; - visualizationMap: VisualizationMap; + visualization: Visualization | undefined; + visualizationState: VisualizationState | undefined; activeDatasource: Datasource | null | undefined; activeDatasourceState: { isLoading: boolean; state: unknown } | null; dataViews: DataViewsState; @@ -46,8 +55,8 @@ export const getApplicationUserMessages = ({ messages.push(getMissingVisTypeError()); } - if (visualization?.activeId && !visualizationMap[visualization.activeId]) { - messages.push(getUnknownVisualizationTypeError(visualization.activeId)); + if (visualizationState?.activeId && !visualization) { + messages.push(getUnknownVisualizationTypeError(visualizationState.activeId)); } if (!activeDatasource) { @@ -182,8 +191,8 @@ function getMissingIndexPatternsErrors( export const filterAndSortUserMessages = ( userMessages: UserMessage[], - locationId: UserMessagesDisplayLocationId | UserMessagesDisplayLocationId[] | undefined, - { dimensionId, severity }: UserMessageFilters + locationId?: UserMessagesDisplayLocationId | UserMessagesDisplayLocationId[], + { dimensionId, severity }: UserMessageFilters = {} ) => { const locationIds = Array.isArray(locationId) ? locationId @@ -231,3 +240,112 @@ function bySeverity(a: UserMessage, b: UserMessage) { } return 1; } + +export const useApplicationUserMessages = ({ + coreStart, + dispatch, + activeDatasourceId, + datasource, + datasourceState, + framePublicAPI, + visualizationType, + visualization, + visualizationState, +}: { + activeDatasourceId: string | null; + coreStart: CoreStart; + datasource: Datasource | null; + datasourceState: DatasourceState | null; + dispatch: Dispatch; + framePublicAPI: FramePublicAPI; + visualizationType: string | null; + visualizationState?: VisualizationState; + visualization?: Visualization; +}) => { + const [userMessages, setUserMessages] = useState([]); + // these are messages managed from other parts of Lens + const [additionalUserMessages, setAdditionalUserMessages] = useState>( + {} + ); + + useEffect(() => { + setUserMessages([ + ...(datasourceState && datasourceState.state && datasource && activeDatasourceId + ? datasource.getUserMessages(datasourceState.state, { + frame: framePublicAPI, + setState: (newStateOrUpdater) => { + dispatch( + updateDatasourceState({ + newDatasourceState: + typeof newStateOrUpdater === 'function' + ? newStateOrUpdater(datasourceState.state) + : newStateOrUpdater, + datasourceId: activeDatasourceId, + }) + ); + }, + }) + : []), + ...(visualizationState?.activeId && visualizationState.state + ? visualization?.getUserMessages?.(visualizationState.state, { + frame: framePublicAPI, + }) ?? [] + : []), + ...getApplicationUserMessages({ + visualizationType, + visualization, + visualizationState, + activeDatasource: datasource, + activeDatasourceState: datasourceState, + core: coreStart, + dataViews: framePublicAPI.dataViews, + }), + ]); + }, [ + activeDatasourceId, + datasource, + datasourceState, + dispatch, + framePublicAPI, + visualization, + visualizationState, + visualizationType, + coreStart, + ]); + + const getUserMessages: UserMessagesGetter = (locationId, filterArgs) => + filterAndSortUserMessages( + [...userMessages, ...Object.values(additionalUserMessages)], + locationId, + filterArgs ?? {} + ); + + const addUserMessages: AddUserMessages = (messages) => { + const newMessageMap = { + ...additionalUserMessages, + }; + + const addedMessageIds: string[] = []; + messages.forEach((message) => { + if (!newMessageMap[message.uniqueId]) { + addedMessageIds.push(message.uniqueId); + newMessageMap[message.uniqueId] = message; + } + }); + + if (addedMessageIds.length) { + setAdditionalUserMessages(newMessageMap); + } + + return () => { + const withMessagesRemoved = { + ...additionalUserMessages, + }; + + addedMessageIds.forEach((id) => delete withMessagesRemoved[id]); + + setAdditionalUserMessages(withMessagesRemoved); + }; + }; + return { getUserMessages, addUserMessages }; +}; diff --git a/x-pack/plugins/lens/public/datasources/form_based/form_based.test.ts b/x-pack/plugins/lens/public/datasources/form_based/form_based.test.ts index 591cfc322a8a0..acc77bd34c39c 100644 --- a/x-pack/plugins/lens/public/datasources/form_based/form_based.test.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/form_based.test.ts @@ -26,7 +26,6 @@ import { Datasource, FramePublicAPI, OperationDescriptor, - FrameDatasourceAPI, UserMessage, } from '../../types'; import { getFieldByNameFactory } from './pure_helpers'; @@ -49,8 +48,9 @@ import { import { createMockedFullReference } from './operations/mocks'; import { cloneDeep } from 'lodash'; import { Datatable, DatatableColumn } from '@kbn/expressions-plugin/common'; -import { createMockFramePublicAPI } from '../../mocks'; import { filterAndSortUserMessages } from '../../app_plugin/get_application_user_messages'; +import { createMockFramePublicAPI } from '../../mocks'; +import { createMockDataViewsState } from '../../data_views_service/mocks'; jest.mock('./loader'); jest.mock('../../id_generator'); @@ -3062,22 +3062,6 @@ describe('IndexPattern Data Source', () => { }); describe('#getUserMessages', () => { - function createMockFrameDatasourceAPI({ - activeData, - dataViews, - }: Partial> & { - dataViews?: Partial; - }): FrameDatasourceAPI { - return { - ...createMockFramePublicAPI({ - activeData, - dataViews, - }), - query: { query: '', language: 'kuery' }, - filters: [], - }; - } - describe('error messages', () => { it('should generate error messages for a single layer', () => { (getErrorMessages as jest.Mock).mockClear(); @@ -3094,7 +3078,9 @@ describe('IndexPattern Data Source', () => { }; expect( FormBasedDatasource.getUserMessages(state, { - frame: createMockFrameDatasourceAPI({ dataViews: { indexPatterns } }), + frame: createMockFramePublicAPI({ + dataViews: createMockDataViewsState({ indexPatterns }), + }), setState: () => {}, }) ).toMatchInlineSnapshot(` @@ -3146,7 +3132,9 @@ describe('IndexPattern Data Source', () => { }; expect( FormBasedDatasource.getUserMessages(state, { - frame: createMockFrameDatasourceAPI({ dataViews: { indexPatterns } }), + frame: createMockFramePublicAPI({ + dataViews: createMockDataViewsState({ indexPatterns }), + }), setState: () => {}, }) ).toMatchInlineSnapshot(` @@ -3235,7 +3223,9 @@ describe('IndexPattern Data Source', () => { (getErrorMessages as jest.Mock).mockReturnValueOnce([]); const messages = FormBasedDatasource.getUserMessages(state, { - frame: createMockFrameDatasourceAPI({ dataViews: { indexPatterns } }), + frame: createMockFramePublicAPI({ + dataViews: createMockDataViewsState({ indexPatterns }), + }), setState: () => {}, }); @@ -3273,7 +3263,9 @@ describe('IndexPattern Data Source', () => { ] as ReturnType); const messages = FormBasedDatasource.getUserMessages(state, { - frame: createMockFrameDatasourceAPI({ dataViews: { indexPatterns } }), + frame: createMockFramePublicAPI({ + dataViews: createMockDataViewsState({ indexPatterns }), + }), setState: () => {}, }); @@ -3303,7 +3295,7 @@ describe('IndexPattern Data Source', () => { describe('warning messages', () => { let state: FormBasedPrivateState; - let framePublicAPI: FrameDatasourceAPI; + let framePublicAPI: FramePublicAPI; beforeEach(() => { (getErrorMessages as jest.Mock).mockReturnValueOnce([]); @@ -3385,7 +3377,7 @@ describe('IndexPattern Data Source', () => { currentIndexPatternId: '1', }; - framePublicAPI = createMockFrameDatasourceAPI({ + framePublicAPI = createMockFramePublicAPI({ activeData: { first: { type: 'datatable', @@ -3419,9 +3411,9 @@ describe('IndexPattern Data Source', () => { ], }, }, - dataViews: { + dataViews: createMockDataViewsState({ indexPatterns: expectedIndexPatterns, - }, + }), }); }); @@ -3549,13 +3541,13 @@ describe('IndexPattern Data Source', () => { currentIndexPatternId: '1', }, { - frame: createMockFrameDatasourceAPI({ + frame: createMockFramePublicAPI({ activeData: { first: createDatatableForLayer(0), }, - dataViews: { + dataViews: createMockDataViewsState({ indexPatterns: expectedIndexPatterns, - }, + }), }), setState: () => {}, visualizationInfo: { layers: [] }, @@ -3574,14 +3566,14 @@ describe('IndexPattern Data Source', () => { currentIndexPatternId: '1', }; const messages = FormBasedDatasource.getUserMessages!(state, { - frame: createMockFrameDatasourceAPI({ + frame: createMockFramePublicAPI({ activeData: { first: createDatatableForLayer(0), second: createDatatableForLayer(1), }, - dataViews: { + dataViews: createMockDataViewsState({ indexPatterns: expectedIndexPatterns, - }, + }), }), setState: () => {}, visualizationInfo: { layers: [] }, diff --git a/x-pack/plugins/lens/public/datasources/form_based/form_based.tsx b/x-pack/plugins/lens/public/datasources/form_based/form_based.tsx index a458c6f804da4..8099a787437ba 100644 --- a/x-pack/plugins/lens/public/datasources/form_based/form_based.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/form_based.tsx @@ -38,7 +38,6 @@ import type { IndexPatternRef, DataSourceInfo, UserMessage, - FrameDatasourceAPI, StateSetter, IndexPatternMap, } from '../../types'; @@ -749,18 +748,12 @@ export function getFormBasedDatasource({ getDatasourceSuggestionsForVisualizeField, getDatasourceSuggestionsForVisualizeCharts, - getUserMessages(state, { frame: frameDatasourceAPI, setState, visualizationInfo }) { + getUserMessages(state, { frame: framePublicAPI, setState, visualizationInfo }) { if (!state) { return []; } - const layerErrorMessages = getLayerErrorMessages( - state, - frameDatasourceAPI, - setState, - core, - data - ); + const layerErrorMessages = getLayerErrorMessages(state, framePublicAPI, setState, core, data); const dimensionErrorMessages = getInvalidDimensionErrorMessages( state, @@ -770,8 +763,8 @@ export function getFormBasedDatasource({ return !isColumnInvalid( layer, columnId, - frameDatasourceAPI.dataViews.indexPatterns[layer.indexPatternId], - frameDatasourceAPI.dateRange, + framePublicAPI.dataViews.indexPatterns[layer.indexPatternId], + framePublicAPI.dateRange, uiSettings.get(UI_SETTINGS.HISTOGRAM_BAR_TARGET) ); } @@ -779,11 +772,8 @@ export function getFormBasedDatasource({ const warningMessages = [ ...[ - ...(getStateTimeShiftWarningMessages( - data.datatableUtilities, - state, - frameDatasourceAPI - ) || []), + ...(getStateTimeShiftWarningMessages(data.datatableUtilities, state, framePublicAPI) || + []), ].map((longMessage) => { const message: UserMessage = { severity: 'warning', @@ -798,14 +788,14 @@ export function getFormBasedDatasource({ ...getPrecisionErrorWarningMessages( data.datatableUtilities, state, - frameDatasourceAPI, + framePublicAPI, core.docLinks, setState ), - ...getUnsupportedOperationsWarningMessage(state, frameDatasourceAPI, core.docLinks), + ...getUnsupportedOperationsWarningMessage(state, framePublicAPI, core.docLinks), ]; - const infoMessages = getNotifiableFeatures(state, frameDatasourceAPI, visualizationInfo); + const infoMessages = getNotifiableFeatures(state, framePublicAPI, visualizationInfo); return layerErrorMessages.concat(dimensionErrorMessages, warningMessages, infoMessages); }, @@ -922,12 +912,12 @@ function blankLayer(indexPatternId: string, linkToLayers?: string[]): FormBasedL function getLayerErrorMessages( state: FormBasedPrivateState, - frameDatasourceAPI: FrameDatasourceAPI, + framePublicAPI: FramePublicAPI, setState: StateSetter, core: CoreStart, data: DataPublicPluginStart ) { - const indexPatterns = frameDatasourceAPI.dataViews.indexPatterns; + const indexPatterns = framePublicAPI.dataViews.indexPatterns; const layerErrors: UserMessage[][] = Object.entries(state.layers) .filter(([_, layer]) => !!indexPatterns[layer.indexPatternId]) @@ -954,7 +944,7 @@ function getLayerErrorMessages( { - const newState = await error.fixAction?.newState(frameDatasourceAPI); + const newState = await error.fixAction?.newState(framePublicAPI); if (newState) { setState(newState); } diff --git a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/index.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/index.ts index a5ac36a5b4ad1..3c62f34cbc1f2 100644 --- a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/index.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/index.ts @@ -51,7 +51,7 @@ import { import { staticValueOperation } from './static_value'; import { lastValueOperation } from './last_value'; import type { - FrameDatasourceAPI, + FramePublicAPI, IndexPattern, IndexPatternField, OperationMetadata, @@ -477,7 +477,7 @@ export type FieldBasedOperationErrorMessage = newState: ( data: DataPublicPluginStart, core: CoreStart, - frame: FrameDatasourceAPI, + frame: FramePublicAPI, layerId: string ) => Promise; }; diff --git a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/terms/helpers.test.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/terms/helpers.test.ts index 6be9e8a76fa3e..583f3ff5015c2 100644 --- a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/terms/helpers.test.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/terms/helpers.test.ts @@ -7,7 +7,7 @@ import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import { coreMock as corePluginMock } from '@kbn/core/public/mocks'; -import type { FrameDatasourceAPI } from '../../../../../types'; +import type { FramePublicAPI } from '../../../../../types'; import type { CountIndexPatternColumn } from '..'; import type { TermsIndexPatternColumn } from './types'; import type { GenericIndexPatternColumn } from '../../../form_based'; @@ -245,7 +245,7 @@ describe('getDisallowedTermsMessage()', () => { fromDate: '2020', toDate: '2021', }, - } as unknown as FrameDatasourceAPI, + } as unknown as FramePublicAPI, 'first' ); @@ -299,7 +299,7 @@ describe('getDisallowedTermsMessage()', () => { rows: [{ col1: 'myTerm' }, { col1: 'myOtherTerm' }], }, }, - } as unknown as FrameDatasourceAPI, + } as unknown as FramePublicAPI, 'first' ); @@ -335,7 +335,7 @@ describe('getDisallowedTermsMessage()', () => { fromDate: '2020', toDate: '2021', }, - } as unknown as FrameDatasourceAPI, + } as unknown as FramePublicAPI, 'first' ); @@ -385,7 +385,7 @@ describe('getDisallowedTermsMessage()', () => { ], }, }, - } as unknown as FrameDatasourceAPI, + } as unknown as FramePublicAPI, 'first' ); diff --git a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/terms/helpers.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/terms/helpers.ts index a1b528f2d0f7f..cb3ed583d7cda 100644 --- a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/terms/helpers.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/terms/helpers.ts @@ -17,7 +17,7 @@ import { GenericIndexPatternColumn, operationDefinitionMap } from '..'; import { defaultLabel } from '../filters'; import { isReferenced } from '../../layer_helpers'; -import type { FrameDatasourceAPI, IndexPattern, IndexPatternField } from '../../../../../types'; +import type { FramePublicAPI, IndexPattern, IndexPatternField } from '../../../../../types'; import type { FiltersIndexPatternColumn } from '..'; import type { TermsIndexPatternColumn } from './types'; import type { LastValueIndexPatternColumn } from '../last_value'; @@ -126,7 +126,7 @@ export function getDisallowedTermsMessage( newState: async ( data: DataPublicPluginStart, core: CoreStart, - frame: FrameDatasourceAPI, + frame: FramePublicAPI, layerId: string ) => { const currentColumn = layer.columns[columnId] as TermsIndexPatternColumn; diff --git a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/terms/terms.test.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/terms/terms.test.tsx index c5af3b5b40e2f..a74872a46f907 100644 --- a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/terms/terms.test.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/terms/terms.test.tsx @@ -33,7 +33,7 @@ import { operationDefinitionMap, } from '..'; import { FormBasedLayer, FormBasedPrivateState } from '../../../types'; -import { FrameDatasourceAPI } from '../../../../../types'; +import { FramePublicAPI } from '../../../../../types'; import { DateHistogramIndexPatternColumn } from '../date_histogram'; import { getOperationSupportMatrix } from '../../../dimension_panel/operation_support'; import { FieldSelect } from '../../../dimension_panel/field_select'; @@ -2867,7 +2867,7 @@ describe('terms', () => { fromDate: '2020', toDate: '2021', }, - } as unknown as FrameDatasourceAPI, + } as unknown as FramePublicAPI, 'first' ); expect(newLayer.columns.col1).toEqual( diff --git a/x-pack/plugins/lens/public/datasources/form_based/operations/layer_helpers.ts b/x-pack/plugins/lens/public/datasources/form_based/operations/layer_helpers.ts index 37a742b426edb..6ab10a097010d 100644 --- a/x-pack/plugins/lens/public/datasources/form_based/operations/layer_helpers.ts +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/layer_helpers.ts @@ -13,7 +13,7 @@ import { DataPublicPluginStart, UI_SETTINGS } from '@kbn/data-plugin/public'; import type { DateRange } from '../../../../common/types'; import type { DatasourceFixAction, - FrameDatasourceAPI, + FramePublicAPI, IndexPattern, IndexPatternField, OperationMetadata, @@ -1594,7 +1594,7 @@ export function getErrorMessages( fixAction: errorMessage.fixAction ? { ...errorMessage.fixAction, - newState: async (frame: FrameDatasourceAPI) => ({ + newState: async (frame: FramePublicAPI) => ({ ...state, layers: { ...state.layers, diff --git a/x-pack/plugins/lens/public/datasources/text_based/text_based_languages.test.ts b/x-pack/plugins/lens/public/datasources/text_based/text_based_languages.test.ts index 0b0437cc96c0b..8aab2f3670959 100644 --- a/x-pack/plugins/lens/public/datasources/text_based/text_based_languages.test.ts +++ b/x-pack/plugins/lens/public/datasources/text_based/text_based_languages.test.ts @@ -13,7 +13,7 @@ import { dataPluginMock } from '@kbn/data-plugin/public/mocks'; import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks'; import { getTextBasedDatasource } from './text_based_languages'; import { generateId } from '../../id_generator'; -import { DatasourcePublicAPI, Datasource, FrameDatasourceAPI } from '../../types'; +import { DatasourcePublicAPI, Datasource, FramePublicAPI } from '../../types'; jest.mock('../../id_generator'); @@ -551,7 +551,7 @@ describe('Textbased Data Source', () => { } as unknown as TextBasedPrivateState; expect( TextBasedDatasource.getUserMessages(state, { - frame: { dataViews: indexPatterns } as unknown as FrameDatasourceAPI, + frame: { dataViews: indexPatterns } as unknown as FramePublicAPI, setState: () => {}, }) ).toMatchInlineSnapshot(` diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/config_panel.test.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/config_panel.test.tsx index c5ec748aa9bf0..b0729cb489ba7 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/config_panel.test.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/config_panel.test.tsx @@ -477,12 +477,14 @@ describe('ConfigPanel', () => { expect(visualizationMap.testVis.setDimension).toHaveBeenCalledWith({ columnId: 'newId', frame: { + dataViews: expect.anything(), activeData: undefined, datasourceLayers: { a: expect.anything(), }, dateRange: expect.anything(), - dataViews: expect.anything(), + filters: [], + query: undefined, }, groupId: 'a', layerId: 'newId', diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/editor_frame.test.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/editor_frame.test.tsx index 3d90273ef0d14..0362f130be87d 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/editor_frame.test.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/editor_frame.test.tsx @@ -38,6 +38,7 @@ import { DatasourceMock, createExpressionRendererMock, mockStoreDeps, + renderWithReduxStore, } from '../../mocks'; import { inspectorPluginMock } from '@kbn/inspector-plugin/public/mocks'; import { ReactExpressionRendererType } from '@kbn/expressions-plugin/public'; @@ -283,7 +284,7 @@ describe('editor_frame', () => { const props = { ...getDefaultProps(), visualizationMap: { - testVis: mockVisualization, + testVis: { ...mockVisualization, toExpression: () => null }, }, datasourceMap: { testDatasource: mockDatasource, @@ -291,18 +292,23 @@ describe('editor_frame', () => { ExpressionRenderer: expressionRendererMock, }; - await mountWithProvider(, { - preloadedState: { - activeDatasourceId: 'testDatasource', - visualization: { activeId: mockVisualization.id, state: {} }, - datasourceStates: { - testDatasource: { - isLoading: false, - state: '', + renderWithReduxStore( + , + {}, + { + preloadedState: { + activeDatasourceId: 'testDatasource', + visualization: { activeId: mockVisualization.id, state: {} }, + datasourceStates: { + testDatasource: { + isLoading: false, + state: '', + }, }, }, - }, - }); + } + ); + const updatedState = {}; const setDatasourceState = (mockDatasource.DataPanelComponent as jest.Mock).mock.calls[0][0] .setState; diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/state_helpers.ts b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/state_helpers.ts index e12182cd07bff..466773ec1c6b2 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/state_helpers.ts +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/state_helpers.ts @@ -35,7 +35,7 @@ import type { import { buildExpression } from './expression_helpers'; import { Document } from '../../persistence/saved_object_store'; import { getActiveDatasourceIdFromDoc, sortDataViewRefs } from '../../utils'; -import type { DatasourceStates, VisualizationState } from '../../state_management'; +import type { DatasourceState, DatasourceStates, VisualizationState } from '../../state_management'; import { readFromStorage } from '../../settings_storage'; import { loadIndexPatternRefs, loadIndexPatterns } from '../../data_views_service/loader'; import { getDatasourceLayers } from '../../state_management/utils'; @@ -461,7 +461,7 @@ export async function persistedStateToExpression( export function getMissingIndexPattern( currentDatasource: Datasource | null | undefined, - currentDatasourceState: { isLoading: boolean; state: unknown } | null, + currentDatasourceState: DatasourceState | null, indexPatterns: IndexPatternMap ) { if ( diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_panel.test.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_panel.test.tsx index 09e5c6406e793..24fe5c971558c 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_panel.test.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_panel.test.tsx @@ -381,8 +381,9 @@ describe('suggestion_panel', () => { }, ] as Suggestion[]); - (mockVisualization.toPreviewExpression as jest.Mock).mockReturnValueOnce(undefined); - (mockVisualization.toPreviewExpression as jest.Mock).mockReturnValueOnce('test | expression'); + (mockVisualization.toPreviewExpression as jest.Mock) + .mockReturnValue(undefined) + .mockReturnValueOnce('test | expression'); mockDatasource.toExpression.mockReturnValue('datasource_expression'); mountWithProvider(); diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_panel.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_panel.tsx index 51f0e3310ccdb..a4e65b280d203 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_panel.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_panel.tsx @@ -41,7 +41,6 @@ import { VisualizationMap, DatasourceLayers, UserMessagesGetter, - FrameDatasourceAPI, } from '../../types'; import { getSuggestions, switchToSuggestion } from './suggestion_helpers'; import { getDatasourceExpressionsByLayers } from './expression_helpers'; @@ -63,7 +62,7 @@ import { selectChangesApplied, applyChanges, selectStagedActiveData, - selectFrameDatasourceAPI, + selectFramePublicAPI, } from '../../state_management'; import { filterAndSortUserMessages } from '../../app_plugin/get_application_user_messages'; const MAX_SUGGESTIONS_DISPLAYED = 5; @@ -74,7 +73,7 @@ const configurationsValid = ( currentDatasourceState: unknown, currentVisualization: Visualization, currentVisualizationState: unknown, - frame: FrameDatasourceAPI + frame: FramePublicAPI ): boolean => { try { return ( @@ -241,9 +240,7 @@ export function SuggestionPanel({ const currentVisualization = useLensSelector(selectCurrentVisualization); const currentDatasourceStates = useLensSelector(selectCurrentDatasourceStates); - const frameDatasourceAPI = useLensSelector((state) => - selectFrameDatasourceAPI(state, datasourceMap) - ); + const framePublicAPI = useLensSelector((state) => selectFramePublicAPI(state, datasourceMap)); const changesApplied = useLensSelector(selectChangesApplied); // get user's selection from localStorage, this key defines if the suggestions panel will be hidden or not const [hideSuggestions, setHideSuggestions] = useLocalStorage( @@ -289,7 +286,7 @@ export function SuggestionPanel({ suggestionDatasourceState, visualizationMap[visualizationId], suggestionVisualizationState, - frameDatasourceAPI + framePublicAPI ) ); } 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 6323dbf5c96f4..a8e834e43881c 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 @@ -380,7 +380,7 @@ describe('workspace_panel', () => { }} framePublicAPI={framePublicAPI} visualizationMap={{ - testVis: mockVisualization, + testVis: { ...mockVisualization, toExpression: () => null }, }} ExpressionRenderer={expressionRendererMock} />, diff --git a/x-pack/plugins/lens/public/embeddable/embeddable.tsx b/x-pack/plugins/lens/public/embeddable/embeddable.tsx index a0a2faec5294d..b9d0bae197909 100644 --- a/x-pack/plugins/lens/public/embeddable/embeddable.tsx +++ b/x-pack/plugins/lens/public/embeddable/embeddable.tsx @@ -97,7 +97,7 @@ import { GetCompatibleCellValueActions, UserMessage, IndexPatternRef, - FrameDatasourceAPI, + FramePublicAPI, AddUserMessages, isMessageRemovable, UserMessagesGetter, @@ -608,11 +608,14 @@ export class Embeddable userMessages.push( ...getApplicationUserMessages({ visualizationType: this.savedVis?.visualizationType, - visualization: { + visualizationState: { state: this.activeVisualizationState, activeId: this.activeVisualizationId, }, - visualizationMap: this.deps.visualizationMap, + visualization: + this.activeVisualizationId && this.deps.visualizationMap[this.activeVisualizationId] + ? this.deps.visualizationMap[this.activeVisualizationId] + : undefined, activeDatasource: this.activeDatasource, activeDatasourceState: { isLoading: !this.activeDatasourceState, @@ -631,7 +634,7 @@ export class Embeddable } const mergedSearchContext = this.getMergedSearchContext(); - const frameDatasourceAPI: FrameDatasourceAPI = { + const framePublicAPI: FramePublicAPI = { dataViews: { indexPatterns: this.indexPatterns, indexPatternRefs: this.indexPatternRefs, @@ -658,14 +661,14 @@ export class Embeddable userMessages.push( ...(this.activeDatasource?.getUserMessages(this.activeDatasourceState, { setState: () => {}, - frame: frameDatasourceAPI, + frame: framePublicAPI, visualizationInfo: this.activeVisualization?.getVisualizationInfo?.( this.activeVisualizationState, - frameDatasourceAPI + framePublicAPI ), }) ?? []), ...(this.activeVisualization?.getUserMessages?.(this.activeVisualizationState, { - frame: frameDatasourceAPI, + frame: framePublicAPI, }) ?? []) ); diff --git a/x-pack/plugins/lens/public/mocks/datasource_mock.tsx b/x-pack/plugins/lens/public/mocks/datasource_mock.tsx index e4f9f5c88fdc1..c92c3007a800a 100644 --- a/x-pack/plugins/lens/public/mocks/datasource_mock.tsx +++ b/x-pack/plugins/lens/public/mocks/datasource_mock.tsx @@ -44,7 +44,9 @@ export function createMockDatasource( getRenderEventCounters: jest.fn((_state) => []), getPublicAPI: jest.fn().mockReturnValue(publicAPIMock), initialize: jest.fn((_state?) => {}), - toExpression: jest.fn((_frame, _state, _indexPatterns, dateRange, nowInstant) => null), + toExpression: jest.fn( + (_frame, _state, _indexPatterns, dateRange, nowInstant) => 'datasource_expression' + ), insertLayer: jest.fn((_state, _newLayerId) => ({})), removeLayer: jest.fn((state, layerId) => ({ newState: state, removedLayerIds: [layerId] })), cloneLayer: jest.fn((_state, _layerId, _newLayerId, getNewId) => {}), @@ -62,7 +64,7 @@ export function createMockDatasource( getUserMessages: jest.fn((_state, _deps) => []), checkIntegrity: jest.fn((_state, _indexPatterns) => []), isTimeBased: jest.fn(), - isEqual: jest.fn(), + isEqual: jest.fn((a, b, c, d) => a === c), getUsedDataView: jest.fn((state, layer) => 'mockip'), getUsedDataViews: jest.fn(), onRefreshIndexPattern: jest.fn(), diff --git a/x-pack/plugins/lens/public/mocks/index.ts b/x-pack/plugins/lens/public/mocks/index.ts index 74fbe267d635a..6cc3ff02ff92e 100644 --- a/x-pack/plugins/lens/public/mocks/index.ts +++ b/x-pack/plugins/lens/public/mocks/index.ts @@ -8,7 +8,7 @@ import { DragContextState, DragContextValue } from '@kbn/dom-drag-drop'; import { DatatableColumnType } from '@kbn/expressions-plugin/common'; import { createMockDataViewsState } from '../data_views_service/mocks'; -import { FramePublicAPI, FrameDatasourceAPI } from '../types'; +import { FramePublicAPI } from '../types'; export { mockDataPlugin } from './data_plugin_mock'; export { visualizationMap, @@ -32,40 +32,16 @@ export { lensPluginMock } from './lens_plugin_mock'; export type FrameMock = jest.Mocked; -export const createMockFramePublicAPI = ({ - datasourceLayers, - dateRange, - dataViews, - activeData, -}: Partial> & { - dataViews?: Partial; -} = {}): FrameMock => ({ - datasourceLayers: datasourceLayers ?? {}, - dateRange: dateRange ?? { +export const createMockFramePublicAPI = (overrides: Partial = {}): FrameMock => ({ + datasourceLayers: {}, + dateRange: { fromDate: '2022-03-17T08:25:00.000Z', toDate: '2022-04-17T08:25:00.000Z', }, - dataViews: createMockDataViewsState(dataViews), - activeData, -}); - -export type FrameDatasourceMock = jest.Mocked; - -export const createMockFrameDatasourceAPI = ({ - datasourceLayers, - dateRange, - dataViews, - query, - filters, -}: Partial = {}): FrameDatasourceMock => ({ - datasourceLayers: datasourceLayers ?? {}, - dateRange: dateRange ?? { - fromDate: '2022-03-17T08:25:00.000Z', - toDate: '2022-04-17T08:25:00.000Z', - }, - query: query ?? { query: '', language: 'lucene' }, - filters: filters ?? [], - dataViews: createMockDataViewsState(dataViews), + dataViews: createMockDataViewsState(), + query: { query: '', language: 'lucene' }, + filters: [], + ...overrides, }); export function createMockedDragDropContext( diff --git a/x-pack/plugins/lens/public/mocks/store_mocks.tsx b/x-pack/plugins/lens/public/mocks/store_mocks.tsx index cafb7796969c8..9a3d33afa1aa7 100644 --- a/x-pack/plugins/lens/public/mocks/store_mocks.tsx +++ b/x-pack/plugins/lens/public/mocks/store_mocks.tsx @@ -13,26 +13,14 @@ import { act } from 'react-dom/test-utils'; import { PreloadedState } from '@reduxjs/toolkit'; import { RenderOptions, render } from '@testing-library/react'; import { I18nProvider } from '@kbn/i18n-react'; -// imported to prevent a type error from testing library https://github.com/testing-library/react-testing-library/issues/587 -import * as ___ from '@testing-library/dom'; - import { LensAppServices } from '../app_plugin/types'; -import { - makeConfigureStore, - LensAppState, - LensState, - LensStoreDeps, - LensRootStore, -} from '../state_management'; +import { makeConfigureStore, LensAppState, LensState, LensStoreDeps } from '../state_management'; import { getResolvedDateRange } from '../utils'; import { DatasourceMap, VisualizationMap } from '../types'; import { mockVisualizationMap } from './visualization_mock'; import { mockDatasourceMap } from './datasource_mock'; import { makeDefaultServices } from './services_mock'; -// preventing a type error from testing library https://github.com/testing-library/react-testing-library/issues/587 -export const unusedFn = () => ___; - export const mockStoreDeps = (deps?: { lensServices?: LensAppServices; datasourceMap?: DatasourceMap; @@ -85,7 +73,8 @@ export const renderWithReduxStore = ( preloadedState: {}, storeDeps: mockStoreDeps(), } -): ReturnType & { store: LensRootStore } => { + // eslint-disable-next-line @typescript-eslint/no-explicit-any +): any => { const { store } = makeLensStore({ preloadedState, storeDeps }); const Wrapper: React.FC<{ diff --git a/x-pack/plugins/lens/public/mocks/visualization_mock.tsx b/x-pack/plugins/lens/public/mocks/visualization_mock.tsx index 80f20e8c3af4e..3d25f7e29864b 100644 --- a/x-pack/plugins/lens/public/mocks/visualization_mock.tsx +++ b/x-pack/plugins/lens/public/mocks/visualization_mock.tsx @@ -44,9 +44,9 @@ export function createMockVisualization(id = 'testVis'): jest.Mocked null), - toPreviewExpression: jest.fn((_state, _frame) => null), - + toExpression: jest.fn((_state, _frame) => 'expression'), + toPreviewExpression: jest.fn((_state, _frame) => 'expression'), + getUserMessages: jest.fn((_state) => []), setDimension: jest.fn(), removeDimension: jest.fn(), DimensionEditorComponent: jest.fn(() =>
    ), diff --git a/x-pack/plugins/lens/public/state_management/selectors.ts b/x-pack/plugins/lens/public/state_management/selectors.ts index 6bf40638554f9..7572c31287297 100644 --- a/x-pack/plugins/lens/public/state_management/selectors.ts +++ b/x-pack/plugins/lens/public/state_management/selectors.ts @@ -220,10 +220,10 @@ export const selectFramePublicAPI = createSelector( selectCurrentDatasourceStates, selectActiveData, selectInjectedDependencies as SelectInjectedDependenciesFunction, - selectResolvedDateRange, selectDataViews, + selectExecutionContext, ], - (datasourceStates, activeData, datasourceMap, dateRange, dataViews) => { + (datasourceStates, activeData, datasourceMap, dataViews, context) => { return { datasourceLayers: getDatasourceLayers( datasourceStates, @@ -231,13 +231,8 @@ export const selectFramePublicAPI = createSelector( dataViews.indexPatterns ), activeData, - dateRange, dataViews, + ...context, }; } ); - -export const selectFrameDatasourceAPI = createSelector( - [selectFramePublicAPI, selectExecutionContext], - (framePublicAPI, context) => ({ ...context, ...framePublicAPI }) -); diff --git a/x-pack/plugins/lens/public/state_management/types.ts b/x-pack/plugins/lens/public/state_management/types.ts index c2d0e1ef2e386..85e7dae2f92ce 100644 --- a/x-pack/plugins/lens/public/state_management/types.ts +++ b/x-pack/plugins/lens/public/state_management/types.ts @@ -34,7 +34,12 @@ export interface DataViewsState { indexPatterns: Record; } -export type DatasourceStates = Record; +export interface DatasourceState { + isLoading: boolean; + state: unknown; +} + +export type DatasourceStates = Record; export interface PreviewState { visualization: VisualizationState; datasourceStates: DatasourceStates; diff --git a/x-pack/plugins/lens/public/types.ts b/x-pack/plugins/lens/public/types.ts index 70ee578c47cc2..6ac2b98569d7f 100644 --- a/x-pack/plugins/lens/public/types.ts +++ b/x-pack/plugins/lens/public/types.ts @@ -460,7 +460,7 @@ export interface Datasource { getUserMessages: ( state: T, deps: { - frame: FrameDatasourceAPI; + frame: FramePublicAPI; setState: StateSetter; visualizationInfo?: VisualizationInfo; } @@ -513,7 +513,7 @@ export interface Datasource { export interface DatasourceFixAction { label: string; - newState: (frame: FrameDatasourceAPI) => Promise; + newState: (frame: FramePublicAPI) => Promise; } /** @@ -925,6 +925,8 @@ export interface VisualizationSuggestion { export type DatasourceLayers = Partial>; export interface FramePublicAPI { + query: Query; + filters: Filter[]; datasourceLayers: DatasourceLayers; dateRange: DateRange; /** @@ -936,11 +938,6 @@ export interface FramePublicAPI { dataViews: DataViewsState; } -export interface FrameDatasourceAPI extends FramePublicAPI { - query: Query; - filters: Filter[]; -} - /** * A visualization type advertised to the user in the chart switcher */ diff --git a/x-pack/plugins/lens/public/visualizations/xy/__snapshots__/to_expression.test.ts.snap b/x-pack/plugins/lens/public/visualizations/xy/__snapshots__/to_expression.test.ts.snap index 0cb3d014853fe..7dfe39667fd22 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/__snapshots__/to_expression.test.ts.snap +++ b/x-pack/plugins/lens/public/visualizations/xy/__snapshots__/to_expression.test.ts.snap @@ -27,6 +27,11 @@ Object { "layers": Array [ Object { "chain": Array [ + Object { + "arguments": Object {}, + "function": "datasource_expression", + "type": "function", + }, Object { "arguments": Object { "accessors": Array [ diff --git a/x-pack/plugins/lens/public/visualizations/xy/to_expression.test.ts b/x-pack/plugins/lens/public/visualizations/xy/to_expression.test.ts index 9cdf33c134c8c..2e63f26413c5e 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/to_expression.test.ts +++ b/x-pack/plugins/lens/public/visualizations/xy/to_expression.test.ts @@ -265,7 +265,7 @@ describe('#toExpression', () => { expect(mockDatasource.publicAPIMock.getOperationForColumnId).toHaveBeenCalledWith('c'); expect(mockDatasource.publicAPIMock.getOperationForColumnId).toHaveBeenCalledWith('d'); expect( - (expression.chain[0].arguments.layers[0] as Ast).chain[0].arguments.columnToLabel + (expression.chain[0].arguments.layers[0] as Ast).chain[1].arguments.columnToLabel ).toEqual([ JSON.stringify({ b: 'col_b', @@ -536,13 +536,18 @@ describe('#toExpression', () => { datasourceExpressionsByLayers ) as Ast; - function getYConfigColorForLayer(ast: Ast, index: number) { + function getYConfigColorForDataLayer(ast: Ast, index: number) { + return ( + (ast.chain[0].arguments.layers[index] as Ast).chain[1].arguments.decorations[0] as Ast + ).chain[0].arguments?.color; + } + function getYConfigColorForReferenceLayer(ast: Ast, index: number) { return ( (ast.chain[0].arguments.layers[index] as Ast).chain[0].arguments.decorations[0] as Ast - ).chain[0].arguments.color; + ).chain[0].arguments?.color; } - expect(getYConfigColorForLayer(expression, 0)).toBeUndefined(); - expect(getYConfigColorForLayer(expression, 1)).toEqual([defaultReferenceLineColor]); + expect(getYConfigColorForDataLayer(expression, 0)).toBeUndefined(); + expect(getYConfigColorForReferenceLayer(expression, 1)).toEqual([defaultReferenceLineColor]); }); it('should ignore annotation layers with no event configured', () => { diff --git a/x-pack/plugins/lists/public/exceptions/components/builder/entry_renderer.test.tsx b/x-pack/plugins/lists/public/exceptions/components/builder/entry_renderer.test.tsx index b73379acd1518..7edcf5b53f724 100644 --- a/x-pack/plugins/lists/public/exceptions/components/builder/entry_renderer.test.tsx +++ b/x-pack/plugins/lists/public/exceptions/components/builder/entry_renderer.test.tsx @@ -25,7 +25,7 @@ import { useFindListsBySize } from '@kbn/securitysolution-list-hooks'; import type { FieldSpec } from '@kbn/data-plugin/common'; import { fields, getField } from '@kbn/data-plugin/common/mocks'; import { unifiedSearchPluginMock } from '@kbn/unified-search-plugin/public/mocks'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { ReactWrapper, mount } from 'enzyme'; import { getFoundListsBySizeSchemaMock } from '../../../../common/schemas/response/found_lists_by_size_schema.mock'; diff --git a/x-pack/plugins/lists/server/routes/utils/build_siem_response.ts b/x-pack/plugins/lists/server/routes/utils/build_siem_response.ts index 4a5ed5cc4b0e0..d61a02a869d28 100644 --- a/x-pack/plugins/lists/server/routes/utils/build_siem_response.ts +++ b/x-pack/plugins/lists/server/routes/utils/build_siem_response.ts @@ -49,7 +49,7 @@ export class SiemResponseFactory { constructor(private response: KibanaResponseFactory) {} // eslint-disable-next-line @typescript-eslint/explicit-function-return-type - error({ statusCode, body, headers }: CustomHttpResponseOptions) { + error({ statusCode, body, headers, bypassErrorFormat }: CustomHttpResponseOptions) { // KibanaResponse is not exported so we cannot use a return type here and that is why the linter is turned off above const contentType: CustomHttpResponseOptions['headers'] = { 'content-type': 'application/json', @@ -59,10 +59,14 @@ export class SiemResponseFactory { ...(headers ?? {}), }; + const formattedBody = bypassErrorFormat + ? body + : { message: body ?? statusToErrorMessage(statusCode) }; + return this.response.custom({ body: Buffer.from( JSON.stringify({ - message: body ?? statusToErrorMessage(statusCode), + ...formattedBody, status_code: statusCode, }) ), diff --git a/x-pack/plugins/log_explorer/kibana.jsonc b/x-pack/plugins/log_explorer/kibana.jsonc index 76eb47e4a5915..71781ca9cada3 100644 --- a/x-pack/plugins/log_explorer/kibana.jsonc +++ b/x-pack/plugins/log_explorer/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/log-explorer-plugin", - "owner": "@elastic/infra-monitoring-ui", + "owner": "@elastic/obs-ux-logs-team", "description": "This plugin provides a LogExplorer component using the Discover customization framework, offering several affordances specifically designed for log consumption.", "plugin": { "id": "logExplorer", diff --git a/x-pack/plugins/log_explorer/public/components/log_explorer/log_explorer.tsx b/x-pack/plugins/log_explorer/public/components/log_explorer/log_explorer.tsx index 0612713085224..57736dd4b96dd 100644 --- a/x-pack/plugins/log_explorer/public/components/log_explorer/log_explorer.tsx +++ b/x-pack/plugins/log_explorer/public/components/log_explorer/log_explorer.tsx @@ -17,6 +17,7 @@ import { createLogExplorerProfileCustomizations } from '../../customizations/log import { createPropertyGetProxy } from '../../utils/proxies'; import { LogExplorerProfileContext } from '../../state_machines/log_explorer_profile'; import { LogExplorerStartDeps } from '../../types'; +import { LogExplorerCustomizations } from './types'; export interface CreateLogExplorerArgs { core: CoreStart; @@ -29,6 +30,7 @@ export interface LogExplorerStateContainer { } export interface LogExplorerProps { + customizations?: LogExplorerCustomizations; scopedHistory: ScopedHistory; state$?: BehaviorSubject; } @@ -44,10 +46,10 @@ export const createLogExplorer = ({ core, plugins }: CreateLogExplorerArgs) => { uiSettings: createUiSettingsServiceProxy(core.uiSettings), }; - return ({ scopedHistory, state$ }: LogExplorerProps) => { + return ({ customizations = {}, scopedHistory, state$ }: LogExplorerProps) => { const logExplorerCustomizations = useMemo( - () => [createLogExplorerProfileCustomizations({ core, plugins, state$ })], - [state$] + () => [createLogExplorerProfileCustomizations({ core, customizations, plugins, state$ })], + [customizations, state$] ); return ( diff --git a/x-pack/plugins/log_explorer/public/components/log_explorer/types.ts b/x-pack/plugins/log_explorer/public/components/log_explorer/types.ts new file mode 100644 index 0000000000000..2b366cce7c55c --- /dev/null +++ b/x-pack/plugins/log_explorer/public/components/log_explorer/types.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 { DataTableRecord } from '@kbn/discover-utils/types'; + +export type RenderPreviousContent = () => React.ReactNode; + +export interface LogExplorerFlyoutContentProps { + doc: DataTableRecord; +} + +export type FlyoutRenderContent = ( + renderPreviousContent: RenderPreviousContent, + props: LogExplorerFlyoutContentProps +) => React.ReactNode; + +export interface LogExplorerCustomizations { + flyout?: { + renderContent?: FlyoutRenderContent; + }; +} diff --git a/x-pack/plugins/log_explorer/public/customizations/custom_flyout_content.tsx b/x-pack/plugins/log_explorer/public/customizations/custom_flyout_content.tsx index a4b473119744a..e7a5b7ed35915 100644 --- a/x-pack/plugins/log_explorer/public/customizations/custom_flyout_content.tsx +++ b/x-pack/plugins/log_explorer/public/customizations/custom_flyout_content.tsx @@ -5,10 +5,11 @@ * 2.0. */ -import React from 'react'; +import React, { useCallback } from 'react'; import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import { FlyoutDetail } from '../components/flyout_detail/flyout_detail'; import { FlyoutProps } from '../components/flyout_detail'; +import { useLogExplorerCustomizationsContext } from '../hooks/use_log_explorer_customizations'; export const CustomFlyoutContent = ({ actions, @@ -16,12 +17,28 @@ export const CustomFlyoutContent = ({ doc, renderDefaultContent, }: FlyoutProps) => { + const { flyout } = useLogExplorerCustomizationsContext(); + + const renderPreviousContent = useCallback( + () => ( + <> + {/* Apply custom Log Explorer detail */} + + + + + ), + [actions, dataView, doc] + ); + + const content = flyout?.renderContent + ? flyout?.renderContent(renderPreviousContent, { doc }) + : renderPreviousContent(); + return ( {/* Apply custom Log Explorer detail */} - - - + {content} {/* Restore default content */} {renderDefaultContent()} diff --git a/x-pack/plugins/log_explorer/public/customizations/log_explorer_profile.tsx b/x-pack/plugins/log_explorer/public/customizations/log_explorer_profile.tsx index 85d1284752977..628ff40babc22 100644 --- a/x-pack/plugins/log_explorer/public/customizations/log_explorer_profile.tsx +++ b/x-pack/plugins/log_explorer/public/customizations/log_explorer_profile.tsx @@ -14,6 +14,8 @@ import { LogExplorerProfileStateService } from '../state_machines/log_explorer_p import { LogExplorerStateContainer } from '../components/log_explorer'; import { LogExplorerStartDeps } from '../types'; import { useKibanaContextForPluginProvider } from '../utils/use_kibana'; +import { LogExplorerCustomizations } from '../components/log_explorer/types'; +import { LogExplorerCustomizationsProvider } from '../hooks/use_log_explorer_customizations'; const LazyCustomDatasetFilters = dynamic(() => import('./custom_dataset_filters')); const LazyCustomDatasetSelector = dynamic(() => import('./custom_dataset_selector')); @@ -21,12 +23,18 @@ const LazyCustomFlyoutContent = dynamic(() => import('./custom_flyout_content')) export interface CreateLogExplorerProfileCustomizationsDeps { core: CoreStart; + customizations: LogExplorerCustomizations; plugins: LogExplorerStartDeps; state$?: BehaviorSubject; } export const createLogExplorerProfileCustomizations = - ({ core, plugins, state$ }: CreateLogExplorerProfileCustomizationsDeps): CustomizationCallback => + ({ + core, + customizations: logExplorerCustomizations, + plugins, + state$, + }: CreateLogExplorerProfileCustomizationsDeps): CustomizationCallback => async ({ customizations, stateContainer }) => { const { data, dataViews, discover } = plugins; // Lazy load dependencies @@ -127,7 +135,9 @@ export const createLogExplorerProfileCustomizations = return ( - + + + ); }, diff --git a/x-pack/plugins/log_explorer/public/hooks/use_log_explorer_customizations.ts b/x-pack/plugins/log_explorer/public/hooks/use_log_explorer_customizations.ts new file mode 100644 index 0000000000000..0557e17761cb4 --- /dev/null +++ b/x-pack/plugins/log_explorer/public/hooks/use_log_explorer_customizations.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 createContainer from 'constate'; +import { LogExplorerCustomizations } from '../components/log_explorer/types'; + +interface UseLogExplorerCustomizationsDeps { + value: LogExplorerCustomizations; +} + +const useLogExplorerCustomizations = ({ value }: UseLogExplorerCustomizationsDeps) => value; + +export const [LogExplorerCustomizationsProvider, useLogExplorerCustomizationsContext] = + createContainer(useLogExplorerCustomizations); diff --git a/x-pack/plugins/log_explorer/public/index.ts b/x-pack/plugins/log_explorer/public/index.ts index 00750926517e6..1ca7f37aa4c9b 100644 --- a/x-pack/plugins/log_explorer/public/index.ts +++ b/x-pack/plugins/log_explorer/public/index.ts @@ -10,6 +10,10 @@ import type { LogExplorerConfig } from '../common/plugin_config'; import { LogExplorerPlugin } from './plugin'; export type { LogExplorerPluginSetup, LogExplorerPluginStart } from './types'; export type { LogExplorerStateContainer } from './components/log_explorer'; +export type { + LogExplorerCustomizations, + LogExplorerFlyoutContentProps, +} from './components/log_explorer/types'; export function plugin(context: PluginInitializerContext) { return new LogExplorerPlugin(context); diff --git a/x-pack/plugins/logs_shared/kibana.jsonc b/x-pack/plugins/logs_shared/kibana.jsonc index 051d1a452740e..b78503b140a71 100644 --- a/x-pack/plugins/logs_shared/kibana.jsonc +++ b/x-pack/plugins/logs_shared/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/logs-shared-plugin", - "owner": "@elastic/infra-monitoring-ui", + "owner": "@elastic/obs-ux-logs-team", "description": "Exposes the shared components and APIs to access and visualize logs.", "plugin": { "id": "logsShared", diff --git a/x-pack/plugins/logs_shared/public/components/log_ai_assistant/index.tsx b/x-pack/plugins/logs_shared/public/components/log_ai_assistant/index.tsx index a4df6c50cbafd..8cf9b2da45c06 100644 --- a/x-pack/plugins/logs_shared/public/components/log_ai_assistant/index.tsx +++ b/x-pack/plugins/logs_shared/public/components/log_ai_assistant/index.tsx @@ -4,22 +4,25 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import React from 'react'; +import React, { ComponentType } from 'react'; import { Optional } from '@kbn/utility-types'; import { dynamic } from '../../../common/dynamic'; -import type { LogAIAssistantProps } from './log_ai_assistant'; +import type { LogAIAssistantDeps } from './log_ai_assistant'; export const LogAIAssistant = dynamic(() => import('./log_ai_assistant')); interface LogAIAssistantFactoryDeps { - observabilityAIAssistant: LogAIAssistantProps['aiAssistant']; + observabilityAIAssistant: LogAIAssistantDeps['observabilityAIAssistant']; } -export function createLogAIAssistant({ observabilityAIAssistant }: LogAIAssistantFactoryDeps) { - return ({ - aiAssistant = observabilityAIAssistant, - ...props - }: Optional) => ( - +export type LogAIAssistantComponent = ComponentType< + Optional +>; + +export function createLogAIAssistant({ + observabilityAIAssistant: aiAssistant, +}: LogAIAssistantFactoryDeps): LogAIAssistantComponent { + return ({ observabilityAIAssistant = aiAssistant, ...props }) => ( + ); } diff --git a/x-pack/plugins/logs_shared/public/components/log_ai_assistant/log_ai_assistant.mock.tsx b/x-pack/plugins/logs_shared/public/components/log_ai_assistant/log_ai_assistant.mock.tsx new file mode 100644 index 0000000000000..9ece10dff8188 --- /dev/null +++ b/x-pack/plugins/logs_shared/public/components/log_ai_assistant/log_ai_assistant.mock.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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; + +export const createLogAIAssistantMock = () => jest.fn().mockReturnValue(
    ); diff --git a/x-pack/plugins/logs_shared/public/components/log_ai_assistant/log_ai_assistant.tsx b/x-pack/plugins/logs_shared/public/components/log_ai_assistant/log_ai_assistant.tsx index bce36a6d28dc6..335a02ab3a05e 100644 --- a/x-pack/plugins/logs_shared/public/components/log_ai_assistant/log_ai_assistant.tsx +++ b/x-pack/plugins/logs_shared/public/components/log_ai_assistant/log_ai_assistant.tsx @@ -12,6 +12,8 @@ import { type Message, ObservabilityAIAssistantPluginStart, MessageRole, + ObservabilityAIAssistantProvider, + useObservabilityAIAssistant, } from '@kbn/observability-ai-assistant-plugin/public'; import { LogEntryField } from '../../../common'; import { explainLogMessageTitle, similarLogMessagesTitle } from './translations'; @@ -21,11 +23,16 @@ export interface LogAIAssistantDocument { } export interface LogAIAssistantProps { - aiAssistant: ObservabilityAIAssistantPluginStart; doc: LogAIAssistantDocument | undefined; } -export function LogAIAssistant({ aiAssistant, doc }: LogAIAssistantProps) { +export interface LogAIAssistantDeps extends LogAIAssistantProps { + observabilityAIAssistant: ObservabilityAIAssistantPluginStart; +} + +export const LogAIAssistant = withProviders(({ doc }: LogAIAssistantProps) => { + const aiAssistant = useObservabilityAIAssistant(); + const explainLogMessageMessages = useMemo(() => { if (!doc) { return undefined; @@ -80,7 +87,20 @@ export function LogAIAssistant({ aiAssistant, doc }: LogAIAssistantProps) { ) : null} ); -} +}); // eslint-disable-next-line import/no-default-export export default LogAIAssistant; + +function withProviders(Component: React.FunctionComponent) { + return function ComponentWithProviders({ + observabilityAIAssistant, + ...props + }: LogAIAssistantDeps) { + return ( + + + + ); + }; +} diff --git a/x-pack/plugins/logs_shared/public/components/logging/log_entry_flyout/log_entry_flyout.tsx b/x-pack/plugins/logs_shared/public/components/logging/log_entry_flyout/log_entry_flyout.tsx index 62634f2aeba13..b66e864c2a499 100644 --- a/x-pack/plugins/logs_shared/public/components/logging/log_entry_flyout/log_entry_flyout.tsx +++ b/x-pack/plugins/logs_shared/public/components/logging/log_entry_flyout/log_entry_flyout.tsx @@ -184,7 +184,7 @@ export const LogEntryFlyout = ({ > - + diff --git a/x-pack/plugins/logs_shared/public/index.ts b/x-pack/plugins/logs_shared/public/index.ts index 873d202b1af7d..58f22fe48bccb 100644 --- a/x-pack/plugins/logs_shared/public/index.ts +++ b/x-pack/plugins/logs_shared/public/index.ts @@ -37,6 +37,7 @@ export { useLogSummary, WithSummary } from './containers/logs/log_summary'; export { useLogEntryFlyout } from './components/logging/log_entry_flyout'; // Shared components +export type { LogAIAssistantDocument } from './components/log_ai_assistant/log_ai_assistant'; export type { LogEntryStreamItem, LogEntryColumnWidths, diff --git a/x-pack/plugins/logs_shared/public/mocks.tsx b/x-pack/plugins/logs_shared/public/mocks.tsx index 963480d8fd90f..a9b0ebd6a6aa3 100644 --- a/x-pack/plugins/logs_shared/public/mocks.tsx +++ b/x-pack/plugins/logs_shared/public/mocks.tsx @@ -5,11 +5,13 @@ * 2.0. */ +import { createLogAIAssistantMock } from './components/log_ai_assistant/log_ai_assistant.mock'; import { createLogViewsServiceStartMock } from './services/log_views/log_views_service.mock'; import { LogsSharedClientStartExports } from './types'; export const createLogsSharedPluginStartMock = (): jest.Mocked => ({ logViews: createLogViewsServiceStartMock(), + LogAIAssistant: createLogAIAssistantMock(), }); export const _ensureTypeCompatibility = (): LogsSharedClientStartExports => diff --git a/x-pack/plugins/logs_shared/public/types.ts b/x-pack/plugins/logs_shared/public/types.ts index e67f83e4becc0..c0379c6fc21fb 100644 --- a/x-pack/plugins/logs_shared/public/types.ts +++ b/x-pack/plugins/logs_shared/public/types.ts @@ -17,6 +17,7 @@ import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; import type { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; import { ObservabilityAIAssistantPluginStart } from '@kbn/observability-ai-assistant-plugin/public'; import { UiActionsStart } from '@kbn/ui-actions-plugin/public'; +import { LogAIAssistantComponent } from './components/log_ai_assistant'; // import type { OsqueryPluginStart } from '../../osquery/public'; import { LogViewsServiceSetup, LogViewsServiceStart } from './services/log_views'; @@ -27,6 +28,7 @@ export interface LogsSharedClientSetupExports { export interface LogsSharedClientStartExports { logViews: LogViewsServiceStart; + LogAIAssistant: LogAIAssistantComponent; } // eslint-disable-next-line @typescript-eslint/no-empty-interface diff --git a/x-pack/plugins/metrics_data_access/kibana.jsonc b/x-pack/plugins/metrics_data_access/kibana.jsonc index 6842ec7d4a724..10ddf6c04e21e 100644 --- a/x-pack/plugins/metrics_data_access/kibana.jsonc +++ b/x-pack/plugins/metrics_data_access/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/metrics-data-access-plugin", - "owner": "@elastic/infra-monitoring-ui", + "owner": "@elastic/obs-knowledge-team", "description": "Exposes utilities for accessing metrics data", "plugin": { "id": "metricsDataAccess", diff --git a/x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/utils.ts b/x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/utils.ts index e060017bc7fa0..88e66aab91933 100644 --- a/x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/utils.ts +++ b/x-pack/plugins/ml/public/application/jobs/new_job/job_from_lens/utils.ts @@ -186,6 +186,8 @@ export async function getVisTypeFactory(lens: LensPublicStart) { export async function isCompatibleVisualizationType(chartInfo: ChartInfo) { return ( chartInfo.visualizationType === COMPATIBLE_VISUALIZATION && + // @ts-expect-error esql is missing in the type + chartInfo.query.esql === undefined && chartInfo.layers.some((l) => l.layerType === layerTypes.DATA && l.dataView !== undefined) ); } diff --git a/x-pack/plugins/ml/server/lib/capabilities/capabilities_switcher.ts b/x-pack/plugins/ml/server/lib/capabilities/capabilities_switcher.ts index ba08ab5066701..e55f2dfc46d83 100644 --- a/x-pack/plugins/ml/server/lib/capabilities/capabilities_switcher.ts +++ b/x-pack/plugins/ml/server/lib/capabilities/capabilities_switcher.ts @@ -23,7 +23,9 @@ export const setupCapabilitiesSwitcher = ( enabledFeatures: MlFeatures, logger: Logger ) => { - coreSetup.capabilities.registerSwitcher(getSwitcher(license$, logger, enabledFeatures)); + coreSetup.capabilities.registerSwitcher(getSwitcher(license$, logger, enabledFeatures), { + capabilityPath: 'ml.*', + }); }; function getSwitcher( diff --git a/x-pack/plugins/ml/server/plugin.ts b/x-pack/plugins/ml/server/plugin.ts index d148fc8f148d9..c268cd3383211 100644 --- a/x-pack/plugins/ml/server/plugin.ts +++ b/x-pack/plugins/ml/server/plugin.ts @@ -195,7 +195,9 @@ export class MlServerPlugin if (this.capabilities === null) { return null; } - const capabilities = await this.capabilities.resolveCapabilities(request); + const capabilities = await this.capabilities.resolveCapabilities(request, { + capabilityPath: 'ml.*', + }); return capabilities.ml as MlCapabilities; }; diff --git a/x-pack/plugins/monitoring/kibana.jsonc b/x-pack/plugins/monitoring/kibana.jsonc index 8da632c4b7d6f..4992da373a73d 100644 --- a/x-pack/plugins/monitoring/kibana.jsonc +++ b/x-pack/plugins/monitoring/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/monitoring-plugin", - "owner": "@elastic/infra-monitoring-ui", + "owner": "@elastic/obs-ux-infra_services-team", "plugin": { "id": "monitoring", "server": true, diff --git a/x-pack/plugins/monitoring_collection/kibana.jsonc b/x-pack/plugins/monitoring_collection/kibana.jsonc index 1c84d9ee4f84c..246dcce086a07 100644 --- a/x-pack/plugins/monitoring_collection/kibana.jsonc +++ b/x-pack/plugins/monitoring_collection/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/monitoring-collection-plugin", - "owner": "@elastic/infra-monitoring-ui", + "owner": "@elastic/obs-ux-infra_services-team", "plugin": { "id": "monitoringCollection", "server": true, diff --git a/x-pack/plugins/observability/kibana.jsonc b/x-pack/plugins/observability/kibana.jsonc index 86db25972fb1b..c03e0b499d424 100644 --- a/x-pack/plugins/observability/kibana.jsonc +++ b/x-pack/plugins/observability/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/observability-plugin", - "owner": "@elastic/actionable-observability", + "owner": "@elastic/obs-ux-management-team", "plugin": { "id": "observability", "server": true, diff --git a/x-pack/plugins/observability/public/components/custom_threshold/components/custom_equation/custom_equation_editor.tsx b/x-pack/plugins/observability/public/components/custom_threshold/components/custom_equation/custom_equation_editor.tsx index c835f636eaa2d..d0871dbfb75b2 100644 --- a/x-pack/plugins/observability/public/components/custom_threshold/components/custom_equation/custom_equation_editor.tsx +++ b/x-pack/plugins/observability/public/components/custom_threshold/components/custom_equation/custom_equation_editor.tsx @@ -167,7 +167,6 @@ export function CustomEquationEditor({ { defaultMessage: 'Equation and threshold' } )} error={[errors.equation]} - isInvalid={errors.equation != null} > <> @@ -182,6 +181,7 @@ export function CustomEquationEditor({ onClick={() => { setCustomEqPopoverOpen(true); }} + isInvalid={errors.equation != null} /> diff --git a/x-pack/plugins/observability/public/components/custom_threshold/components/custom_equation/metric_row_with_agg.tsx b/x-pack/plugins/observability/public/components/custom_threshold/components/custom_equation/metric_row_with_agg.tsx index 80a379134806c..891c0ceaabbb5 100644 --- a/x-pack/plugins/observability/public/components/custom_threshold/components/custom_equation/metric_row_with_agg.tsx +++ b/x-pack/plugins/observability/public/components/custom_threshold/components/custom_equation/metric_row_with_agg.tsx @@ -38,6 +38,11 @@ interface MetricRowWithAggProps extends MetricRowBaseProps { fields: NormalizedFields; } +const DEFAULT_COUNT_FILTER_TITLE = i18n.translate( + 'xpack.observability.customThreshold.rule.alertFlyout.customEquationEditor.defaultCountFilterTitle', + { defaultMessage: 'all documents' } +); + export function MetricRowWithAgg({ name, aggType = Aggregators.COUNT, @@ -121,17 +126,19 @@ export function MetricRowWithAgg({ 'xpack.observability.customThreshold.rule.alertFlyout.customEquationEditor.aggregationLabel', { defaultMessage: 'Aggregation {name}', values: { name } } )} - isInvalid={aggType !== Aggregators.COUNT && !field} > { setAggTypePopoverOpen(true); }} + isInvalid={aggType !== Aggregators.COUNT && !field} /> } @@ -160,7 +167,6 @@ export function MetricRowWithAgg({ 'xpack.observability.customThreshold.rule.alertFlyout.customEquationEditor.aggregationType', { defaultMessage: 'Aggregation type' } )} - isInvalid={isAggInvalid} > @@ -201,7 +208,6 @@ export function MetricRowWithAgg({ 'xpack.observability.customThreshold.rule.alertFlyout.customEquationEditor.fieldLabel', { defaultMessage: 'Field name' } )} - isInvalid={isFieldInvalid} > +{ public readonly type = SLO_EMBEDDABLE; constructor( @@ -42,6 +45,15 @@ export class SloOverviewEmbeddableFactoryDefinition implements EmbeddableFactory } } + public getPanelPlacementSettings: IProvidesPanelPlacementSettings< + SloEmbeddableInput, + unknown + >['getPanelPlacementSettings'] = () => { + const width = 8; + const height = 7; + return { width, height, strategy: 'placeAtTop' }; + }; + public async create(initialInput: SloEmbeddableInput, parent?: IContainer) { try { const [{ uiSettings, application, http, i18n: i18nService }] = await this.getStartServices(); diff --git a/x-pack/plugins/observability/public/hooks/slo/use_fetch_active_alerts.ts b/x-pack/plugins/observability/public/hooks/slo/use_fetch_active_alerts.ts index 31cf30ca03a1d..2d234b57ab8ed 100644 --- a/x-pack/plugins/observability/public/hooks/slo/use_fetch_active_alerts.ts +++ b/x-pack/plugins/observability/public/hooks/slo/use_fetch_active_alerts.ts @@ -49,6 +49,7 @@ type SloIdAndInstanceId = [string, string]; interface Params { sloIdsAndInstanceIds: SloIdAndInstanceId[]; + shouldRefetch?: boolean; } export interface UseFetchActiveAlerts { @@ -70,9 +71,13 @@ interface FindApiResponse { }; } +const LONG_REFETCH_INTERVAL = 1000 * 60; // 1 minute const EMPTY_ACTIVE_ALERTS_MAP = new ActiveAlerts(); -export function useFetchActiveAlerts({ sloIdsAndInstanceIds = [] }: Params): UseFetchActiveAlerts { +export function useFetchActiveAlerts({ + sloIdsAndInstanceIds = [], + shouldRefetch = false, +}: Params): UseFetchActiveAlerts { const { http } = useKibana().services; const { isInitialLoading, isLoading, isError, isSuccess, isRefetching, data } = useQuery({ @@ -136,6 +141,7 @@ export function useFetchActiveAlerts({ sloIdsAndInstanceIds = [] }: Params): Use } }, refetchOnWindowFocus: false, + refetchInterval: shouldRefetch ? LONG_REFETCH_INTERVAL : undefined, enabled: Boolean(sloIdsAndInstanceIds.length), }); diff --git a/x-pack/plugins/observability/public/pages/slo_details/components/slo_details.tsx b/x-pack/plugins/observability/public/pages/slo_details/components/slo_details.tsx index d70a4cbbfcbe3..e05c9c7403dd6 100644 --- a/x-pack/plugins/observability/public/pages/slo_details/components/slo_details.tsx +++ b/x-pack/plugins/observability/public/pages/slo_details/components/slo_details.tsx @@ -42,6 +42,7 @@ export function SloDetails({ slo, isAutoRefreshing }: Props) { const { search } = useLocation(); const { data: activeAlerts } = useFetchActiveAlerts({ sloIdsAndInstanceIds: [[slo.id, slo.instanceId ?? ALL_VALUE]], + shouldRefetch: isAutoRefreshing, }); const { isLoading: historicalSummaryLoading, data: historicalSummaries = [] } = useFetchHistoricalSummary({ diff --git a/x-pack/plugins/observability/public/pages/slo_edit/slo_edit.test.tsx b/x-pack/plugins/observability/public/pages/slo_edit/slo_edit.test.tsx index 21972da276691..8d4d45a08d709 100644 --- a/x-pack/plugins/observability/public/pages/slo_edit/slo_edit.test.tsx +++ b/x-pack/plugins/observability/public/pages/slo_edit/slo_edit.test.tsx @@ -5,8 +5,7 @@ * 2.0. */ -import { fireEvent, waitFor } from '@testing-library/dom'; -import { cleanup } from '@testing-library/react'; +import { fireEvent, waitFor, cleanup } from '@testing-library/react'; import { createBrowserHistory } from 'history'; import React from 'react'; import Router from 'react-router-dom'; diff --git a/x-pack/plugins/observability/server/plugin.ts b/x-pack/plugins/observability/server/plugin.ts index 4e2c7a57ead13..17476d335f48f 100644 --- a/x-pack/plugins/observability/server/plugin.ts +++ b/x-pack/plugins/observability/server/plugin.ts @@ -29,6 +29,7 @@ import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server'; import { ApmRuleType, ES_QUERY_ID, + METRIC_INVENTORY_THRESHOLD_ALERT_TYPE_ID, OBSERVABILITY_THRESHOLD_RULE_TYPE_ID, } from '@kbn/rule-data-utils'; import { ObservabilityConfig } from '.'; @@ -81,6 +82,7 @@ const o11yRuleTypes = [ SLO_BURN_RATE_RULE_TYPE_ID, OBSERVABILITY_THRESHOLD_RULE_TYPE_ID, ES_QUERY_ID, + METRIC_INVENTORY_THRESHOLD_ALERT_TYPE_ID, ...Object.values(ApmRuleType), ]; diff --git a/x-pack/plugins/observability/tsconfig.json b/x-pack/plugins/observability/tsconfig.json index d0d4114fe4612..4e2f8ef70482c 100644 --- a/x-pack/plugins/observability/tsconfig.json +++ b/x-pack/plugins/observability/tsconfig.json @@ -93,7 +93,8 @@ "@kbn/react-kibana-context-theme", "@kbn/shared-ux-link-redirect-app", "@kbn/core-chrome-browser", - "@kbn/serverless" + "@kbn/serverless", + "@kbn/dashboard-plugin" ], "exclude": [ "target/**/*" diff --git a/x-pack/plugins/observability_ai_assistant/kibana.jsonc b/x-pack/plugins/observability_ai_assistant/kibana.jsonc index 3af934a10fcfa..291c7e658de18 100644 --- a/x-pack/plugins/observability_ai_assistant/kibana.jsonc +++ b/x-pack/plugins/observability_ai_assistant/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/observability-ai-assistant-plugin", - "owner": "@elastic/obs-ai-assistant", + "owner": "@elastic/obs-knowledge-team", "plugin": { "id": "observabilityAIAssistant", "server": true, diff --git a/x-pack/plugins/observability_log_explorer/kibana.jsonc b/x-pack/plugins/observability_log_explorer/kibana.jsonc index 7ac940de86dd4..72d03b82d3386 100644 --- a/x-pack/plugins/observability_log_explorer/kibana.jsonc +++ b/x-pack/plugins/observability_log_explorer/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/observability-log-explorer-plugin", - "owner": "@elastic/infra-monitoring-ui", + "owner": "@elastic/obs-ux-logs-team", "description": "This plugin exposes and registers observability log consumption features.", "plugin": { "id": "observabilityLogExplorer", @@ -15,6 +15,7 @@ "data", "discover", "logExplorer", + "logsShared", "observabilityShared", "share", "kibanaUtils", diff --git a/x-pack/plugins/observability_log_explorer/public/log_explorer_customizations/flyout_content.tsx b/x-pack/plugins/observability_log_explorer/public/log_explorer_customizations/flyout_content.tsx new file mode 100644 index 0000000000000..53d34a71a7237 --- /dev/null +++ b/x-pack/plugins/observability_log_explorer/public/log_explorer_customizations/flyout_content.tsx @@ -0,0 +1,51 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { EuiFlexItem } from '@elastic/eui'; +import { + LogExplorerCustomizations, + LogExplorerFlyoutContentProps, +} from '@kbn/log-explorer-plugin/public'; +import type { LogAIAssistantDocument } from '@kbn/logs-shared-plugin/public'; +import React, { useMemo } from 'react'; +import { useKibanaContextForPlugin } from '../utils/use_kibana'; + +const ObservabilityLogAIAssistant = ({ doc }: LogExplorerFlyoutContentProps) => { + const { services } = useKibanaContextForPlugin(); + const { LogAIAssistant } = services.logsShared; + + const mappedDoc = useMemo(() => mapDocToAIAssistantFormat(doc), [doc]); + + return ; +}; + +export const renderFlyoutContent: Required['flyout']['renderContent'] = ( + renderPreviousContent, + props +) => { + return ( + <> + {renderPreviousContent()} + + + + + ); +}; + +/** + * Utils + */ +const mapDocToAIAssistantFormat = (doc: LogExplorerFlyoutContentProps['doc']) => { + if (!doc) return; + + return { + fields: Object.entries(doc.flattened).map(([field, value]) => ({ + field, + value, + })) as LogAIAssistantDocument['fields'], + }; +}; diff --git a/x-pack/plugins/observability_log_explorer/public/log_explorer_customizations/index.ts b/x-pack/plugins/observability_log_explorer/public/log_explorer_customizations/index.ts new file mode 100644 index 0000000000000..a86b47e92cf01 --- /dev/null +++ b/x-pack/plugins/observability_log_explorer/public/log_explorer_customizations/index.ts @@ -0,0 +1,15 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { LogExplorerCustomizations } from '@kbn/log-explorer-plugin/public'; +import { renderFlyoutContent } from './flyout_content'; + +export const createLogExplorerCustomizations = (): LogExplorerCustomizations => ({ + flyout: { + renderContent: renderFlyoutContent, + }, +}); diff --git a/x-pack/plugins/observability_log_explorer/public/routes/main/main_route.tsx b/x-pack/plugins/observability_log_explorer/public/routes/main/main_route.tsx index aece8474f0390..e17f92a46c23b 100644 --- a/x-pack/plugins/observability_log_explorer/public/routes/main/main_route.tsx +++ b/x-pack/plugins/observability_log_explorer/public/routes/main/main_route.tsx @@ -6,7 +6,7 @@ */ import { CoreStart } from '@kbn/core/public'; -import React, { useState } from 'react'; +import React, { useMemo, useState } from 'react'; import { BehaviorSubject } from 'rxjs'; import { LogExplorerTopNavMenu } from '../../components/log_explorer_top_nav_menu'; import { ObservabilityLogExplorerPageTemplate } from '../../components/page_template'; @@ -14,6 +14,7 @@ import { noBreadcrumbs, useBreadcrumbs } from '../../utils/breadcrumbs'; import { useKibanaContextForPlugin } from '../../utils/use_kibana'; import { ObservabilityLogExplorerAppMountParameters } from '../../types'; import { LazyOriginInterpreter } from '../../state_machines/origin_interpreter/src/lazy_component'; +import { createLogExplorerCustomizations } from '../../log_explorer_customizations'; export interface ObservablityLogExplorerMainRouteProps { appParams: ObservabilityLogExplorerAppMountParameters; core: CoreStart; @@ -31,6 +32,8 @@ export const ObservablityLogExplorerMainRoute = ({ const [state$] = useState(() => new BehaviorSubject({})); + const customizations = useMemo(() => createLogExplorerCustomizations(), []); + return ( <> - + ); diff --git a/x-pack/plugins/observability_log_explorer/public/types.ts b/x-pack/plugins/observability_log_explorer/public/types.ts index 82045faea76e8..8b315ad206ce4 100644 --- a/x-pack/plugins/observability_log_explorer/public/types.ts +++ b/x-pack/plugins/observability_log_explorer/public/types.ts @@ -12,6 +12,7 @@ import { ObservabilitySharedPluginStart } from '@kbn/observability-shared-plugin import { ServerlessPluginStart } from '@kbn/serverless/public'; import { SharePluginSetup, SharePluginStart } from '@kbn/share-plugin/public'; import { AppMountParameters, ScopedHistory } from '@kbn/core/public'; +import { LogsSharedClientStartExports } from '@kbn/logs-shared-plugin/public'; import { ObservabilityLogExplorerLocators, ObservabilityLogExplorerLocationState, @@ -33,6 +34,7 @@ export interface ObservabilityLogExplorerStartDeps { data: DataPublicPluginStart; discover: DiscoverStart; logExplorer: LogExplorerPluginStart; + logsShared: LogsSharedClientStartExports; observabilityShared: ObservabilitySharedPluginStart; serverless?: ServerlessPluginStart; share: SharePluginStart; diff --git a/x-pack/plugins/observability_log_explorer/tsconfig.json b/x-pack/plugins/observability_log_explorer/tsconfig.json index 7266e097dae62..109b54b929ec7 100644 --- a/x-pack/plugins/observability_log_explorer/tsconfig.json +++ b/x-pack/plugins/observability_log_explorer/tsconfig.json @@ -33,7 +33,8 @@ "@kbn/core-mount-utils-browser-internal", "@kbn/xstate-utils", "@kbn/shared-ux-utility", - "@kbn/ui-theme" + "@kbn/ui-theme", + "@kbn/logs-shared-plugin" ], "exclude": [ "target/**/*" diff --git a/x-pack/plugins/observability_onboarding/kibana.jsonc b/x-pack/plugins/observability_onboarding/kibana.jsonc index 5c1615c3a95ba..c2b89c8c9b4fa 100644 --- a/x-pack/plugins/observability_onboarding/kibana.jsonc +++ b/x-pack/plugins/observability_onboarding/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/observability-onboarding-plugin", - "owner": "@elastic/apm-ui", + "owner": "@elastic/obs-ux-logs-team", "plugin": { "id": "observabilityOnboarding", "server": true, diff --git a/x-pack/plugins/osquery/cypress/e2e/all/alerts_response_actions_form.cy.ts b/x-pack/plugins/osquery/cypress/e2e/all/alerts_response_actions_form.cy.ts index 15fb98540e438..cb4ce27a69031 100644 --- a/x-pack/plugins/osquery/cypress/e2e/all/alerts_response_actions_form.cy.ts +++ b/x-pack/plugins/osquery/cypress/e2e/all/alerts_response_actions_form.cy.ts @@ -63,6 +63,7 @@ describe('Alert Event Details - Response Actions Form', { tags: ['@ess', '@serve cy.getBySel('globalLoadingIndicator').should('not.exist'); closeDateTabIfVisible(); cy.getBySel('edit-rule-actions-tab').click(); + cy.getBySel('globalLoadingIndicator').should('not.exist'); cy.contains('Response actions are run on each rule execution.'); cy.getBySel(OSQUERY_RESPONSE_ACTION_ADD_BUTTON).click(); cy.getBySel(RESPONSE_ACTIONS_ITEM_0).within(() => { diff --git a/x-pack/plugins/osquery/cypress/tasks/response_actions.ts b/x-pack/plugins/osquery/cypress/tasks/response_actions.ts index 3f59ebca9f560..d686392431b7a 100644 --- a/x-pack/plugins/osquery/cypress/tasks/response_actions.ts +++ b/x-pack/plugins/osquery/cypress/tasks/response_actions.ts @@ -45,6 +45,7 @@ export const checkOsqueryResponseActionsPermissions = (enabled: boolean) => { cy.getBySel('globalLoadingIndicator').should('not.exist'); closeDateTabIfVisible(); cy.getBySel('edit-rule-actions-tab').click(); + cy.getBySel('globalLoadingIndicator').should('not.exist'); cy.contains('Response actions are run on each rule execution.'); cy.getBySel(OSQUERY_RESPONSE_ACTION_ADD_BUTTON).click(); if (enabled) { diff --git a/x-pack/plugins/osquery/server/routes/live_query/create_live_query_route.ts b/x-pack/plugins/osquery/server/routes/live_query/create_live_query_route.ts index 586ebe3716a96..fff242db7475c 100644 --- a/x-pack/plugins/osquery/server/routes/live_query/create_live_query_route.ts +++ b/x-pack/plugins/osquery/server/routes/live_query/create_live_query_route.ts @@ -45,7 +45,9 @@ export const createLiveQueryRoute = (router: IRouter, osqueryContext: OsqueryApp const { osquery: { writeLiveQueries, runSavedQueries }, - } = await coreStartServices.capabilities.resolveCapabilities(request); + } = await coreStartServices.capabilities.resolveCapabilities(request, { + capabilityPath: 'osquery.*', + }); const isInvalid = !( writeLiveQueries || diff --git a/x-pack/plugins/profiling/kibana.jsonc b/x-pack/plugins/profiling/kibana.jsonc index 104196bababc9..296b4e40bb822 100644 --- a/x-pack/plugins/profiling/kibana.jsonc +++ b/x-pack/plugins/profiling/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/profiling-plugin", - "owner": "@elastic/profiling-ui", + "owner": "@elastic/obs-ux-infra_services-team", "plugin": { "id": "profiling", "server": true, diff --git a/x-pack/plugins/profiling_data_access/kibana.jsonc b/x-pack/plugins/profiling_data_access/kibana.jsonc index a6bcd9f7ecff4..a2c3fb4cb267b 100644 --- a/x-pack/plugins/profiling_data_access/kibana.jsonc +++ b/x-pack/plugins/profiling_data_access/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/profiling-data-access-plugin", - "owner": "@elastic/profiling-ui", + "owner": "@elastic/obs-ux-infra_services-team", "plugin": { "id": "profilingDataAccess", "server": true, diff --git a/x-pack/plugins/rule_registry/kibana.jsonc b/x-pack/plugins/rule_registry/kibana.jsonc index d5c867247e811..28612bff2b9cc 100644 --- a/x-pack/plugins/rule_registry/kibana.jsonc +++ b/x-pack/plugins/rule_registry/kibana.jsonc @@ -3,7 +3,7 @@ "id": "@kbn/rule-registry-plugin", "owner": [ "@elastic/response-ops", - "@elastic/actionable-observability" + "@elastic/obs-ux-management-team" ], "plugin": { "id": "ruleRegistry", diff --git a/x-pack/plugins/security/server/anonymous_access/anonymous_access_service.test.ts b/x-pack/plugins/security/server/anonymous_access/anonymous_access_service.test.ts index 3cee2adf03f5c..398ff6a3c425b 100644 --- a/x-pack/plugins/security/server/anonymous_access/anonymous_access_service.test.ts +++ b/x-pack/plugins/security/server/anonymous_access/anonymous_access_service.test.ts @@ -165,6 +165,7 @@ describe('AnonymousAccessService', () => { expect.objectContaining({ headers: {} }), { useDefaultCapabilities: true, + capabilityPath: '*', } ); }); @@ -202,6 +203,7 @@ describe('AnonymousAccessService', () => { expect.objectContaining({ headers: {} }), { useDefaultCapabilities: true, + capabilityPath: '*', } ); }); @@ -225,7 +227,7 @@ describe('AnonymousAccessService', () => { expect(startParams.capabilities.resolveCapabilities).toHaveBeenCalledTimes(1); expect(startParams.capabilities.resolveCapabilities).toHaveBeenCalledWith( expect.objectContaining({ headers: { authorization: 'Basic dXNlcjpwYXNzd29yZA==' } }), - { useDefaultCapabilities: false } + { useDefaultCapabilities: false, capabilityPath: '*' } ); }); @@ -245,7 +247,7 @@ describe('AnonymousAccessService', () => { expect(startParams.capabilities.resolveCapabilities).toHaveBeenCalledTimes(1); expect(startParams.capabilities.resolveCapabilities).toHaveBeenCalledWith( expect.objectContaining({ headers: { authorization: 'Basic dXNlcjpwYXNzd29yZA==' } }), - { useDefaultCapabilities: false } + { useDefaultCapabilities: false, capabilityPath: '*' } ); }); }); diff --git a/x-pack/plugins/security/server/anonymous_access/anonymous_access_service.ts b/x-pack/plugins/security/server/anonymous_access/anonymous_access_service.ts index 8641d242d56eb..ad0a9b79fff46 100644 --- a/x-pack/plugins/security/server/anonymous_access/anonymous_access_service.ts +++ b/x-pack/plugins/security/server/anonymous_access/anonymous_access_service.ts @@ -121,6 +121,7 @@ export class AnonymousAccessService { try { return await capabilities.resolveCapabilities(fakeAnonymousRequest, { + capabilityPath: '*', useDefaultCapabilities, }); } catch (err) { diff --git a/x-pack/plugins/security/server/authorization/authorization_service.test.ts b/x-pack/plugins/security/server/authorization/authorization_service.test.ts index 0d1009bdd4b9e..a052d67532480 100644 --- a/x-pack/plugins/security/server/authorization/authorization_service.test.ts +++ b/x-pack/plugins/security/server/authorization/authorization_service.test.ts @@ -116,7 +116,9 @@ it(`#setup returns exposed services`, () => { expect(authorizationModeFactory).toHaveBeenCalledWith(mockLicense); expect(mockCoreSetup.capabilities.registerSwitcher).toHaveBeenCalledTimes(1); - expect(mockCoreSetup.capabilities.registerSwitcher).toHaveBeenCalledWith(expect.any(Function)); + expect(mockCoreSetup.capabilities.registerSwitcher).toHaveBeenCalledWith(expect.any(Function), { + capabilityPath: '*', + }); }); describe('#start', () => { diff --git a/x-pack/plugins/security/server/authorization/authorization_service.tsx b/x-pack/plugins/security/server/authorization/authorization_service.tsx index a2b32a0a6b13e..10bee6309438f 100644 --- a/x-pack/plugins/security/server/authorization/authorization_service.tsx +++ b/x-pack/plugins/security/server/authorization/authorization_service.tsx @@ -64,8 +64,11 @@ interface AuthorizationServiceSetupParams { loggers: LoggerFactory; features: FeaturesPluginSetup; kibanaIndexName: string; + getSpacesService(): SpacesService | undefined; + getCurrentUser(request: KibanaRequest): AuthenticatedUser | null; + customBranding: CustomBrandingSetup; } @@ -174,6 +177,9 @@ export class AuthorizationService { } return await disableUICapabilities.usingPrivileges(uiCapabilities); + }, + { + capabilityPath: '*', } ); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/error_schema.mock.ts b/x-pack/plugins/security_solution/common/api/detection_engine/model/error_schema.mock.ts index 22c507804e1d8..b52f61febbafb 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/error_schema.mock.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/model/error_schema.mock.ts @@ -4,9 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -// TODO https://github.com/elastic/security-team/issues/7491 -// eslint-disable-next-line no-restricted-imports -import type { ErrorSchema } from './error_schema_legacy'; +import type { ErrorSchema } from './error_schema.gen'; export const getErrorSchemaMock = ( id: string = '819eded6-e9c8-445b-a647-519aea39e063' diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/index.ts b/x-pack/plugins/security_solution/common/api/detection_engine/model/index.ts index 0d243fc201fb9..f5c8440a07148 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/index.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/model/index.ts @@ -8,12 +8,8 @@ export * from './alerts'; export * from './rule_response_actions'; export * from './rule_schema'; -// TODO https://github.com/elastic/security-team/issues/7491 -// eslint-disable-next-line no-restricted-imports -export * from './error_schema_legacy'; -export * from './pagination'; +export * from './error_schema.gen'; +export * from './pagination.gen'; export * from './schemas'; -// TODO https://github.com/elastic/security-team/issues/7491 -// eslint-disable-next-line no-restricted-imports -export * from './sorting_legacy'; +export * from './sorting.gen'; export * from './warning_schema.gen'; diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/pagination.gen.ts b/x-pack/plugins/security_solution/common/api/detection_engine/model/pagination.gen.ts new file mode 100644 index 0000000000000..0a7336b8f78c3 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/detection_engine/model/pagination.gen.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 { z } from 'zod'; + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + */ + +/** + * Page number + */ +export type Page = z.infer; +export const Page = z.number().int().min(1); + +/** + * Number of items per page + */ +export type PerPage = z.infer; +export const PerPage = z.number().int().min(0); + +export type PaginationResult = z.infer; +export const PaginationResult = z.object({ + page: Page, + per_page: PerPage, + /** + * Total number of items + */ + total: z.number().int().min(0), +}); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/pagination.schema.yaml b/x-pack/plugins/security_solution/common/api/detection_engine/model/pagination.schema.yaml new file mode 100644 index 0000000000000..3afccce86e329 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/detection_engine/model/pagination.schema.yaml @@ -0,0 +1,31 @@ +openapi: 3.0.0 +info: + title: Pagination Schema + version: 'not applicable' +paths: {} +components: + x-codegen-enabled: true + schemas: + Page: + type: integer + minimum: 1 + description: Page number + PerPage: + type: integer + minimum: 0 + description: Number of items per page + PaginationResult: + type: object + properties: + page: + $ref: '#/components/schemas/Page' + per_page: + $ref: '#/components/schemas/PerPage' + total: + type: integer + minimum: 0 + description: Total number of items + required: + - page + - per_page + - total diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/pagination.ts b/x-pack/plugins/security_solution/common/api/detection_engine/model/pagination.ts deleted file mode 100644 index bed2cade86df4..0000000000000 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/pagination.ts +++ /dev/null @@ -1,28 +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 * as t from 'io-ts'; -import { PositiveInteger, PositiveIntegerGreaterThanZero } from '@kbn/securitysolution-io-ts-types'; - -export type Page = t.TypeOf; -export const Page = PositiveIntegerGreaterThanZero; - -export type PageOrUndefined = t.TypeOf; -export const PageOrUndefined = t.union([Page, t.undefined]); - -export type PerPage = t.TypeOf; -export const PerPage = PositiveInteger; - -export type PerPageOrUndefined = t.TypeOf; -export const PerPageOrUndefined = t.union([PerPage, t.undefined]); - -export type PaginationResult = t.TypeOf; -export const PaginationResult = t.type({ - page: Page, - per_page: PerPage, - total: PositiveInteger, -}); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_response_actions/index.ts b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_response_actions/index.ts index ccaf290dc5d33..e9956d88eb45a 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_response_actions/index.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_response_actions/index.ts @@ -5,7 +5,4 @@ * 2.0. */ -// TODO https://github.com/elastic/security-team/issues/7491 -// eslint-disable-next-line no-restricted-imports -export { RESPONSE_ACTION_TYPES, SUPPORTED_RESPONSE_ACTION_TYPES } from './response_actions_legacy'; export * from './response_actions.gen'; diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/common_attributes.gen.ts b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/common_attributes.gen.ts index 0d62dfd9c21f3..79ad21ddfb009 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/common_attributes.gen.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/common_attributes.gen.ts @@ -367,26 +367,38 @@ export const RuleActionFrequency = z.object({ throttle: RuleActionThrottle.nullable(), }); +export type RuleActionAlertsFilter = z.infer; +export const RuleActionAlertsFilter = z.object({}).catchall(z.unknown()); + +/** + * Object containing the allowed connector fields, which varies according to the connector type. + */ +export type RuleActionParams = z.infer; +export const RuleActionParams = z.object({}).catchall(z.unknown()); + +/** + * Optionally groups actions by use cases. Use `default` for alert notifications. + */ +export type RuleActionGroup = z.infer; +export const RuleActionGroup = z.string(); + +/** + * The connector ID. + */ +export type RuleActionId = z.infer; +export const RuleActionId = z.string(); + export type RuleAction = z.infer; export const RuleAction = z.object({ /** * The action type used for sending notifications. */ action_type_id: z.string(), - /** - * Optionally groups actions by use cases. Use `default` for alert notifications. - */ - group: z.string(), - /** - * The connector ID. - */ - id: z.string(), - /** - * Object containing the allowed connector fields, which varies according to the connector type. - */ - params: z.object({}).catchall(z.unknown()), + group: RuleActionGroup, + id: RuleActionId, + params: RuleActionParams, uuid: NonEmptyString.optional(), - alerts_filter: z.object({}).catchall(z.unknown()).optional(), + alerts_filter: RuleActionAlertsFilter.optional(), frequency: RuleActionFrequency.optional(), }); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/common_attributes.schema.yaml b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/common_attributes.schema.yaml index 921f9350550b6..ad2bfaf76c4c0 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/common_attributes.schema.yaml +++ b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/common_attributes.schema.yaml @@ -397,6 +397,23 @@ components: - notifyWhen - throttle + RuleActionAlertsFilter: + type: object + additionalProperties: true + + RuleActionParams: + type: object + description: Object containing the allowed connector fields, which varies according to the connector type. + additionalProperties: true + + RuleActionGroup: + type: string + description: Optionally groups actions by use cases. Use `default` for alert notifications. + + RuleActionId: + type: string + description: The connector ID. + RuleAction: type: object properties: @@ -404,20 +421,15 @@ components: type: string description: The action type used for sending notifications. group: - type: string - description: Optionally groups actions by use cases. Use `default` for alert notifications. + $ref: '#/components/schemas/RuleActionGroup' id: - type: string - description: The connector ID. + $ref: '#/components/schemas/RuleActionId' params: - type: object - description: Object containing the allowed connector fields, which varies according to the connector type. - additionalProperties: true + $ref: '#/components/schemas/RuleActionParams' uuid: $ref: '#/components/schemas/NonEmptyString' alerts_filter: - type: object - additionalProperties: true + $ref: '#/components/schemas/RuleActionAlertsFilter' frequency: $ref: '#/components/schemas/RuleActionFrequency' required: diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_request_schema.test.ts b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_request_schema.test.ts index abbfa4903ea31..062c913354404 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_request_schema.test.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_request_schema.test.ts @@ -25,7 +25,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"name: Required, description: Required, risk_score: Required, severity: Required, type: Invalid literal value, expected \\"eql\\", and 52 more"` + ); }); test('strips any unknown values', () => { @@ -46,7 +48,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"name: Required, description: Required, risk_score: Required, severity: Required, type: Invalid literal value, expected \\"eql\\", and 52 more"` + ); }); test('[rule_id, description] does not validate', () => { @@ -57,7 +61,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"name: Required, risk_score: Required, severity: Required, type: Invalid literal value, expected \\"eql\\", query: Required, and 44 more"` + ); }); test('[rule_id, description, from] does not validate', () => { @@ -69,7 +75,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"name: Required, risk_score: Required, severity: Required, type: Invalid literal value, expected \\"eql\\", query: Required, and 44 more"` + ); }); test('[rule_id, description, from, to] does not validate', () => { @@ -82,7 +90,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"name: Required, risk_score: Required, severity: Required, type: Invalid literal value, expected \\"eql\\", query: Required, and 44 more"` + ); }); test('[rule_id, description, from, to, name] does not validate', () => { @@ -96,7 +106,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"risk_score: Required, severity: Required, type: Invalid literal value, expected \\"eql\\", query: Required, language: Invalid literal value, expected \\"eql\\", and 36 more"` + ); }); test('[rule_id, description, from, to, name, severity] does not validate', () => { @@ -111,7 +123,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"risk_score: Required, type: Invalid literal value, expected \\"eql\\", query: Required, language: Invalid literal value, expected \\"eql\\", risk_score: Required, and 28 more"` + ); }); test('[rule_id, description, from, to, name, severity, type] does not validate', () => { @@ -127,7 +141,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"risk_score: Required, type: Invalid literal value, expected \\"eql\\", query: Required, language: Invalid literal value, expected \\"eql\\", risk_score: Required, and 27 more"` + ); }); test('[rule_id, description, from, to, name, severity, type, interval] does not validate', () => { @@ -144,7 +160,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"risk_score: Required, type: Invalid literal value, expected \\"eql\\", query: Required, language: Invalid literal value, expected \\"eql\\", risk_score: Required, and 27 more"` + ); }); test('[rule_id, description, from, to, name, severity, type, interval, index] does not validate', () => { @@ -162,7 +180,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"risk_score: Required, type: Invalid literal value, expected \\"eql\\", query: Required, language: Invalid literal value, expected \\"eql\\", risk_score: Required, and 27 more"` + ); }); test('[rule_id, description, from, to, name, severity, type, query, index, interval] does validate', () => { @@ -202,7 +222,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"risk_score: Required, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", risk_score: Required, risk_score: Required, and 22 more"` + ); }); test('[rule_id, description, from, to, index, name, severity, interval, type, query, language, risk_score] does validate', () => { @@ -368,7 +390,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"references.0: Expected string, received number, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", references.0: Expected string, received number, references.0: Expected string, received number, and 22 more"` + ); }); test('indexes cannot be numbers', () => { @@ -379,7 +403,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", index.0: Expected string, received number, index.0: Expected string, received number, type: Invalid literal value, expected \\"saved_query\\", and 20 more"` + ); }); test('saved_query type can have filters with it', () => { @@ -401,7 +427,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", filters: Expected array, received string, filters: Expected array, received string, type: Invalid literal value, expected \\"saved_query\\", and 20 more"` + ); }); test('language validates with kuery', () => { @@ -434,7 +462,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", language: Invalid enum value. Expected 'kuery' | 'lucene', received 'something-made-up', type: Invalid literal value, expected \\"saved_query\\", saved_id: Required, and 19 more"` + ); }); test('max_signals cannot be negative', () => { @@ -493,7 +523,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"tags.0: Expected string, received number, tags.1: Expected string, received number, tags.2: Expected string, received number, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", and 38 more"` + ); }); test('You cannot send in an array of threat that are missing "framework"', () => { @@ -519,7 +551,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"threat.0.framework: Required, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", threat.0.framework: Required, threat.0.framework: Required, and 22 more"` + ); }); test('You cannot send in an array of threat that are missing "tactic"', () => { @@ -541,7 +575,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"threat.0.tactic: Required, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", threat.0.tactic: Required, threat.0.tactic: Required, and 22 more"` + ); }); test('You can send in an array of threat that are missing "technique"', () => { @@ -583,7 +619,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"false_positives.0: Expected string, received number, false_positives.1: Expected string, received number, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", false_positives.0: Expected string, received number, and 30 more"` + ); }); test('You cannot set the risk_score to 101', () => { @@ -655,7 +693,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"meta: Expected object, received string, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", meta: Expected object, received string, meta: Expected object, received string, and 22 more"` + ); }); test('You can omit the query string when filters are present', () => { @@ -690,7 +730,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"severity: Invalid enum value. Expected 'low' | 'medium' | 'high' | 'critical', received 'junk', type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", severity: Invalid enum value. Expected 'low' | 'medium' | 'high' | 'critical', received 'junk', severity: Invalid enum value. Expected 'low' | 'medium' | 'high' | 'critical', received 'junk', and 22 more"` + ); }); test('You cannot send in an array of actions that are missing "group"', () => { @@ -701,7 +743,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"actions.0.group: Required, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", actions.0.group: Required, actions.0.group: Required, and 22 more"` + ); }); test('You cannot send in an array of actions that are missing "id"', () => { @@ -712,7 +756,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"actions.0.id: Required, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", actions.0.id: Required, actions.0.id: Required, and 22 more"` + ); }); test('You cannot send in an array of actions that are missing "action_type_id"', () => { @@ -723,7 +769,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"actions.0.action_type_id: Required, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", actions.0.action_type_id: Required, actions.0.action_type_id: Required, and 22 more"` + ); }); test('You cannot send in an array of actions that are missing "params"', () => { @@ -734,7 +782,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"actions.0.params: Required, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", actions.0.params: Required, actions.0.params: Required, and 22 more"` + ); }); test('You cannot send in an array of actions that are including "actionTypeId"', () => { @@ -752,7 +802,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"actions.0.action_type_id: Required, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", actions.0.action_type_id: Required, actions.0.action_type_id: Required, and 22 more"` + ); }); describe('note', () => { @@ -788,7 +840,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"note: Expected string, received object, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", note: Expected string, received object, note: Expected string, received object, and 22 more"` + ); }); test('empty name is not valid', () => { @@ -872,7 +926,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", type: Invalid literal value, expected \\"query\\", saved_id: Required, type: Invalid literal value, expected \\"threshold\\", and 14 more"` + ); }); test('threshold is required when type is threshold and will not validate without it', () => { @@ -880,7 +936,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", type: Invalid literal value, expected \\"query\\", type: Invalid literal value, expected \\"saved_query\\", saved_id: Required, and 14 more"` + ); }); test('threshold rules fail validation if threshold is not greater than 0', () => { @@ -958,7 +1016,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"exceptions_list.0.list_id: Required, exceptions_list.0.type: Required, exceptions_list.0.namespace_type: Invalid enum value. Expected 'agnostic' | 'single', received 'not a namespace type', type: Invalid literal value, expected \\"eql\\", query: Required, and 43 more"` + ); }); test('[rule_id, description, from, to, index, name, severity, interval, type, filters, risk_score, note, and non-existent exceptions_list] does validate with empty exceptions_list', () => { @@ -999,7 +1059,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", type: Invalid literal value, expected \\"query\\", type: Invalid literal value, expected \\"saved_query\\", saved_id: Required, and 14 more"` + ); }); test('fails validation when threat_mapping is an empty array', () => { @@ -1068,7 +1130,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", data_view_id: Expected string, received number, data_view_id: Expected string, received number, type: Invalid literal value, expected \\"saved_query\\", and 20 more"` + ); }); test('it should validate a type of "query" with "data_view_id" defined', () => { @@ -1131,7 +1195,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"investigation_fields.field_names: Required, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", investigation_fields.field_names: Required, investigation_fields.field_names: Required, and 22 more"` + ); }); test('You can send in investigation_fields', () => { @@ -1166,7 +1232,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"investigation_fields.field_names.0: Expected string, received number, investigation_fields.field_names.1: Expected string, received number, investigation_fields.field_names.2: Expected string, received number, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", and 38 more"` + ); }); test('You cannot send in investigation_fields without specifying fields', () => { @@ -1177,7 +1245,9 @@ describe('rules schema', () => { const result = RuleCreateProps.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"investigation_fields.field_names: Required, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", investigation_fields.field_names: Required, investigation_fields.field_names: Required, and 22 more"` + ); }); }); }); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_response_schema.test.ts b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_response_schema.test.ts index e8573502cb662..d1432e5a67352 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_response_schema.test.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_response_schema.test.ts @@ -40,7 +40,9 @@ describe('Rule response schema', () => { const result = RuleResponse.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", type: Invalid literal value, expected \\"query\\", type: Invalid literal value, expected \\"saved_query\\", saved_id: Required, and 15 more"` + ); }); test('it should validate a type of "query" with a saved_id together', () => { @@ -68,7 +70,9 @@ describe('Rule response schema', () => { const result = RuleResponse.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", type: Invalid literal value, expected \\"query\\", saved_id: Required, type: Invalid literal value, expected \\"threshold\\", and 14 more"` + ); }); test('it should validate a type of "timeline_id" if there is a "timeline_title" dependent', () => { @@ -98,7 +102,9 @@ describe('Rule response schema', () => { const result = RuleResponse.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"exceptions_list: Expected array, received string, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", exceptions_list: Expected array, received string, exceptions_list: Expected array, received string, and 22 more"` + ); }); }); @@ -232,6 +238,8 @@ describe('investigation_fields', () => { const result = RuleResponse.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toEqual('Invalid input'); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"investigation_fields: Expected object, received string, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", investigation_fields: Expected object, received string, investigation_fields: Expected object, received string, and 22 more"` + ); }); }); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_response_actions/response_actions_legacy.ts b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema_legacy/response_actions.ts similarity index 82% rename from x-pack/plugins/security_solution/common/api/detection_engine/model/rule_response_actions/response_actions_legacy.ts rename to x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema_legacy/response_actions.ts index 6947953b4d65d..8f176a9908041 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_response_actions/response_actions_legacy.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema_legacy/response_actions.ts @@ -4,18 +4,9 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - import { arrayQueries, ecsMapping } from '@kbn/osquery-io-ts-types'; import * as t from 'io-ts'; import { ENABLED_AUTOMATED_RESPONSE_ACTION_COMMANDS } from '../../../../endpoint/service/response_actions/constants'; -import { ResponseActionTypesEnum } from './response_actions.gen'; - -export const RESPONSE_ACTION_TYPES = { - OSQUERY: ResponseActionTypesEnum['.osquery'], - ENDPOINT: ResponseActionTypesEnum['.endpoint'], -} as const; - -export const SUPPORTED_RESPONSE_ACTION_TYPES = Object.values(RESPONSE_ACTION_TYPES); // to enable using RESPONSE_ACTION_API_COMMANDS_NAMES as a type function keyObject(arr: T): { [K in T[number]]: null } { @@ -47,13 +38,13 @@ export const OsqueryParamsCamelCase = t.type({ // When we create new response action types, create a union of types export type RuleResponseOsqueryAction = t.TypeOf; export const RuleResponseOsqueryAction = t.strict({ - actionTypeId: t.literal(RESPONSE_ACTION_TYPES.OSQUERY), + actionTypeId: t.literal('.osquery'), params: OsqueryParamsCamelCase, }); export type RuleResponseEndpointAction = t.TypeOf; export const RuleResponseEndpointAction = t.strict({ - actionTypeId: t.literal(RESPONSE_ACTION_TYPES.ENDPOINT), + actionTypeId: t.literal('.endpoint'), params: EndpointParams, }); @@ -67,12 +58,12 @@ export const ResponseActionRuleParamsOrUndefined = t.union([ // When we create new response action types, create a union of types const OsqueryResponseAction = t.strict({ - action_type_id: t.literal(RESPONSE_ACTION_TYPES.OSQUERY), + action_type_id: t.literal('.osquery'), params: OsqueryParams, }); const EndpointResponseAction = t.strict({ - action_type_id: t.literal(RESPONSE_ACTION_TYPES.ENDPOINT), + action_type_id: t.literal('.endpoint'), params: EndpointParams, }); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema_legacy/rule_schemas.ts b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema_legacy/rule_schemas.ts index e95fa38e0d2e6..4ec9ca19ee399 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema_legacy/rule_schemas.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema_legacy/rule_schemas.ts @@ -26,20 +26,10 @@ import { threat_mapping, threat_query, } from '@kbn/securitysolution-io-ts-alerting-types'; +import { PositiveInteger } from '@kbn/securitysolution-io-ts-types'; +import { ResponseActionArray } from './response_actions'; -import { RuleExecutionSummary } from '../../rule_monitoring/model'; -// eslint-disable-next-line no-restricted-imports -import { ResponseActionArray } from '../rule_response_actions/response_actions_legacy'; - -import { - anomaly_threshold, - created_at, - created_by, - revision, - saved_id, - updated_at, - updated_by, -} from '../schemas'; +import { anomaly_threshold, saved_id } from '../schemas'; import { AlertsIndex, @@ -51,10 +41,7 @@ import { InvestigationFields, InvestigationGuide, IsRuleEnabled, - IsRuleImmutable, MaxSignals, - RelatedIntegrationArray, - RequiredFieldArray, RuleAuthorArray, RuleDescription, RuleFalsePositiveArray, @@ -63,7 +50,6 @@ import { RuleMetadata, RuleName, RuleNameOverride, - RuleObjectId, RuleQuery, RuleReferenceArray, RuleSignatureId, @@ -72,7 +58,6 @@ import { SavedObjectResolveAliasPurpose, SavedObjectResolveAliasTargetId, SavedObjectResolveOutcome, - SetupGuide, ThreatArray, TimelineTemplateId, TimelineTemplateTitle, @@ -186,28 +171,24 @@ export const baseSchema = buildRuleSchemas({ }, }); -const responseRequiredFields = { - id: RuleObjectId, - rule_id: RuleSignatureId, - immutable: IsRuleImmutable, - updated_at, - updated_by, - created_at, - created_by, - revision, - - // NOTE: For now, Related Integrations, Required Fields and Setup Guide are supported for prebuilt - // rules only. We don't want to allow users to edit these 3 fields via the API. If we added them - // to baseParams.defaultable, they would become a part of the request schema as optional fields. - // This is why we add them here, in order to add them only to the response schema. - related_integrations: RelatedIntegrationArray, - required_fields: RequiredFieldArray, - setup: SetupGuide, -}; - -const responseOptionalFields = { - execution_summary: RuleExecutionSummary, -}; +export type DurationMetric = t.TypeOf; +export const DurationMetric = PositiveInteger; + +export type RuleExecutionMetrics = t.TypeOf; + +/** + @property total_search_duration_ms - "total time spent performing ES searches as measured by Kibana; + includes network latency and time spent serializing/deserializing request/response", + @property total_indexing_duration_ms - "total time spent indexing documents during current rule execution cycle", + @property total_enrichment_duration_ms - total time spent enriching documents during current rule execution cycle + @property execution_gap_duration_s - "duration in seconds of execution gap" +*/ +export const RuleExecutionMetrics = t.partial({ + total_search_duration_ms: DurationMetric, + total_indexing_duration_ms: DurationMetric, + total_enrichment_duration_ms: DurationMetric, + execution_gap_duration_s: DurationMetric, +}); export type BaseCreateProps = t.TypeOf; export const BaseCreateProps = baseSchema.create; @@ -225,36 +206,9 @@ export const SharedCreateProps = t.intersection([ t.exact(t.partial({ rule_id: RuleSignatureId })), ]); -type SharedUpdateProps = t.TypeOf; -const SharedUpdateProps = t.intersection([ - baseSchema.create, - t.exact(t.partial({ rule_id: RuleSignatureId })), - t.exact(t.partial({ id: RuleObjectId })), -]); - -type SharedPatchProps = t.TypeOf; -const SharedPatchProps = t.intersection([ - baseSchema.patch, - t.exact(t.partial({ rule_id: RuleSignatureId, id: RuleObjectId })), -]); - -export type SharedResponseProps = t.TypeOf; -export const SharedResponseProps = t.intersection([ - baseSchema.response, - t.exact(t.type(responseRequiredFields)), - t.exact(t.partial(responseOptionalFields)), -]); - // ------------------------------------------------------------------------------------------------- // EQL rule schema -export enum QueryLanguage { - 'kuery' = 'kuery', - 'lucene' = 'lucene', - 'eql' = 'eql', - 'esql' = 'esql', -} - export type KqlQueryLanguage = t.TypeOf; export const KqlQueryLanguage = t.keyof({ kuery: null, lucene: null }); @@ -278,21 +232,6 @@ const eqlSchema = buildRuleSchemas({ defaultable: {}, }); -export type EqlRule = t.TypeOf; -export const EqlRule = t.intersection([SharedResponseProps, eqlSchema.response]); - -export type EqlRuleCreateProps = t.TypeOf; -export const EqlRuleCreateProps = t.intersection([SharedCreateProps, eqlSchema.create]); - -export type EqlRuleUpdateProps = t.TypeOf; -export const EqlRuleUpdateProps = t.intersection([SharedUpdateProps, eqlSchema.create]); - -export type EqlRulePatchProps = t.TypeOf; -export const EqlRulePatchProps = t.intersection([SharedPatchProps, eqlSchema.patch]); - -export type EqlPatchParams = t.TypeOf; -export const EqlPatchParams = eqlSchema.patch; - // ------------------------------------------------------------------------------------------------- // ES|QL rule schema @@ -309,21 +248,6 @@ const esqlSchema = buildRuleSchemas({ defaultable: {}, }); -export type EsqlRule = t.TypeOf; -export const EsqlRule = t.intersection([SharedResponseProps, esqlSchema.response]); - -export type EsqlRuleCreateProps = t.TypeOf; -export const EsqlRuleCreateProps = t.intersection([SharedCreateProps, esqlSchema.create]); - -export type EsqlRuleUpdateProps = t.TypeOf; -export const EsqlRuleUpdateProps = t.intersection([SharedUpdateProps, esqlSchema.create]); - -export type EsqlRulePatchProps = t.TypeOf; -export const EsqlRulePatchProps = t.intersection([SharedPatchProps, esqlSchema.patch]); - -export type EsqlPatchParams = t.TypeOf; -export const EsqlPatchParams = esqlSchema.patch; - // ------------------------------------------------------------------------------------------------- // Indicator Match rule schema @@ -351,30 +275,6 @@ const threatMatchSchema = buildRuleSchemas({ }, }); -export type ThreatMatchRule = t.TypeOf; -export const ThreatMatchRule = t.intersection([SharedResponseProps, threatMatchSchema.response]); - -export type ThreatMatchRuleCreateProps = t.TypeOf; -export const ThreatMatchRuleCreateProps = t.intersection([ - SharedCreateProps, - threatMatchSchema.create, -]); - -export type ThreatMatchRuleUpdateProps = t.TypeOf; -export const ThreatMatchRuleUpdateProps = t.intersection([ - SharedUpdateProps, - threatMatchSchema.create, -]); - -export type ThreatMatchRulePatchProps = t.TypeOf; -export const ThreatMatchRulePatchProps = t.intersection([ - SharedPatchProps, - threatMatchSchema.patch, -]); - -export type ThreatMatchPatchParams = t.TypeOf; -export const ThreatMatchPatchParams = threatMatchSchema.patch; - // ------------------------------------------------------------------------------------------------- // Custom Query rule schema @@ -396,21 +296,6 @@ const querySchema = buildRuleSchemas({ }, }); -export type QueryRule = t.TypeOf; -export const QueryRule = t.intersection([SharedResponseProps, querySchema.response]); - -export type QueryRuleCreateProps = t.TypeOf; -export const QueryRuleCreateProps = t.intersection([SharedCreateProps, querySchema.create]); - -export type QueryRuleUpdateProps = t.TypeOf; -export const QueryRuleUpdateProps = t.intersection([SharedUpdateProps, querySchema.create]); - -export type QueryRulePatchProps = t.TypeOf; -export const QueryRulePatchProps = t.intersection([SharedPatchProps, querySchema.patch]); - -export type QueryPatchParams = t.TypeOf; -export const QueryPatchParams = querySchema.patch; - // ------------------------------------------------------------------------------------------------- // Saved Query rule schema @@ -434,27 +319,6 @@ const savedQuerySchema = buildRuleSchemas({ }, }); -export type SavedQueryRule = t.TypeOf; -export const SavedQueryRule = t.intersection([SharedResponseProps, savedQuerySchema.response]); - -export type SavedQueryRuleCreateProps = t.TypeOf; -export const SavedQueryRuleCreateProps = t.intersection([ - SharedCreateProps, - savedQuerySchema.create, -]); - -export type SavedQueryRuleUpdateProps = t.TypeOf; -export const SavedQueryRuleUpdateProps = t.intersection([ - SharedUpdateProps, - savedQuerySchema.create, -]); - -export type SavedQueryRulePatchProps = t.TypeOf; -export const SavedQueryRulePatchProps = t.intersection([SharedPatchProps, savedQuerySchema.patch]); - -export type SavedQueryPatchParams = t.TypeOf; -export const SavedQueryPatchParams = savedQuerySchema.patch; - // ------------------------------------------------------------------------------------------------- // Threshold rule schema @@ -475,21 +339,6 @@ const thresholdSchema = buildRuleSchemas({ }, }); -export type ThresholdRule = t.TypeOf; -export const ThresholdRule = t.intersection([SharedResponseProps, thresholdSchema.response]); - -export type ThresholdRuleCreateProps = t.TypeOf; -export const ThresholdRuleCreateProps = t.intersection([SharedCreateProps, thresholdSchema.create]); - -export type ThresholdRuleUpdateProps = t.TypeOf; -export const ThresholdRuleUpdateProps = t.intersection([SharedUpdateProps, thresholdSchema.create]); - -export type ThresholdRulePatchProps = t.TypeOf; -export const ThresholdRulePatchProps = t.intersection([SharedPatchProps, thresholdSchema.patch]); - -export type ThresholdPatchParams = t.TypeOf; -export const ThresholdPatchParams = thresholdSchema.patch; - // ------------------------------------------------------------------------------------------------- // Machine Learning rule schema @@ -503,33 +352,6 @@ const machineLearningSchema = buildRuleSchemas({ defaultable: {}, }); -export type MachineLearningRule = t.TypeOf; -export const MachineLearningRule = t.intersection([ - SharedResponseProps, - machineLearningSchema.response, -]); - -export type MachineLearningRuleCreateProps = t.TypeOf; -export const MachineLearningRuleCreateProps = t.intersection([ - SharedCreateProps, - machineLearningSchema.create, -]); - -export type MachineLearningRuleUpdateProps = t.TypeOf; -export const MachineLearningRuleUpdateProps = t.intersection([ - SharedUpdateProps, - machineLearningSchema.create, -]); - -export type MachineLearningRulePatchProps = t.TypeOf; -export const MachineLearningRulePatchProps = t.intersection([ - SharedPatchProps, - machineLearningSchema.patch, -]); - -export type MachineLearningPatchParams = t.TypeOf; -export const MachineLearningPatchParams = machineLearningSchema.patch; - // ------------------------------------------------------------------------------------------------- // New Terms rule schema @@ -550,21 +372,6 @@ const newTermsSchema = buildRuleSchemas({ }, }); -export type NewTermsRule = t.TypeOf; -export const NewTermsRule = t.intersection([SharedResponseProps, newTermsSchema.response]); - -export type NewTermsRuleCreateProps = t.TypeOf; -export const NewTermsRuleCreateProps = t.intersection([SharedCreateProps, newTermsSchema.create]); - -export type NewTermsRuleUpdateProps = t.TypeOf; -export const NewTermsRuleUpdateProps = t.intersection([SharedUpdateProps, newTermsSchema.create]); - -export type NewTermsRulePatchProps = t.TypeOf; -export const NewTermsRulePatchProps = t.intersection([SharedPatchProps, newTermsSchema.patch]); - -export type NewTermsPatchParams = t.TypeOf; -export const NewTermsPatchParams = newTermsSchema.patch; - // ------------------------------------------------------------------------------------------------- // Combined type specific schemas @@ -579,42 +386,3 @@ export const TypeSpecificCreateProps = t.union([ machineLearningSchema.create, newTermsSchema.create, ]); - -export type TypeSpecificPatchProps = t.TypeOf; -export const TypeSpecificPatchProps = t.union([ - eqlSchema.patch, - esqlSchema.patch, - threatMatchSchema.patch, - querySchema.patch, - savedQuerySchema.patch, - thresholdSchema.patch, - machineLearningSchema.patch, - newTermsSchema.patch, -]); - -export type TypeSpecificResponse = t.TypeOf; -export const TypeSpecificResponse = t.union([ - eqlSchema.response, - esqlSchema.response, - threatMatchSchema.response, - querySchema.response, - savedQuerySchema.response, - thresholdSchema.response, - machineLearningSchema.response, - newTermsSchema.response, -]); - -// ------------------------------------------------------------------------------------------------- -// Final combined schemas - -export type RuleCreateProps = t.TypeOf; -export const RuleCreateProps = t.intersection([TypeSpecificCreateProps, SharedCreateProps]); - -export type RuleUpdateProps = t.TypeOf; -export const RuleUpdateProps = t.intersection([TypeSpecificCreateProps, SharedUpdateProps]); - -export type RulePatchProps = t.TypeOf; -export const RulePatchProps = t.intersection([TypeSpecificPatchProps, SharedPatchProps]); - -export type RuleResponse = t.TypeOf; -export const RuleResponse = t.intersection([TypeSpecificResponse, SharedResponseProps]); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/schemas.ts b/x-pack/plugins/security_solution/common/api/detection_engine/model/schemas.ts index 9c325d1e70fc0..35a394edcb6ad 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/schemas.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/model/schemas.ts @@ -33,12 +33,6 @@ export type Status = t.TypeOf; export const conflicts = t.keyof({ abort: null, proceed: null }); -export const queryFilter = t.string; -export type QueryFilter = t.TypeOf; - -export const queryFilterOrUndefined = t.union([queryFilter, t.undefined]); -export type QueryFilterOrUndefined = t.TypeOf; - export const signal_ids = t.array(t.string); export type SignalIds = t.TypeOf; @@ -48,23 +42,12 @@ export const signal_status_query = t.object; export const alert_tag_ids = t.array(t.string); export type AlertTagIds = t.TypeOf; -export const fields = t.array(t.string); -export type Fields = t.TypeOf; -export const fieldsOrUndefined = t.union([fields, t.undefined]); -export type FieldsOrUndefined = t.TypeOf; - export const created_at = IsoDateString; export const updated_at = IsoDateString; export const created_by = t.string; export const updated_by = t.string; -export const status_code = PositiveInteger; -export const message = t.string; -export const perPage = PositiveInteger; -export const total = PositiveInteger; export const revision = PositiveInteger; -export const success = t.boolean; -export const success_count = PositiveInteger; export const indexRecord = t.record( t.string, diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/sorting.test.ts b/x-pack/plugins/security_solution/common/api/detection_engine/model/sorting.test.ts index 17ad724039d7e..04a5fadefe051 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/sorting.test.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/model/sorting.test.ts @@ -5,85 +5,30 @@ * 2.0. */ -import { pipe } from 'fp-ts/lib/pipeable'; -import { left } from 'fp-ts/lib/Either'; -import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; -// TODO https://github.com/elastic/security-team/issues/7491 -// eslint-disable-next-line no-restricted-imports -import { DefaultSortOrderAsc, DefaultSortOrderDesc } from './sorting_legacy'; - -describe('Common sorting schemas', () => { - describe('DefaultSortOrderAsc', () => { - describe('Validation succeeds', () => { - it('when valid sort order is passed', () => { - const payload = 'desc'; - const decoded = DefaultSortOrderAsc.decode(payload); - const message = pipe(decoded, foldLeftRight); - - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); - }); - }); - - describe('Validation fails', () => { - it('when invalid sort order is passed', () => { - const payload = 'behind_you'; - const decoded = DefaultSortOrderAsc.decode(payload); - const message = pipe(decoded, foldLeftRight); - - expect(getPaths(left(message.errors))).toEqual([ - 'Invalid value "behind_you" supplied to "DefaultSortOrderAsc"', - ]); - expect(message.schema).toEqual({}); - }); - }); - - describe('Validation sets the default sort order "asc"', () => { - it('when sort order is not passed', () => { - const payload = undefined; - const decoded = DefaultSortOrderAsc.decode(payload); - const message = pipe(decoded, foldLeftRight); - - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual('asc'); - }); - }); +import { expectParseError, expectParseSuccess, stringifyZodError } from '@kbn/zod-helpers'; +import { SortOrder } from './sorting.gen'; + +describe('SortOrder schema', () => { + it('accepts asc value', () => { + const payload = 'asc'; + const result = SortOrder.safeParse(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); - describe('DefaultSortOrderDesc', () => { - describe('Validation succeeds', () => { - it('when valid sort order is passed', () => { - const payload = 'asc'; - const decoded = DefaultSortOrderDesc.decode(payload); - const message = pipe(decoded, foldLeftRight); - - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); - }); - }); - - describe('Validation fails', () => { - it('when invalid sort order is passed', () => { - const payload = 'behind_you'; - const decoded = DefaultSortOrderDesc.decode(payload); - const message = pipe(decoded, foldLeftRight); - - expect(getPaths(left(message.errors))).toEqual([ - 'Invalid value "behind_you" supplied to "DefaultSortOrderDesc"', - ]); - expect(message.schema).toEqual({}); - }); - }); - - describe('Validation sets the default sort order "desc"', () => { - it('when sort order is not passed', () => { - const payload = null; - const decoded = DefaultSortOrderDesc.decode(payload); - const message = pipe(decoded, foldLeftRight); + it('accepts desc value', () => { + const payload = 'desc'; + const result = SortOrder.safeParse(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); + }); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual('desc'); - }); - }); + it('fails on unknown value', () => { + const payload = 'invalid'; + const result = SortOrder.safeParse(payload); + expectParseError(result); + expect(stringifyZodError(result.error)).toEqual( + "Invalid enum value. Expected 'asc' | 'desc', received 'invalid'" + ); }); }); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/sorting_legacy.ts b/x-pack/plugins/security_solution/common/api/detection_engine/model/sorting_legacy.ts deleted file mode 100644 index 8aa8cf2831ea1..0000000000000 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/sorting_legacy.ts +++ /dev/null @@ -1,40 +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 * as t from 'io-ts'; -import type { Either } from 'fp-ts/lib/Either'; -import { capitalize } from 'lodash'; - -export type SortOrder = t.TypeOf; -export const SortOrder = t.keyof({ asc: null, desc: null }); - -export type SortOrderOrUndefined = t.TypeOf; -export const SortOrderOrUndefined = t.union([SortOrder, t.undefined]); - -const defaultSortOrder = (order: SortOrder): t.Type => { - return new t.Type( - `DefaultSortOrder${capitalize(order)}`, - SortOrder.is, - (input, context): Either => - input == null ? t.success(order) : SortOrder.validate(input, context), - t.identity - ); -}; - -/** - * Types the DefaultSortOrderAsc as: - * - If undefined, then a default sort order of 'asc' will be set - * - If a string is sent in, then the string will be validated to ensure it's a valid SortOrder - */ -export const DefaultSortOrderAsc = defaultSortOrder('asc'); - -/** - * Types the DefaultSortOrderDesc as: - * - If undefined, then a default sort order of 'desc' will be set - * - If a string is sent in, then the string will be validated to ensure it's a valid SortOrder - */ -export const DefaultSortOrderDesc = defaultSortOrder('desc'); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_exceptions/create_rule_exceptions/create_rule_exceptions_route.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_exceptions/create_rule_exceptions/create_rule_exceptions_route.ts index feecf23faf293..75eb2b543d337 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_exceptions/create_rule_exceptions/create_rule_exceptions_route.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_exceptions/create_rule_exceptions/create_rule_exceptions_route.ts @@ -12,9 +12,7 @@ import type { ExceptionListItemSchema, } from '@kbn/securitysolution-io-ts-list-types'; import { createRuleExceptionListItemSchema } from '@kbn/securitysolution-io-ts-list-types'; -// TODO https://github.com/elastic/security-team/issues/7491 -// eslint-disable-next-line no-restricted-imports -import { RuleObjectId } from '../../model/rule_schema_legacy'; +import { UUID } from '@kbn/securitysolution-io-ts-types'; /** * URL path parameters of the API route. @@ -22,7 +20,7 @@ import { RuleObjectId } from '../../model/rule_schema_legacy'; export type CreateRuleExceptionsRequestParams = t.TypeOf; export const CreateRuleExceptionsRequestParams = t.exact( t.type({ - id: RuleObjectId, + id: UUID, }) ); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.gen.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.gen.ts new file mode 100644 index 0000000000000..d11eea7b16711 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.gen.ts @@ -0,0 +1,291 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license 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 'zod'; +import { BooleanFromString } from '@kbn/zod-helpers'; + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + */ + +import { RuleResponse } from '../../model/rule_schema/rule_schemas.gen'; +import { + RuleActionGroup, + RuleActionId, + RuleActionParams, + RuleActionFrequency, + RuleActionAlertsFilter, + IndexPatternArray, + RuleTagArray, + TimelineTemplateId, + TimelineTemplateTitle, +} from '../../model/rule_schema/common_attributes.gen'; + +export type BulkEditSkipReason = z.infer; +export const BulkEditSkipReason = z.literal('RULE_NOT_MODIFIED'); + +export type BulkActionSkipResult = z.infer; +export const BulkActionSkipResult = z.object({ + id: z.string(), + name: z.string().optional(), + skip_reason: BulkEditSkipReason, +}); + +export type RuleDetailsInError = z.infer; +export const RuleDetailsInError = z.object({ + id: z.string(), + name: z.string().optional(), +}); + +export type BulkActionsDryRunErrCode = z.infer; +export const BulkActionsDryRunErrCode = z.enum([ + 'IMMUTABLE', + 'MACHINE_LEARNING_AUTH', + 'MACHINE_LEARNING_INDEX_PATTERN', + 'ESQL_INDEX_PATTERN', +]); +export type BulkActionsDryRunErrCodeEnum = typeof BulkActionsDryRunErrCode.enum; +export const BulkActionsDryRunErrCodeEnum = BulkActionsDryRunErrCode.enum; + +export type NormalizedRuleError = z.infer; +export const NormalizedRuleError = z.object({ + message: z.string(), + status_code: z.number().int(), + err_code: BulkActionsDryRunErrCode.optional(), + rules: z.array(RuleDetailsInError), +}); + +export type BulkEditActionResults = z.infer; +export const BulkEditActionResults = z.object({ + updated: z.array(RuleResponse), + created: z.array(RuleResponse), + deleted: z.array(RuleResponse), + skipped: z.array(BulkActionSkipResult), +}); + +export type BulkEditActionSummary = z.infer; +export const BulkEditActionSummary = z.object({ + failed: z.number().int(), + skipped: z.number().int(), + succeeded: z.number().int(), + total: z.number().int(), +}); + +export type BulkEditActionResponse = z.infer; +export const BulkEditActionResponse = z.object({ + success: z.boolean().optional(), + status_code: z.number().int().optional(), + message: z.string().optional(), + rules_count: z.number().int().optional(), + attributes: z.object({ + results: BulkEditActionResults, + summary: BulkEditActionSummary, + errors: z.array(NormalizedRuleError).optional(), + }), +}); + +export type BulkExportActionResponse = z.infer; +export const BulkExportActionResponse = z.string(); + +export type BulkActionBase = z.infer; +export const BulkActionBase = z.object({ + /** + * Query to filter rules + */ + query: z.string().optional(), + /** + * Array of rule IDs + */ + ids: z.array(z.string()).min(1).optional(), +}); + +export type BulkDeleteRules = z.infer; +export const BulkDeleteRules = BulkActionBase.and( + z.object({ + action: z.literal('delete'), + }) +); + +export type BulkDisableRules = z.infer; +export const BulkDisableRules = BulkActionBase.and( + z.object({ + action: z.literal('disable'), + }) +); + +export type BulkEnableRules = z.infer; +export const BulkEnableRules = BulkActionBase.and( + z.object({ + action: z.literal('enable'), + }) +); + +export type BulkExportRules = z.infer; +export const BulkExportRules = BulkActionBase.and( + z.object({ + action: z.literal('export'), + }) +); + +export type BulkDuplicateRules = z.infer; +export const BulkDuplicateRules = BulkActionBase.and( + z.object({ + action: z.literal('duplicate'), + duplicate: z + .object({ + /** + * Whether to copy exceptions from the original rule + */ + include_exceptions: z.boolean(), + /** + * Whether to copy expired exceptions from the original rule + */ + include_expired_exceptions: z.boolean(), + }) + .optional(), + }) +); + +/** + * The condition for throttling the notification: 'rule', 'no_actions', or time duration + */ +export type ThrottleForBulkActions = z.infer; +export const ThrottleForBulkActions = z.enum(['rule', '1h', '1d', '7d']); +export type ThrottleForBulkActionsEnum = typeof ThrottleForBulkActions.enum; +export const ThrottleForBulkActionsEnum = ThrottleForBulkActions.enum; + +export type BulkActionType = z.infer; +export const BulkActionType = z.enum([ + 'enable', + 'disable', + 'export', + 'delete', + 'duplicate', + 'edit', +]); +export type BulkActionTypeEnum = typeof BulkActionType.enum; +export const BulkActionTypeEnum = BulkActionType.enum; + +export type BulkActionEditType = z.infer; +export const BulkActionEditType = z.enum([ + 'add_tags', + 'delete_tags', + 'set_tags', + 'add_index_patterns', + 'delete_index_patterns', + 'set_index_patterns', + 'set_timeline', + 'add_rule_actions', + 'set_rule_actions', + 'set_schedule', +]); +export type BulkActionEditTypeEnum = typeof BulkActionEditType.enum; +export const BulkActionEditTypeEnum = BulkActionEditType.enum; + +export type NormalizedRuleAction = z.infer; +export const NormalizedRuleAction = z + .object({ + group: RuleActionGroup, + id: RuleActionId, + params: RuleActionParams, + frequency: RuleActionFrequency.optional(), + alerts_filter: RuleActionAlertsFilter.optional(), + }) + .strict(); + +export type BulkActionEditPayloadRuleActions = z.infer; +export const BulkActionEditPayloadRuleActions = z.object({ + type: z.enum(['add_rule_actions', 'set_rule_actions']), + value: z.object({ + throttle: ThrottleForBulkActions.optional(), + actions: z.array(NormalizedRuleAction), + }), +}); + +export type BulkActionEditPayloadSchedule = z.infer; +export const BulkActionEditPayloadSchedule = z.object({ + type: z.literal('set_schedule'), + value: z.object({ + /** + * Interval in which the rule is executed + */ + interval: z.string().regex(/^[1-9]\d*[smh]$/), + /** + * Lookback time for the rule + */ + lookback: z.string().regex(/^[1-9]\d*[smh]$/), + }), +}); + +export type BulkActionEditPayloadIndexPatterns = z.infer; +export const BulkActionEditPayloadIndexPatterns = z.object({ + type: z.enum(['add_index_patterns', 'delete_index_patterns', 'set_index_patterns']), + value: IndexPatternArray, + overwrite_data_views: z.boolean().optional(), +}); + +export type BulkActionEditPayloadTags = z.infer; +export const BulkActionEditPayloadTags = z.object({ + type: z.enum(['add_tags', 'delete_tags', 'set_tags']), + value: RuleTagArray, +}); + +export type BulkActionEditPayloadTimeline = z.infer; +export const BulkActionEditPayloadTimeline = z.object({ + type: z.literal('set_timeline'), + value: z.object({ + timeline_id: TimelineTemplateId, + timeline_title: TimelineTemplateTitle, + }), +}); + +export type BulkActionEditPayload = z.infer; +export const BulkActionEditPayload = z.union([ + BulkActionEditPayloadTags, + BulkActionEditPayloadIndexPatterns, + BulkActionEditPayloadTimeline, + BulkActionEditPayloadRuleActions, + BulkActionEditPayloadSchedule, +]); + +export type BulkEditRules = z.infer; +export const BulkEditRules = BulkActionBase.and( + z.object({ + action: z.literal('edit'), + /** + * Array of objects containing the edit operations + */ + edit: z.array(BulkActionEditPayload).min(1), + }) +); + +export type PerformBulkActionRequestQuery = z.infer; +export const PerformBulkActionRequestQuery = z.object({ + /** + * Enables dry run mode for the request call. + */ + dry_run: BooleanFromString.optional(), +}); +export type PerformBulkActionRequestQueryInput = z.input; + +export type PerformBulkActionRequestBody = z.infer; +export const PerformBulkActionRequestBody = z.union([ + BulkDeleteRules, + BulkDisableRules, + BulkEnableRules, + BulkExportRules, + BulkDuplicateRules, + BulkEditRules, +]); +export type PerformBulkActionRequestBodyInput = z.input; + +export type PerformBulkActionResponse = z.infer; +export const PerformBulkActionResponse = z.union([ + BulkEditActionResponse, + BulkExportActionResponse, +]); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.mock.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.mock.ts index 66ce78ff9b615..fa4fcefbcad1a 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.mock.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.mock.ts @@ -5,18 +5,18 @@ * 2.0. */ -import { BulkActionType, BulkActionEditType } from './bulk_actions_route'; -import type { PerformBulkActionRequestBody } from './bulk_actions_route'; +import type { PerformBulkActionRequestBody } from './bulk_actions_route.gen'; +import { BulkActionEditTypeEnum, BulkActionTypeEnum } from './bulk_actions_route.gen'; export const getPerformBulkActionSchemaMock = (): PerformBulkActionRequestBody => ({ query: '', ids: undefined, - action: BulkActionType.disable, + action: BulkActionTypeEnum.disable, }); export const getPerformBulkActionEditSchemaMock = (): PerformBulkActionRequestBody => ({ query: '', ids: undefined, - action: BulkActionType.edit, - [BulkActionType.edit]: [{ type: BulkActionEditType.add_tags, value: ['tag1'] }], + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [{ type: BulkActionEditTypeEnum.add_tags, value: ['tag1'] }], }); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.schema.yaml b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.schema.yaml index 8eba09881bbd9..583782f086ae7 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.schema.yaml +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.schema.yaml @@ -6,7 +6,7 @@ paths: /api/detection_engine/rules/_bulk_action: post: operationId: PerformBulkAction - x-codegen-enabled: false + x-codegen-enabled: true summary: Applies a bulk action to multiple rules description: The bulk action is applied to all rules that match the filter or to the list of rules by their IDs. tags: @@ -22,19 +22,24 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/PerformBulkActionRequest' + oneOf: + - $ref: '#/components/schemas/BulkDeleteRules' + - $ref: '#/components/schemas/BulkDisableRules' + - $ref: '#/components/schemas/BulkEnableRules' + - $ref: '#/components/schemas/BulkExportRules' + - $ref: '#/components/schemas/BulkDuplicateRules' + - $ref: '#/components/schemas/BulkEditRules' responses: 200: description: OK content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/BulkEditActionResponse' + oneOf: + - $ref: '#/components/schemas/BulkEditActionResponse' + - $ref: '#/components/schemas/BulkExportActionResponse' components: - x-codegen-enabled: false schemas: BulkEditSkipReason: type: string @@ -66,6 +71,11 @@ components: BulkActionsDryRunErrCode: type: string + enum: + - IMMUTABLE + - MACHINE_LEARNING_AUTH + - MACHINE_LEARNING_INDEX_PATTERN + - ESQL_INDEX_PATTERN NormalizedRuleError: type: object @@ -127,35 +137,17 @@ components: - succeeded - total - BulkEditActionSuccessResponse: + BulkEditActionResponse: type: object properties: success: type: boolean - rules_count: - type: integer - attributes: - type: object - properties: - results: - $ref: '#/components/schemas/BulkEditActionResults' - summary: - $ref: '#/components/schemas/BulkEditActionSummary' - required: - - results - - summary - required: - - success - - rules_count - - attributes - - BulkEditActionErrorResponse: - type: object - properties: status_code: type: integer message: type: string + rules_count: + type: integer attributes: type: object properties: @@ -171,35 +163,23 @@ components: - results - summary required: - - status_code - - message - attributes - BulkEditActionResponse: - oneOf: - - $ref: '#/components/schemas/BulkEditActionSuccessResponse' - - $ref: '#/components/schemas/BulkEditActionErrorResponse' + BulkExportActionResponse: + type: string BulkActionBase: - oneOf: - - type: object - properties: - query: - type: string - description: Query to filter rules - required: - - query - additionalProperties: false - - - type: object - properties: - ids: - type: array - description: Array of rule IDs - minItems: 1 - items: - type: string - additionalProperties: false + type: object + properties: + query: + type: string + description: Query to filter rules + ids: + type: array + description: Array of rule IDs + minItems: 1 + items: + type: string BulkDeleteRules: allOf: @@ -262,35 +242,20 @@ components: include_expired_exceptions: type: boolean description: Whether to copy expired exceptions from the original rule + required: + - include_exceptions + - include_expired_exceptions required: - action - RuleActionSummary: - type: boolean - description: Action summary indicates whether we will send a summary notification about all the generate alerts or notification per individual alert - - RuleActionNotifyWhen: - type: string - description: "The condition for throttling the notification: 'onActionGroupChange', 'onActiveAlert', or 'onThrottleInterval'" - enum: - - onActionGroupChange - - onActiveAlert - - onThrottleInterval - - RuleActionThrottle: + ThrottleForBulkActions: type: string description: "The condition for throttling the notification: 'rule', 'no_actions', or time duration" - - RuleActionFrequency: - type: object - properties: - summary: - $ref: '#/components/schemas/RuleActionSummary' - notifyWhen: - $ref: '#/components/schemas/RuleActionNotifyWhen' - throttle: - $ref: '#/components/schemas/RuleActionThrottle' - nullable: true + enum: + - rule + - 1h + - 1d + - 7d BulkActionType: type: string @@ -316,6 +281,26 @@ components: - set_rule_actions - set_schedule + # Per rulesClient.bulkEdit rules actions operation contract (x-pack/plugins/alerting/server/rules_client/rules_client.ts) normalized rule action object is expected (NormalizedAlertAction) as value for the edit operation + NormalizedRuleAction: + type: object + properties: + group: + $ref: '../../model/rule_schema/common_attributes.schema.yaml#/components/schemas/RuleActionGroup' + id: + $ref: '../../model/rule_schema/common_attributes.schema.yaml#/components/schemas/RuleActionId' + params: + $ref: '../../model/rule_schema/common_attributes.schema.yaml#/components/schemas/RuleActionParams' + frequency: + $ref: '../../model/rule_schema/common_attributes.schema.yaml#/components/schemas/RuleActionFrequency' + alerts_filter: + $ref: '../../model/rule_schema/common_attributes.schema.yaml#/components/schemas/RuleActionAlertsFilter' + required: + - group + - id + - params + additionalProperties: false + BulkActionEditPayloadRuleActions: type: object properties: @@ -326,28 +311,11 @@ components: type: object properties: throttle: - $ref: '#/components/schemas/RuleActionThrottle' + $ref: '#/components/schemas/ThrottleForBulkActions' actions: type: array items: - type: object - properties: - group: - type: string - description: Action group - id: - type: string - description: Action ID - params: - type: object - description: Action parameters - frequency: - $ref: '#/components/schemas/RuleActionFrequency' - description: Action frequency - required: - - group - - id - - params + $ref: '#/components/schemas/NormalizedRuleAction' required: - actions required: @@ -366,12 +334,19 @@ components: interval: type: string description: Interval in which the rule is executed + pattern: '^[1-9]\d*[smh]$' # any number except zero followed by one of the suffixes 's', 'm', 'h' + example: '1h' lookback: type: string description: Lookback time for the rule + pattern: '^[1-9]\d*[smh]$' # any number except zero followed by one of the suffixes 's', 'm', 'h' + example: '1h' required: - interval - lookback + required: + - type + - value BulkActionEditPayloadIndexPatterns: type: object @@ -441,22 +416,13 @@ components: properties: action: type: string - x-type: literal enum: [edit] edit: type: array description: Array of objects containing the edit operations items: $ref: '#/components/schemas/BulkActionEditPayload' + minItems: 1 required: - action - - rule - - PerformBulkActionRequest: - oneOf: - - $ref: '#/components/schemas/BulkDeleteRules' - - $ref: '#/components/schemas/BulkDisableRules' - - $ref: '#/components/schemas/BulkEnableRules' - - $ref: '#/components/schemas/BulkExportRules' - - $ref: '#/components/schemas/BulkDuplicateRules' - - $ref: '#/components/schemas/BulkEditRules' + - edit diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.test.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.test.ts index 70ae548674332..ff5289f79d98d 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.test.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.test.ts @@ -5,19 +5,12 @@ * 2.0. */ -import { left } from 'fp-ts/lib/Either'; -import { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; +import { expectParseError, expectParseSuccess, stringifyZodError } from '@kbn/zod-helpers'; import { + BulkActionEditTypeEnum, + BulkActionTypeEnum, PerformBulkActionRequestBody, - BulkActionType, - BulkActionEditType, -} from './bulk_actions_route'; - -const retrieveValidationMessage = (payload: unknown) => { - const decoded = PerformBulkActionRequestBody.decode(payload); - const checked = exactCheck(payload, decoded); - return foldLeftRight(checked); -}; +} from './bulk_actions_route.gen'; describe('Perform bulk action request schema', () => { describe('cases common to every bulk action', () => { @@ -25,62 +18,64 @@ describe('Perform bulk action request schema', () => { test('valid request: missing query', () => { const payload: PerformBulkActionRequestBody = { query: undefined, - action: BulkActionType.enable, + action: BulkActionTypeEnum.enable, }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); test('invalid request: missing action', () => { const payload: Omit = { query: 'name: test', }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); + expectParseError(result); - expect(getPaths(left(message.errors))).toEqual([ - 'Invalid value "undefined" supplied to "action"', - 'Invalid value "undefined" supplied to "edit"', - ]); - expect(message.schema).toEqual({}); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"action: Invalid literal value, expected \\"delete\\", action: Invalid literal value, expected \\"disable\\", action: Invalid literal value, expected \\"enable\\", action: Invalid literal value, expected \\"export\\", action: Invalid literal value, expected \\"duplicate\\", and 2 more"` + ); }); test('invalid request: unknown action', () => { const payload: Omit & { action: 'unknown' } = { - query: 'name: test', action: 'unknown', }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); + expectParseError(result); - expect(getPaths(left(message.errors))).toEqual([ - 'Invalid value "unknown" supplied to "action"', - 'Invalid value "undefined" supplied to "edit"', - ]); - expect(message.schema).toEqual({}); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"action: Invalid literal value, expected \\"delete\\", action: Invalid literal value, expected \\"disable\\", action: Invalid literal value, expected \\"enable\\", action: Invalid literal value, expected \\"export\\", action: Invalid literal value, expected \\"duplicate\\", and 2 more"` + ); }); - test('invalid request: unknown property', () => { + test('strips unknown properties', () => { const payload = { query: 'name: test', - action: BulkActionType.enable, + action: BulkActionTypeEnum.enable, mock: ['id'], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); + expectParseSuccess(result); - expect(getPaths(left(message.errors))).toEqual(['invalid keys "mock,["id"]"']); - expect(message.schema).toEqual({}); + expect(result.data).toEqual({ + query: 'name: test', + action: BulkActionTypeEnum.enable, + }); }); test('invalid request: wrong type for ids', () => { const payload = { ids: 'mock', - action: BulkActionType.enable, + action: BulkActionTypeEnum.enable, }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); + expectParseError(result); - expect(getPaths(left(message.errors))).toEqual(['Invalid value "mock" supplied to "ids"']); - expect(message.schema).toEqual({}); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"ids: Expected array, received string, action: Invalid literal value, expected \\"delete\\", ids: Expected array, received string, action: Invalid literal value, expected \\"disable\\", ids: Expected array, received string, and 7 more"` + ); }); }); @@ -88,11 +83,11 @@ describe('Perform bulk action request schema', () => { test('valid request', () => { const payload: PerformBulkActionRequestBody = { query: 'name: test', - action: BulkActionType.enable, + action: BulkActionTypeEnum.enable, }; - const message = retrieveValidationMessage(payload); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); }); @@ -100,11 +95,11 @@ describe('Perform bulk action request schema', () => { test('valid request', () => { const payload: PerformBulkActionRequestBody = { query: 'name: test', - action: BulkActionType.disable, + action: BulkActionTypeEnum.disable, }; - const message = retrieveValidationMessage(payload); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); }); @@ -112,11 +107,11 @@ describe('Perform bulk action request schema', () => { test('valid request', () => { const payload: PerformBulkActionRequestBody = { query: 'name: test', - action: BulkActionType.export, + action: BulkActionTypeEnum.export, }; - const message = retrieveValidationMessage(payload); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); }); @@ -124,11 +119,11 @@ describe('Perform bulk action request schema', () => { test('valid request', () => { const payload: PerformBulkActionRequestBody = { query: 'name: test', - action: BulkActionType.delete, + action: BulkActionTypeEnum.delete, }; - const message = retrieveValidationMessage(payload); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); }); @@ -136,15 +131,15 @@ describe('Perform bulk action request schema', () => { test('valid request', () => { const payload: PerformBulkActionRequestBody = { query: 'name: test', - action: BulkActionType.duplicate, - [BulkActionType.duplicate]: { + action: BulkActionTypeEnum.duplicate, + [BulkActionTypeEnum.duplicate]: { include_exceptions: false, include_expired_exceptions: false, }, }; - const message = retrieveValidationMessage(payload); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); }); @@ -153,47 +148,30 @@ describe('Perform bulk action request schema', () => { test('invalid request: missing edit payload', () => { const payload = { query: 'name: test', - action: BulkActionType.edit, - }; - - const message = retrieveValidationMessage(payload); - - expect(getPaths(left(message.errors))).toEqual([ - 'Invalid value "edit" supplied to "action"', - 'Invalid value "undefined" supplied to "edit"', - ]); - expect(message.schema).toEqual({}); - }); - - test('invalid request: specified edit payload for another action', () => { - const payload = { - query: 'name: test', - action: BulkActionType.enable, - [BulkActionType.edit]: [{ type: BulkActionEditType.set_tags, value: ['test-tag'] }], + action: BulkActionTypeEnum.edit, }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); + expectParseError(result); - expect(getPaths(left(message.errors))).toEqual([ - 'invalid keys "edit,[{"type":"set_tags","value":["test-tag"]}]"', - ]); - expect(message.schema).toEqual({}); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"action: Invalid literal value, expected \\"delete\\", action: Invalid literal value, expected \\"disable\\", action: Invalid literal value, expected \\"enable\\", action: Invalid literal value, expected \\"export\\", action: Invalid literal value, expected \\"duplicate\\", and 1 more"` + ); }); test('invalid request: wrong type for edit payload', () => { const payload = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: { type: BulkActionEditType.set_tags, value: ['test-tag'] }, + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: { type: BulkActionEditTypeEnum.set_tags, value: ['test-tag'] }, }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); + expectParseError(result); - expect(getPaths(left(message.errors))).toEqual([ - 'Invalid value "edit" supplied to "action"', - 'Invalid value "{"type":"set_tags","value":["test-tag"]}" supplied to "edit"', - ]); - expect(message.schema).toEqual({}); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"action: Invalid literal value, expected \\"delete\\", action: Invalid literal value, expected \\"disable\\", action: Invalid literal value, expected \\"enable\\", action: Invalid literal value, expected \\"export\\", action: Invalid literal value, expected \\"duplicate\\", and 1 more"` + ); }); }); @@ -201,57 +179,61 @@ describe('Perform bulk action request schema', () => { test('invalid request: wrong tags type', () => { const payload = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [{ type: BulkActionEditType.set_tags, value: 'test-tag' }], + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [{ type: BulkActionEditTypeEnum.set_tags, value: 'test-tag' }], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); + expectParseError(result); - expect(getPaths(left(message.errors))).toEqual([ - 'Invalid value "edit" supplied to "action"', - 'Invalid value "test-tag" supplied to "edit,value"', - 'Invalid value "set_tags" supplied to "edit,type"', - ]); - expect(message.schema).toEqual({}); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"action: Invalid literal value, expected \\"delete\\", action: Invalid literal value, expected \\"disable\\", action: Invalid literal value, expected \\"enable\\", action: Invalid literal value, expected \\"export\\", action: Invalid literal value, expected \\"duplicate\\", and 9 more"` + ); }); test('valid request: add_tags edit action', () => { const payload = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [{ type: BulkActionEditType.add_tags, value: ['test-tag'] }], + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ + { type: BulkActionEditTypeEnum.add_tags, value: ['test-tag'] }, + ], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); test('valid request: set_tags edit action', () => { const payload = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [{ type: BulkActionEditType.set_tags, value: ['test-tag'] }], + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ + { type: BulkActionEditTypeEnum.set_tags, value: ['test-tag'] }, + ], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); test('valid request: delete_tags edit action', () => { const payload = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [{ type: BulkActionEditType.delete_tags, value: ['test-tag'] }], + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ + { type: BulkActionEditTypeEnum.delete_tags, value: ['test-tag'] }, + ], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); }); @@ -259,63 +241,61 @@ describe('Perform bulk action request schema', () => { test('invalid request: wrong index_patterns type', () => { const payload = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [{ type: BulkActionEditType.set_tags, value: 'logs-*' }], + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [{ type: BulkActionEditTypeEnum.set_tags, value: 'logs-*' }], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); + expectParseError(result); - expect(getPaths(left(message.errors))).toEqual([ - 'Invalid value "edit" supplied to "action"', - 'Invalid value "logs-*" supplied to "edit,value"', - 'Invalid value "set_tags" supplied to "edit,type"', - ]); - expect(message.schema).toEqual({}); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"action: Invalid literal value, expected \\"delete\\", action: Invalid literal value, expected \\"disable\\", action: Invalid literal value, expected \\"enable\\", action: Invalid literal value, expected \\"export\\", action: Invalid literal value, expected \\"duplicate\\", and 9 more"` + ); }); test('valid request: set_index_patterns edit action', () => { const payload: PerformBulkActionRequestBody = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [ - { type: BulkActionEditType.set_index_patterns, value: ['logs-*'] }, + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ + { type: BulkActionEditTypeEnum.set_index_patterns, value: ['logs-*'] }, ], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); test('valid request: add_index_patterns edit action', () => { const payload: PerformBulkActionRequestBody = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [ - { type: BulkActionEditType.add_index_patterns, value: ['logs-*'] }, + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ + { type: BulkActionEditTypeEnum.add_index_patterns, value: ['logs-*'] }, ], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); test('valid request: delete_index_patterns edit action', () => { const payload: PerformBulkActionRequestBody = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [ - { type: BulkActionEditType.delete_index_patterns, value: ['logs-*'] }, + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ + { type: BulkActionEditTypeEnum.delete_index_patterns, value: ['logs-*'] }, ], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); }); @@ -323,27 +303,25 @@ describe('Perform bulk action request schema', () => { test('invalid request: wrong timeline payload type', () => { const payload = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [{ type: BulkActionEditType.set_timeline, value: [] }], + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [{ type: BulkActionEditTypeEnum.set_timeline, value: [] }], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual([ - 'Invalid value "edit" supplied to "action"', - 'Invalid value "set_timeline" supplied to "edit,type"', - 'Invalid value "[]" supplied to "edit,value"', - ]); - expect(message.schema).toEqual({}); + expectParseError(result); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"action: Invalid literal value, expected \\"delete\\", action: Invalid literal value, expected \\"disable\\", action: Invalid literal value, expected \\"enable\\", action: Invalid literal value, expected \\"export\\", action: Invalid literal value, expected \\"duplicate\\", and 7 more"` + ); }); test('invalid request: missing timeline_id', () => { const payload = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_timeline, + type: BulkActionEditTypeEnum.set_timeline, value: { timeline_title: 'Test timeline title', }, @@ -351,24 +329,21 @@ describe('Perform bulk action request schema', () => { ], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual( - expect.arrayContaining([ - 'Invalid value "{"timeline_title":"Test timeline title"}" supplied to "edit,value"', - 'Invalid value "undefined" supplied to "edit,value,timeline_id"', - ]) + expectParseError(result); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"action: Invalid literal value, expected \\"delete\\", action: Invalid literal value, expected \\"disable\\", action: Invalid literal value, expected \\"enable\\", action: Invalid literal value, expected \\"export\\", action: Invalid literal value, expected \\"duplicate\\", and 10 more"` ); - expect(message.schema).toEqual({}); }); test('valid request: set_timeline edit action', () => { const payload: PerformBulkActionRequestBody = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_timeline, + type: BulkActionEditTypeEnum.set_timeline, value: { timeline_id: 'timelineid', timeline_title: 'Test timeline title', @@ -377,10 +352,10 @@ describe('Perform bulk action request schema', () => { ], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); }); @@ -388,27 +363,25 @@ describe('Perform bulk action request schema', () => { test('invalid request: wrong schedules payload type', () => { const payload = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [{ type: BulkActionEditType.set_schedule, value: [] }], + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [{ type: BulkActionEditTypeEnum.set_schedule, value: [] }], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual([ - 'Invalid value "edit" supplied to "action"', - 'Invalid value "set_schedule" supplied to "edit,type"', - 'Invalid value "[]" supplied to "edit,value"', - ]); - expect(message.schema).toEqual({}); + expectParseError(result); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"action: Invalid literal value, expected \\"delete\\", action: Invalid literal value, expected \\"disable\\", action: Invalid literal value, expected \\"enable\\", action: Invalid literal value, expected \\"export\\", action: Invalid literal value, expected \\"duplicate\\", and 7 more"` + ); }); test('invalid request: wrong type of payload data', () => { const payload = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_schedule, + type: BulkActionEditTypeEnum.set_schedule, value: { interval: '-10m', lookback: '1m', @@ -417,25 +390,21 @@ describe('Perform bulk action request schema', () => { ], } as PerformBulkActionRequestBody; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual( - expect.arrayContaining([ - 'Invalid value "edit" supplied to "action"', - 'Invalid value "{"interval":"-10m","lookback":"1m"}" supplied to "edit,value"', - 'Invalid value "-10m" supplied to "edit,value,interval"', - ]) + expectParseError(result); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"edit.0.value.interval: Invalid"` ); - expect(message.schema).toEqual({}); }); test('invalid request: missing interval', () => { const payload = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_schedule, + type: BulkActionEditTypeEnum.set_schedule, value: { lookback: '1m', }, @@ -443,25 +412,21 @@ describe('Perform bulk action request schema', () => { ], } as PerformBulkActionRequestBody; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual( - expect.arrayContaining([ - 'Invalid value "edit" supplied to "action"', - 'Invalid value "{"lookback":"1m"}" supplied to "edit,value"', - 'Invalid value "undefined" supplied to "edit,value,interval"', - ]) + expectParseError(result); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"action: Invalid literal value, expected \\"delete\\", action: Invalid literal value, expected \\"disable\\", action: Invalid literal value, expected \\"enable\\", action: Invalid literal value, expected \\"export\\", action: Invalid literal value, expected \\"duplicate\\", and 10 more"` ); - expect(message.schema).toEqual({}); }); test('invalid request: missing lookback', () => { const payload = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_schedule, + type: BulkActionEditTypeEnum.set_schedule, value: { interval: '1m', }, @@ -469,25 +434,21 @@ describe('Perform bulk action request schema', () => { ], } as PerformBulkActionRequestBody; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual( - expect.arrayContaining([ - 'Invalid value "edit" supplied to "action"', - 'Invalid value "{"interval":"1m"}" supplied to "edit,value"', - 'Invalid value "undefined" supplied to "edit,value,lookback"', - ]) + expectParseError(result); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"action: Invalid literal value, expected \\"delete\\", action: Invalid literal value, expected \\"disable\\", action: Invalid literal value, expected \\"enable\\", action: Invalid literal value, expected \\"export\\", action: Invalid literal value, expected \\"duplicate\\", and 10 more"` ); - expect(message.schema).toEqual({}); }); test('valid request: set_schedule edit action', () => { const payload: PerformBulkActionRequestBody = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_schedule, + type: BulkActionEditTypeEnum.set_schedule, value: { interval: '1m', lookback: '1m', @@ -496,10 +457,10 @@ describe('Perform bulk action request schema', () => { ], } as PerformBulkActionRequestBody; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); }); @@ -507,25 +468,25 @@ describe('Perform bulk action request schema', () => { test('invalid request: invalid rule actions payload', () => { const payload = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [{ type: BulkActionEditType.add_rule_actions, value: [] }], + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [{ type: BulkActionEditTypeEnum.add_rule_actions, value: [] }], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual( - expect.arrayContaining(['Invalid value "[]" supplied to "edit,value"']) + expectParseError(result); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"action: Invalid literal value, expected \\"delete\\", action: Invalid literal value, expected \\"disable\\", action: Invalid literal value, expected \\"enable\\", action: Invalid literal value, expected \\"export\\", action: Invalid literal value, expected \\"duplicate\\", and 7 more"` ); - expect(message.schema).toEqual({}); }); test('invalid request: missing actions in payload', () => { const payload = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_rule_actions, + type: BulkActionEditTypeEnum.add_rule_actions, value: { throttle: '1h', }, @@ -533,21 +494,21 @@ describe('Perform bulk action request schema', () => { ], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual( - expect.arrayContaining(['Invalid value "undefined" supplied to "edit,value,actions"']) + expectParseError(result); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"action: Invalid literal value, expected \\"delete\\", action: Invalid literal value, expected \\"disable\\", action: Invalid literal value, expected \\"enable\\", action: Invalid literal value, expected \\"export\\", action: Invalid literal value, expected \\"duplicate\\", and 11 more"` ); - expect(message.schema).toEqual({}); }); test('invalid request: invalid action_type_id property in actions array', () => { const payload = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_rule_actions, + type: BulkActionEditTypeEnum.add_rule_actions, value: { throttle: '1h', actions: [ @@ -567,20 +528,20 @@ describe('Perform bulk action request schema', () => { ], }; - const message = retrieveValidationMessage(payload); - expect(getPaths(left(message.errors))).toEqual( - expect.arrayContaining(['invalid keys "action_type_id"']) + const result = PerformBulkActionRequestBody.safeParse(payload); + expectParseError(result); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"edit.0.value.actions.0: Unrecognized key(s) in object: 'action_type_id'"` ); - expect(message.schema).toEqual({}); }); test('valid request: add_rule_actions edit action', () => { const payload: PerformBulkActionRequestBody = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_rule_actions, + type: BulkActionEditTypeEnum.add_rule_actions, value: { throttle: '1h', actions: [ @@ -599,19 +560,19 @@ describe('Perform bulk action request schema', () => { ], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); test('valid request: set_rule_actions edit action', () => { const payload: PerformBulkActionRequestBody = { query: 'name: test', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_rule_actions, + type: BulkActionEditTypeEnum.set_rule_actions, value: { throttle: '1h', actions: [ @@ -632,10 +593,10 @@ describe('Perform bulk action request schema', () => { ], }; - const message = retrieveValidationMessage(payload); + const result = PerformBulkActionRequestBody.safeParse(payload); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); }); }); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.ts deleted file mode 100644 index 768626d08769d..0000000000000 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route.ts +++ /dev/null @@ -1,269 +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 * as t from 'io-ts'; - -import { NonEmptyArray, TimeDuration } from '@kbn/securitysolution-io-ts-types'; -import { - RuleActionAlertsFilter, - RuleActionFrequency, - RuleActionGroup, - RuleActionId, - RuleActionParams, -} from '@kbn/securitysolution-io-ts-alerting-types'; - -import type { BulkActionSkipResult } from '@kbn/alerting-plugin/common'; -import type { RuleResponse } from '../../model'; -import type { BulkActionsDryRunErrCode } from '../../../../constants'; - -// TODO https://github.com/elastic/security-team/issues/7491 -// eslint-disable-next-line no-restricted-imports -import { - IndexPatternArray, - RuleQuery, - RuleTagArray, - TimelineTemplateId, - TimelineTemplateTitle, -} from '../../model/rule_schema_legacy'; - -export enum BulkActionType { - 'enable' = 'enable', - 'disable' = 'disable', - 'export' = 'export', - 'delete' = 'delete', - 'duplicate' = 'duplicate', - 'edit' = 'edit', -} - -export enum BulkActionEditType { - 'add_tags' = 'add_tags', - 'delete_tags' = 'delete_tags', - 'set_tags' = 'set_tags', - 'add_index_patterns' = 'add_index_patterns', - 'delete_index_patterns' = 'delete_index_patterns', - 'set_index_patterns' = 'set_index_patterns', - 'set_timeline' = 'set_timeline', - 'add_rule_actions' = 'add_rule_actions', - 'set_rule_actions' = 'set_rule_actions', - 'set_schedule' = 'set_schedule', -} - -export type ThrottleForBulkActions = t.TypeOf; -export const ThrottleForBulkActions = t.union([ - t.literal('rule'), - t.literal('1h'), - t.literal('1d'), - t.literal('7d'), -]); - -type BulkActionEditPayloadTags = t.TypeOf; -const BulkActionEditPayloadTags = t.type({ - type: t.union([ - t.literal(BulkActionEditType.add_tags), - t.literal(BulkActionEditType.delete_tags), - t.literal(BulkActionEditType.set_tags), - ]), - value: RuleTagArray, -}); - -export type BulkActionEditPayloadIndexPatterns = t.TypeOf< - typeof BulkActionEditPayloadIndexPatterns ->; -const BulkActionEditPayloadIndexPatterns = t.intersection([ - t.type({ - type: t.union([ - t.literal(BulkActionEditType.add_index_patterns), - t.literal(BulkActionEditType.delete_index_patterns), - t.literal(BulkActionEditType.set_index_patterns), - ]), - value: IndexPatternArray, - }), - t.exact(t.partial({ overwrite_data_views: t.boolean })), -]); - -type BulkActionEditPayloadTimeline = t.TypeOf; -const BulkActionEditPayloadTimeline = t.type({ - type: t.literal(BulkActionEditType.set_timeline), - value: t.type({ - timeline_id: TimelineTemplateId, - timeline_title: TimelineTemplateTitle, - }), -}); - -/** - * per rulesClient.bulkEdit rules actions operation contract (x-pack/plugins/alerting/server/rules_client/rules_client.ts) - * normalized rule action object is expected (NormalizedAlertAction) as value for the edit operation - */ -export type NormalizedRuleAction = t.TypeOf; -export const NormalizedRuleAction = t.exact( - t.intersection([ - t.type({ - group: RuleActionGroup, - id: RuleActionId, - params: RuleActionParams, - }), - t.partial({ frequency: RuleActionFrequency }), - t.partial({ alerts_filter: RuleActionAlertsFilter }), - ]) -); - -export type BulkActionEditPayloadRuleActions = t.TypeOf; -export const BulkActionEditPayloadRuleActions = t.type({ - type: t.union([ - t.literal(BulkActionEditType.add_rule_actions), - t.literal(BulkActionEditType.set_rule_actions), - ]), - value: t.intersection([ - t.partial({ throttle: ThrottleForBulkActions }), - t.type({ - actions: t.array(NormalizedRuleAction), - }), - ]), -}); - -type BulkActionEditPayloadSchedule = t.TypeOf; -const BulkActionEditPayloadSchedule = t.type({ - type: t.literal(BulkActionEditType.set_schedule), - value: t.type({ - interval: TimeDuration({ allowedUnits: ['s', 'm', 'h'] }), - lookback: TimeDuration({ allowedUnits: ['s', 'm', 'h'] }), - }), -}); - -export type BulkActionEditPayload = t.TypeOf; -export const BulkActionEditPayload = t.union([ - BulkActionEditPayloadTags, - BulkActionEditPayloadIndexPatterns, - BulkActionEditPayloadTimeline, - BulkActionEditPayloadRuleActions, - BulkActionEditPayloadSchedule, -]); - -const bulkActionDuplicatePayload = t.exact( - t.type({ - include_exceptions: t.boolean, - include_expired_exceptions: t.boolean, - }) -); - -export type BulkActionDuplicatePayload = t.TypeOf; - -/** - * actions that modify rules attributes - */ -export type BulkActionEditForRuleAttributes = - | BulkActionEditPayloadTags - | BulkActionEditPayloadRuleActions - | BulkActionEditPayloadSchedule; - -/** - * actions that modify rules params - */ -export type BulkActionEditForRuleParams = - | BulkActionEditPayloadIndexPatterns - | BulkActionEditPayloadTimeline - | BulkActionEditPayloadSchedule; - -/** - * Request body parameters of the API route. - */ -export type PerformBulkActionRequestBody = t.TypeOf; -export const PerformBulkActionRequestBody = t.intersection([ - t.exact( - t.type({ - query: t.union([RuleQuery, t.undefined]), - }) - ), - t.exact(t.partial({ ids: NonEmptyArray(t.string) })), - t.union([ - t.exact( - t.type({ - action: t.union([ - t.literal(BulkActionType.delete), - t.literal(BulkActionType.disable), - t.literal(BulkActionType.enable), - t.literal(BulkActionType.export), - ]), - }) - ), - t.intersection([ - t.exact( - t.type({ - action: t.literal(BulkActionType.duplicate), - }) - ), - t.exact( - t.partial({ - [BulkActionType.duplicate]: bulkActionDuplicatePayload, - }) - ), - ]), - t.exact( - t.type({ - action: t.literal(BulkActionType.edit), - [BulkActionType.edit]: NonEmptyArray(BulkActionEditPayload), - }) - ), - ]), -]); - -/** - * Query string parameters of the API route. - */ -export type PerformBulkActionRequestQuery = t.TypeOf; -export const PerformBulkActionRequestQuery = t.exact( - t.partial({ - dry_run: t.union([t.literal('true'), t.literal('false')]), - }) -); - -export interface RuleDetailsInError { - id: string; - name?: string; -} -export interface NormalizedRuleError { - message: string; - status_code: number; - err_code?: BulkActionsDryRunErrCode; - rules: RuleDetailsInError[]; -} -export interface BulkEditActionResults { - updated: RuleResponse[]; - created: RuleResponse[]; - deleted: RuleResponse[]; - skipped: BulkActionSkipResult[]; -} - -export interface BulkEditActionSummary { - failed: number; - skipped: number; - succeeded: number; - total: number; -} -export interface BulkEditActionSuccessResponse { - success: boolean; - rules_count: number; - attributes: { - results: BulkEditActionResults; - summary: BulkEditActionSummary; - }; -} -export interface BulkEditActionErrorResponse { - status_code: number; - message: string; - attributes: { - results: BulkEditActionResults; - summary: BulkEditActionSummary; - errors?: NormalizedRuleError[]; - }; -} - -export type BulkEditActionResponse = BulkEditActionSuccessResponse | BulkEditActionErrorResponse; - -export type BulkExportActionResponse = string; - -export type PerformBulkActionResponse = BulkEditActionResponse | BulkExportActionResponse; diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_types.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_types.ts new file mode 100644 index 0000000000000..6e57e5abe2410 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_actions/bulk_actions_types.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 { + BulkActionEditPayloadIndexPatterns, + BulkActionEditPayloadRuleActions, + BulkActionEditPayloadSchedule, + BulkActionEditPayloadTags, + BulkActionEditPayloadTimeline, +} from './bulk_actions_route.gen'; + +/** + * actions that modify rules attributes + */ +export type BulkActionEditForRuleAttributes = + | BulkActionEditPayloadTags + | BulkActionEditPayloadRuleActions + | BulkActionEditPayloadSchedule; + +/** + * actions that modify rules params + */ +export type BulkActionEditForRuleParams = + | BulkActionEditPayloadIndexPatterns + | BulkActionEditPayloadTimeline + | BulkActionEditPayloadSchedule; diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_crud/bulk_create_rules/bulk_create_rules_route.test.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_crud/bulk_create_rules/bulk_create_rules_route.test.ts index 40955f2eba40a..2e6cff31f8f7d 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_crud/bulk_create_rules/bulk_create_rules_route.test.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_crud/bulk_create_rules/bulk_create_rules_route.test.ts @@ -26,7 +26,9 @@ describe('Bulk create rules request schema', () => { const result = BulkCreateRulesRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"0: Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"0.name: Required, 0.description: Required, 0.risk_score: Required, 0.severity: Required, 0.type: Invalid literal value, expected \\"eql\\", and 52 more"` + ); }); test('single array element does validate', () => { @@ -56,7 +58,9 @@ describe('Bulk create rules request schema', () => { const result = BulkCreateRulesRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"0: Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"0.risk_score: Required, 0.type: Invalid literal value, expected \\"eql\\", 0.language: Invalid literal value, expected \\"eql\\", 0.risk_score: Required, 0.risk_score: Required, and 22 more"` + ); }); test('two array elements where the first is valid but the second is invalid (risk_score) will not validate', () => { @@ -68,7 +72,9 @@ describe('Bulk create rules request schema', () => { const result = BulkCreateRulesRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"1: Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"1.risk_score: Required, 1.type: Invalid literal value, expected \\"eql\\", 1.language: Invalid literal value, expected \\"eql\\", 1.risk_score: Required, 1.risk_score: Required, and 22 more"` + ); }); test('two array elements where the first is invalid (risk_score) but the second is valid will not validate', () => { @@ -80,7 +86,9 @@ describe('Bulk create rules request schema', () => { const result = BulkCreateRulesRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"0: Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"0.risk_score: Required, 0.type: Invalid literal value, expected \\"eql\\", 0.language: Invalid literal value, expected \\"eql\\", 0.risk_score: Required, 0.risk_score: Required, and 22 more"` + ); }); test('two array elements where both are invalid (risk_score) will not validate', () => { @@ -95,7 +103,7 @@ describe('Bulk create rules request schema', () => { const result = BulkCreateRulesRequestBody.safeParse(payload); expectParseError(result); expect(stringifyZodError(result.error)).toMatchInlineSnapshot( - `"0: Invalid input, 1: Invalid input"` + `"0.risk_score: Required, 0.type: Invalid literal value, expected \\"eql\\", 0.language: Invalid literal value, expected \\"eql\\", 0.risk_score: Required, 0.risk_score: Required, and 49 more"` ); }); @@ -121,7 +129,9 @@ describe('Bulk create rules request schema', () => { const result = BulkCreateRulesRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"0: Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"0.severity: Invalid enum value. Expected 'low' | 'medium' | 'high' | 'critical', received 'madeup', 0.type: Invalid literal value, expected \\"eql\\", 0.language: Invalid literal value, expected \\"eql\\", 0.severity: Invalid enum value. Expected 'low' | 'medium' | 'high' | 'critical', received 'madeup', 0.severity: Invalid enum value. Expected 'low' | 'medium' | 'high' | 'critical', received 'madeup', and 22 more"` + ); }); test('You can set "note" to a string', () => { @@ -154,6 +164,8 @@ describe('Bulk create rules request schema', () => { const result = BulkCreateRulesRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"0: Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"0.note: Expected string, received object, 0.type: Invalid literal value, expected \\"eql\\", 0.language: Invalid literal value, expected \\"eql\\", 0.note: Expected string, received object, 0.note: Expected string, received object, and 22 more"` + ); }); }); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_crud/bulk_patch_rules/bulk_patch_rules_route.test.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_crud/bulk_patch_rules/bulk_patch_rules_route.test.ts index 443a3e0862b45..d5325ad5ed13f 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_crud/bulk_patch_rules/bulk_patch_rules_route.test.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_crud/bulk_patch_rules/bulk_patch_rules_route.test.ts @@ -70,6 +70,8 @@ describe('Bulk patch rules request schema', () => { const result = BulkPatchRulesRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"1: Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"1.note: Expected string, received object, 1.note: Expected string, received object, 1.note: Expected string, received object, 1.note: Expected string, received object, 1.note: Expected string, received object, and 3 more"` + ); }); }); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_crud/bulk_update_rules/bulk_update_rules_route.test.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_crud/bulk_update_rules/bulk_update_rules_route.test.ts index 86a3a943b6626..3fa69c6ad24dc 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_crud/bulk_update_rules/bulk_update_rules_route.test.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_crud/bulk_update_rules/bulk_update_rules_route.test.ts @@ -27,7 +27,9 @@ describe('Bulk update rules request schema', () => { const result = BulkUpdateRulesRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"0: Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"0.name: Required, 0.description: Required, 0.risk_score: Required, 0.severity: Required, 0.type: Invalid literal value, expected \\"eql\\", and 52 more"` + ); }); test('single array element does validate', () => { @@ -57,7 +59,9 @@ describe('Bulk update rules request schema', () => { const result = BulkUpdateRulesRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"0: Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"0.risk_score: Required, 0.type: Invalid literal value, expected \\"eql\\", 0.language: Invalid literal value, expected \\"eql\\", 0.risk_score: Required, 0.risk_score: Required, and 22 more"` + ); }); test('two array elements where the first is valid but the second is invalid (risk_score) will not validate', () => { @@ -69,7 +73,9 @@ describe('Bulk update rules request schema', () => { const result = BulkUpdateRulesRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"1: Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"1.risk_score: Required, 1.type: Invalid literal value, expected \\"eql\\", 1.language: Invalid literal value, expected \\"eql\\", 1.risk_score: Required, 1.risk_score: Required, and 22 more"` + ); }); test('two array elements where the first is invalid (risk_score) but the second is valid will not validate', () => { @@ -81,7 +87,9 @@ describe('Bulk update rules request schema', () => { const result = BulkUpdateRulesRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"0: Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"0.risk_score: Required, 0.type: Invalid literal value, expected \\"eql\\", 0.language: Invalid literal value, expected \\"eql\\", 0.risk_score: Required, 0.risk_score: Required, and 22 more"` + ); }); test('two array elements where both are invalid (risk_score) will not validate', () => { @@ -96,7 +104,7 @@ describe('Bulk update rules request schema', () => { const result = BulkUpdateRulesRequestBody.safeParse(payload); expectParseError(result); expect(stringifyZodError(result.error)).toMatchInlineSnapshot( - `"0: Invalid input, 1: Invalid input"` + `"0.risk_score: Required, 0.type: Invalid literal value, expected \\"eql\\", 0.language: Invalid literal value, expected \\"eql\\", 0.risk_score: Required, 0.risk_score: Required, and 49 more"` ); }); @@ -122,7 +130,9 @@ describe('Bulk update rules request schema', () => { const result = BulkUpdateRulesRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"0: Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"0.severity: Invalid enum value. Expected 'low' | 'medium' | 'high' | 'critical', received 'madeup', 0.type: Invalid literal value, expected \\"eql\\", 0.language: Invalid literal value, expected \\"eql\\", 0.severity: Invalid enum value. Expected 'low' | 'medium' | 'high' | 'critical', received 'madeup', 0.severity: Invalid enum value. Expected 'low' | 'medium' | 'high' | 'critical', received 'madeup', and 22 more"` + ); }); test('You can set "namespace" to a string', () => { @@ -165,6 +175,8 @@ describe('Bulk update rules request schema', () => { const result = BulkUpdateRulesRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"0: Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"0.note: Expected string, received object, 0.type: Invalid literal value, expected \\"eql\\", 0.language: Invalid literal value, expected \\"eql\\", 0.note: Expected string, received object, 0.note: Expected string, received object, and 22 more"` + ); }); }); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_crud/response_schema.test.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_crud/response_schema.test.ts index d8e3c997e2279..413d83f9fee01 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_crud/response_schema.test.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/bulk_crud/response_schema.test.ts @@ -45,7 +45,9 @@ describe('Bulk CRUD rules response schema', () => { const result = BulkCrudRulesResponse.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"0: Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"0.error: Required, 0: Unrecognized key(s) in object: 'author', 'created_at', 'updated_at', 'created_by', 'description', 'enabled', 'false_positives', 'from', 'immutable', 'references', 'revision', 'severity', 'severity_mapping', 'updated_by', 'tags', 'to', 'threat', 'version', 'output_index', 'max_signals', 'risk_score', 'risk_score_mapping', 'interval', 'exceptions_list', 'related_integrations', 'required_fields', 'setup', 'throttle', 'actions', 'building_block_type', 'note', 'license', 'outcome', 'alias_target_id', 'alias_purpose', 'timeline_id', 'timeline_title', 'meta', 'rule_name_override', 'timestamp_override', 'timestamp_override_fallback_disabled', 'namespace', 'investigation_fields', 'query', 'type', 'language', 'index', 'data_view_id', 'filters', 'saved_id', 'response_actions', 'alert_suppression', 0.name: Required, 0.type: Invalid literal value, expected \\"eql\\", 0.language: Invalid literal value, expected \\"eql\\", and 24 more"` + ); }); test('it should NOT validate an invalid error message with a deleted value', () => { @@ -56,7 +58,9 @@ describe('Bulk CRUD rules response schema', () => { const result = BulkCrudRulesResponse.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"0: Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"0.error: Required, 0.name: Required, 0.description: Required, 0.risk_score: Required, 0.severity: Required, and 267 more"` + ); }); test('it should omit any extra rule props', () => { diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/crud/patch_rule/patch_rule_route.test.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/crud/patch_rule/patch_rule_route.test.ts index b70b5a6a7d908..1994b3de5d453 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/crud/patch_rule/patch_rule_route.test.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/crud/patch_rule/patch_rule_route.test.ts @@ -373,7 +373,9 @@ describe('Patch rule request schema', () => { const result = PatchRuleRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"references.0: Expected string, received number, references.0: Expected string, received number, references.0: Expected string, received number, references.0: Expected string, received number, references.0: Expected string, received number, and 3 more"` + ); }); test('indexes cannot be numbers', () => { @@ -385,7 +387,9 @@ describe('Patch rule request schema', () => { const result = PatchRuleRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"type: Invalid literal value, expected \\"eql\\", index.0: Expected string, received number, index.0: Expected string, received number, type: Invalid literal value, expected \\"saved_query\\", index.0: Expected string, received number, and 8 more"` + ); }); test('saved_id is not required when type is saved_query and will validate without it', () => { @@ -456,7 +460,9 @@ describe('Patch rule request schema', () => { const result = PatchRuleRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", language: Invalid enum value. Expected 'kuery' | 'lucene', received 'something-made-up', type: Invalid literal value, expected \\"saved_query\\", language: Invalid enum value. Expected 'kuery' | 'lucene', received 'something-made-up', and 9 more"` + ); }); test('max_signals cannot be negative', () => { @@ -518,7 +524,9 @@ describe('Patch rule request schema', () => { const result = PatchRuleRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"meta: Expected object, received string, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", meta: Expected object, received string, meta: Expected object, received string, and 12 more"` + ); }); test('filters cannot be a string', () => { @@ -529,7 +537,9 @@ describe('Patch rule request schema', () => { const result = PatchRuleRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", filters: Expected array, received string, filters: Expected array, received string, type: Invalid literal value, expected \\"saved_query\\", and 10 more"` + ); }); test('name cannot be an empty string', () => { @@ -631,7 +641,9 @@ describe('Patch rule request schema', () => { const result = PatchRuleRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"threat.0.framework: Required, threat.0.framework: Required, threat.0.framework: Required, threat.0.framework: Required, threat.0.framework: Required, and 3 more"` + ); }); test('threat is invalid when updated with missing tactic sub-object', () => { @@ -655,7 +667,9 @@ describe('Patch rule request schema', () => { const result = PatchRuleRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"threat.0.tactic: Required, threat.0.tactic: Required, threat.0.tactic: Required, threat.0.tactic: Required, threat.0.tactic: Required, and 3 more"` + ); }); test('threat is valid when updated with missing technique', () => { @@ -700,7 +714,9 @@ describe('Patch rule request schema', () => { const result = PatchRuleRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"severity: Invalid enum value. Expected 'low' | 'medium' | 'high' | 'critical', received 'junk', severity: Invalid enum value. Expected 'low' | 'medium' | 'high' | 'critical', received 'junk', severity: Invalid enum value. Expected 'low' | 'medium' | 'high' | 'critical', received 'junk', severity: Invalid enum value. Expected 'low' | 'medium' | 'high' | 'critical', received 'junk', severity: Invalid enum value. Expected 'low' | 'medium' | 'high' | 'critical', received 'junk', and 3 more"` + ); }); describe('note', () => { @@ -744,7 +760,9 @@ describe('Patch rule request schema', () => { const result = PatchRuleRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"note: Expected string, received object, note: Expected string, received object, note: Expected string, received object, note: Expected string, received object, note: Expected string, received object, and 3 more"` + ); }); }); @@ -756,7 +774,9 @@ describe('Patch rule request schema', () => { const result = PatchRuleRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"actions.0.group: Required, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", actions.0.group: Required, actions.0.group: Required, and 12 more"` + ); }); test('You cannot send in an array of actions that are missing "id"', () => { @@ -767,7 +787,9 @@ describe('Patch rule request schema', () => { const result = PatchRuleRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"actions.0.id: Required, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", actions.0.id: Required, actions.0.id: Required, and 12 more"` + ); }); test('You cannot send in an array of actions that are missing "params"', () => { @@ -778,7 +800,9 @@ describe('Patch rule request schema', () => { const result = PatchRuleRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"actions.0.params: Required, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", actions.0.params: Required, actions.0.params: Required, and 12 more"` + ); }); test('You cannot send in an array of actions that are including "actionTypeId"', () => { @@ -796,7 +820,9 @@ describe('Patch rule request schema', () => { const result = PatchRuleRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"actions.0.action_type_id: Required, type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", actions.0.action_type_id: Required, actions.0.action_type_id: Required, and 12 more"` + ); }); describe('exception_list', () => { @@ -862,7 +888,9 @@ describe('Patch rule request schema', () => { const result = PatchRuleRequestBody.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"exceptions_list.0.list_id: Required, exceptions_list.0.type: Required, exceptions_list.0.namespace_type: Invalid enum value. Expected 'agnostic' | 'single', received 'not a namespace type', type: Invalid literal value, expected \\"eql\\", exceptions_list.0.list_id: Required, and 26 more"` + ); }); test('[rule_id, description, from, to, index, name, severity, interval, type, filters, risk_score, note, and non-existent exceptions_list] does validate with empty exceptions_list', () => { diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/export_rules/export_rules_route.gen.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/export_rules/export_rules_route.gen.ts index 01cd91216753f..2dfb54396c9ce 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/export_rules/export_rules_route.gen.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/export_rules/export_rules_route.gen.ts @@ -6,6 +6,7 @@ */ import { z } from 'zod'; +import { BooleanFromString } from '@kbn/zod-helpers'; /* * NOTICE: Do not edit this file manually. @@ -19,13 +20,7 @@ export const ExportRulesRequestQuery = z.object({ /** * Determines whether a summary of the exported rules is returned. */ - exclude_export_details: z.preprocess( - (value: unknown) => (typeof value === 'boolean' ? String(value) : value), - z - .enum(['true', 'false']) - .default('false') - .transform((value) => value === 'true') - ), + exclude_export_details: BooleanFromString.optional().default(false), /** * File name for saving the exported rules. */ diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/export_rules/export_rules_route.test.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/export_rules/export_rules_route.test.ts index 49b56c6673218..783556d2076af 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/export_rules/export_rules_route.test.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/export_rules/export_rules_route.test.ts @@ -120,7 +120,7 @@ describe('Export rules request schema', () => { const result = ExportRulesRequestQuery.safeParse(payload); expectParseError(result); expect(stringifyZodError(result.error)).toEqual( - `exclude_export_details: Invalid enum value. Expected 'true' | 'false', received 'invalid string'` + `exclude_export_details: Invalid enum value. Expected 'true' | 'false', received 'invalid string', exclude_export_details: Expected boolean, received string` ); }); }); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/find_rules_route.gen.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/find_rules_route.gen.ts new file mode 100644 index 0000000000000..a515cf70f9513 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/find_rules_route.gen.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 { z } from 'zod'; +import { ArrayFromString } from '@kbn/zod-helpers'; + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + */ + +import { SortOrder } from '../../model/sorting.gen'; +import { RuleResponse } from '../../model/rule_schema/rule_schemas.gen'; + +export type FindRulesSortField = z.infer; +export const FindRulesSortField = z.enum([ + 'created_at', + 'createdAt', + 'enabled', + 'execution_summary.last_execution.date', + 'execution_summary.last_execution.metrics.execution_gap_duration_s', + 'execution_summary.last_execution.metrics.total_indexing_duration_ms', + 'execution_summary.last_execution.metrics.total_search_duration_ms', + 'execution_summary.last_execution.status', + 'name', + 'risk_score', + 'riskScore', + 'severity', + 'updated_at', + 'updatedAt', +]); +export type FindRulesSortFieldEnum = typeof FindRulesSortField.enum; +export const FindRulesSortFieldEnum = FindRulesSortField.enum; + +export type FindRulesRequestQuery = z.infer; +export const FindRulesRequestQuery = z.object({ + fields: ArrayFromString(z.string()).optional(), + /** + * Search query + */ + filter: z.string().optional(), + /** + * Field to sort by + */ + sort_field: FindRulesSortField.optional(), + /** + * Sort order + */ + sort_order: SortOrder.optional(), + /** + * Page number + */ + page: z.coerce.number().int().min(1).optional().default(1), + /** + * Rules per page + */ + per_page: z.coerce.number().int().min(0).optional().default(20), +}); +export type FindRulesRequestQueryInput = z.input; + +export type FindRulesResponse = z.infer; +export const FindRulesResponse = z.object({ + page: z.number().int(), + perPage: z.number().int(), + total: z.number().int(), + data: z.array(RuleResponse), +}); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/find_rules_route.schema.yaml b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/find_rules_route.schema.yaml new file mode 100644 index 0000000000000..4fa1c14542ed0 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/find_rules_route.schema.yaml @@ -0,0 +1,98 @@ +openapi: 3.0.0 +info: + title: Find Rules API endpoint + version: 2023-10-31 +paths: + /api/detection_engine/rules/_find: + get: + operationId: FindRules + x-codegen-enabled: true + description: Finds rules that match the given query. + tags: + - Rules API + parameters: + - name: 'fields' + in: query + required: false + schema: + type: array + items: + type: string + - name: 'filter' + in: query + description: Search query + required: false + schema: + type: string + - name: 'sort_field' + in: query + description: Field to sort by + required: false + schema: + $ref: '#/components/schemas/FindRulesSortField' + - name: 'sort_order' + in: query + description: Sort order + required: false + schema: + $ref: '../../model/sorting.schema.yaml#/components/schemas/SortOrder' + - name: 'page' + in: query + description: Page number + required: false + schema: + type: integer + minimum: 1 + default: 1 + - name: 'per_page' + in: query + description: Rules per page + required: false + schema: + type: integer + minimum: 0 + default: 20 + + responses: + '200': + description: Successful response + content: + application/json: + schema: + type: object + properties: + page: + type: integer + perPage: + type: integer + total: + type: integer + data: + type: array + items: + $ref: '../../model/rule_schema/rule_schemas.schema.yaml#/components/schemas/RuleResponse' + required: + - page + - perPage + - total + - data + +components: + schemas: + FindRulesSortField: + type: string + enum: + - 'created_at' + - 'createdAt' # Legacy notation, keeping for backwards compatibility + - 'enabled' + - 'execution_summary.last_execution.date' + - 'execution_summary.last_execution.metrics.execution_gap_duration_s' + - 'execution_summary.last_execution.metrics.total_indexing_duration_ms' + - 'execution_summary.last_execution.metrics.total_search_duration_ms' + - 'execution_summary.last_execution.status' + - 'name' + - 'risk_score' + - 'riskScore' # Legacy notation, keeping for backwards compatibility + - 'severity' + - 'updated_at' + - 'updatedAt' # Legacy notation, keeping for backwards compatibility diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/find_rules_route.test.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/find_rules_route.test.ts index 391826fed9923..aa4bb53ab7481 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/find_rules_route.test.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/find_rules_route.test.ts @@ -5,21 +5,17 @@ * 2.0. */ -import { left } from 'fp-ts/lib/Either'; -import { pipe } from 'fp-ts/lib/pipeable'; -import { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; - -import { FindRulesRequestQuery } from './find_rules_route'; +import { expectParseError, expectParseSuccess, stringifyZodError } from '@kbn/zod-helpers'; +import type { FindRulesRequestQueryInput } from './find_rules_route.gen'; +import { FindRulesRequestQuery } from './find_rules_route.gen'; describe('Find rules request schema', () => { test('empty objects do validate', () => { - const payload: FindRulesRequestQuery = {}; + const payload: FindRulesRequestQueryInput = {}; - const decoded = FindRulesRequestQuery.decode(payload); - const checked = exactCheck(payload, decoded); - const message = pipe(checked, foldLeftRight); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual({ + const result = FindRulesRequestQuery.safeParse(payload); + expectParseSuccess(result); + expect(result.data).toEqual({ page: 1, per_page: 20, }); @@ -35,167 +31,126 @@ describe('Find rules request schema', () => { sort_order: 'asc', }; - const decoded = FindRulesRequestQuery.decode(payload); - const checked = exactCheck(payload, decoded); - const message = pipe(checked, foldLeftRight); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(payload); + const result = FindRulesRequestQuery.safeParse(payload); + expectParseSuccess(result); + expect(result.data).toEqual(payload); }); - test('made up parameters do not validate', () => { - const payload: Partial & { madeUp: string } = { + test('made up parameters are ignored', () => { + const payload: Partial & { madeUp: string } = { madeUp: 'invalid value', }; - const decoded = FindRulesRequestQuery.decode(payload); - const checked = exactCheck(payload, decoded); - const message = pipe(checked, foldLeftRight); - expect(getPaths(left(message.errors))).toEqual(['invalid keys "madeUp"']); - expect(message.schema).toEqual({}); + const result = FindRulesRequestQuery.safeParse(payload); + expectParseSuccess(result); + expect(result.data).toEqual({ + page: 1, + per_page: 20, + }); }); test('per_page validates', () => { - const payload: FindRulesRequestQuery = { + const payload: FindRulesRequestQueryInput = { per_page: 5, }; - const decoded = FindRulesRequestQuery.decode(payload); - const checked = exactCheck(payload, decoded); - const message = pipe(checked, foldLeftRight); - expect(getPaths(left(message.errors))).toEqual([]); - expect((message.schema as FindRulesRequestQuery).per_page).toEqual(payload.per_page); + const result = FindRulesRequestQuery.safeParse(payload); + expectParseSuccess(result); + expect(result.data.per_page).toEqual(payload.per_page); }); test('page validates', () => { - const payload: FindRulesRequestQuery = { + const payload: FindRulesRequestQueryInput = { page: 5, }; - const decoded = FindRulesRequestQuery.decode(payload); - const checked = exactCheck(payload, decoded); - const message = pipe(checked, foldLeftRight); - expect(getPaths(left(message.errors))).toEqual([]); - expect((message.schema as FindRulesRequestQuery).page).toEqual(payload.page); + const result = FindRulesRequestQuery.safeParse(payload); + expectParseSuccess(result); + expect(result.data.page).toEqual(payload.page); }); test('sort_field validates', () => { - const payload: FindRulesRequestQuery = { + const payload: FindRulesRequestQueryInput = { sort_field: 'name', }; - const decoded = FindRulesRequestQuery.decode(payload); - const checked = exactCheck(payload, decoded); - const message = pipe(checked, foldLeftRight); - expect(getPaths(left(message.errors))).toEqual([]); - expect((message.schema as FindRulesRequestQuery).sort_field).toEqual('name'); + const result = FindRulesRequestQuery.safeParse(payload); + expectParseSuccess(result); + expect(result.data.sort_field).toEqual(payload.sort_field); }); test('fields validates with a string', () => { - const payload: FindRulesRequestQuery = { + const payload: FindRulesRequestQueryInput = { fields: ['some value'], }; - const decoded = FindRulesRequestQuery.decode(payload); - const checked = exactCheck(payload, decoded); - const message = pipe(checked, foldLeftRight); - expect(getPaths(left(message.errors))).toEqual([]); - expect((message.schema as FindRulesRequestQuery).fields).toEqual(payload.fields); + const result = FindRulesRequestQuery.safeParse(payload); + expectParseSuccess(result); + expect(result.data.fields).toEqual(payload.fields); }); test('fields validates with multiple strings', () => { - const payload: FindRulesRequestQuery = { + const payload: FindRulesRequestQueryInput = { fields: ['some value 1', 'some value 2'], }; - const decoded = FindRulesRequestQuery.decode(payload); - const checked = exactCheck(payload, decoded); - const message = pipe(checked, foldLeftRight); - expect(getPaths(left(message.errors))).toEqual([]); - expect((message.schema as FindRulesRequestQuery).fields).toEqual(payload.fields); + const result = FindRulesRequestQuery.safeParse(payload); + expectParseSuccess(result); + expect(result.data.fields).toEqual(payload.fields); }); test('fields does not validate with a number', () => { - const payload: Omit & { fields: number } = { + const payload: Omit & { fields: number } = { fields: 5, }; - const decoded = FindRulesRequestQuery.decode(payload); - const checked = exactCheck(payload, decoded); - const message = pipe(checked, foldLeftRight); - expect(getPaths(left(message.errors))).toEqual(['Invalid value "5" supplied to "fields"']); - expect(message.schema).toEqual({}); - }); - - test('per_page has a default of 20', () => { - const payload: FindRulesRequestQuery = {}; - - const decoded = FindRulesRequestQuery.decode(payload); - const checked = exactCheck(payload, decoded); - const message = pipe(checked, foldLeftRight); - expect(getPaths(left(message.errors))).toEqual([]); - expect((message.schema as FindRulesRequestQuery).per_page).toEqual(20); - }); - - test('page has a default of 1', () => { - const payload: FindRulesRequestQuery = {}; - - const decoded = FindRulesRequestQuery.decode(payload); - const checked = exactCheck(payload, decoded); - const message = pipe(checked, foldLeftRight); - expect(getPaths(left(message.errors))).toEqual([]); - expect((message.schema as FindRulesRequestQuery).page).toEqual(1); + const result = FindRulesRequestQuery.safeParse(payload); + expectParseError(result); + expect(stringifyZodError(result.error)).toEqual('fields: Expected array, received number'); }); test('filter works with a string', () => { - const payload: FindRulesRequestQuery = { + const payload: FindRulesRequestQueryInput = { filter: 'some value 1', }; - const decoded = FindRulesRequestQuery.decode(payload); - const checked = exactCheck(payload, decoded); - const message = pipe(checked, foldLeftRight); - expect(getPaths(left(message.errors))).toEqual([]); - expect((message.schema as FindRulesRequestQuery).filter).toEqual(payload.filter); + const result = FindRulesRequestQuery.safeParse(payload); + expectParseSuccess(result); + expect(result.data.filter).toEqual(payload.filter); }); test('filter does not work with a number', () => { - const payload: Omit & { filter: number } = { + const payload: Omit & { filter: number } = { filter: 5, }; - const decoded = FindRulesRequestQuery.decode(payload); - const checked = exactCheck(payload, decoded); - const message = pipe(checked, foldLeftRight); - expect(getPaths(left(message.errors))).toEqual(['Invalid value "5" supplied to "filter"']); - expect(message.schema).toEqual({}); + const result = FindRulesRequestQuery.safeParse(payload); + expectParseError(result); + expect(stringifyZodError(result.error)).toEqual('filter: Expected string, received number'); }); test('sort_order validates with desc and sort_field', () => { - const payload: FindRulesRequestQuery = { + const payload: FindRulesRequestQueryInput = { sort_order: 'desc', sort_field: 'name', }; - const decoded = FindRulesRequestQuery.decode(payload); - const checked = exactCheck(payload, decoded); - const message = pipe(checked, foldLeftRight); - expect(getPaths(left(message.errors))).toEqual([]); - expect((message.schema as FindRulesRequestQuery).sort_order).toEqual(payload.sort_order); - expect((message.schema as FindRulesRequestQuery).sort_field).toEqual(payload.sort_field); + const result = FindRulesRequestQuery.safeParse(payload); + expectParseSuccess(result); + expect(result.data.sort_order).toEqual(payload.sort_order); + expect(result.data.sort_field).toEqual(payload.sort_field); }); test('sort_order does not validate with a string other than asc and desc', () => { - const payload: Omit & { sort_order: string } = { + const payload: Omit & { sort_order: string } = { sort_order: 'some other string', sort_field: 'name', }; - const decoded = FindRulesRequestQuery.decode(payload); - const checked = exactCheck(payload, decoded); - const message = pipe(checked, foldLeftRight); - expect(getPaths(left(message.errors))).toEqual([ - 'Invalid value "some other string" supplied to "sort_order"', - ]); - expect(message.schema).toEqual({}); + const result = FindRulesRequestQuery.safeParse(payload); + expectParseError(result); + expect(stringifyZodError(result.error)).toEqual( + "sort_order: Invalid enum value. Expected 'asc' | 'desc', received 'some other string'" + ); }); }); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/find_rules_route.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/find_rules_route.ts deleted file mode 100644 index 7e16b696bdd70..0000000000000 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/find_rules_route.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 * as t from 'io-ts'; -import { DefaultPerPage, DefaultPage } from '@kbn/securitysolution-io-ts-alerting-types'; -import type { RuleResponse } from '../../model'; -import { SortOrder, queryFilter, fields } from '../../model'; - -export type FindRulesSortField = t.TypeOf; -export const FindRulesSortField = t.union([ - t.literal('created_at'), - t.literal('createdAt'), // Legacy notation, keeping for backwards compatibility - t.literal('enabled'), - t.literal('execution_summary.last_execution.date'), - t.literal('execution_summary.last_execution.metrics.execution_gap_duration_s'), - t.literal('execution_summary.last_execution.metrics.total_indexing_duration_ms'), - t.literal('execution_summary.last_execution.metrics.total_search_duration_ms'), - t.literal('execution_summary.last_execution.status'), - t.literal('name'), - t.literal('risk_score'), - t.literal('riskScore'), // Legacy notation, keeping for backwards compatibility - t.literal('severity'), - t.literal('updated_at'), - t.literal('updatedAt'), // Legacy notation, keeping for backwards compatibility -]); - -export type FindRulesSortFieldOrUndefined = t.TypeOf; -export const FindRulesSortFieldOrUndefined = t.union([FindRulesSortField, t.undefined]); - -/** - * Query string parameters of the API route. - */ -export type FindRulesRequestQuery = t.TypeOf; -export const FindRulesRequestQuery = t.exact( - t.partial({ - fields, - filter: queryFilter, - sort_field: FindRulesSortField, - sort_order: SortOrder, - page: DefaultPage, // defaults to 1 - per_page: DefaultPerPage, // defaults to 20 - }) -); - -export interface FindRulesResponse { - page: number; - perPage: number; - total: number; - data: RuleResponse[]; -} diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/request_schema_validation.test.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/request_schema_validation.test.ts index 93cded33f6d94..c9fb9ce9a3524 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/request_schema_validation.test.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/request_schema_validation.test.ts @@ -5,19 +5,19 @@ * 2.0. */ -import type { FindRulesRequestQuery } from './find_rules_route'; +import type { FindRulesRequestQueryInput } from './find_rules_route.gen'; import { validateFindRulesRequestQuery } from './request_schema_validation'; describe('Find rules request schema, additional validation', () => { describe('validateFindRulesRequestQuery', () => { test('You can have an empty sort_field and empty sort_order', () => { - const schema: FindRulesRequestQuery = {}; + const schema: FindRulesRequestQueryInput = {}; const errors = validateFindRulesRequestQuery(schema); expect(errors).toEqual([]); }); test('You can have both a sort_field and and a sort_order', () => { - const schema: FindRulesRequestQuery = { + const schema: FindRulesRequestQueryInput = { sort_field: 'name', sort_order: 'asc', }; @@ -26,7 +26,7 @@ describe('Find rules request schema, additional validation', () => { }); test('You cannot have sort_field without sort_order', () => { - const schema: FindRulesRequestQuery = { + const schema: FindRulesRequestQueryInput = { sort_field: 'name', }; const errors = validateFindRulesRequestQuery(schema); @@ -36,7 +36,7 @@ describe('Find rules request schema, additional validation', () => { }); test('You cannot have sort_order without sort_field', () => { - const schema: FindRulesRequestQuery = { + const schema: FindRulesRequestQueryInput = { sort_order: 'asc', }; const errors = validateFindRulesRequestQuery(schema); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/request_schema_validation.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/request_schema_validation.ts index 769ef566d1efd..69d94be334e3f 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/request_schema_validation.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/find_rules/request_schema_validation.ts @@ -5,23 +5,16 @@ * 2.0. */ -import type { FindRulesRequestQuery } from './find_rules_route'; +import type { FindRulesRequestQueryInput } from './find_rules_route.gen'; /** * Additional validation that is implemented outside of the schema itself. */ -export const validateFindRulesRequestQuery = (query: FindRulesRequestQuery): string[] => { - return [...validateSortOrder(query)]; -}; - -const validateSortOrder = (query: FindRulesRequestQuery): string[] => { +export const validateFindRulesRequestQuery = (query: FindRulesRequestQueryInput): string[] => { if (query.sort_order != null || query.sort_field != null) { if (query.sort_order == null || query.sort_field == null) { return ['when "sort_order" and "sort_field" must exist together or not at all']; - } else { - return []; } - } else { - return []; } + return []; }; diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/import_rules/import_rules_route.gen.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/import_rules/import_rules_route.gen.ts index d0a105e28c2c8..225179a6c0489 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/import_rules/import_rules_route.gen.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/import_rules/import_rules_route.gen.ts @@ -6,6 +6,7 @@ */ import { z } from 'zod'; +import { BooleanFromString } from '@kbn/zod-helpers'; /* * NOTICE: Do not edit this file manually. @@ -20,43 +21,19 @@ export const ImportRulesRequestQuery = z.object({ /** * Determines whether existing rules with the same `rule_id` are overwritten. */ - overwrite: z.preprocess( - (value: unknown) => (typeof value === 'boolean' ? String(value) : value), - z - .enum(['true', 'false']) - .default('false') - .transform((value) => value === 'true') - ), + overwrite: BooleanFromString.optional().default(false), /** * Determines whether existing exception lists with the same `list_id` are overwritten. */ - overwrite_exceptions: z.preprocess( - (value: unknown) => (typeof value === 'boolean' ? String(value) : value), - z - .enum(['true', 'false']) - .default('false') - .transform((value) => value === 'true') - ), + overwrite_exceptions: BooleanFromString.optional().default(false), /** * Determines whether existing actions with the same `kibana.alert.rule.actions.id` are overwritten. */ - overwrite_action_connectors: z.preprocess( - (value: unknown) => (typeof value === 'boolean' ? String(value) : value), - z - .enum(['true', 'false']) - .default('false') - .transform((value) => value === 'true') - ), + overwrite_action_connectors: BooleanFromString.optional().default(false), /** * Generates a new list ID for each imported exception list. */ - as_new_list: z.preprocess( - (value: unknown) => (typeof value === 'boolean' ? String(value) : value), - z - .enum(['true', 'false']) - .default('false') - .transform((value) => value === 'true') - ), + as_new_list: BooleanFromString.optional().default(false), }); export type ImportRulesRequestQueryInput = z.input; diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/index.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/index.ts index 7fdab0816d650..709e63a6ec402 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/index.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_management/index.ts @@ -5,7 +5,8 @@ * 2.0. */ -export * from './bulk_actions/bulk_actions_route'; +export * from './bulk_actions/bulk_actions_types'; +export * from './bulk_actions/bulk_actions_route.gen'; export * from './bulk_crud/bulk_create_rules/bulk_create_rules_route.gen'; export * from './bulk_crud/bulk_delete_rules/bulk_delete_rules_route.gen'; export * from './bulk_crud/bulk_patch_rules/bulk_patch_rules_route.gen'; @@ -22,7 +23,7 @@ export * from './crud/update_rule/request_schema_validation'; export * from './crud/update_rule/update_rule_route.gen'; export * from './export_rules/export_rules_details_schema'; export * from './export_rules/export_rules_route.gen'; -export * from './find_rules/find_rules_route'; +export * from './find_rules/find_rules_route.gen'; export * from './find_rules/request_schema_validation'; export * from './get_rule_management_filters/get_rule_management_filters_route'; export * from './import_rules/import_rules_route.gen'; diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/index.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/index.ts index 1494e09b9c51a..ddb132ebf64bb 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/index.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/index.ts @@ -10,15 +10,15 @@ export * from './detection_engine_health/get_rule_health/get_rule_health_route'; export * from './detection_engine_health/get_space_health/get_space_health_route'; export * from './detection_engine_health/setup_health/setup_health_route'; export * from './detection_engine_health/model'; -export * from './rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route'; +export * from './rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.gen'; export * from './rule_execution_logs/get_rule_execution_results/get_rule_execution_results_route.gen'; export * from './urls'; -export * from './model/execution_event'; -export * from './model/execution_metrics'; +export * from './model/execution_event.gen'; +export * from './model/execution_metrics.gen'; export * from './model/execution_result.gen'; export * from './model/execution_settings'; export * from './model/execution_status.gen'; export * from './model/execution_status'; -export * from './model/execution_summary'; +export * from './model/execution_summary.gen'; export * from './model/log_level'; diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_event.gen.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_event.gen.ts new file mode 100644 index 0000000000000..e493c5233a03d --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_event.gen.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 { z } from 'zod'; + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + */ + +export type LogLevel = z.infer; +export const LogLevel = z.enum(['trace', 'debug', 'info', 'warn', 'error']); +export type LogLevelEnum = typeof LogLevel.enum; +export const LogLevelEnum = LogLevel.enum; + +/** + * Type of a plain rule execution event: +- message: Simple log message of some log level, such as debug, info or error. +- status-change: We log an event of this type each time a rule changes its status during an execution. +- execution-metrics: We log an event of this type at the end of a rule execution. It contains various execution metrics such as search and indexing durations. + */ +export type RuleExecutionEventType = z.infer; +export const RuleExecutionEventType = z.enum(['message', 'status-change', 'execution-metrics']); +export type RuleExecutionEventTypeEnum = typeof RuleExecutionEventType.enum; +export const RuleExecutionEventTypeEnum = RuleExecutionEventType.enum; + +/** + * Plain rule execution event. A rule can write many of them during each execution. Events can be of different types and log levels. + +NOTE: This is a read model of rule execution events and it is pretty generic. It contains only a subset of their fields: only those fields that are common to all types of execution events. + */ +export type RuleExecutionEvent = z.infer; +export const RuleExecutionEvent = z.object({ + timestamp: z.string().datetime(), + sequence: z.number().int(), + level: LogLevel, + type: RuleExecutionEventType, + execution_id: z.string().min(1), + message: z.string(), +}); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_event.mock.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_event.mock.ts index c8efaa8dd85b8..3d987356a37c9 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_event.mock.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_event.mock.ts @@ -5,9 +5,8 @@ * 2.0. */ -import type { RuleExecutionEvent } from './execution_event'; -import { RuleExecutionEventType } from './execution_event'; -import { LogLevel } from './log_level'; +import type { RuleExecutionEvent } from './execution_event.gen'; +import { LogLevelEnum, RuleExecutionEventTypeEnum } from './execution_event.gen'; const DEFAULT_TIMESTAMP = '2021-12-28T10:10:00.806Z'; const DEFAULT_SEQUENCE_NUMBER = 0; @@ -17,13 +16,13 @@ const getMessageEvent = (props: Partial = {}): RuleExecution // Default values timestamp: DEFAULT_TIMESTAMP, sequence: DEFAULT_SEQUENCE_NUMBER, - level: LogLevel.debug, + level: LogLevelEnum.debug, execution_id: 'execution-id-1', message: 'Some message', // Overridden values ...props, // Mandatory values for this type of event - type: RuleExecutionEventType.message, + type: RuleExecutionEventTypeEnum.message, }; }; @@ -37,8 +36,8 @@ const getRunningStatusChange = (props: Partial = {}): RuleEx // Overridden values ...props, // Mandatory values for this type of event - level: LogLevel.info, - type: RuleExecutionEventType['status-change'], + level: LogLevelEnum.info, + type: RuleExecutionEventTypeEnum['status-change'], }; }; @@ -54,8 +53,8 @@ const getPartialFailureStatusChange = ( // Overridden values ...props, // Mandatory values for this type of event - level: LogLevel.warn, - type: RuleExecutionEventType['status-change'], + level: LogLevelEnum.warn, + type: RuleExecutionEventTypeEnum['status-change'], }; }; @@ -69,8 +68,8 @@ const getFailedStatusChange = (props: Partial = {}): RuleExe // Overridden values ...props, // Mandatory values for this type of event - level: LogLevel.error, - type: RuleExecutionEventType['status-change'], + level: LogLevelEnum.error, + type: RuleExecutionEventTypeEnum['status-change'], }; }; @@ -84,8 +83,8 @@ const getSucceededStatusChange = (props: Partial = {}): Rule // Overridden values ...props, // Mandatory values for this type of event - level: LogLevel.info, - type: RuleExecutionEventType['status-change'], + level: LogLevelEnum.info, + type: RuleExecutionEventTypeEnum['status-change'], }; }; @@ -99,8 +98,8 @@ const getExecutionMetricsEvent = (props: Partial = {}): Rule // Overridden values ...props, // Mandatory values for this type of event - level: LogLevel.debug, - type: RuleExecutionEventType['execution-metrics'], + level: LogLevelEnum.debug, + type: RuleExecutionEventTypeEnum['execution-metrics'], }; }; @@ -120,7 +119,7 @@ const getSomeEvents = (): RuleExecutionEvent[] => [ getMessageEvent({ timestamp: '2021-12-28T10:10:06.806Z', sequence: 6, - level: LogLevel.debug, + level: LogLevelEnum.debug, message: 'Rule execution started', }), getFailedStatusChange({ @@ -138,7 +137,7 @@ const getSomeEvents = (): RuleExecutionEvent[] => [ getMessageEvent({ timestamp: '2021-12-28T10:10:02.806Z', sequence: 2, - level: LogLevel.error, + level: LogLevelEnum.error, message: 'Some error', }), getRunningStatusChange({ @@ -148,7 +147,7 @@ const getSomeEvents = (): RuleExecutionEvent[] => [ getMessageEvent({ timestamp: '2021-12-28T10:10:00.806Z', sequence: 0, - level: LogLevel.debug, + level: LogLevelEnum.debug, message: 'Rule execution started', }), ]; diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_event.schema.yaml b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_event.schema.yaml new file mode 100644 index 0000000000000..d49a49d222401 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_event.schema.yaml @@ -0,0 +1,49 @@ +openapi: '3.0.0' +info: + title: Execution Event Schema + version: 'not applicable' +paths: {} +components: + x-codegen-enabled: true + schemas: + LogLevel: + type: string + enum: ['trace', 'debug', 'info', 'warn', 'error'] + + RuleExecutionEventType: + type: string + enum: ['message', 'status-change', 'execution-metrics'] + description: |- + Type of a plain rule execution event: + - message: Simple log message of some log level, such as debug, info or error. + - status-change: We log an event of this type each time a rule changes its status during an execution. + - execution-metrics: We log an event of this type at the end of a rule execution. It contains various execution metrics such as search and indexing durations. + + RuleExecutionEvent: + type: object + properties: + timestamp: + type: string + format: date-time + sequence: + type: integer + level: + $ref: '#/components/schemas/LogLevel' + type: + $ref: '#/components/schemas/RuleExecutionEventType' + execution_id: + type: string + minLength: 1 + message: + type: string + required: + - timestamp + - sequence + - level + - type + - execution_id + - message + description: |- + Plain rule execution event. A rule can write many of them during each execution. Events can be of different types and log levels. + + NOTE: This is a read model of rule execution events and it is pretty generic. It contains only a subset of their fields: only those fields that are common to all types of execution events. diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_event.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_event.ts deleted file mode 100644 index 64acfb01e2e2a..0000000000000 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_event.ts +++ /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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import * as t from 'io-ts'; -import { enumeration, IsoDateString, NonEmptyString } from '@kbn/securitysolution-io-ts-types'; -import { enumFromString } from '../../../../utils/enum_from_string'; -import { TLogLevel } from './log_level'; - -/** - * Type of a plain rule execution event. - */ -export enum RuleExecutionEventType { - /** - * Simple log message of some log level, such as debug, info or error. - */ - 'message' = 'message', - - /** - * We log an event of this type each time a rule changes its status during an execution. - */ - 'status-change' = 'status-change', - - /** - * We log an event of this type at the end of a rule execution. It contains various execution - * metrics such as search and indexing durations. - */ - 'execution-metrics' = 'execution-metrics', -} - -export const TRuleExecutionEventType = enumeration( - 'RuleExecutionEventType', - RuleExecutionEventType -); - -/** - * An array of supported types of rule execution events. - */ -export const RULE_EXECUTION_EVENT_TYPES = Object.values(RuleExecutionEventType); - -export const ruleExecutionEventTypeFromString = enumFromString(RuleExecutionEventType); - -/** - * Plain rule execution event. A rule can write many of them during each execution. Events can be - * of different types and log levels. - * - * NOTE: This is a read model of rule execution events and it is pretty generic. It contains only a - * subset of their fields: only those fields that are common to all types of execution events. - */ -export type RuleExecutionEvent = t.TypeOf; -export const RuleExecutionEvent = t.type({ - timestamp: IsoDateString, - sequence: t.number, - level: TLogLevel, - type: TRuleExecutionEventType, - execution_id: NonEmptyString, - message: t.string, -}); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_metrics.gen.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_metrics.gen.ts index 235437cc5ed68..67aac49310a7d 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_metrics.gen.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_metrics.gen.ts @@ -15,16 +15,19 @@ import { z } from 'zod'; export type RuleExecutionMetrics = z.infer; export const RuleExecutionMetrics = z.object({ /** - * Total time spent searching for events + * Total time spent performing ES searches as measured by Kibana; includes network latency and time spent serializing/deserializing request/response */ total_search_duration_ms: z.number().int().min(0).optional(), /** - * Total time spent indexing alerts + * Total time spent indexing documents during current rule execution cycle */ total_indexing_duration_ms: z.number().int().min(0).optional(), + /** + * Total time spent enriching documents during current rule execution cycle + */ total_enrichment_duration_ms: z.number().int().min(0).optional(), /** - * Time gap between last execution and current execution + * Duration in seconds of execution gap */ execution_gap_duration_s: z.number().int().min(0).optional(), }); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_metrics.schema.yaml b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_metrics.schema.yaml index 7e04ef38a0a87..985da08e1df88 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_metrics.schema.yaml +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_metrics.schema.yaml @@ -10,17 +10,18 @@ components: type: object properties: total_search_duration_ms: - description: Total time spent searching for events + description: Total time spent performing ES searches as measured by Kibana; includes network latency and time spent serializing/deserializing request/response type: integer minimum: 0 total_indexing_duration_ms: - description: Total time spent indexing alerts + description: Total time spent indexing documents during current rule execution cycle type: integer minimum: 0 total_enrichment_duration_ms: + description: Total time spent enriching documents during current rule execution cycle type: integer minimum: 0 execution_gap_duration_s: - description: Time gap between last execution and current execution + description: Duration in seconds of execution gap type: integer minimum: 0 diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_metrics.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_metrics.ts deleted file mode 100644 index b15c76119e441..0000000000000 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_metrics.ts +++ /dev/null @@ -1,28 +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 * as t from 'io-ts'; -import { PositiveInteger } from '@kbn/securitysolution-io-ts-types'; - -export type DurationMetric = t.TypeOf; -export const DurationMetric = PositiveInteger; - -export type RuleExecutionMetrics = t.TypeOf; - -/** - @property total_search_duration_ms - "total time spent performing ES searches as measured by Kibana; - includes network latency and time spent serializing/deserializing request/response", - @property total_indexing_duration_ms - "total time spent indexing documents during current rule execution cycle", - @property total_enrichment_duration_ms - total time spent enriching documents during current rule execution cycle - @property execution_gap_duration_s - "duration in seconds of execution gap" -*/ -export const RuleExecutionMetrics = t.partial({ - total_search_duration_ms: DurationMetric, - total_indexing_duration_ms: DurationMetric, - total_enrichment_duration_ms: DurationMetric, - execution_gap_duration_s: DurationMetric, -}); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_status.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_status.ts index ae031191fd74d..903912b39cbb2 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_status.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_status.ts @@ -6,14 +6,10 @@ */ import type { RuleLastRunOutcomes } from '@kbn/alerting-plugin/common'; -import { enumeration } from '@kbn/securitysolution-io-ts-types'; import { assertUnreachable } from '../../../../utility_types'; import type { RuleExecutionStatus, RuleExecutionStatusOrder } from './execution_status.gen'; import { RuleExecutionStatusEnum } from './execution_status.gen'; -// TODO remove after the migration to Zod is done -export const TRuleExecutionStatus = enumeration('RuleExecutionStatus', RuleExecutionStatusEnum); - export const ruleExecutionStatusToNumber = ( status: RuleExecutionStatus ): RuleExecutionStatusOrder => { diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_summary.mock.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_summary.mock.ts index 59482e759f902..5ffc034edd172 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_summary.mock.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_summary.mock.ts @@ -6,7 +6,7 @@ */ import { RuleExecutionStatusEnum } from './execution_status.gen'; -import type { RuleExecutionSummary } from './execution_summary'; +import type { RuleExecutionSummary } from './execution_summary.gen'; const getSummarySucceeded = (): RuleExecutionSummary => ({ last_execution: { diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_summary.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_summary.ts deleted file mode 100644 index a747d2f021b7c..0000000000000 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/execution_summary.ts +++ /dev/null @@ -1,22 +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 { IsoDateString } from '@kbn/securitysolution-io-ts-types'; -import * as t from 'io-ts'; -import { RuleExecutionMetrics } from './execution_metrics'; -import { TRuleExecutionStatus } from './execution_status'; - -export type RuleExecutionSummary = t.TypeOf; -export const RuleExecutionSummary = t.type({ - last_execution: t.type({ - date: IsoDateString, - status: TRuleExecutionStatus, - status_order: t.number, - message: t.string, - metrics: RuleExecutionMetrics, - }), -}); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/index.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/index.ts index b4f003cf48228..7fbb16e206197 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/index.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/index.ts @@ -5,10 +5,10 @@ * 2.0. */ -export * from './execution_event'; -export * from './execution_metrics'; +export * from './execution_event.gen'; +export * from './execution_metrics.gen'; export * from './execution_result.gen'; export * from './execution_settings'; export * from './execution_status.gen'; -export * from './execution_summary'; +export * from './execution_summary.gen'; export * from './log_level'; diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/log_level.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/log_level.ts index 495589b3cd432..e7004455160bd 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/log_level.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/model/log_level.ts @@ -5,42 +5,31 @@ * 2.0. */ -import { enumeration } from '@kbn/securitysolution-io-ts-types'; -import { enumFromString } from '../../../../utils/enum_from_string'; import { assertUnreachable } from '../../../../utility_types'; import type { RuleExecutionStatus } from './execution_status.gen'; import { RuleExecutionStatusEnum } from './execution_status.gen'; - -export enum LogLevel { - 'trace' = 'trace', - 'debug' = 'debug', - 'info' = 'info', - 'warn' = 'warn', - 'error' = 'error', -} - -export const TLogLevel = enumeration('LogLevel', LogLevel); +import { LogLevel, LogLevelEnum } from './execution_event.gen'; /** * An array of supported log levels. */ -export const LOG_LEVELS = Object.values(LogLevel); +export const LOG_LEVELS = LogLevel.options; -export const logLevelToNumber = (level: keyof typeof LogLevel | null | undefined): number => { +export const logLevelToNumber = (level: LogLevel | null | undefined): number => { if (!level) { return 0; } switch (level) { - case 'trace': + case LogLevelEnum.trace: return 0; - case 'debug': + case LogLevelEnum.debug: return 10; - case 'info': + case LogLevelEnum.info: return 20; - case 'warn': + case LogLevelEnum.warn: return 30; - case 'error': + case LogLevelEnum.error: return 40; default: assertUnreachable(level); @@ -50,34 +39,32 @@ export const logLevelToNumber = (level: keyof typeof LogLevel | null | undefined export const logLevelFromNumber = (num: number | null | undefined): LogLevel => { if (num === null || num === undefined || num < 10) { - return LogLevel.trace; + return LogLevelEnum.trace; } if (num < 20) { - return LogLevel.debug; + return LogLevelEnum.debug; } if (num < 30) { - return LogLevel.info; + return LogLevelEnum.info; } if (num < 40) { - return LogLevel.warn; + return LogLevelEnum.warn; } - return LogLevel.error; + return LogLevelEnum.error; }; -export const logLevelFromString = enumFromString(LogLevel); - export const logLevelFromExecutionStatus = (status: RuleExecutionStatus): LogLevel => { switch (status) { case RuleExecutionStatusEnum['going to run']: case RuleExecutionStatusEnum.running: case RuleExecutionStatusEnum.succeeded: - return LogLevel.info; + return LogLevelEnum.info; case RuleExecutionStatusEnum['partial failure']: - return LogLevel.warn; + return LogLevelEnum.warn; case RuleExecutionStatusEnum.failed: - return LogLevel.error; + return LogLevelEnum.error; default: assertUnreachable(status); - return LogLevel.trace; + return LogLevelEnum.trace; } }; diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.gen.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.gen.ts index 751e571aae3fd..352a8cbdf89b0 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.gen.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.gen.ts @@ -6,48 +6,43 @@ */ import { z } from 'zod'; +import { ArrayFromString } from '@kbn/zod-helpers'; /* * NOTICE: Do not edit this file manually. * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. */ -import { RuleExecutionStatus } from '../../model/execution_status.gen'; import { - SortFieldOfRuleExecutionResult, - RuleExecutionResult, -} from '../../model/execution_result.gen'; + RuleExecutionEventType, + LogLevel, + RuleExecutionEvent, +} from '../../model/execution_event.gen'; import { SortOrder } from '../../../model/sorting.gen'; +import { PaginationResult } from '../../../model/pagination.gen'; export type GetRuleExecutionEventsRequestQuery = z.infer; export const GetRuleExecutionEventsRequestQuery = z.object({ /** - * Start date of the time range to query + * Include events of matching the search term. If omitted, all events will be included. */ - start: z.string().datetime(), + search_term: z.string().optional(), /** - * End date of the time range to query + * Include events of the specified types. If omitted, all types of events will be included. */ - end: z.string().datetime(), + event_types: ArrayFromString(RuleExecutionEventType).optional().default([]), /** - * Query text to filter results by + * Include events having these log levels. If omitted, events of all levels will be included. */ - query_text: z.string().optional().default(''), + log_levels: ArrayFromString(LogLevel).optional().default([]), /** - * Comma-separated list of rule execution statuses to filter results by + * Start date of the time range to query */ - status_filters: z - .preprocess( - (value: unknown) => - typeof value === 'string' ? (value === '' ? [] : value.split(',')) : value, - z.array(RuleExecutionStatus) - ) - .optional() - .default([]), + date_start: z.string().datetime().optional(), /** - * Field to sort results by + * End date of the time range to query */ - sort_field: SortFieldOfRuleExecutionResult.optional().default('timestamp'), + date_end: z.string().datetime().optional(), /** * Sort order to sort results by */ @@ -69,9 +64,6 @@ export type GetRuleExecutionEventsRequestParams = z.infer< typeof GetRuleExecutionEventsRequestParams >; export const GetRuleExecutionEventsRequestParams = z.object({ - /** - * Saved object ID of the rule to get execution results for - */ ruleId: z.string().min(1), }); export type GetRuleExecutionEventsRequestParamsInput = z.input< @@ -80,6 +72,6 @@ export type GetRuleExecutionEventsRequestParamsInput = z.input< export type GetRuleExecutionEventsResponse = z.infer; export const GetRuleExecutionEventsResponse = z.object({ - events: z.array(RuleExecutionResult).optional(), - total: z.number().int().optional(), + events: z.array(RuleExecutionEvent), + pagination: PaginationResult, }); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.mock.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.mock.ts index b46f8d9b13870..e730350215f8e 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.mock.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.mock.ts @@ -6,7 +6,7 @@ */ import { ruleExecutionEventMock } from '../../model/execution_event.mock'; -import type { GetRuleExecutionEventsResponse } from './get_rule_execution_events_route'; +import type { GetRuleExecutionEventsResponse } from './get_rule_execution_events_route.gen'; const getSomeResponse = (): GetRuleExecutionEventsResponse => { const events = ruleExecutionEventMock.getSomeEvents(); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.schema.yaml b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.schema.yaml index 677213bae4f2e..990ea4ef64876 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.schema.yaml +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.schema.yaml @@ -14,47 +14,47 @@ paths: - name: ruleId in: path required: true - description: Saved object ID of the rule to get execution results for schema: type: string minLength: 1 - - name: start + - name: search_term in: query - required: true - description: Start date of the time range to query - schema: - type: string - format: date-time - - name: end - in: query - required: true - description: End date of the time range to query + required: false + description: Include events of matching the search term. If omitted, all events will be included. schema: type: string - format: date-time - - name: query_text + - name: event_types in: query required: false - description: Query text to filter results by + description: Include events of the specified types. If omitted, all types of events will be included. schema: - type: string - default: '' - - name: status_filters + type: array + items: + $ref: '../../model/execution_event.schema.yaml#/components/schemas/RuleExecutionEventType' + default: [] + - name: log_levels in: query required: false - description: Comma-separated list of rule execution statuses to filter results by + description: Include events having these log levels. If omitted, events of all levels will be included. schema: type: array items: - $ref: '../../model/execution_status.schema.yaml#/components/schemas/RuleExecutionStatus' + $ref: '../../model/execution_event.schema.yaml#/components/schemas/LogLevel' default: [] - - name: sort_field + - name: date_start in: query required: false - description: Field to sort results by + description: Start date of the time range to query schema: - $ref: '../../model/execution_result.schema.yaml#/components/schemas/SortFieldOfRuleExecutionResult' - default: timestamp + type: string + format: date-time + - name: date_end + in: query + required: false + description: End date of the time range to query + schema: + type: string + format: date-time - name: sort_order in: query required: false @@ -87,6 +87,9 @@ paths: events: type: array items: - $ref: '../../model/execution_result.schema.yaml#/components/schemas/RuleExecutionResult' - total: - type: integer + $ref: '../../model/execution_event.schema.yaml#/components/schemas/RuleExecutionEvent' + pagination: + $ref: '../../../model/pagination.schema.yaml#/components/schemas/PaginationResult' + required: + - events + - pagination diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.test.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.test.ts index ecf94032039ac..5f73b6109e820 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.test.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.test.ts @@ -5,14 +5,11 @@ * 2.0. */ -import { pipe } from 'fp-ts/lib/pipeable'; -import { left } from 'fp-ts/lib/Either'; -import { foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; - +import { expectParseError, expectParseSuccess } from '@kbn/zod-helpers'; import { GetRuleExecutionEventsRequestParams, GetRuleExecutionEventsRequestQuery, -} from './get_rule_execution_events_route'; +} from './get_rule_execution_events_route.gen'; describe('Request schema of Get rule execution events', () => { describe('GetRuleExecutionEventsRequestParams', () => { @@ -22,11 +19,10 @@ describe('Request schema of Get rule execution events', () => { ruleId: 'some id', }; - const decoded = GetRuleExecutionEventsRequestParams.decode(input); - const message = pipe(decoded, foldLeftRight); + const results = GetRuleExecutionEventsRequestParams.safeParse(input); + expectParseSuccess(results); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual( + expect(results.data).toEqual( expect.objectContaining({ ruleId: 'some id', }) @@ -39,23 +35,21 @@ describe('Request schema of Get rule execution events', () => { foo: 'bar', // this one is not in the schema and will be stripped }; - const decoded = GetRuleExecutionEventsRequestParams.decode(input); - const message = pipe(decoded, foldLeftRight); + const results = GetRuleExecutionEventsRequestParams.safeParse(input); + expectParseSuccess(results); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual({ - ruleId: 'some id', - }); + expect(results.data).toEqual( + expect.objectContaining({ + ruleId: 'some id', + }) + ); }); }); describe('Validation fails', () => { const test = (input: unknown) => { - const decoded = GetRuleExecutionEventsRequestParams.decode(input); - const message = pipe(decoded, foldLeftRight); - - expect(getPaths(left(message.errors)).length).toBeGreaterThan(0); - expect(message.schema).toEqual({}); + const results = GetRuleExecutionEventsRequestParams.safeParse(input); + expectParseError(results); }; it('when not all the required parameters are passed', () => { @@ -84,11 +78,10 @@ describe('Request schema of Get rule execution events', () => { per_page: 6, }; - const decoded = GetRuleExecutionEventsRequestQuery.decode(input); - const message = pipe(decoded, foldLeftRight); + const result = GetRuleExecutionEventsRequestQuery.safeParse(input); + expectParseSuccess(result); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual({ + expect(result.data).toEqual({ event_types: ['message', 'status-change'], log_levels: ['debug', 'info', 'error'], sort_order: 'asc', @@ -107,11 +100,10 @@ describe('Request schema of Get rule execution events', () => { foo: 'bar', // this one is not in the schema and will be stripped }; - const decoded = GetRuleExecutionEventsRequestQuery.decode(input); - const message = pipe(decoded, foldLeftRight); + const result = GetRuleExecutionEventsRequestQuery.safeParse(input); + expectParseSuccess(result); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual({ + expect(result.data).toEqual({ event_types: ['message', 'status-change'], log_levels: ['debug', 'info', 'error'], sort_order: 'asc', @@ -119,25 +111,12 @@ describe('Request schema of Get rule execution events', () => { per_page: 6, }); }); - - it('when no parameters are passed (all are have default values)', () => { - const input = {}; - - const decoded = GetRuleExecutionEventsRequestQuery.decode(input); - const message = pipe(decoded, foldLeftRight); - - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual(expect.any(Object)); - }); }); describe('Validation fails', () => { const test = (input: unknown) => { - const decoded = GetRuleExecutionEventsRequestQuery.decode(input); - const message = pipe(decoded, foldLeftRight); - - expect(getPaths(left(message.errors)).length).toBeGreaterThan(0); - expect(message.schema).toEqual({}); + const result = GetRuleExecutionEventsRequestQuery.safeParse(input); + expectParseError(result); }; it('when invalid parameters are passed', () => { @@ -147,21 +126,18 @@ describe('Request schema of Get rule execution events', () => { }); }); - describe('Validation sets default values', () => { - it('when optional parameters are not passed', () => { - const input = {}; + it('Validation sets default values when optional parameters are not passed', () => { + const input = {}; - const decoded = GetRuleExecutionEventsRequestQuery.decode(input); - const message = pipe(decoded, foldLeftRight); + const result = GetRuleExecutionEventsRequestQuery.safeParse(input); + expectParseSuccess(result); - expect(getPaths(left(message.errors))).toEqual([]); - expect(message.schema).toEqual({ - event_types: [], - log_levels: [], - sort_order: 'desc', - page: 1, - per_page: 20, - }); + expect(result.data).toEqual({ + event_types: [], + log_levels: [], + sort_order: 'desc', + page: 1, + per_page: 20, }); }); }); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.ts deleted file mode 100644 index 628e71cf51790..0000000000000 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.ts +++ /dev/null @@ -1,60 +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 * as t from 'io-ts'; - -import { DefaultPerPage, DefaultPage } from '@kbn/securitysolution-io-ts-alerting-types'; -import { defaultCsvArray, IsoDateString, NonEmptyString } from '@kbn/securitysolution-io-ts-types'; - -import { DefaultSortOrderDesc, PaginationResult } from '../../../model'; -import { RuleExecutionEvent, TRuleExecutionEventType, TLogLevel } from '../../model'; - -/** - * URL path parameters of the API route. - */ -export type GetRuleExecutionEventsRequestParams = t.TypeOf< - typeof GetRuleExecutionEventsRequestParams ->; -export const GetRuleExecutionEventsRequestParams = t.exact( - t.type({ - ruleId: NonEmptyString, - }) -); - -/** - * Query string parameters of the API route. - */ -export type GetRuleExecutionEventsRequestQuery = t.TypeOf< - typeof GetRuleExecutionEventsRequestQuery ->; -export const GetRuleExecutionEventsRequestQuery = t.exact( - t.intersection([ - t.partial({ - search_term: NonEmptyString, - event_types: defaultCsvArray(TRuleExecutionEventType), - log_levels: defaultCsvArray(TLogLevel), - date_start: IsoDateString, - date_end: IsoDateString, - }), - t.type({ - sort_order: DefaultSortOrderDesc, // defaults to 'desc' - page: DefaultPage, // defaults to 1 - per_page: DefaultPerPage, // defaults to 20 - }), - ]) -); - -/** - * Response body of the API route. - */ -export type GetRuleExecutionEventsResponse = t.TypeOf; -export const GetRuleExecutionEventsResponse = t.exact( - t.type({ - events: t.array(RuleExecutionEvent), - pagination: PaginationResult, - }) -); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_results/get_rule_execution_results_route.gen.ts b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_results/get_rule_execution_results_route.gen.ts index 442c45f3e8dc9..cb8e2f1d8ffa5 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_results/get_rule_execution_results_route.gen.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/rule_monitoring/rule_execution_logs/get_rule_execution_results/get_rule_execution_results_route.gen.ts @@ -6,6 +6,7 @@ */ import { z } from 'zod'; +import { ArrayFromString } from '@kbn/zod-helpers'; /* * NOTICE: Do not edit this file manually. @@ -38,14 +39,7 @@ export const GetRuleExecutionResultsRequestQuery = z.object({ /** * Comma-separated list of rule execution statuses to filter results by */ - status_filters: z - .preprocess( - (value: unknown) => - typeof value === 'string' ? (value === '' ? [] : value.split(',')) : value, - z.array(RuleExecutionStatus) - ) - .optional() - .default([]), + status_filters: ArrayFromString(RuleExecutionStatus).optional().default([]), /** * Field to sort results by */ diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/signals_migration/create_signals_migration/create_signals_migration_route.ts b/x-pack/plugins/security_solution/common/api/detection_engine/signals_migration/create_signals_migration/create_signals_migration_route.ts index dd1ecc4208ef7..9089efeb87d05 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/signals_migration/create_signals_migration/create_signals_migration_route.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/signals_migration/create_signals_migration/create_signals_migration_route.ts @@ -8,9 +8,6 @@ import * as t from 'io-ts'; import { PositiveInteger, PositiveIntegerGreaterThanZero } from '@kbn/securitysolution-io-ts-types'; -// TODO https://github.com/elastic/security-team/issues/7491 -// eslint-disable-next-line no-restricted-imports -import { IndexPatternArray } from '../../model/rule_schema_legacy'; export const signalsReindexOptions = t.partial({ requests_per_second: t.number, @@ -23,7 +20,7 @@ export type SignalsReindexOptions = t.TypeOf; export const createSignalsMigrationSchema = t.intersection([ t.exact( t.type({ - index: IndexPatternArray, + index: t.array(t.string), }) ), t.exact(signalsReindexOptions), diff --git a/x-pack/plugins/security_solution/common/api/timeline/model/api.ts b/x-pack/plugins/security_solution/common/api/timeline/model/api.ts index 864b4613857e2..c423b2a4418bb 100644 --- a/x-pack/plugins/security_solution/common/api/timeline/model/api.ts +++ b/x-pack/plugins/security_solution/common/api/timeline/model/api.ts @@ -21,7 +21,7 @@ import { SavedObjectResolveAliasTargetId, SavedObjectResolveOutcome, } from '../../detection_engine/model/rule_schema_legacy'; -import { ErrorSchema, success, success_count as successCount } from '../../detection_engine'; +import { ErrorSchema } from './error_schema'; export const BareNoteSchema = runtimeTypes.intersection([ runtimeTypes.type({ @@ -497,8 +497,8 @@ export interface ExportTimelineNotFoundError { export const importTimelineResultSchema = runtimeTypes.exact( runtimeTypes.type({ - success, - success_count: successCount, + success: runtimeTypes.boolean, + success_count: PositiveInteger, timelines_installed: PositiveInteger, timelines_updated: PositiveInteger, errors: runtimeTypes.array(ErrorSchema), diff --git a/x-pack/plugins/security_solution/common/api/timeline/model/error_schema.mock.ts b/x-pack/plugins/security_solution/common/api/timeline/model/error_schema.mock.ts new file mode 100644 index 0000000000000..7c24d605d5f98 --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/timeline/model/error_schema.mock.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 { ErrorSchema } from './error_schema'; + +export const getErrorSchemaMock = ( + id: string = '819eded6-e9c8-445b-a647-519aea39e063' +): ErrorSchema => ({ + id, + error: { + status_code: 404, + message: 'id: "819eded6-e9c8-445b-a647-519aea39e063" not found', + }, +}); diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/error_schema.test.ts b/x-pack/plugins/security_solution/common/api/timeline/model/error_schema.test.ts similarity index 93% rename from x-pack/plugins/security_solution/common/api/detection_engine/model/error_schema.test.ts rename to x-pack/plugins/security_solution/common/api/timeline/model/error_schema.test.ts index 164f5ee854efc..8326479db9c14 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/error_schema.test.ts +++ b/x-pack/plugins/security_solution/common/api/timeline/model/error_schema.test.ts @@ -8,9 +8,7 @@ import { exactCheck, foldLeftRight, getPaths } from '@kbn/securitysolution-io-ts-utils'; import { left } from 'fp-ts/lib/Either'; import { pipe } from 'fp-ts/lib/pipeable'; -// TODO https://github.com/elastic/security-team/issues/7491 -// eslint-disable-next-line no-restricted-imports -import { ErrorSchema } from './error_schema_legacy'; +import { ErrorSchema } from './error_schema'; import { getErrorSchemaMock } from './error_schema.mock'; describe('error_schema', () => { diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/error_schema_legacy.ts b/x-pack/plugins/security_solution/common/api/timeline/model/error_schema.ts similarity index 69% rename from x-pack/plugins/security_solution/common/api/detection_engine/model/error_schema_legacy.ts rename to x-pack/plugins/security_solution/common/api/timeline/model/error_schema.ts index c2efee05269c1..a0ac17765c3a8 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/error_schema_legacy.ts +++ b/x-pack/plugins/security_solution/common/api/timeline/model/error_schema.ts @@ -5,22 +5,16 @@ * 2.0. */ -import { NonEmptyString } from '@kbn/securitysolution-io-ts-types'; +import { NonEmptyString, PositiveInteger } from '@kbn/securitysolution-io-ts-types'; import * as t from 'io-ts'; -// TODO https://github.com/elastic/security-team/issues/7491 -// eslint-disable-next-line no-restricted-imports -import { RuleSignatureId } from './rule_schema_legacy'; - -import { status_code, message } from './schemas'; - // We use id: t.string intentionally and _never_ the id from global schemas as // sometimes echo back out the id that the user gave us and it is not guaranteed // to be a UUID but rather just a string const partial = t.exact( t.partial({ id: t.string, - rule_id: RuleSignatureId, + rule_id: NonEmptyString, list_id: NonEmptyString, item_id: NonEmptyString, }) @@ -28,8 +22,8 @@ const partial = t.exact( const required = t.exact( t.type({ error: t.type({ - status_code, - message, + status_code: PositiveInteger, + message: t.string, }), }) ); diff --git a/x-pack/plugins/security_solution/common/constants.ts b/x-pack/plugins/security_solution/common/constants.ts index c6edaf898f67f..a7460bcd70345 100644 --- a/x-pack/plugins/security_solution/common/constants.ts +++ b/x-pack/plugins/security_solution/common/constants.ts @@ -505,3 +505,8 @@ export const DEFAULT_ALERT_TAGS_VALUE = [ i18n.FALSE_POSITIVE, i18n.FURTHER_INVESTIGATION_REQUIRED, ] as const; + +/** + * Max length for the comments within security solution + */ +export const MAX_COMMENT_LENGTH = 30000 as const; diff --git a/x-pack/plugins/security_solution/common/detection_engine/transform_actions.test.ts b/x-pack/plugins/security_solution/common/detection_engine/transform_actions.test.ts index 6bdce7573ed4c..1e2db97225580 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/transform_actions.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/transform_actions.test.ts @@ -17,8 +17,8 @@ import type { ResponseAction, RuleResponseAction, } from '../api/detection_engine/model/rule_response_actions'; -import { RESPONSE_ACTION_TYPES } from '../api/detection_engine/model/rule_response_actions'; -import type { NormalizedRuleAction } from '../api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { ResponseActionTypesEnum } from '../api/detection_engine/model/rule_response_actions'; +import type { NormalizedRuleAction } from '../api/detection_engine/rule_management'; import type { RuleAction } from '@kbn/alerting-plugin/common'; describe('transform_actions', () => { @@ -93,7 +93,7 @@ describe('transform_actions', () => { }); test('it should transform ResponseAction[] to RuleResponseAction[]', () => { const ruleAction: ResponseAction = { - action_type_id: RESPONSE_ACTION_TYPES.OSQUERY, + action_type_id: ResponseActionTypesEnum['.osquery'], params: { ecs_mapping: {}, saved_query_id: undefined, @@ -117,7 +117,7 @@ describe('transform_actions', () => { test('it should transform RuleResponseAction[] to ResponseAction[]', () => { const alertAction: RuleResponseAction = { - actionTypeId: RESPONSE_ACTION_TYPES.OSQUERY, + actionTypeId: ResponseActionTypesEnum['.osquery'], params: { ecsMapping: {}, savedQueryId: undefined, diff --git a/x-pack/plugins/security_solution/common/detection_engine/transform_actions.ts b/x-pack/plugins/security_solution/common/detection_engine/transform_actions.ts index 5750f35d893e2..1f3727e6e4e0b 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/transform_actions.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/transform_actions.ts @@ -7,12 +7,12 @@ import type { RuleAction as AlertingRuleAction } from '@kbn/alerting-plugin/common'; import type { NormalizedAlertAction } from '@kbn/alerting-plugin/server/rules_client'; -import type { NormalizedRuleAction } from '../api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import type { NormalizedRuleAction } from '../api/detection_engine/rule_management'; import type { ResponseAction, RuleResponseAction, } from '../api/detection_engine/model/rule_response_actions'; -import { RESPONSE_ACTION_TYPES } from '../api/detection_engine/model/rule_response_actions'; +import { ResponseActionTypesEnum } from '../api/detection_engine/model/rule_response_actions'; import type { RuleAction } from '../api/detection_engine/model'; export const transformRuleToAlertAction = ({ @@ -63,7 +63,12 @@ export const transformNormalizedRuleToAlertAction = ({ group, id, params: params as AlertingRuleAction['params'], - ...(alertsFilter && { alertsFilter }), + ...(alertsFilter && { + // We use "unknown" as the alerts filter type which is stricter than the one + // used in the alerting plugin (what they use is essentially "any"). So we + // have to to cast here + alertsFilter: alertsFilter as AlertingRuleAction['alertsFilter'], + }), ...(frequency && { frequency }), }); @@ -85,7 +90,7 @@ export const transformRuleToAlertResponseAction = ({ action_type_id: actionTypeId, params, }: ResponseAction): RuleResponseAction => { - if (actionTypeId === RESPONSE_ACTION_TYPES.OSQUERY) { + if (actionTypeId === ResponseActionTypesEnum['.osquery']) { const { saved_query_id: savedQueryId, ecs_mapping: ecsMapping, @@ -113,7 +118,7 @@ export const transformAlertToRuleResponseAction = ({ actionTypeId, params, }: RuleResponseAction): ResponseAction => { - if (actionTypeId === RESPONSE_ACTION_TYPES.OSQUERY) { + if (actionTypeId === ResponseActionTypesEnum['.osquery']) { const { savedQueryId, ecsMapping, packId, ...rest } = params; return { params: { diff --git a/x-pack/plugins/security_solution/common/risk_engine/risk_score_calculation/request_schema.ts b/x-pack/plugins/security_solution/common/risk_engine/risk_score_calculation/request_schema.ts index 6058f60e1e1c6..c05ca782aface 100644 --- a/x-pack/plugins/security_solution/common/risk_engine/risk_score_calculation/request_schema.ts +++ b/x-pack/plugins/security_solution/common/risk_engine/risk_score_calculation/request_schema.ts @@ -6,9 +6,6 @@ */ import * as t from 'io-ts'; -// TODO https://github.com/elastic/security-team/issues/7491 -// eslint-disable-next-line no-restricted-imports -import { DataViewId } from '../../api/detection_engine/model/rule_schema_legacy'; import { afterKeysSchema } from '../after_keys'; import { identifierTypeSchema } from '../identifier_types'; import { riskWeightsSchema } from '../risk_weights/schema'; @@ -16,7 +13,7 @@ import { riskWeightsSchema } from '../risk_weights/schema'; export const riskScoreCalculationRequestSchema = t.exact( t.intersection([ t.type({ - data_view_id: DataViewId, + data_view_id: t.string, identifier_type: identifierTypeSchema, range: t.type({ start: t.string, diff --git a/x-pack/plugins/security_solution/common/risk_engine/risk_score_preview/request_schema.ts b/x-pack/plugins/security_solution/common/risk_engine/risk_score_preview/request_schema.ts index c440248311636..76ee6a303532b 100644 --- a/x-pack/plugins/security_solution/common/risk_engine/risk_score_preview/request_schema.ts +++ b/x-pack/plugins/security_solution/common/risk_engine/risk_score_preview/request_schema.ts @@ -6,9 +6,6 @@ */ import * as t from 'io-ts'; -// TODO https://github.com/elastic/security-team/issues/7491 -// eslint-disable-next-line no-restricted-imports -import { DataViewId } from '../../api/detection_engine/model/rule_schema_legacy'; import { afterKeysSchema } from '../after_keys'; import { identifierTypeSchema } from '../identifier_types'; import { rangeSchema } from '../range'; @@ -17,7 +14,7 @@ import { riskWeightsSchema } from '../risk_weights/schema'; export const riskScorePreviewRequestSchema = t.exact( t.intersection([ t.type({ - data_view_id: DataViewId, + data_view_id: t.string, }), t.partial({ after_keys: afterKeysSchema, diff --git a/x-pack/plugins/security_solution/common/types/response_actions/index.ts b/x-pack/plugins/security_solution/common/types/response_actions/index.ts index 07124b6bc5e45..35333bdc54eb7 100644 --- a/x-pack/plugins/security_solution/common/types/response_actions/index.ts +++ b/x-pack/plugins/security_solution/common/types/response_actions/index.ts @@ -13,7 +13,7 @@ export interface RawEventData { _index: string; } -export enum RESPONSE_ACTION_TYPES { +export enum ResponseActionTypesEnum { OSQUERY = '.osquery', ENDPOINT = '.endpoint', } @@ -34,7 +34,7 @@ export interface ExpandedEventFieldsObject { type RuleParameters = Array<{ response_actions: Array<{ - action_type_id: RESPONSE_ACTION_TYPES; + action_type_id: ResponseActionTypesEnum; params: Record; }>; }>; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/event_details.test.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/event_details.test.tsx index 7323c293cd94c..edc72e92ff153 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/event_details.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/event_details.test.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { mount } from 'enzyme'; import type { ReactWrapper } from 'enzyme'; import React from 'react'; diff --git a/x-pack/plugins/security_solution/public/common/components/event_details/osquery_tab.tsx b/x-pack/plugins/security_solution/public/common/components/event_details/osquery_tab.tsx index 289561c0bc4aa..274c649ece9dc 100644 --- a/x-pack/plugins/security_solution/public/common/components/event_details/osquery_tab.tsx +++ b/x-pack/plugins/security_solution/public/common/components/event_details/osquery_tab.tsx @@ -20,7 +20,7 @@ import { useIsExperimentalFeatureEnabled } from '../../hooks/use_experimental_fe import { useKibana } from '../../lib/kibana'; import { EventsViewType } from './event_details'; import * as i18n from './translations'; -import { RESPONSE_ACTION_TYPES } from '../../../../common/api/detection_engine/model/rule_response_actions'; +import { ResponseActionTypesEnum } from '../../../../common/api/detection_engine/model/rule_response_actions'; const TabContentWrapper = styled.div` height: 100%; @@ -71,7 +71,7 @@ export const useOsqueryTab = ({ } const osqueryResponseActions = responseActions.filter( - (responseAction) => responseAction.action_type_id === RESPONSE_ACTION_TYPES.OSQUERY + (responseAction) => responseAction.action_type_id === ResponseActionTypesEnum['.osquery'] ); if (!osqueryResponseActions?.length) { diff --git a/x-pack/plugins/security_solution/public/common/components/ml/score/anomaly_score.test.tsx b/x-pack/plugins/security_solution/public/common/components/ml/score/anomaly_score.test.tsx index 4bdbbdca8bdca..d8b43fa9a603b 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/score/anomaly_score.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/score/anomaly_score.test.tsx @@ -15,7 +15,7 @@ import { mockAnomalies } from '../mock'; import { TestProviders } from '../../../mock/test_providers'; import { useMountAppended } from '../../../utils/use_mount_appended'; import type { Anomalies } from '../types'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; jest.mock('../../../lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/common/components/ml/score/anomaly_scores.test.tsx b/x-pack/plugins/security_solution/public/common/components/ml/score/anomaly_scores.test.tsx index 6a72d72a9eb59..b54ec85bab0e4 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/score/anomaly_scores.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/score/anomaly_scores.test.tsx @@ -16,7 +16,7 @@ import { TestProviders } from '../../../mock/test_providers'; import { getEmptyValue } from '../../empty_value'; import type { Anomalies } from '../types'; import { useMountAppended } from '../../../utils/use_mount_appended'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; jest.mock('../../../lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/common/components/ml/score/create_descriptions_list.test.tsx b/x-pack/plugins/security_solution/public/common/components/ml/score/create_descriptions_list.test.tsx index c9de8aad04de8..832c60c69be87 100644 --- a/x-pack/plugins/security_solution/public/common/components/ml/score/create_descriptions_list.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/ml/score/create_descriptions_list.test.tsx @@ -11,7 +11,7 @@ import { mockAnomalies } from '../mock'; import { createDescriptionList } from './create_description_list'; import { EuiDescriptionList } from '@elastic/eui'; import type { Anomaly } from '../types'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; jest.mock('../../../lib/kibana'); diff --git a/x-pack/plugins/security_solution/public/common/components/popover_items/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/popover_items/index.test.tsx index 8d7123bfe6d66..58584f4325d4e 100644 --- a/x-pack/plugins/security_solution/public/common/components/popover_items/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/popover_items/index.test.tsx @@ -10,8 +10,7 @@ import React from 'react'; import type { PopoverItemsProps } from '.'; import { PopoverItems } from '.'; import { TestProviders } from '../../mock'; -import { render, screen } from '@testing-library/react'; -import { within } from '@testing-library/dom'; +import { render, screen, within } from '@testing-library/react'; import { waitForEuiPopoverOpen } from '@elastic/eui/lib/test/rtl'; const mockTags = ['Elastic', 'Endpoint', 'Data Protection', 'ML', 'Continuous Monitoring']; diff --git a/x-pack/plugins/security_solution/public/common/components/sourcerer/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/sourcerer/index.test.tsx index ceab08373993a..ebda7e6748ebd 100644 --- a/x-pack/plugins/security_solution/public/common/components/sourcerer/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/sourcerer/index.test.tsx @@ -22,7 +22,7 @@ import { } from '../../mock'; import { createStore } from '../../store'; import type { EuiSuperSelectOption } from '@elastic/eui/src/components/form/super_select/super_select_control'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { useSourcererDataView } from '../../containers/sourcerer'; import { useSignalHelpers } from '../../containers/sourcerer/use_signal_helpers'; import { TimelineId } from '../../../../common/types/timeline'; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/index.test.tsx index 573419676a086..63b0490b91e60 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/index.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import type { ReactWrapper } from 'enzyme'; import { mount, shallow } from 'enzyme'; -import { waitFor, render } from '@testing-library/react'; +import { act, fireEvent, render, waitFor } from '@testing-library/react'; import { getExceptionListSchemaMock } from '@kbn/lists-plugin/common/schemas/response/exception_list_schema.mock'; import { getExceptionBuilderComponentLazy } from '@kbn/lists-plugin/public'; @@ -35,6 +35,7 @@ import { import type { AlertData } from '../../utils/types'; import { useFindRules } from '../../../rule_management/logic/use_find_rules'; import { useFindExceptionListReferences } from '../../logic/use_find_references'; +import { MAX_COMMENT_LENGTH } from '../../../../../common/constants'; jest.mock('../../../../detections/containers/detection_engine/alerts/use_signal_index'); jest.mock('../../../../common/lib/kibana'); @@ -1305,5 +1306,46 @@ describe('When the add exception modal is opened', () => { wrapper.find('button[data-test-subj="addExceptionConfirmButton"]').getDOMNode() ).toBeDisabled(); }); + + test('when there is a comment error has submit button disabled', async () => { + const { getByLabelText, queryByText, getByTestId } = render( + + + + ); + + const commentInput = getByLabelText('Comment Input'); + + const commentErrorMessage = `The length of the comment is too long. The maximum length is ${MAX_COMMENT_LENGTH} characters.`; + expect(queryByText(commentErrorMessage)).toBeNull(); + + // Put comment with the length above maximum allowed + act(() => { + fireEvent.change(commentInput, { + target: { + value: [...new Array(MAX_COMMENT_LENGTH + 1).keys()].map((_) => 'a').join(''), + }, + }); + fireEvent.blur(commentInput); + }); + expect(queryByText(commentErrorMessage)).not.toBeNull(); + expect(getByTestId('addExceptionConfirmButton')).toBeDisabled(); + }); }); }); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/index.tsx index d4108c3eddede..9eefb96be62c9 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/index.tsx @@ -157,6 +157,7 @@ export const AddExceptionFlyout = memo(function AddExceptionFlyout({ selectedRulesToAddTo, exceptionListsToAddTo, newComment, + commentErrorExists, itemConditionValidationErrorExists, errorSubmitting, expireTime, @@ -267,6 +268,16 @@ export const AddExceptionFlyout = memo(function AddExceptionFlyout({ [dispatch] ); + const setCommentError = useCallback( + (errorExists: boolean): void => { + dispatch({ + type: 'setCommentError', + errorExists, + }); + }, + [dispatch] + ); + const setBulkCloseIndex = useCallback( (index: string[] | undefined): void => { dispatch({ @@ -445,6 +456,7 @@ export const AddExceptionFlyout = memo(function AddExceptionFlyout({ exceptionItemName.trim() === '' || exceptionItems.every((item) => item.entries.length === 0) || itemConditionValidationErrorExists || + commentErrorExists || expireErrorExists || (addExceptionToRadioSelection === 'add_to_lists' && isEmpty(exceptionListsToAddTo)) || (addExceptionToRadioSelection === 'select_rules_to_add_to' && @@ -462,6 +474,7 @@ export const AddExceptionFlyout = memo(function AddExceptionFlyout({ expireErrorExists, selectedRulesToAddTo, listType, + commentErrorExists, ] ); @@ -555,6 +568,7 @@ export const AddExceptionFlyout = memo(function AddExceptionFlyout({ initialIsOpen={!!newComment} newCommentValue={newComment} newCommentOnChange={setComment} + setCommentError={setCommentError} /> {listType !== ExceptionListTypeEnum.ENDPOINT && ( <> diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/reducer.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/reducer.ts index 04d13c3a1b4e9..ec8040d1fe7cc 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/reducer.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/add_exception_flyout/reducer.ts @@ -21,6 +21,7 @@ export interface State { initialItems: ExceptionsBuilderExceptionItem[]; exceptionItems: ExceptionsBuilderReturnExceptionItem[]; newComment: string; + commentErrorExists: boolean; addExceptionToRadioSelection: string; itemConditionValidationErrorExists: boolean; closeSingleAlert: boolean; @@ -40,6 +41,7 @@ export const initialState: State = { exceptionItems: [], exceptionItemMeta: { name: '' }, newComment: '', + commentErrorExists: false, itemConditionValidationErrorExists: false, closeSingleAlert: false, bulkCloseAlerts: false, @@ -76,6 +78,10 @@ export type Action = type: 'setComment'; comment: string; } + | { + type: 'setCommentError'; + errorExists: boolean; + } | { type: 'setCloseSingleAlert'; close: boolean; @@ -127,6 +133,7 @@ export type Action = export const createExceptionItemsReducer = () => + /* eslint complexity: ["error", 21]*/ (state: State, action: Action): State => { switch (action.type) { case 'setExceptionItemMeta': { @@ -172,6 +179,14 @@ export const createExceptionItemsReducer = newComment: comment, }; } + case 'setCommentError': { + const { errorExists } = action; + + return { + ...state, + commentErrorExists: errorExists, + }; + } case 'setCloseSingleAlert': { const { close } = action; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/edit_exception_flyout/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/edit_exception_flyout/index.test.tsx index faa7c1385142c..077befdad52ba 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/edit_exception_flyout/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/edit_exception_flyout/index.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { waitFor } from '@testing-library/react'; +import { act, fireEvent, render, waitFor } from '@testing-library/react'; import { ThemeProvider } from 'styled-components'; import type { ReactWrapper } from 'enzyme'; import { mount } from 'enzyme'; @@ -34,6 +34,7 @@ import { useFetchIndexPatterns } from '../../logic/use_exception_flyout_data'; import { useCreateOrUpdateException } from '../../logic/use_create_update_exception'; import { useFindExceptionListReferences } from '../../logic/use_find_references'; import * as i18n from './translations'; +import { MAX_COMMENT_LENGTH } from '../../../../../common/constants'; const mockTheme = getMockTheme({ eui: { @@ -693,5 +694,60 @@ describe('When the edit exception modal is opened', () => { wrapper.find('button[data-test-subj="editExceptionConfirmButton"]').getDOMNode() ).toBeDisabled(); }); + + test('when there is a comment error has submit button disabled', async () => { + const { getByLabelText, queryByText, getByTestId } = render( + + + + ); + + const commentInput = getByLabelText('Comment Input'); + + const commentErrorMessage = `The length of the comment is too long. The maximum length is ${MAX_COMMENT_LENGTH} characters.`; + expect(queryByText(commentErrorMessage)).toBeNull(); + + // Put comment with the length above maximum allowed + act(() => { + fireEvent.change(commentInput, { + target: { + value: [...new Array(MAX_COMMENT_LENGTH + 1).keys()].map((_) => 'a').join(''), + }, + }); + fireEvent.blur(commentInput); + }); + expect(queryByText(commentErrorMessage)).not.toBeNull(); + expect(getByTestId('editExceptionConfirmButton')).toBeDisabled(); + }); }); }); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/edit_exception_flyout/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/edit_exception_flyout/index.tsx index 4d9e7c3bbc4ef..6d2526cdbf239 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/edit_exception_flyout/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/edit_exception_flyout/index.tsx @@ -117,6 +117,7 @@ const EditExceptionFlyoutComponent: React.FC = ({ exceptionItems, exceptionItemMeta: { name: exceptionItemName }, newComment, + commentErrorExists, bulkCloseAlerts, disableBulkClose, bulkCloseIndex, @@ -129,6 +130,7 @@ const EditExceptionFlyoutComponent: React.FC = ({ exceptionItems: [itemToEdit], exceptionItemMeta: { name: itemToEdit.name }, newComment: '', + commentErrorExists: false, bulkCloseAlerts: false, disableBulkClose: true, bulkCloseIndex: undefined, @@ -197,6 +199,16 @@ const EditExceptionFlyoutComponent: React.FC = ({ [dispatch] ); + const setCommentError = useCallback( + (errorExists: boolean): void => { + dispatch({ + type: 'setCommentError', + errorExists, + }); + }, + [dispatch] + ); + const setBulkCloseAlerts = useCallback( (bulkClose: boolean): void => { dispatch({ @@ -337,8 +349,17 @@ const EditExceptionFlyoutComponent: React.FC = ({ exceptionItems.every((item) => item.entries.length === 0) || isLoading || entryErrorExists || + expireErrorExists || + commentErrorExists, + [ + isLoading, + entryErrorExists, + exceptionItems, + isSubmitting, + isClosingAlerts, expireErrorExists, - [isLoading, entryErrorExists, exceptionItems, isSubmitting, isClosingAlerts, expireErrorExists] + commentErrorExists, + ] ); return ( @@ -398,6 +419,7 @@ const EditExceptionFlyoutComponent: React.FC = ({ exceptionItemComments={itemToEdit.comments} newCommentValue={newComment} newCommentOnChange={setComment} + setCommentError={setCommentError} /> {listType !== ExceptionListTypeEnum.ENDPOINT && ( <> diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/edit_exception_flyout/reducer.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/edit_exception_flyout/reducer.ts index e08b3c8d135c0..e6dee3af16572 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/edit_exception_flyout/reducer.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/edit_exception_flyout/reducer.ts @@ -12,6 +12,7 @@ export interface State { exceptionItems: ExceptionsBuilderReturnExceptionItem[]; exceptionItemMeta: { name: string }; newComment: string; + commentErrorExists: boolean; bulkCloseAlerts: boolean; disableBulkClose: boolean; bulkCloseIndex: string[] | undefined; @@ -29,6 +30,10 @@ export type Action = type: 'setComment'; comment: string; } + | { + type: 'setCommentError'; + errorExists: boolean; + } | { type: 'setBulkCloseAlerts'; bulkClose: boolean; @@ -81,6 +86,14 @@ export const createExceptionItemsReducer = newComment: comment, }; } + case 'setCommentError': { + const { errorExists } = action; + + return { + ...state, + commentErrorExists: errorExists, + }; + } case 'setBulkCloseAlerts': { const { bulkClose } = action; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/use_add_to_rules_table.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/use_add_to_rules_table.test.tsx index 7afa5e5a7eef0..8862c626ea6e4 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/use_add_to_rules_table.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/flyout_components/add_to_rules_table/use_add_to_rules_table.test.tsx @@ -6,9 +6,8 @@ */ import React from 'react'; -import { fireEvent, render as rTLRender } from '@testing-library/react'; -import { waitFor } from '@testing-library/dom'; -import { act, renderHook } from '@testing-library/react-hooks'; +import { fireEvent, render as rTLRender, waitFor, act } from '@testing-library/react'; +import { renderHook } from '@testing-library/react-hooks'; import type { EuiTableFieldDataColumnType } from '@elastic/eui'; import type { Rule } from '../../../../rule_management/logic/types'; import { getRulesSchemaMock } from '../../../../../../common/api/detection_engine/model/rule_schema/mocks'; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/item_comments/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/item_comments/index.test.tsx index 47933db0b3522..6dd8684eaeaac 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/item_comments/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/item_comments/index.test.tsx @@ -6,6 +6,7 @@ */ import React from 'react'; +import { act, fireEvent, render } from '@testing-library/react'; import { mountWithIntl } from '@kbn/test-jest-helpers'; import { EuiTextArea } from '@elastic/eui'; @@ -13,6 +14,7 @@ import { ExceptionItemComments } from '.'; import { TestProviders } from '../../../../common/mock'; import { useCurrentUser } from '../../../../common/lib/kibana'; import { shallow } from 'enzyme'; +import { MAX_COMMENT_LENGTH } from '../../../../../common/constants'; jest.mock('../../../../common/lib/kibana'); @@ -38,6 +40,7 @@ describe('ExceptionItemComments', () => { ); @@ -65,6 +68,7 @@ describe('ExceptionItemComments', () => { ); @@ -92,6 +96,7 @@ describe('ExceptionItemComments', () => { ); @@ -106,6 +111,7 @@ describe('ExceptionItemComments', () => { ); @@ -122,6 +128,7 @@ describe('ExceptionItemComments', () => { ); @@ -152,10 +159,53 @@ describe('ExceptionItemComments', () => { ]} newCommentValue={''} newCommentOnChange={mockOnCommentChange} + setCommentError={jest.fn()} /> ); expect(wrapper.find('[data-test-subj="exceptionItemCommentsAccordion"]').exists()).toBeTruthy(); }); + + it('it calls setCommentError on comment error update change', async () => { + const mockSetCommentError = jest.fn(); + const { getByLabelText, queryByText } = render( + + + + ); + + const commentInput = getByLabelText('Comment Input'); + + const commentErrorMessage = `The length of the comment is too long. The maximum length is ${MAX_COMMENT_LENGTH} characters.`; + expect(queryByText(commentErrorMessage)).toBeNull(); + + // Put comment with the length above maximum allowed + act(() => { + fireEvent.change(commentInput, { + target: { + value: [...new Array(MAX_COMMENT_LENGTH + 1).keys()].map((_) => 'a').join(''), + }, + }); + fireEvent.blur(commentInput); + }); + expect(queryByText(commentErrorMessage)).not.toBeNull(); + expect(mockSetCommentError).toHaveBeenCalledWith(true); + + // Put comment with the allowed length + act(() => { + fireEvent.change(commentInput, { + target: { + value: 'Updating my new comment', + }, + }); + fireEvent.blur(commentInput); + }); + expect(queryByText(commentErrorMessage)).toBeNull(); + expect(mockSetCommentError).toHaveBeenCalledWith(false); + }); }); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/item_comments/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/item_comments/index.tsx index 0f32e2b4d1ab8..f262c7a07754a 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/item_comments/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/item_comments/index.tsx @@ -5,19 +5,21 @@ * 2.0. */ -import React, { memo, useState, useCallback, useMemo } from 'react'; +import React, { memo, useState, useCallback, useMemo, useEffect } from 'react'; import styled, { css } from 'styled-components'; import type { EuiCommentProps } from '@elastic/eui'; import { EuiTextArea, EuiFlexGroup, EuiFlexItem, + EuiFormRow, EuiAvatar, EuiAccordion, EuiCommentList, EuiText, } from '@elastic/eui'; import type { Comment } from '@kbn/securitysolution-io-ts-list-types'; +import { MAX_COMMENT_LENGTH } from '../../../../../common/constants'; import * as i18n from './translations'; import { useCurrentUser } from '../../../../common/lib/kibana'; import { getFormattedComments } from '../../utils/helpers'; @@ -28,6 +30,7 @@ interface ExceptionItemCommentsProps { accordionTitle?: JSX.Element; initialIsOpen?: boolean; newCommentOnChange: (value: string) => void; + setCommentError: (errorExists: boolean) => void; } const COMMENT_ACCORDION_BUTTON_CLASS_NAME = 'exceptionCommentAccordionButton'; @@ -53,8 +56,11 @@ export const ExceptionItemComments = memo(function ExceptionItemComments({ accordionTitle, initialIsOpen = false, newCommentOnChange, + setCommentError, }: ExceptionItemCommentsProps) { + const [errorExists, setErrorExists] = useState(false); const [shouldShowComments, setShouldShowComments] = useState(false); + const currentUser = useCurrentUser(); const fullName = currentUser?.fullName; const userName = currentUser?.username; @@ -73,9 +79,14 @@ export const ExceptionItemComments = memo(function ExceptionItemComments({ return userName && userName.length > 0 ? userName : i18n.UNKNOWN_AVATAR_NAME; }, [fullName, userEmail, userName]); + useEffect(() => { + setCommentError(errorExists); + }, [errorExists, setCommentError]); + const handleOnChange = useCallback( (event: React.ChangeEvent) => { newCommentOnChange(event.target.value); + setErrorExists(event.target.value.length > MAX_COMMENT_LENGTH); }, [newCommentOnChange] ); @@ -121,14 +132,20 @@ export const ExceptionItemComments = memo(function ExceptionItemComments({ - + + + diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/item_comments/translations.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/item_comments/translations.ts index afe20c6aada98..90c3d9bd0bc48 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/item_comments/translations.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/item_comments/translations.ts @@ -32,3 +32,10 @@ export const COMMENTS_HIDE = (comments: number) => values: { comments }, defaultMessage: 'Hide ({comments}) {comments, plural, =1 {Comment} other {Comments}}', }); + +export const COMMENT_MAX_LENGTH_ERROR = (length: number) => + i18n.translate('xpack.securitySolution.rule_exceptions.itemComments.maxLengthError', { + values: { length }, + defaultMessage: + 'The length of the comment is too long. The maximum length is {length} characters.', + }); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/api.test.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/api.test.ts index 9e09a1754a04d..226d0a2bd16ed 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/api.test.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/api.test.ts @@ -16,9 +16,9 @@ import { getRulesSchemaMock, } from '../../../../common/api/detection_engine/model/rule_schema/mocks'; import { - BulkActionType, - BulkActionEditType, -} from '../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; + BulkActionTypeEnum, + BulkActionEditTypeEnum, +} from '../../../../common/api/detection_engine/rule_management'; import { rulesMock } from '../logic/mock'; import type { FindRulesReferencedByExceptionsListProp } from '../logic/types'; @@ -701,7 +701,9 @@ describe('Detections Rules API', () => { }); test('passes a query', async () => { - await performBulkAction({ bulkAction: { type: BulkActionType.enable, query: 'some query' } }); + await performBulkAction({ + bulkAction: { type: BulkActionTypeEnum.enable, query: 'some query' }, + }); expect(fetchMock).toHaveBeenCalledWith( '/api/detection_engine/rules/_bulk_action', @@ -720,7 +722,7 @@ describe('Detections Rules API', () => { test('passes ids', async () => { await performBulkAction({ - bulkAction: { type: BulkActionType.disable, ids: ['ruleId1', 'ruleId2'] }, + bulkAction: { type: BulkActionTypeEnum.disable, ids: ['ruleId1', 'ruleId2'] }, }); expect(fetchMock).toHaveBeenCalledWith( @@ -741,10 +743,10 @@ describe('Detections Rules API', () => { test('passes edit payload', async () => { await performBulkAction({ bulkAction: { - type: BulkActionType.edit, + type: BulkActionTypeEnum.edit, ids: ['ruleId1'], editPayload: [ - { type: BulkActionEditType.add_index_patterns, value: ['some-index-pattern'] }, + { type: BulkActionEditTypeEnum.add_index_patterns, value: ['some-index-pattern'] }, ], }, }); @@ -767,7 +769,7 @@ describe('Detections Rules API', () => { test('executes dry run', async () => { await performBulkAction({ - bulkAction: { type: BulkActionType.disable, query: 'some query' }, + bulkAction: { type: BulkActionTypeEnum.disable, query: 'some query' }, dryRun: true, }); @@ -787,7 +789,7 @@ describe('Detections Rules API', () => { test('returns result', async () => { const result = await performBulkAction({ bulkAction: { - type: BulkActionType.disable, + type: BulkActionTypeEnum.disable, query: 'some query', }, }); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/api.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/api.ts index 860e0fc86e850..70f0a56ef74cd 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/api.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/api/api.ts @@ -27,12 +27,16 @@ import type { ReviewRuleInstallationResponseBody, } from '../../../../common/api/detection_engine/prebuilt_rules'; import type { + BulkDuplicateRules, + BulkActionEditPayload, + BulkActionType, CoverageOverviewResponse, GetRuleManagementFiltersResponse, } from '../../../../common/api/detection_engine/rule_management'; import { RULE_MANAGEMENT_FILTERS_URL, RULE_MANAGEMENT_COVERAGE_OVERVIEW_URL, + BulkActionTypeEnum, } from '../../../../common/api/detection_engine/rule_management'; import type { BulkActionsDryRunErrCode } from '../../../../common/constants'; import { @@ -54,11 +58,6 @@ import { import type { RulesReferencedByExceptionListsSchema } from '../../../../common/api/detection_engine/rule_exceptions'; import { DETECTION_ENGINE_RULES_EXCEPTIONS_REFERENCE_URL } from '../../../../common/api/detection_engine/rule_exceptions'; -import type { - BulkActionDuplicatePayload, - BulkActionEditPayload, -} from '../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; -import { BulkActionType } from '../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; import type { PreviewResponse, RuleResponse } from '../../../../common/api/detection_engine'; import { KibanaServices } from '../../../common/lib/kibana'; @@ -331,18 +330,18 @@ export type QueryOrIds = { query: string; ids?: undefined } | { query?: undefine type PlainBulkAction = { type: Exclude< BulkActionType, - BulkActionType.edit | BulkActionType.export | BulkActionType.duplicate + BulkActionTypeEnum['edit'] | BulkActionTypeEnum['export'] | BulkActionTypeEnum['duplicate'] >; } & QueryOrIds; type EditBulkAction = { - type: BulkActionType.edit; + type: BulkActionTypeEnum['edit']; editPayload: BulkActionEditPayload[]; } & QueryOrIds; type DuplicateBulkAction = { - type: BulkActionType.duplicate; - duplicatePayload?: BulkActionDuplicatePayload; + type: BulkActionTypeEnum['duplicate']; + duplicatePayload?: BulkDuplicateRules['duplicate']; } & QueryOrIds; export type BulkAction = PlainBulkAction | EditBulkAction | DuplicateBulkAction; @@ -368,9 +367,9 @@ export async function performBulkAction({ action: bulkAction.type, query: bulkAction.query, ids: bulkAction.ids, - edit: bulkAction.type === BulkActionType.edit ? bulkAction.editPayload : undefined, + edit: bulkAction.type === BulkActionTypeEnum.edit ? bulkAction.editPayload : undefined, duplicate: - bulkAction.type === BulkActionType.duplicate ? bulkAction.duplicatePayload : undefined, + bulkAction.type === BulkActionTypeEnum.duplicate ? bulkAction.duplicatePayload : undefined, }; return KibanaServices.get().http.fetch(DETECTION_ENGINE_RULES_BULK_ACTION, { @@ -392,7 +391,7 @@ export type BulkExportResponse = Blob; */ export async function bulkExportRules(queryOrIds: QueryOrIds): Promise { const params = { - action: BulkActionType.export, + action: BulkActionTypeEnum.export, query: queryOrIds.query, ids: queryOrIds.ids, }; 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 1a52bbb0a8194..9e54e41f1b091 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 @@ -7,7 +7,7 @@ import type { UseMutationOptions } from '@tanstack/react-query'; import { useMutation } from '@tanstack/react-query'; import type { IHttpFetchError } from '@kbn/core/public'; -import { BulkActionType } from '../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { BulkActionTypeEnum } from '../../../../../common/api/detection_engine/rule_management'; import type { BulkActionErrorResponse, BulkActionResponse, PerformBulkActionProps } from '../api'; import { performBulkAction } from '../api'; import { DETECTION_ENGINE_RULES_BULK_ACTION } from '../../../../../common/constants'; @@ -59,8 +59,8 @@ export const useBulkActionMutation = ( response?.attributes?.results?.updated ?? error?.body?.attributes?.results?.updated; switch (actionType) { - case BulkActionType.enable: - case BulkActionType.disable: { + case BulkActionTypeEnum.enable: + case BulkActionTypeEnum.disable: { invalidateFetchRuleByIdQuery(); invalidateFetchCoverageOverviewQuery(); if (updatedRules) { @@ -72,7 +72,7 @@ export const useBulkActionMutation = ( } break; } - case BulkActionType.delete: + case BulkActionTypeEnum.delete: invalidateFindRulesQuery(); invalidateFetchRuleByIdQuery(); invalidateFetchRuleManagementFilters(); @@ -81,12 +81,12 @@ export const useBulkActionMutation = ( invalidateFetchPrebuiltRulesUpgradeReviewQuery(); invalidateFetchCoverageOverviewQuery(); break; - case BulkActionType.duplicate: + case BulkActionTypeEnum.duplicate: invalidateFindRulesQuery(); invalidateFetchRuleManagementFilters(); invalidateFetchCoverageOverviewQuery(); break; - case BulkActionType.edit: + case BulkActionTypeEnum.edit: if (updatedRules) { // We have a list of updated rules, no need to invalidate all updateRulesCache(updatedRules); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/translations.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/translations.ts index 40877d8fcb2fd..99bad79536bd7 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/translations.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/translations.ts @@ -6,54 +6,57 @@ */ import type { HTTPError } from '../../../../../common/detection_engine/types'; -import type { BulkActionEditPayload } from '../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; -import { - BulkActionEditType, +import type { + BulkActionEditPayload, BulkActionType, -} from '../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +} from '../../../../../common/api/detection_engine/rule_management'; +import { + BulkActionEditTypeEnum, + BulkActionTypeEnum, +} from '../../../../../common/api/detection_engine/rule_management'; import * as i18n from '../../../../detections/pages/detection_engine/rules/translations'; import type { BulkActionResponse, BulkActionSummary } from '../../api/api'; export function summarizeBulkSuccess(action: BulkActionType): string { switch (action) { - case BulkActionType.export: + case BulkActionTypeEnum.export: return i18n.RULES_BULK_EXPORT_SUCCESS; - case BulkActionType.duplicate: + case BulkActionTypeEnum.duplicate: return i18n.RULES_BULK_DUPLICATE_SUCCESS; - case BulkActionType.delete: + case BulkActionTypeEnum.delete: return i18n.RULES_BULK_DELETE_SUCCESS; - case BulkActionType.enable: + case BulkActionTypeEnum.enable: return i18n.RULES_BULK_ENABLE_SUCCESS; - case BulkActionType.disable: + case BulkActionTypeEnum.disable: return i18n.RULES_BULK_DISABLE_SUCCESS; - case BulkActionType.edit: + case BulkActionTypeEnum.edit: return i18n.RULES_BULK_EDIT_SUCCESS; } } export function explainBulkSuccess( - action: Exclude, + action: Exclude, summary: BulkActionSummary ): string { switch (action) { - case BulkActionType.export: + case BulkActionTypeEnum.export: return getExportSuccessToastMessage(summary.succeeded, summary.total); - case BulkActionType.duplicate: + case BulkActionTypeEnum.duplicate: return i18n.RULES_BULK_DUPLICATE_SUCCESS_DESCRIPTION(summary.succeeded); - case BulkActionType.delete: + case BulkActionTypeEnum.delete: return i18n.RULES_BULK_DELETE_SUCCESS_DESCRIPTION(summary.succeeded); - case BulkActionType.enable: + case BulkActionTypeEnum.enable: return i18n.RULES_BULK_ENABLE_SUCCESS_DESCRIPTION(summary.succeeded); - case BulkActionType.disable: + case BulkActionTypeEnum.disable: return i18n.RULES_BULK_DISABLE_SUCCESS_DESCRIPTION(summary.succeeded); } } @@ -67,9 +70,9 @@ export function explainBulkEditSuccess( if ( editPayload.some( (x) => - x.type === BulkActionEditType.add_index_patterns || - x.type === BulkActionEditType.set_index_patterns || - x.type === BulkActionEditType.delete_index_patterns + x.type === BulkActionEditTypeEnum.add_index_patterns || + x.type === BulkActionEditTypeEnum.set_index_patterns || + x.type === BulkActionEditTypeEnum.delete_index_patterns ) ) { return `${i18n.RULES_BULK_EDIT_SUCCESS_DESCRIPTION( @@ -83,22 +86,22 @@ export function explainBulkEditSuccess( export function summarizeBulkError(action: BulkActionType): string { switch (action) { - case BulkActionType.export: + case BulkActionTypeEnum.export: return i18n.RULES_BULK_EXPORT_FAILURE; - case BulkActionType.duplicate: + case BulkActionTypeEnum.duplicate: return i18n.RULES_BULK_DUPLICATE_FAILURE; - case BulkActionType.delete: + case BulkActionTypeEnum.delete: return i18n.RULES_BULK_DELETE_FAILURE; - case BulkActionType.enable: + case BulkActionTypeEnum.enable: return i18n.RULES_BULK_ENABLE_FAILURE; - case BulkActionType.disable: + case BulkActionTypeEnum.disable: return i18n.RULES_BULK_DISABLE_FAILURE; - case BulkActionType.edit: + case BulkActionTypeEnum.edit: return i18n.RULES_BULK_EDIT_FAILURE; } } @@ -112,22 +115,22 @@ export function explainBulkError(action: BulkActionType, error: HTTPError): stri } switch (action) { - case BulkActionType.export: + case BulkActionTypeEnum.export: return i18n.RULES_BULK_EXPORT_FAILURE_DESCRIPTION(summary.failed); - case BulkActionType.duplicate: + case BulkActionTypeEnum.duplicate: return i18n.RULES_BULK_DUPLICATE_FAILURE_DESCRIPTION(summary.failed); - case BulkActionType.delete: + case BulkActionTypeEnum.delete: return i18n.RULES_BULK_DELETE_FAILURE_DESCRIPTION(summary.failed); - case BulkActionType.enable: + case BulkActionTypeEnum.enable: return i18n.RULES_BULK_ENABLE_FAILURE_DESCRIPTION(summary.failed); - case BulkActionType.disable: + case BulkActionTypeEnum.disable: return i18n.RULES_BULK_DISABLE_FAILURE_DESCRIPTION(summary.failed); - case BulkActionType.edit: + case BulkActionTypeEnum.edit: return i18n.RULES_BULK_EDIT_FAILURE_DESCRIPTION(summary.failed, summary.skipped); } } diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_bulk_export.test.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_bulk_export.test.ts index 1ac62109cc626..968b40c7a6026 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_bulk_export.test.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_bulk_export.test.ts @@ -6,7 +6,7 @@ */ import { renderHook } from '@testing-library/react-hooks'; -import { BulkActionType } from '../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { BulkActionTypeEnum } from '../../../../../common/api/detection_engine/rule_management'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; import { useRulesTableContextOptional } from '../../../rule_management_ui/components/rules_table/rules_table/rules_table_context'; import { useBulkExportMutation } from '../../api/hooks/use_bulk_export_mutation'; @@ -92,7 +92,7 @@ describe('useBulkExport', () => { expect(setLoadingRules).toHaveBeenCalledWith({ ids: ['ruleId1', 'ruleId2'], - action: BulkActionType.export, + action: BulkActionTypeEnum.export, }); }); @@ -101,7 +101,7 @@ describe('useBulkExport', () => { expect(setLoadingRules).toHaveBeenCalledWith({ ids: [], - action: BulkActionType.export, + action: BulkActionTypeEnum.export, }); }); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_bulk_export.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_bulk_export.ts index 5554ba2296302..651b2b0e4b86c 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_bulk_export.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_bulk_export.ts @@ -6,7 +6,7 @@ */ import { useCallback } from 'react'; -import { BulkActionType } from '../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { BulkActionTypeEnum } from '../../../../../common/api/detection_engine/rule_management'; import { useRulesTableContextOptional } from '../../../rule_management_ui/components/rules_table/rules_table/rules_table_context'; import { useBulkExportMutation } from '../../api/hooks/use_bulk_export_mutation'; import { useShowBulkErrorToast } from './use_show_bulk_error_toast'; @@ -24,12 +24,12 @@ export function useBulkExport() { async (queryOrIds: QueryOrIds) => { try { setLoadingRules?.({ - ids: queryOrIds.ids ?? guessRuleIdsForBulkAction(BulkActionType.export), - action: BulkActionType.export, + ids: queryOrIds.ids ?? guessRuleIdsForBulkAction(BulkActionTypeEnum.export), + action: BulkActionTypeEnum.export, }); return await mutateAsync(queryOrIds); } catch (error) { - showBulkErrorToast({ actionType: BulkActionType.export, error }); + showBulkErrorToast({ actionType: BulkActionTypeEnum.export, error }); } finally { setLoadingRules?.({ ids: [], action: null }); } diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_download_exported_rules.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_download_exported_rules.ts index 94c26b278d1b1..7be106090bcfa 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_download_exported_rules.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_download_exported_rules.ts @@ -6,7 +6,7 @@ */ import { useCallback } from 'react'; -import { BulkActionType } from '../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { BulkActionTypeEnum } from '../../../../../common/api/detection_engine/rule_management'; import { downloadBlob } from '../../../../common/utils/download_blob'; import * as i18n from '../../../../detections/pages/detection_engine/rules/translations'; import { getExportedRulesCounts } from '../../../rule_management_ui/components/rules_table/helpers'; @@ -27,11 +27,11 @@ export function useDownloadExportedRules() { try { downloadBlob(response, DEFAULT_EXPORT_FILENAME); showBulkSuccessToast({ - actionType: BulkActionType.export, + actionType: BulkActionTypeEnum.export, summary: await getExportedRulesCounts(response), }); } catch (error) { - showBulkErrorToast({ actionType: BulkActionType.export, error }); + showBulkErrorToast({ actionType: BulkActionTypeEnum.export, error }); } }, [showBulkSuccessToast, showBulkErrorToast] diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_execute_bulk_action.test.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_execute_bulk_action.test.ts index 3c211247b94ec..6309d8b629bc2 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_execute_bulk_action.test.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_execute_bulk_action.test.ts @@ -6,7 +6,7 @@ */ import { renderHook } from '@testing-library/react-hooks'; -import { BulkActionType } from '../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { BulkActionTypeEnum } from '../../../../../common/api/detection_engine/rule_management'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; import { METRIC_TYPE, TELEMETRY_EVENT, track } from '../../../../common/lib/telemetry'; import { useBulkActionMutation } from '../../api/hooks/use_bulk_action_mutation'; @@ -61,7 +61,7 @@ describe('useExecuteBulkAction', () => { it('executes bulk action', async () => { const bulkAction = { - type: BulkActionType.enable, + type: BulkActionTypeEnum.enable, query: 'some query', } as const; @@ -73,7 +73,7 @@ describe('useExecuteBulkAction', () => { describe('state handlers', () => { it('shows success toast upon completion', async () => { await executeBulkAction({ - type: BulkActionType.enable, + type: BulkActionTypeEnum.enable, ids: ['ruleId1'], }); @@ -84,7 +84,7 @@ describe('useExecuteBulkAction', () => { it('does not shows success toast upon completion if suppressed', async () => { await executeBulkAction( { - type: BulkActionType.enable, + type: BulkActionTypeEnum.enable, ids: ['ruleId1'], }, { suppressSuccessToast: true } @@ -100,7 +100,7 @@ describe('useExecuteBulkAction', () => { }); await executeBulkAction({ - type: BulkActionType.enable, + type: BulkActionTypeEnum.enable, ids: ['ruleId1'], }); @@ -126,31 +126,31 @@ describe('useExecuteBulkAction', () => { it('sets the loading state before execution', async () => { await executeBulkAction({ - type: BulkActionType.enable, + type: BulkActionTypeEnum.enable, ids: ['ruleId1', 'ruleId2'], }); expect(setLoadingRules).toHaveBeenCalledWith({ ids: ['ruleId1', 'ruleId2'], - action: BulkActionType.enable, + action: BulkActionTypeEnum.enable, }); }); it('sets the empty loading state before execution when query is set', async () => { await executeBulkAction({ - type: BulkActionType.enable, + type: BulkActionTypeEnum.enable, query: 'some query', }); expect(setLoadingRules).toHaveBeenCalledWith({ ids: [], - action: BulkActionType.enable, + action: BulkActionTypeEnum.enable, }); }); it('clears loading state for the processing rules after execution', async () => { await executeBulkAction({ - type: BulkActionType.enable, + type: BulkActionTypeEnum.enable, ids: ['ruleId1', 'ruleId2'], }); @@ -163,7 +163,7 @@ describe('useExecuteBulkAction', () => { }); await executeBulkAction({ - type: BulkActionType.enable, + type: BulkActionTypeEnum.enable, ids: ['ruleId1', 'ruleId2'], }); @@ -174,7 +174,7 @@ describe('useExecuteBulkAction', () => { describe('telemetry', () => { it('sends for enable action', async () => { await executeBulkAction({ - type: BulkActionType.enable, + type: BulkActionTypeEnum.enable, query: 'some query', }); @@ -184,7 +184,7 @@ describe('useExecuteBulkAction', () => { it('sends for disable action', async () => { await executeBulkAction({ - type: BulkActionType.disable, + type: BulkActionTypeEnum.disable, query: 'some query', }); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_execute_bulk_action.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_execute_bulk_action.ts index 9fbfb0c310f20..0a294647aad3f 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_execute_bulk_action.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_execute_bulk_action.ts @@ -9,7 +9,8 @@ import type { NavigateToAppOptions } from '@kbn/core/public'; import { useCallback } from 'react'; import type { BulkActionResponse } from '..'; import { APP_UI_ID } from '../../../../../common/constants'; -import { BulkActionType } from '../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import type { BulkActionType } from '../../../../../common/api/detection_engine/rule_management'; +import { BulkActionTypeEnum } from '../../../../../common/api/detection_engine/rule_management'; import { SecurityPageName } from '../../../../app/types'; import { getEditRuleUrl } from '../../../../common/components/link_to/redirect_to_detection_engine'; import { METRIC_TYPE, TELEMETRY_EVENT, track } from '../../../../common/lib/telemetry'; @@ -58,7 +59,7 @@ export const useExecuteBulkAction = (options?: UseExecuteBulkActionOptions) => { actionType: bulkAction.type, summary: response.attributes.summary, editPayload: - bulkAction.type === BulkActionType.edit ? bulkAction.editPayload : undefined, + bulkAction.type === BulkActionTypeEnum.edit ? bulkAction.editPayload : undefined, }); } @@ -83,14 +84,14 @@ export const useExecuteBulkAction = (options?: UseExecuteBulkActionOptions) => { }; function sendTelemetry(action: BulkActionType, response: BulkActionResponse): void { - if (action !== BulkActionType.disable && action !== BulkActionType.enable) { + if (action !== BulkActionTypeEnum.disable && action !== BulkActionTypeEnum.enable) { return; } if (response.attributes.results.updated.some((rule) => rule.immutable)) { track( METRIC_TYPE.COUNT, - action === BulkActionType.enable + action === BulkActionTypeEnum.enable ? TELEMETRY_EVENT.SIEM_RULE_ENABLED : TELEMETRY_EVENT.SIEM_RULE_DISABLED ); @@ -99,7 +100,7 @@ function sendTelemetry(action: BulkActionType, response: BulkActionResponse): vo if (response.attributes.results.updated.some((rule) => !rule.immutable)) { track( METRIC_TYPE.COUNT, - action === BulkActionType.disable + action === BulkActionTypeEnum.disable ? TELEMETRY_EVENT.CUSTOM_RULE_DISABLED : TELEMETRY_EVENT.CUSTOM_RULE_ENABLED ); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_guess_rule_ids_for_bulk_action.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_guess_rule_ids_for_bulk_action.ts index ce262ce940f43..2a1acc7a3d4c8 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_guess_rule_ids_for_bulk_action.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_guess_rule_ids_for_bulk_action.ts @@ -6,7 +6,8 @@ */ import { useCallback } from 'react'; -import { BulkActionType } from '../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import type { BulkActionType } from '../../../../../common/api/detection_engine/rule_management'; +import { BulkActionTypeEnum } from '../../../../../common/api/detection_engine/rule_management'; import { useRulesTableContextOptional } from '../../../rule_management_ui/components/rules_table/rules_table/rules_table_context'; export function useGuessRuleIdsForBulkAction(): (bulkActionType: BulkActionType) => string[] { @@ -16,9 +17,9 @@ export function useGuessRuleIdsForBulkAction(): (bulkActionType: BulkActionType) (bulkActionType: BulkActionType) => { const allRules = rulesTableContext?.state.isAllSelected ? rulesTableContext.state.rules : []; const processingRules = - bulkActionType === BulkActionType.enable + bulkActionType === BulkActionTypeEnum.enable ? allRules.filter((x) => !x.enabled) - : bulkActionType === BulkActionType.disable + : bulkActionType === BulkActionTypeEnum.disable ? allRules.filter((x) => x.enabled) : allRules; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_show_bulk_error_toast.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_show_bulk_error_toast.ts index 3f9230a36da34..bb72429ad6b0b 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_show_bulk_error_toast.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_show_bulk_error_toast.ts @@ -8,7 +8,7 @@ import { useCallback } from 'react'; import type { HTTPError } from '../../../../../common/detection_engine/types'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; -import type { BulkActionType } from '../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import type { BulkActionType } from '../../../../../common/api/detection_engine/rule_management'; import { explainBulkError, summarizeBulkError } from './translations'; interface ShowBulkErrorToastProps { diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_show_bulk_success_toast.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_show_bulk_success_toast.ts index dfc2ca5dcb918..03113c772818c 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_show_bulk_success_toast.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/bulk_actions/use_show_bulk_success_toast.ts @@ -8,8 +8,11 @@ import { useCallback } from 'react'; import type { BulkActionSummary } from '..'; import { useAppToasts } from '../../../../common/hooks/use_app_toasts'; -import type { BulkActionEditPayload } from '../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; -import { BulkActionType } from '../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import type { + BulkActionEditPayload, + BulkActionType, +} from '../../../../../common/api/detection_engine/rule_management'; +import { BulkActionTypeEnum } from '../../../../../common/api/detection_engine/rule_management'; import { explainBulkEditSuccess, explainBulkSuccess, summarizeBulkSuccess } from './translations'; interface ShowBulkSuccessToastProps { @@ -24,7 +27,7 @@ export function useShowBulkSuccessToast() { return useCallback( ({ actionType, summary, editPayload }: ShowBulkSuccessToastProps) => { const text = - actionType === BulkActionType.edit + actionType === BulkActionTypeEnum.edit ? explainBulkEditSuccess(editPayload ?? [], summary) : explainBulkSuccess(actionType, summary); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/types.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/types.ts index d44c4effd265f..94a3d47c90ecf 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/types.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/types.ts @@ -5,12 +5,11 @@ * 2.0. */ -import * as t from 'io-ts'; +import * as z from 'zod'; import type { RuleSnooze } from '@kbn/alerting-plugin/common'; import type { Type } from '@kbn/securitysolution-io-ts-alerting-types'; import type { NamespaceType } from '@kbn/securitysolution-io-ts-list-types'; -import { PositiveInteger } from '@kbn/securitysolution-io-ts-types'; import type { RuleSnoozeSettings } from '@kbn/triggers-actions-ui-plugin/public/types'; import type { WarningSchema } from '../../../../common/api/detection_engine'; import type { RuleExecutionStatus } from '../../../../common/api/detection_engine/rule_monitoring'; @@ -49,11 +48,11 @@ export interface PatchRuleProps { export type Rule = RuleResponse; -export type PaginationOptions = t.TypeOf; -export const PaginationOptions = t.type({ - page: PositiveInteger, - perPage: PositiveInteger, - total: PositiveInteger, +export type PaginationOptions = z.infer; +export const PaginationOptions = z.object({ + page: z.number().int().min(0), + perPage: z.number().int().min(0), + total: z.number().int().min(0), }); export interface FetchRulesProps { @@ -81,8 +80,8 @@ export interface RulesSnoozeSettingsBatchResponse { data: RuleSnoozeSettingsResponse[]; } -export type SortingOptions = t.TypeOf; -export const SortingOptions = t.type({ +export type SortingOptions = z.infer; +export const SortingOptions = z.object({ field: FindRulesSortField, order: SortOrder, }); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/bulk_action_dry_run_confirmation.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/bulk_action_dry_run_confirmation.tsx index 9e3e9c8b602b1..23bb9106d62cf 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/bulk_action_dry_run_confirmation.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/bulk_action_dry_run_confirmation.tsx @@ -10,7 +10,7 @@ import { EuiConfirmModal } from '@elastic/eui'; import * as i18n from '../../../../../detections/pages/detection_engine/rules/translations'; import { BulkActionRuleErrorsList } from './bulk_action_rule_errors_list'; -import { BulkActionType } from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { BulkActionTypeEnum } from '../../../../../../common/api/detection_engine/rule_management'; import { assertUnreachable } from '../../../../../../common/utility_types'; import type { BulkActionForConfirmation, DryRunResult } from './types'; @@ -20,9 +20,9 @@ const getActionRejectedTitle = ( failedRulesCount: number ) => { switch (bulkAction) { - case BulkActionType.edit: + case BulkActionTypeEnum.edit: return i18n.BULK_EDIT_CONFIRMATION_REJECTED_TITLE(failedRulesCount); - case BulkActionType.export: + case BulkActionTypeEnum.export: return i18n.BULK_EXPORT_CONFIRMATION_REJECTED_TITLE(failedRulesCount); default: assertUnreachable(bulkAction); @@ -34,9 +34,9 @@ const getActionConfirmLabel = ( succeededRulesCount: number ) => { switch (bulkAction) { - case BulkActionType.edit: + case BulkActionTypeEnum.edit: return i18n.BULK_EDIT_CONFIRMATION_CONFIRM(succeededRulesCount); - case BulkActionType.export: + case BulkActionTypeEnum.export: return i18n.BULK_EXPORT_CONFIRMATION_CONFIRM(succeededRulesCount); default: assertUnreachable(bulkAction); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/bulk_action_rule_errors_list.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/bulk_action_rule_errors_list.test.tsx index 05a27a17274a1..5b90a457a6bd4 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/bulk_action_rule_errors_list.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/bulk_action_rule_errors_list.test.tsx @@ -13,7 +13,7 @@ import { render, screen } from '@testing-library/react'; import { BulkActionRuleErrorsList } from './bulk_action_rule_errors_list'; import { BulkActionsDryRunErrCode } from '../../../../../../common/constants'; import type { DryRunResult } from './types'; -import { BulkActionType } from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { BulkActionTypeEnum } from '../../../../../../common/api/detection_engine/rule_management'; const Wrapper: FC = ({ children }) => { return ( @@ -26,7 +26,7 @@ const Wrapper: FC = ({ children }) => { describe('Component BulkEditRuleErrorsList', () => { test('should not render component if no errors present', () => { const { container } = render( - , + , { wrapper: Wrapper, } @@ -46,9 +46,12 @@ describe('Component BulkEditRuleErrorsList', () => { ruleIds: ['rule:1'], }, ]; - render(, { - wrapper: Wrapper, - }); + render( + , + { + wrapper: Wrapper, + } + ); expect(screen.getByText("2 rules can't be edited (test failure)")).toBeInTheDocument(); expect(screen.getByText("1 rule can't be edited (another failure)")).toBeInTheDocument(); @@ -80,9 +83,12 @@ describe('Component BulkEditRuleErrorsList', () => { ruleIds: ['rule:1', 'rule:2'], }, ]; - render(, { - wrapper: Wrapper, - }); + render( + , + { + wrapper: Wrapper, + } + ); expect(screen.getByText(value)).toBeInTheDocument(); }); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/bulk_action_rule_errors_list.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/bulk_action_rule_errors_list.tsx index 674206446f85c..907e67f658bc4 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/bulk_action_rule_errors_list.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/bulk_action_rule_errors_list.tsx @@ -10,7 +10,7 @@ import { EuiSpacer } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import { BulkActionsDryRunErrCode } from '../../../../../../common/constants'; -import { BulkActionType } from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { BulkActionTypeEnum } from '../../../../../../common/api/detection_engine/rule_management'; import type { DryRunResult, BulkActionForConfirmation } from './types'; @@ -132,7 +132,7 @@ const BulkActionRuleErrorsListComponent = ({ {ruleErrors.map(({ message, errorCode, ruleIds }) => { const rulesCount = ruleIds.length; switch (bulkAction) { - case BulkActionType.edit: + case BulkActionTypeEnum.edit: return ( ); - case BulkActionType.export: + case BulkActionTypeEnum.export: return ( { switch (editAction) { - case BulkActionEditType.add_index_patterns: - case BulkActionEditType.delete_index_patterns: - case BulkActionEditType.set_index_patterns: + case BulkActionEditTypeEnum.add_index_patterns: + case BulkActionEditTypeEnum.delete_index_patterns: + case BulkActionEditTypeEnum.set_index_patterns: return ; - case BulkActionEditType.add_tags: - case BulkActionEditType.delete_tags: - case BulkActionEditType.set_tags: + case BulkActionEditTypeEnum.add_tags: + case BulkActionEditTypeEnum.delete_tags: + case BulkActionEditTypeEnum.set_tags: return ; - case BulkActionEditType.set_timeline: + case BulkActionEditTypeEnum.set_timeline: return ; - case BulkActionEditType.add_rule_actions: - case BulkActionEditType.set_rule_actions: + case BulkActionEditTypeEnum.add_rule_actions: + case BulkActionEditTypeEnum.set_rule_actions: return ; - case BulkActionEditType.set_schedule: + case BulkActionEditTypeEnum.set_schedule: return ; default: diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/forms/index_patterns_form.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/forms/index_patterns_form.tsx index c9d4900e9adc7..e124e23bd0aea 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/forms/index_patterns_form.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/forms/index_patterns_form.tsx @@ -14,8 +14,8 @@ import * as i18n from '../../../../../../detections/pages/detection_engine/rules import { DEFAULT_INDEX_KEY } from '../../../../../../../common/constants'; import { useKibana } from '../../../../../../common/lib/kibana'; -import { BulkActionEditType } from '../../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; -import type { BulkActionEditPayload } from '../../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { BulkActionEditTypeEnum } from '../../../../../../../common/api/detection_engine/rule_management'; +import type { BulkActionEditPayload } from '../../../../../../../common/api/detection_engine/rule_management'; import type { FormSchema } from '../../../../../../shared_imports'; import { @@ -31,9 +31,9 @@ import { BulkEditFormWrapper } from './bulk_edit_form_wrapper'; const CommonUseField = getUseField({ component: Field }); type IndexPatternsEditActions = - | BulkActionEditType.add_index_patterns - | BulkActionEditType.delete_index_patterns - | BulkActionEditType.set_index_patterns; + | BulkActionEditTypeEnum['add_index_patterns'] + | BulkActionEditTypeEnum['delete_index_patterns'] + | BulkActionEditTypeEnum['set_index_patterns']; interface IndexPatternsFormData { index: string[]; @@ -70,7 +70,7 @@ const initialFormData: IndexPatternsFormData = { }; const getFormConfig = (editAction: IndexPatternsEditActions) => - editAction === BulkActionEditType.add_index_patterns + editAction === BulkActionEditTypeEnum.add_index_patterns ? { indexLabel: i18n.BULK_EDIT_FLYOUT_FORM_ADD_INDEX_PATTERNS_LABEL, indexHelpText: i18n.BULK_EDIT_FLYOUT_FORM_ADD_INDEX_PATTERNS_HELP_TEXT, @@ -115,13 +115,11 @@ const IndexPatternsFormComponent = ({ return; } - const payload = { + onConfirm({ value: data.index, - type: data.overwrite ? BulkActionEditType.set_index_patterns : editAction, + type: data.overwrite ? BulkActionEditTypeEnum.set_index_patterns : editAction, overwrite_data_views: data.overwriteDataViews, - }; - - onConfirm(payload); + }); }; return ( @@ -140,7 +138,7 @@ const IndexPatternsFormComponent = ({ }, }} /> - {editAction === BulkActionEditType.add_index_patterns && ( + {editAction === BulkActionEditTypeEnum.add_index_patterns && ( )} - {editAction === BulkActionEditType.add_index_patterns && ( + {editAction === BulkActionEditTypeEnum.add_index_patterns && ( )} - {editAction === BulkActionEditType.delete_index_patterns && ( + {editAction === BulkActionEditTypeEnum.delete_index_patterns && ( = { const initialFormData: TagsFormData = { tags: [], overwrite: false }; const getFormConfig = (editAction: TagsEditActions) => - editAction === BulkActionEditType.add_tags + editAction === BulkActionEditTypeEnum.add_tags ? { tagsLabel: i18n.BULK_EDIT_FLYOUT_FORM_ADD_TAGS_LABEL, tagsHelpText: i18n.BULK_EDIT_FLYOUT_FORM_ADD_TAGS_HELP_TEXT, @@ -97,12 +97,10 @@ const TagsFormComponent = ({ editAction, rulesCount, onClose, onConfirm }: TagsF return; } - const payload = { + onConfirm({ value: data.tags, - type: data.overwrite ? BulkActionEditType.set_tags : editAction, - }; - - onConfirm(payload); + type: data.overwrite ? BulkActionEditTypeEnum.set_tags : editAction, + }); }; return ( @@ -121,7 +119,7 @@ const TagsFormComponent = ({ editAction, rulesCount, onClose, onConfirm }: TagsF }, }} /> - {editAction === BulkActionEditType.add_tags ? ( + {editAction === BulkActionEditTypeEnum.add_tags ? ( { const timelineTitle = timelineId ? data.timeline.title : ''; onConfirm({ - type: BulkActionEditType.set_timeline, + type: BulkActionEditTypeEnum.set_timeline, value: { timeline_id: timelineId, timeline_title: timelineTitle, diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/types.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/types.ts index 000a7e37a9cec..409ee722c6383 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/types.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/types.ts @@ -6,14 +6,14 @@ */ import type { BulkActionsDryRunErrCode } from '../../../../../../common/constants'; -import type { BulkActionType } from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import type { BulkActionTypeEnum } from '../../../../../../common/api/detection_engine/rule_management'; /** * Only 2 bulk actions are supported for for confirmation dry run modal: * * export * * edit */ -export type BulkActionForConfirmation = BulkActionType.export | BulkActionType.edit; +export type BulkActionForConfirmation = BulkActionTypeEnum['export'] | BulkActionTypeEnum['edit']; /** * transformed results of dry run diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_actions.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_actions.tsx index a7c5e35ff3341..41802a4738b8d 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_actions.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_actions.tsx @@ -14,11 +14,14 @@ import { euiThemeVars } from '@kbn/ui-theme'; import React, { useCallback } from 'react'; import { convertRulesFilterToKQL } from '../../../../../../common/detection_engine/rule_management/rule_filtering'; import { DuplicateOptions } from '../../../../../../common/detection_engine/rule_management/constants'; -import type { BulkActionEditPayload } from '../../../../../../common/api/detection_engine/rule_management'; -import { - BulkActionType, +import type { + BulkActionEditPayload, BulkActionEditType, } from '../../../../../../common/api/detection_engine/rule_management'; +import { + BulkActionTypeEnum, + BulkActionEditTypeEnum, +} from '../../../../../../common/api/detection_engine/rule_management'; import { isMlRule } from '../../../../../../common/machine_learning/helpers'; import { useAppToasts } from '../../../../../common/hooks/use_app_toasts'; import { BULK_RULE_ACTIONS } from '../../../../../common/lib/apm/user_actions'; @@ -106,7 +109,7 @@ export const useBulkActions = ({ : disabledRulesNoML.map(({ id }) => id); await executeBulkAction({ - type: BulkActionType.enable, + type: BulkActionTypeEnum.enable, ...(isAllSelected ? { query: kql } : { ids: ruleIds }), }); }; @@ -118,7 +121,7 @@ export const useBulkActions = ({ const enabledIds = selectedRules.filter(({ enabled }) => enabled).map(({ id }) => id); await executeBulkAction({ - type: BulkActionType.disable, + type: BulkActionTypeEnum.disable, ...(isAllSelected ? { query: kql } : { ids: enabledIds }), }); }; @@ -132,7 +135,7 @@ export const useBulkActions = ({ return; } await executeBulkAction({ - type: BulkActionType.duplicate, + type: BulkActionTypeEnum.duplicate, duplicatePayload: { include_exceptions: modalDuplicationConfirmationResult === DuplicateOptions.withExceptions || @@ -159,7 +162,7 @@ export const useBulkActions = ({ startTransaction({ name: BULK_RULE_ACTIONS.DELETE }); await executeBulkAction({ - type: BulkActionType.delete, + type: BulkActionTypeEnum.delete, ...(isAllSelected ? { query: kql } : { ids: selectedRuleIds }), }); }; @@ -183,7 +186,7 @@ export const useBulkActions = ({ // they can either cancel action or proceed with export of succeeded rules const hasActionBeenConfirmed = await showBulkActionConfirmation( transformExportDetailsToDryRunResult(details), - BulkActionType.export + BulkActionTypeEnum.export ); if (hasActionBeenConfirmed === false) { return; @@ -201,7 +204,7 @@ export const useBulkActions = ({ setIsPreflightInProgress(true); const dryRunResult = await executeBulkActionsDryRun({ - type: BulkActionType.edit, + type: BulkActionTypeEnum.edit, ...(isAllSelected ? { query: convertRulesFilterToKQL(filterOptions) } : { ids: selectedRuleIds }), @@ -213,7 +216,7 @@ export const useBulkActions = ({ // User has cancelled edit action or there are no custom rules to proceed const hasActionBeenConfirmed = await showBulkActionConfirmation( dryRunResult, - BulkActionType.edit + BulkActionTypeEnum.edit ); if (hasActionBeenConfirmed === false) { return; @@ -264,7 +267,7 @@ export const useBulkActions = ({ }, 5 * 1000); await executeBulkAction({ - type: BulkActionType.edit, + type: BulkActionTypeEnum.edit, ...prepareSearchParams({ ...(isAllSelected ? { filterOptions } : { selectedRuleIds }), dryRunResult, @@ -330,7 +333,7 @@ export const useBulkActions = ({ name: i18n.BULK_ACTION_ADD_RULE_ACTIONS, 'data-test-subj': 'addRuleActionsBulk', disabled: !hasActionsPrivileges || isEditDisabled, - onClick: handleBulkEdit(BulkActionEditType.add_rule_actions), + onClick: handleBulkEdit(BulkActionEditTypeEnum.add_rule_actions), toolTipContent: !hasActionsPrivileges ? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES : undefined, @@ -342,7 +345,7 @@ export const useBulkActions = ({ name: i18n.BULK_ACTION_SET_SCHEDULE, 'data-test-subj': 'setScheduleBulk', disabled: isEditDisabled, - onClick: handleBulkEdit(BulkActionEditType.set_schedule), + onClick: handleBulkEdit(BulkActionEditTypeEnum.set_schedule), toolTipContent: missingActionPrivileges ? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES : undefined, @@ -354,7 +357,7 @@ export const useBulkActions = ({ name: i18n.BULK_ACTION_APPLY_TIMELINE_TEMPLATE, 'data-test-subj': 'applyTimelineTemplateBulk', disabled: isEditDisabled, - onClick: handleBulkEdit(BulkActionEditType.set_timeline), + onClick: handleBulkEdit(BulkActionEditTypeEnum.set_timeline), toolTipContent: missingActionPrivileges ? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES : undefined, @@ -407,7 +410,7 @@ export const useBulkActions = ({ key: i18n.BULK_ACTION_ADD_TAGS, name: i18n.BULK_ACTION_ADD_TAGS, 'data-test-subj': 'addTagsBulkEditRule', - onClick: handleBulkEdit(BulkActionEditType.add_tags), + onClick: handleBulkEdit(BulkActionEditTypeEnum.add_tags), disabled: isEditDisabled, toolTipContent: missingActionPrivileges ? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES @@ -418,7 +421,7 @@ export const useBulkActions = ({ key: i18n.BULK_ACTION_DELETE_TAGS, name: i18n.BULK_ACTION_DELETE_TAGS, 'data-test-subj': 'deleteTagsBulkEditRule', - onClick: handleBulkEdit(BulkActionEditType.delete_tags), + onClick: handleBulkEdit(BulkActionEditTypeEnum.delete_tags), disabled: isEditDisabled, toolTipContent: missingActionPrivileges ? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES @@ -435,7 +438,7 @@ export const useBulkActions = ({ key: i18n.BULK_ACTION_ADD_INDEX_PATTERNS, name: i18n.BULK_ACTION_ADD_INDEX_PATTERNS, 'data-test-subj': 'addIndexPatternsBulkEditRule', - onClick: handleBulkEdit(BulkActionEditType.add_index_patterns), + onClick: handleBulkEdit(BulkActionEditTypeEnum.add_index_patterns), disabled: isEditDisabled, toolTipContent: missingActionPrivileges ? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES @@ -446,7 +449,7 @@ export const useBulkActions = ({ key: i18n.BULK_ACTION_DELETE_INDEX_PATTERNS, name: i18n.BULK_ACTION_DELETE_INDEX_PATTERNS, 'data-test-subj': 'deleteIndexPatternsBulkEditRule', - onClick: handleBulkEdit(BulkActionEditType.delete_index_patterns), + onClick: handleBulkEdit(BulkActionEditTypeEnum.delete_index_patterns), disabled: isEditDisabled, toolTipContent: missingActionPrivileges ? i18n.LACK_OF_KIBANA_ACTIONS_FEATURE_PRIVILEGES diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_actions_confirmation.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_actions_confirmation.ts index 9ce813fc6d9a2..5ef159bed856b 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_actions_confirmation.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_actions_confirmation.ts @@ -11,11 +11,23 @@ import { useBoolState } from '../../../../../common/hooks/use_bool_state'; import type { DryRunResult, BulkActionForConfirmation } from './types'; +interface BulkActionsConfirmation { + bulkActionsDryRunResult: DryRunResult | undefined; + bulkAction: BulkActionForConfirmation | undefined; + isBulkActionConfirmationVisible: boolean; + showBulkActionConfirmation: ( + result: DryRunResult | undefined, + action: BulkActionForConfirmation + ) => Promise; + cancelBulkActionConfirmation: () => void; + approveBulkActionConfirmation: () => void; +} + /** * hook that controls bulk actions confirmation modal window and its content */ // TODO Why does this hook exist? Consider removing it altogether -export const useBulkActionsConfirmation = () => { +export const useBulkActionsConfirmation = (): BulkActionsConfirmation => { const [bulkAction, setBulkAction] = useState(); const [dryRunResult, setDryRunResult] = useState(); const [isBulkActionConfirmationVisible, showModal, hideModal] = useBoolState(); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_edit_form_flyout.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_edit_form_flyout.ts index 260e187e46fbe..f2dc15233cb6b 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_edit_form_flyout.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/use_bulk_edit_form_flyout.ts @@ -10,10 +10,20 @@ import { useAsyncConfirmation } from '../rules_table/use_async_confirmation'; import type { BulkActionEditPayload, BulkActionEditType, -} from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +} from '../../../../../../common/api/detection_engine/rule_management'; import { useBoolState } from '../../../../../common/hooks/use_bool_state'; -export const useBulkEditFormFlyout = () => { +interface UseBulkEditFormFlyout { + bulkEditActionType: BulkActionEditType | undefined; + isBulkEditFlyoutVisible: boolean; + handleBulkEditFormConfirm: (data: BulkActionEditPayload) => void; + handleBulkEditFormCancel: () => void; + completeBulkEditForm: ( + editActionType: BulkActionEditType + ) => Promise; +} + +export const useBulkEditFormFlyout = (): UseBulkEditFormFlyout => { const dataFormRef = useRef(null); const [actionType, setActionType] = useState(); const [isBulkEditFlyoutVisible, showBulkEditFlyout, hideBulkEditFlyout] = useBoolState(); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/utils/compute_dry_run_edit_payload.test.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/utils/compute_dry_run_edit_payload.test.ts index 3adae50d99adf..0549306036fd2 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/utils/compute_dry_run_edit_payload.test.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/utils/compute_dry_run_edit_payload.test.ts @@ -5,19 +5,20 @@ * 2.0. */ -import { BulkActionEditType } from '../../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import type { BulkActionEditType } from '../../../../../../../common/api/detection_engine/rule_management'; +import { BulkActionEditTypeEnum } from '../../../../../../../common/api/detection_engine/rule_management'; import { computeDryRunEditPayload } from './compute_dry_run_edit_payload'; describe('computeDryRunEditPayload', () => { - test.each([ - [BulkActionEditType.set_index_patterns, []], - [BulkActionEditType.delete_index_patterns, []], - [BulkActionEditType.add_index_patterns, []], - [BulkActionEditType.add_tags, []], - [BulkActionEditType.delete_index_patterns, []], - [BulkActionEditType.set_tags, []], - [BulkActionEditType.set_timeline, { timeline_id: '', timeline_title: '' }], + test.each<[BulkActionEditType, unknown]>([ + [BulkActionEditTypeEnum.set_index_patterns, []], + [BulkActionEditTypeEnum.delete_index_patterns, []], + [BulkActionEditTypeEnum.add_index_patterns, []], + [BulkActionEditTypeEnum.add_tags, []], + [BulkActionEditTypeEnum.delete_index_patterns, []], + [BulkActionEditTypeEnum.set_tags, []], + [BulkActionEditTypeEnum.set_timeline, { timeline_id: '', timeline_title: '' }], ])('should return correct payload for bulk edit action %s', (editAction, value) => { const payload = computeDryRunEditPayload(editAction); expect(payload).toHaveLength(1); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/utils/compute_dry_run_edit_payload.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/utils/compute_dry_run_edit_payload.ts index d31bbfaa91790..ba5d565e393d0 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/utils/compute_dry_run_edit_payload.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/bulk_actions/utils/compute_dry_run_edit_payload.ts @@ -5,8 +5,11 @@ * 2.0. */ -import type { BulkActionEditPayload } from '../../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; -import { BulkActionEditType } from '../../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import type { + BulkActionEditPayload, + BulkActionEditType, +} from '../../../../../../../common/api/detection_engine/rule_management'; +import { BulkActionEditTypeEnum } from '../../../../../../../common/api/detection_engine/rule_management'; import { assertUnreachable } from '../../../../../../../common/utility_types'; /** @@ -17,9 +20,9 @@ import { assertUnreachable } from '../../../../../../../common/utility_types'; */ export function computeDryRunEditPayload(editAction: BulkActionEditType): BulkActionEditPayload[] { switch (editAction) { - case BulkActionEditType.add_index_patterns: - case BulkActionEditType.delete_index_patterns: - case BulkActionEditType.set_index_patterns: + case BulkActionEditTypeEnum.add_index_patterns: + case BulkActionEditTypeEnum.delete_index_patterns: + case BulkActionEditTypeEnum.set_index_patterns: return [ { type: editAction, @@ -27,9 +30,9 @@ export function computeDryRunEditPayload(editAction: BulkActionEditType): BulkAc }, ]; - case BulkActionEditType.add_tags: - case BulkActionEditType.delete_tags: - case BulkActionEditType.set_tags: + case BulkActionEditTypeEnum.add_tags: + case BulkActionEditTypeEnum.delete_tags: + case BulkActionEditTypeEnum.set_tags: return [ { type: editAction, @@ -37,7 +40,7 @@ export function computeDryRunEditPayload(editAction: BulkActionEditType): BulkAc }, ]; - case BulkActionEditType.set_timeline: + case BulkActionEditTypeEnum.set_timeline: return [ { type: editAction, @@ -45,15 +48,15 @@ export function computeDryRunEditPayload(editAction: BulkActionEditType): BulkAc }, ]; - case BulkActionEditType.add_rule_actions: - case BulkActionEditType.set_rule_actions: + case BulkActionEditTypeEnum.add_rule_actions: + case BulkActionEditTypeEnum.set_rule_actions: return [ { type: editAction, value: { actions: [] }, }, ]; - case BulkActionEditType.set_schedule: + case BulkActionEditTypeEnum.set_schedule: return [ { type: editAction, diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/guided_onboarding/rules_management_tour.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/guided_onboarding/rules_management_tour.tsx index e27910df0b7e0..fbb81fd0b66f4 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/guided_onboarding/rules_management_tour.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/guided_onboarding/rules_management_tour.tsx @@ -12,7 +12,7 @@ import React, { useCallback, useEffect, useMemo } from 'react'; import useObservable from 'react-use/lib/useObservable'; import { of } from 'rxjs'; import { siemGuideId } from '../../../../../../../common/guided_onboarding/siem_guide_config'; -import { BulkActionType } from '../../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { BulkActionTypeEnum } from '../../../../../../../common/api/detection_engine/rule_management'; import { useKibana } from '../../../../../../common/lib/kibana'; import { useFindRulesQuery } from '../../../../../rule_management/api/hooks/use_find_rules_query'; import { useExecuteBulkAction } from '../../../../../rule_management/logic/bulk_actions/use_execute_bulk_action'; @@ -113,7 +113,7 @@ export const RulesManagementTour = () => { const enableDemoRule = useCallback(async () => { if (demoRule) { await executeBulkAction({ - type: BulkActionType.enable, + type: BulkActionTypeEnum.enable, ids: [demoRule.id], }); } diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/rules_table_saved_state.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/rules_table_saved_state.ts index 84c23a248a0db..1a4efe7517ac9 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/rules_table_saved_state.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/rules_table_saved_state.ts @@ -5,41 +5,45 @@ * 2.0. */ -import * as t from 'io-ts'; -import { enumeration } from '@kbn/securitysolution-io-ts-types'; -import { SortingOptions, PaginationOptions } from '../../../../rule_management/logic'; -import { TRuleExecutionStatus } from '../../../../../../common/api/detection_engine/rule_monitoring/model/execution_status'; +import * as z from 'zod'; +import { RuleExecutionStatus } from '../../../../../../common/api/detection_engine'; +import { PaginationOptions, SortingOptions } from '../../../../rule_management/logic'; export enum RuleSource { Prebuilt = 'prebuilt', Custom = 'custom', } -export type RulesTableSavedFilter = t.TypeOf; -export const RulesTableSavedFilter = t.partial({ - searchTerm: t.string, - source: enumeration('RuleSource', RuleSource), - tags: t.array(t.string), - enabled: t.boolean, - ruleExecutionStatus: TRuleExecutionStatus, -}); - -export type RulesTableSavedSorting = t.TypeOf; -export const RulesTableSavedSorting = t.partial({ - field: SortingOptions.props.field, - order: SortingOptions.props.order, -}); - -export type RulesTableStorageSavedPagination = t.TypeOf; -export const RulesTableStorageSavedPagination = t.partial({ - perPage: PaginationOptions.props.perPage, -}); - -export type RulesTableUrlSavedPagination = t.TypeOf; -export const RulesTableUrlSavedPagination = t.partial({ - page: PaginationOptions.props.page, - perPage: PaginationOptions.props.perPage, -}); +export const RulesTableSavedFilter = z + .object({ + searchTerm: z.string(), + source: z.nativeEnum(RuleSource), + tags: z.array(z.string()), + enabled: z.boolean(), + ruleExecutionStatus: RuleExecutionStatus, + }) + .partial(); + +export type RulesTableSavedFilter = z.infer; + +export const RulesTableSavedSorting = SortingOptions.pick({ + field: true, + order: true, +}).partial(); + +export type RulesTableSavedSorting = z.infer; + +export const RulesTableStorageSavedPagination = PaginationOptions.pick({ + perPage: true, +}).partial(); + +export type RulesTableStorageSavedPagination = z.infer; + +export type RulesTableUrlSavedPagination = z.infer; +export const RulesTableUrlSavedPagination = PaginationOptions.pick({ + page: true, + perPage: true, +}).partial(); export type RulesTableStorageSavedState = RulesTableSavedFilter & RulesTableSavedSorting & diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/use_rules_table_saved_state.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/use_rules_table_saved_state.ts index bc1b28ee72a41..3055c9cbdcbba 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/use_rules_table_saved_state.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/rules_table/use_rules_table_saved_state.ts @@ -6,7 +6,7 @@ */ import type { Storage } from '@kbn/kibana-utils-plugin/public'; -import { validateNonExact } from '@kbn/securitysolution-io-ts-utils'; +import { safeParseResult } from '@kbn/zod-helpers'; import { useGetInitialUrlParamValue } from '../../../../../common/utils/global_query_string/helpers'; import { RULES_TABLE_MAX_PAGE_SIZE } from '../../../../../../common/constants'; import { useKibana } from '../../../../../common/lib/kibana'; @@ -57,8 +57,8 @@ function validateState( urlState: RulesTableUrlSavedState | null, storageState: RulesTableStorageSavedState | null ): [RulesTableSavedFilter, RulesTableSavedSorting, RulesTableUrlSavedPagination] { - const [filterFromUrl] = validateNonExact(urlState, RulesTableSavedFilter); - const [filterFromStorage] = validateNonExact(storageState, RulesTableSavedFilter); + const filterFromUrl = safeParseResult(urlState, RulesTableSavedFilter); + const filterFromStorage = safeParseResult(storageState, RulesTableSavedFilter); // We have to expose filter, sorting and pagination objects by explicitly specifying each field // since urlState and/or storageState may contain unnecessary fields (e.g. outdated or explicitly added by user) // and validateNonExact doesn't truncate fields not included in the type RulesTableSavedFilter and etc. @@ -71,15 +71,15 @@ function validateState( filterFromUrl?.ruleExecutionStatus ?? filterFromStorage?.ruleExecutionStatus, }; - const [sortingFromUrl] = validateNonExact(urlState, RulesTableSavedSorting); - const [sortingFromStorage] = validateNonExact(storageState, RulesTableSavedSorting); + const sortingFromUrl = safeParseResult(urlState, RulesTableSavedSorting); + const sortingFromStorage = safeParseResult(storageState, RulesTableSavedSorting); const sorting = { field: sortingFromUrl?.field ?? sortingFromStorage?.field, order: sortingFromUrl?.order ?? sortingFromStorage?.order, - }; + } as const; - const [paginationFromUrl] = validateNonExact(urlState, RulesTableUrlSavedPagination); - const [paginationFromStorage] = validateNonExact(storageState, RulesTableStorageSavedPagination); + const paginationFromUrl = safeParseResult(urlState, RulesTableUrlSavedPagination); + const paginationFromStorage = safeParseResult(storageState, RulesTableStorageSavedPagination); const pagination = { page: paginationFromUrl?.page, // We don't persist page number in the session storage since it may be outdated when restored perPage: paginationFromUrl?.perPage ?? paginationFromStorage?.perPage, diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_columns.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_columns.tsx index 3525793caa3a3..acf43ebf2c36e 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_columns.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_columns.tsx @@ -16,10 +16,7 @@ import { SecurityPageName, SHOW_RELATED_INTEGRATIONS_SETTING, } from '../../../../../common/constants'; -import type { - DurationMetric, - RuleExecutionSummary, -} from '../../../../../common/api/detection_engine/rule_monitoring'; +import type { RuleExecutionSummary } from '../../../../../common/api/detection_engine/rule_monitoring'; import { isMlRule } from '../../../../../common/machine_learning/helpers'; import { getEmptyTagValue } from '../../../../common/components/empty_value'; import { RuleSnoozeBadge } from '../../../rule_management/components/rule_snooze_badge'; @@ -402,7 +399,7 @@ export const useMonitoringColumns = ({ tooltipContent={i18n.COLUMN_INDEXING_TIMES_TOOLTIP} /> ), - render: (value: DurationMetric | undefined) => ( + render: (value: number | undefined) => ( {value != null ? value.toFixed() : getEmptyTagValue()} @@ -419,7 +416,7 @@ export const useMonitoringColumns = ({ tooltipContent={i18n.COLUMN_QUERY_TIMES_TOOLTIP} /> ), - render: (value: DurationMetric | undefined) => ( + render: (value: number | undefined) => ( {value != null ? value.toFixed() : getEmptyTagValue()} @@ -459,7 +456,7 @@ export const useMonitoringColumns = ({ } /> ), - render: (value: DurationMetric | undefined) => ( + render: (value: number | undefined) => ( {value != null ? moment.duration(value, 'seconds').humanize() : getEmptyTagValue()} diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_rules_table_actions.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_rules_table_actions.tsx index 1d9d6ad45c8fa..04fc59da5e027 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_rules_table_actions.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/components/rules_table/use_rules_table_actions.tsx @@ -9,7 +9,7 @@ import type { DefaultItemAction } from '@elastic/eui'; import { EuiToolTip } from '@elastic/eui'; import React from 'react'; import { DuplicateOptions } from '../../../../../common/detection_engine/rule_management/constants'; -import { BulkActionType } from '../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { BulkActionTypeEnum } from '../../../../../common/api/detection_engine/rule_management'; import { SINGLE_RULE_ACTIONS } from '../../../../common/lib/apm/user_actions'; import { useStartTransaction } from '../../../../common/lib/apm/use_start_transaction'; import { useKibana } from '../../../../common/lib/kibana'; @@ -75,7 +75,7 @@ export const useRulesTableActions = ({ return; } const result = await executeBulkAction({ - type: BulkActionType.duplicate, + type: BulkActionTypeEnum.duplicate, ids: [rule.id], duplicatePayload: { include_exceptions: @@ -123,7 +123,7 @@ export const useRulesTableActions = ({ startTransaction({ name: SINGLE_RULE_ACTIONS.DELETE }); await executeBulkAction({ - type: BulkActionType.delete, + type: BulkActionTypeEnum.delete, ids: [rule.id], }); }, diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/coverage_overview/coverage_overview_dashboard_context.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/coverage_overview/coverage_overview_dashboard_context.tsx index 3a2424664f8ab..057a75d9a5a51 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/coverage_overview/coverage_overview_dashboard_context.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management_ui/pages/coverage_overview/coverage_overview_dashboard_context.tsx @@ -15,7 +15,7 @@ import React, { } from 'react'; import { invariant } from '../../../../../common/utils/invariant'; import { - BulkActionType, + BulkActionTypeEnum, CoverageOverviewRuleActivity, CoverageOverviewRuleSource, } from '../../../../../common/api/detection_engine'; @@ -114,7 +114,7 @@ export const CoverageOverviewDashboardContextProvider = ({ const enableAllDisabled = useCallback( async (ruleIds: string[]) => { - await executeBulkAction({ type: BulkActionType.enable, ids: ruleIds }); + await executeBulkAction({ type: BulkActionTypeEnum.enable, ids: ruleIds }); }, [executeBulkAction] ); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/api/__mocks__/api_client.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/api/__mocks__/api_client.ts index b5b8f201f0ff3..a70a9bd66671b 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/api/__mocks__/api_client.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/api/__mocks__/api_client.ts @@ -10,8 +10,8 @@ import type { GetRuleExecutionResultsResponse, } from '../../../../../common/api/detection_engine/rule_monitoring'; import { - LogLevel, - RuleExecutionEventType, + LogLevelEnum, + RuleExecutionEventTypeEnum, } from '../../../../../common/api/detection_engine/rule_monitoring'; import type { @@ -30,8 +30,8 @@ export const api: jest.Mocked = { { timestamp: '2021-12-29T10:42:59.996Z', sequence: 0, - level: LogLevel.info, - type: RuleExecutionEventType['status-change'], + level: LogLevelEnum.info, + type: RuleExecutionEventTypeEnum['status-change'], execution_id: 'execution-id-1', message: 'Rule changed status to "succeeded". Rule execution completed without errors', }, diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/api/api_client.test.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/api/api_client.test.ts index d1317e2f74252..640cc1a86e423 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/api/api_client.test.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/api/api_client.test.ts @@ -12,11 +12,12 @@ import type { GetRuleExecutionResultsResponse, } from '../../../../common/api/detection_engine/rule_monitoring'; import { - LogLevel, - RuleExecutionEventType, + LogLevelEnum, + RuleExecutionEventTypeEnum, } from '../../../../common/api/detection_engine/rule_monitoring'; import { api } from './api_client'; +import type { FetchRuleExecutionEventsArgs } from './api_client_interface'; jest.mock('../../../common/lib/kibana'); @@ -74,7 +75,7 @@ describe('Rule Monitoring API Client', () => { const ISO_PATTERN = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$/; - it.each([ + it.each<[string, Omit, Record]>([ [ 'search term filter', { searchTerm: 'something to search' }, @@ -82,12 +83,12 @@ describe('Rule Monitoring API Client', () => { ], [ 'event types filter', - { eventTypes: [RuleExecutionEventType.message] }, + { eventTypes: [RuleExecutionEventTypeEnum.message] }, { event_types: 'message' }, ], [ 'log level filter', - { logLevels: [LogLevel.warn, LogLevel.error] }, + { logLevels: [LogLevelEnum.warn, LogLevelEnum.error] }, { log_levels: 'warn,error' }, ], [ diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/basic/filters/event_type_filter/index.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/basic/filters/event_type_filter/index.tsx index 2c87a184f5b1c..5edc079ef5c42 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/basic/filters/event_type_filter/index.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/basic/filters/event_type_filter/index.tsx @@ -7,8 +7,7 @@ import React, { useCallback } from 'react'; -import type { RuleExecutionEventType } from '../../../../../../../common/api/detection_engine/rule_monitoring'; -import { RULE_EXECUTION_EVENT_TYPES } from '../../../../../../../common/api/detection_engine/rule_monitoring'; +import { RuleExecutionEventType } from '../../../../../../../common/api/detection_engine/rule_monitoring'; import { EventTypeIndicator } from '../../indicators/event_type_indicator'; import { MultiselectFilter } from '../multiselect_filter'; @@ -28,7 +27,7 @@ const EventTypeFilterComponent: React.FC = ({ selectedItem dataTestSubj="eventTypeFilter" title={i18n.FILTER_TITLE} - items={RULE_EXECUTION_EVENT_TYPES} + items={RuleExecutionEventType.options} selectedItems={selectedItems} onSelectionChange={onChange} renderItem={renderItem} diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/basic/indicators/event_type_indicator/utils.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/basic/indicators/event_type_indicator/utils.ts index 07b3b3a6b096a..9e86215228078 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/basic/indicators/event_type_indicator/utils.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/basic/indicators/event_type_indicator/utils.ts @@ -6,18 +6,19 @@ */ import type { IconType } from '@elastic/eui'; -import { RuleExecutionEventType } from '../../../../../../../common/api/detection_engine/rule_monitoring'; +import type { RuleExecutionEventType } from '../../../../../../../common/api/detection_engine/rule_monitoring'; +import { RuleExecutionEventTypeEnum } from '../../../../../../../common/api/detection_engine/rule_monitoring'; import { assertUnreachable } from '../../../../../../../common/utility_types'; import * as i18n from './translations'; export const getBadgeIcon = (type: RuleExecutionEventType): IconType => { switch (type) { - case RuleExecutionEventType.message: + case RuleExecutionEventTypeEnum.message: return 'console'; - case RuleExecutionEventType['status-change']: + case RuleExecutionEventTypeEnum['status-change']: return 'dot'; - case RuleExecutionEventType['execution-metrics']: + case RuleExecutionEventTypeEnum['execution-metrics']: return 'gear'; default: return assertUnreachable(type, 'Unknown rule execution event type'); @@ -26,11 +27,11 @@ export const getBadgeIcon = (type: RuleExecutionEventType): IconType => { export const getBadgeText = (type: RuleExecutionEventType): string => { switch (type) { - case RuleExecutionEventType.message: + case RuleExecutionEventTypeEnum.message: return i18n.TYPE_MESSAGE; - case RuleExecutionEventType['status-change']: + case RuleExecutionEventTypeEnum['status-change']: return i18n.TYPE_STATUS_CHANGE; - case RuleExecutionEventType['execution-metrics']: + case RuleExecutionEventTypeEnum['execution-metrics']: return i18n.TYPE_EXECUTION_METRICS; default: return assertUnreachable(type, 'Unknown rule execution event type'); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/basic/indicators/log_level_indicator/utils.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/basic/indicators/log_level_indicator/utils.ts index 639c648de0241..702d3edddda5b 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/basic/indicators/log_level_indicator/utils.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/basic/indicators/log_level_indicator/utils.ts @@ -7,20 +7,21 @@ import { upperCase } from 'lodash'; import type { IconColor } from '@elastic/eui'; -import { LogLevel } from '../../../../../../../common/api/detection_engine/rule_monitoring'; +import type { LogLevel } from '../../../../../../../common/api/detection_engine/rule_monitoring'; +import { LogLevelEnum } from '../../../../../../../common/api/detection_engine/rule_monitoring'; import { assertUnreachable } from '../../../../../../../common/utility_types'; export const getBadgeColor = (logLevel: LogLevel): IconColor => { switch (logLevel) { - case LogLevel.trace: + case LogLevelEnum.trace: return 'hollow'; - case LogLevel.debug: + case LogLevelEnum.debug: return 'hollow'; - case LogLevel.info: + case LogLevelEnum.info: return 'default'; - case LogLevel.warn: + case LogLevelEnum.warn: return 'warning'; - case LogLevel.error: + case LogLevelEnum.error: return 'danger'; default: return assertUnreachable(logLevel, 'Unknown log level'); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/basic/tables/use_sorting.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/basic/tables/use_sorting.ts index 39e48c3997478..5fb9c0fb32215 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/basic/tables/use_sorting.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/basic/tables/use_sorting.ts @@ -11,11 +11,18 @@ import type { SortOrder } from '../../../../../../common/api/detection_engine'; type TableItem = Record; +interface SortingState { + sort: { + field: keyof T; + direction: SortOrder; + }; +} + export const useSorting = (defaultField: keyof T, defaultOrder: SortOrder) => { const [sortField, setSortField] = useState(defaultField); const [sortOrder, setSortOrder] = useState(defaultOrder); - const state = useMemo(() => { + const state = useMemo>(() => { return { sort: { field: sortField, diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/execution_events_table/use_execution_events.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/execution_events_table/use_execution_events.test.tsx index 866e0e44b6c77..5459968b6c497 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/execution_events_table/use_execution_events.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_monitoring/components/execution_events_table/use_execution_events.test.tsx @@ -10,8 +10,8 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { renderHook, cleanup } from '@testing-library/react-hooks'; import { - LogLevel, - RuleExecutionEventType, + LogLevelEnum, + RuleExecutionEventTypeEnum, } from '../../../../../common/api/detection_engine/rule_monitoring'; import { useExecutionEvents } from './use_execution_events'; @@ -85,8 +85,8 @@ describe('useExecutionEvents', () => { { timestamp: '2021-12-29T10:42:59.996Z', sequence: 0, - level: LogLevel.info, - type: RuleExecutionEventType['status-change'], + level: LogLevelEnum.info, + type: RuleExecutionEventTypeEnum['status-change'], execution_id: 'execution-id-1', message: 'Rule changed status to "succeeded". Rule execution completed without errors', }, diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/constants.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/constants.ts index d99be0c13e70b..19d6111b5a936 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/constants.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/constants.ts @@ -5,13 +5,13 @@ * 2.0. */ -import { RESPONSE_ACTION_TYPES } from '../../../common/api/detection_engine/model/rule_response_actions'; +import { ResponseActionTypesEnum } from '../../../common/api/detection_engine/model/rule_response_actions'; export const getActionDetails = (actionTypeId: string) => { switch (actionTypeId) { - case RESPONSE_ACTION_TYPES.OSQUERY: + case ResponseActionTypesEnum['.osquery']: return { logo: 'logoOsquery', name: 'Osquery' }; - case RESPONSE_ACTION_TYPES.ENDPOINT: + case ResponseActionTypesEnum['.endpoint']: return { logo: 'logoSecurity', name: 'Endpoint Security' }; // update when new responseActions are provided default: diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/get_supported_response_actions.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/get_supported_response_actions.ts index ad3e3f8392eb1..e8afdd91d1ff3 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/get_supported_response_actions.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/get_supported_response_actions.ts @@ -6,10 +6,9 @@ */ import type { EnabledFeatures } from '@kbn/spaces-plugin/public/management/edit_space/enabled_features'; -import type { ResponseActionTypes } from '../../../common/api/detection_engine/model/rule_response_actions'; import { - RESPONSE_ACTION_TYPES, - SUPPORTED_RESPONSE_ACTION_TYPES, + ResponseActionTypes, + ResponseActionTypesEnum, } from '../../../common/api/detection_engine/model/rule_response_actions'; export interface ResponseActionType { @@ -29,9 +28,9 @@ export const getSupportedResponseActions = ( userPermissions: EnabledFeatures ): ResponseActionType[] => actionTypes.reduce((acc: ResponseActionType[], actionType) => { - const isEndpointAction = actionType.id === RESPONSE_ACTION_TYPES.ENDPOINT; + const isEndpointAction = actionType.id === ResponseActionTypesEnum['.endpoint']; if (!enabledFeatures.endpoint && isEndpointAction) return acc; - if (SUPPORTED_RESPONSE_ACTION_TYPES.includes(actionType.id)) + if (ResponseActionTypes.options.includes(actionType.id)) return [ ...acc, { ...actionType, disabled: isEndpointAction ? !userPermissions.endpoint : undefined }, @@ -39,14 +38,14 @@ export const getSupportedResponseActions = ( return acc; }, []); -export const responseActionTypes = [ +export const responseActionTypes: ResponseActionType[] = [ { - id: RESPONSE_ACTION_TYPES.OSQUERY, + id: ResponseActionTypesEnum['.osquery'], name: 'Osquery', iconClass: 'logoOsquery', }, { - id: RESPONSE_ACTION_TYPES.ENDPOINT, + id: ResponseActionTypesEnum['.endpoint'], name: 'Endpoint Security', iconClass: 'logoSecurity', }, diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_action_type_form.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_action_type_form.tsx index 7b176b96c2948..97f3e932e81fe 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_action_type_form.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/response_action_type_form.tsx @@ -21,7 +21,7 @@ import styled from 'styled-components'; import { useCheckEndpointPermissions } from './endpoint/check_permissions'; import { EndpointResponseAction } from './endpoint/endpoint_response_action'; import type { RuleResponseAction } from '../../../common/api/detection_engine/model/rule_response_actions'; -import { RESPONSE_ACTION_TYPES } from '../../../common/api/detection_engine/model/rule_response_actions'; +import { ResponseActionTypesEnum } from '../../../common/api/detection_engine/model/rule_response_actions'; import { OsqueryResponseAction } from './osquery/osquery_response_action'; import { getActionDetails } from './constants'; import { useFormData } from '../../shared_imports'; @@ -48,10 +48,10 @@ const ResponseActionTypeFormComponent = ({ item, onDeleteAction }: ResponseActio const editDisabled = useCheckEndpointPermissions(action) ?? false; const getResponseActionTypeForm = useMemo(() => { - if (action?.actionTypeId === RESPONSE_ACTION_TYPES.OSQUERY) { + if (action?.actionTypeId === ResponseActionTypesEnum['.osquery']) { return ; } - if (action?.actionTypeId === RESPONSE_ACTION_TYPES.ENDPOINT) { + if (action?.actionTypeId === ResponseActionTypesEnum['.endpoint']) { return ; } // Place for other ResponseActionTypes diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/utils.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/utils.tsx index 5b1e57e6386f4..22d190d80b9c4 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/utils.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_response_actions/utils.tsx @@ -11,7 +11,7 @@ import { filter, reduce } from 'lodash'; import type { ECSMapping } from '@kbn/osquery-io-ts-types'; import type { RuleResponseAction } from '../../../common/api/detection_engine/model/rule_response_actions'; -import { RESPONSE_ACTION_TYPES } from '../../../common/api/detection_engine/model/rule_response_actions'; +import { ResponseActionTypesEnum } from '../../../common/api/detection_engine/model/rule_response_actions'; import { OsqueryParser } from '../../common/components/markdown_editor/plugins/osquery/parser'; interface OsqueryNoteQuery { @@ -38,7 +38,7 @@ export const getResponseActionsFromNote = ( (acc: { responseActions: RuleResponseAction[] }, { configuration }: OsqueryNoteQuery) => { const responseActionPath = 'responseActions'; acc[responseActionPath].push({ - actionTypeId: RESPONSE_ACTION_TYPES.OSQUERY, + actionTypeId: ResponseActionTypesEnum['.osquery'], params: { savedQueryId: undefined, packId: undefined, diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_actions_overflow/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/rule_actions_overflow/index.tsx index 50c8a5bf50d1b..9a351af0803c7 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_actions_overflow/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/rule_actions_overflow/index.tsx @@ -16,7 +16,7 @@ import React, { useCallback, useMemo } from 'react'; import styled from 'styled-components'; import { APP_UI_ID, SecurityPageName } from '../../../../../common/constants'; import { DuplicateOptions } from '../../../../../common/detection_engine/rule_management/constants'; -import { BulkActionType } from '../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { BulkActionTypeEnum } from '../../../../../common/api/detection_engine/rule_management'; import { getRulesUrl } from '../../../../common/components/link_to/redirect_to_detection_engine'; import { useBoolState } from '../../../../common/hooks/use_bool_state'; import { SINGLE_RULE_ACTIONS } from '../../../../common/lib/apm/user_actions'; @@ -94,7 +94,7 @@ const RuleActionsOverflowComponent = ({ return; } const result = await executeBulkAction({ - type: BulkActionType.duplicate, + type: BulkActionTypeEnum.duplicate, ids: [rule.id], duplicatePayload: { include_exceptions: @@ -156,7 +156,7 @@ const RuleActionsOverflowComponent = ({ startTransaction({ name: SINGLE_RULE_ACTIONS.DELETE }); await executeBulkAction({ - type: BulkActionType.delete, + type: BulkActionTypeEnum.delete, ids: [rule.id], }); diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_switch/index.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/rule_switch/index.tsx index 7e4881800f738..35434a711768e 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_switch/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/rule_switch/index.tsx @@ -9,7 +9,7 @@ import type { EuiSwitchEvent } from '@elastic/eui'; import { EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner, EuiSwitch } from '@elastic/eui'; import React, { useCallback, useMemo, useState } from 'react'; import styled from 'styled-components'; -import { BulkActionType } from '../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { BulkActionTypeEnum } from '../../../../../common/api/detection_engine/rule_management'; import { SINGLE_RULE_ACTIONS } from '../../../../common/lib/apm/user_actions'; import { useStartTransaction } from '../../../../common/lib/apm/use_start_transaction'; import { useExecuteBulkAction } from '../../../../detection_engine/rule_management/logic/bulk_actions/use_execute_bulk_action'; @@ -60,7 +60,7 @@ export const RuleSwitchComponent = ({ await startMlJobsIfNeeded?.(); } const bulkActionResponse = await executeBulkAction({ - type: enableRule ? BulkActionType.enable : BulkActionType.disable, + type: enableRule ? BulkActionTypeEnum.enable : BulkActionTypeEnum.disable, ids: [id], }); if (bulkActionResponse?.attributes.results.updated.length) { diff --git a/x-pack/plugins/security_solution/public/entity_analytics/api/api.ts b/x-pack/plugins/security_solution/public/entity_analytics/api/api.ts index cc2b01f75da57..6b92583b1ddde 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/api/api.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/api/api.ts @@ -20,7 +20,7 @@ import type { GetRiskEngineStatusResponse, InitRiskEngineResponse, DisableRiskEngineResponse, -} from '../../../server/lib/risk_engine/types'; +} from '../../../server/lib/entity_analytics/risk_engine/types'; import type { RiskScorePreviewRequestSchema } from '../../../common/risk_engine/risk_score_preview/request_schema'; /** diff --git a/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_disable_risk_engine_mutation.ts b/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_disable_risk_engine_mutation.ts index 997e93136339e..68b63300061b6 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_disable_risk_engine_mutation.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_disable_risk_engine_mutation.ts @@ -11,7 +11,7 @@ import { useInvalidateRiskEngineStatusQuery } from './use_risk_engine_status'; import type { EnableRiskEngineResponse, EnableDisableRiskEngineErrorResponse, -} from '../../../../server/lib/risk_engine/types'; +} from '../../../../server/lib/entity_analytics/risk_engine/types'; export const DISABLE_RISK_ENGINE_MUTATION_KEY = ['POST', 'DISABLE_RISK_ENGINE']; diff --git a/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_enable_risk_engine_mutation.ts b/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_enable_risk_engine_mutation.ts index 3875a79399dcc..40b3f1b4bddb6 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_enable_risk_engine_mutation.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_enable_risk_engine_mutation.ts @@ -11,7 +11,7 @@ import { useInvalidateRiskEngineStatusQuery } from './use_risk_engine_status'; import type { EnableRiskEngineResponse, EnableDisableRiskEngineErrorResponse, -} from '../../../../server/lib/risk_engine/types'; +} from '../../../../server/lib/entity_analytics/risk_engine/types'; export const ENABLE_RISK_ENGINE_MUTATION_KEY = ['POST', 'ENABLE_RISK_ENGINE']; export const useEnableRiskEngineMutation = (options?: UseMutationOptions<{}>) => { diff --git a/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_init_risk_engine_mutation.ts b/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_init_risk_engine_mutation.ts index d220885148cac..35b1071b62b80 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_init_risk_engine_mutation.ts +++ b/x-pack/plugins/security_solution/public/entity_analytics/api/hooks/use_init_risk_engine_mutation.ts @@ -11,7 +11,7 @@ import { useInvalidateRiskEngineStatusQuery } from './use_risk_engine_status'; import type { InitRiskEngineResponse, InitRiskEngineError, -} from '../../../../server/lib/risk_engine/types'; +} from '../../../../server/lib/entity_analytics/risk_engine/types'; export const INIT_RISK_ENGINE_STATUS_KEY = ['POST', 'INIT_RISK_ENGINE']; diff --git a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_enable_section.tsx b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_enable_section.tsx index 0eead8683e4f2..bd0b0e262e3cc 100644 --- a/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_enable_section.tsx +++ b/x-pack/plugins/security_solution/public/entity_analytics/components/risk_score_enable_section.tsx @@ -235,11 +235,11 @@ export const RiskScoreEnableSection = () => { let initRiskEngineErrors: string[] = []; if (initRiskEngineMutation.isError) { - const errorBody = initRiskEngineMutation.error.body.message; + const errorBody = initRiskEngineMutation.error.body; if (errorBody?.full_error?.errors) { initRiskEngineErrors = errorBody.full_error?.errors; } else { - initRiskEngineErrors = [errorBody]; + initRiskEngineErrors = [errorBody.message]; } } @@ -266,10 +266,10 @@ export const RiskScoreEnableSection = () => { {initRiskEngineMutation.isError && } {disableRiskEngineMutation.isError && ( - + )} {enableRiskEngineMutation.isError && ( - + )} diff --git a/x-pack/plugins/security_solution/public/management/components/console/mocks.tsx b/x-pack/plugins/security_solution/public/management/components/console/mocks.tsx index ac729f898c6be..d756e6aaea2e5 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/mocks.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/mocks.tsx @@ -10,8 +10,7 @@ import React, { memo, useEffect } from 'react'; import { EuiCode } from '@elastic/eui'; import userEvent from '@testing-library/user-event'; -import { act } from '@testing-library/react'; -import { within } from '@testing-library/dom'; +import { act, within } from '@testing-library/react'; import { convertToTestId } from './components/command_list'; import { Console } from './console'; import type { diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/automated_response_actions/form.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/automated_response_actions/form.cy.ts index a370f2a89cb6f..fb1285fb89f05 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/automated_response_actions/form.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/automated_response_actions/form.cy.ts @@ -15,7 +15,7 @@ import { visitRuleActions, } from '../../tasks/response_actions'; import { cleanupRule, generateRandomStringName, loadRule } from '../../tasks/api_fixtures'; -import { RESPONSE_ACTION_TYPES } from '../../../../../common/api/detection_engine'; +import { ResponseActionTypesEnum } from '../../../../../common/api/detection_engine'; import { login, ROLE } from '../../tasks/login'; describe( @@ -78,7 +78,7 @@ describe( cy.getByTestSubj(`command-type-${testedCommand}`).click(); cy.intercept('POST', '/api/detection_engine/rules', (request) => { const result = { - action_type_id: RESPONSE_ACTION_TYPES.ENDPOINT, + action_type_id: ResponseActionTypesEnum['.endpoint'], params: { command: testedCommand, comment: 'example1', @@ -127,7 +127,7 @@ describe( cy.getByTestSubj('ruleEditSubmitButton').click(); cy.wait('@updateResponseAction').should(({ request }) => { const query = { - action_type_id: RESPONSE_ACTION_TYPES.ENDPOINT, + action_type_id: ResponseActionTypesEnum['.endpoint'], params: { command: testedCommand, comment: newDescription, diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/response_console/execute.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/response_console/execute.cy.ts index d43037f4d7f97..dad573bb09c2b 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/response_console/execute.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/response_console/execute.cy.ts @@ -21,8 +21,7 @@ import { enableAllPolicyProtections } from '../../../tasks/endpoint_policy'; import { createEndpointHost } from '../../../tasks/create_endpoint_host'; import { deleteAllLoadedEndpointData } from '../../../tasks/delete_all_endpoint_data'; -// FLAKY: https://github.com/elastic/kibana/issues/170373 -describe.skip('Response console', { tags: ['@ess', '@serverless'] }, () => { +describe('Response console', { tags: ['@ess', '@serverless'] }, () => { beforeEach(() => { login(); }); diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/policy_details_with_security_essentials.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/policy_details_with_security_essentials.cy.ts index efb48f6543542..36ebb060454c5 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/policy_details_with_security_essentials.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/policy_details_with_security_essentials.cy.ts @@ -9,8 +9,7 @@ import { login } from '../../tasks/login'; import { visitPolicyDetailsPage } from '../../screens/policy_details'; import type { IndexedFleetEndpointPolicyResponse } from '../../../../../common/endpoint/data_loaders/index_fleet_endpoint_policy'; -// FLAKY: https://github.com/elastic/kibana/issues/170666 -describe.skip( +describe( 'When displaying the Policy Details in Security Essentials PLI', { tags: ['@serverless'], @@ -24,7 +23,11 @@ describe.skip( let loadedPolicyData: IndexedFleetEndpointPolicyResponse; before(() => { - cy.task('indexFleetEndpointPolicy', { policyName: 'tests-serverless' }).then((response) => { + cy.task( + 'indexFleetEndpointPolicy', + { policyName: 'tests-serverless' }, + { timeout: 5 * 60 * 1000 } + ).then((response) => { loadedPolicyData = response as IndexedFleetEndpointPolicyResponse; }); }); diff --git a/x-pack/plugins/security_solution/public/management/cypress/tasks/fleet.ts b/x-pack/plugins/security_solution/public/management/cypress/tasks/fleet.ts index 8f1da4a0ec020..bc0f94d712058 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/tasks/fleet.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/tasks/fleet.ts @@ -81,15 +81,20 @@ export const yieldEndpointPolicyRevision = (): Cypress.Chainable => export const createAgentPolicyTask = ( version: string, - policyPrefix?: string + policyPrefix?: string, + timeout?: number ): Cypress.Chainable => { const policyName = `${policyPrefix || 'Reassign'} ${Math.random().toString(36).substring(2, 7)}`; - return cy.task('indexFleetEndpointPolicy', { - policyName, - endpointPackageVersion: version, - agentPolicyName: policyName, - }); + return cy.task( + 'indexFleetEndpointPolicy', + { + policyName, + endpointPackageVersion: version, + agentPolicyName: policyName, + }, + { timeout: timeout ?? 5 * 60 * 1000 } + ); }; export const enableAgentTamperProtectionFeatureFlagInPolicy = (agentPolicyId: string) => { diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/integration_tests/search_bar.test.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/integration_tests/search_bar.test.tsx index ab0a856ff1fa6..f053ee5ef8d68 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/integration_tests/search_bar.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/components/integration_tests/search_bar.test.tsx @@ -9,10 +9,9 @@ import React from 'react'; import type { AppContextTestRender } from '../../../../../../common/mock/endpoint'; import { createAppRootMockRenderer } from '../../../../../../common/mock/endpoint'; import { endpointPageHttpMock } from '../../../mocks'; -import { act, waitFor, cleanup } from '@testing-library/react'; +import { act, waitFor, cleanup, fireEvent } from '@testing-library/react'; import { getEndpointListPath } from '../../../../../common/routing'; import { AdminSearchBar } from '../search_bar'; -import { fireEvent } from '@testing-library/dom'; import { uiQueryParams } from '../../../store/selectors'; import type { EndpointIndexUIQueryParams } from '../../../types'; diff --git a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/form.test.tsx b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/form.test.tsx index be028512cb0a8..2870a67e7042c 100644 --- a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/form.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/form.test.tsx @@ -25,6 +25,7 @@ import { OperatingSystem } from '@kbn/securitysolution-utils'; import { EventFiltersForm } from './form'; import { EndpointDocGenerator } from '../../../../../../common/endpoint/generate_data'; import type { PolicyData } from '../../../../../../common/endpoint/types'; +import { MAX_COMMENT_LENGTH } from '../../../../../../common/constants'; jest.mock('../../../../../common/lib/kibana'); jest.mock('../../../../../common/containers/source'); @@ -466,4 +467,35 @@ describe('Event filter form', () => { expect(renderResult.findByTestId('duplicate-fields-warning-message')).not.toBeNull(); }); }); + + describe('Errors', () => { + beforeEach(() => { + render(); + }); + + it('should not show warning text when unique fields are added', async () => { + rerender(); + + const commentInput = renderResult.getByLabelText('Comment Input'); + + expect( + renderResult.queryByText( + `The length of the comment is too long. The maximum length is ${MAX_COMMENT_LENGTH} characters.` + ) + ).toBeNull(); + act(() => { + fireEvent.change(commentInput, { + target: { + value: [...new Array(MAX_COMMENT_LENGTH + 1).keys()].map((_) => 'a').join(''), + }, + }); + fireEvent.blur(commentInput); + }); + expect( + renderResult.queryByText( + `The length of the comment is too long. The maximum length is ${MAX_COMMENT_LENGTH} characters.` + ) + ).not.toBeNull(); + }); + }); }); diff --git a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/form.tsx b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/form.tsx index 3b4ff4e394a82..e4e1fa7e14638 100644 --- a/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/form.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/form.tsx @@ -133,6 +133,7 @@ export const EventFiltersForm: React.FC(!exception.name); const [newComment, setNewComment] = useState(''); + const [hasCommentError, setHasCommentError] = useState(false); const [hasBeenInputNameVisited, setHasBeenInputNameVisited] = useState(false); const [selectedPolicies, setSelectedPolicies] = useState([]); const isPlatinumPlus = useLicense().isPlatinumPlus(); @@ -173,10 +174,11 @@ export const EventFiltersForm: React.FC e.value !== '' || e.value.length) ); - }, [hasNameError, exception.entries]); + }, [hasCommentError, hasNameError, exception.entries]); const processChanged = useCallback( (updatedItem?: Partial) => { @@ -340,6 +342,7 @@ export const EventFiltersForm: React.FC ), [existingComments, handleOnChangeComment, newComment] diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/assignable/policy_artifacts_assignable_list.test.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/assignable/policy_artifacts_assignable_list.test.tsx index aa57df82276c6..c1f95b1f4d067 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/assignable/policy_artifacts_assignable_list.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/artifacts/assignable/policy_artifacts_assignable_list.test.tsx @@ -10,7 +10,7 @@ import { PolicyArtifactsAssignableList } from './policy_artifacts_assignable_lis import * as reactTestingLibrary from '@testing-library/react'; import type { AppContextTestRender } from '../../../../../../common/mock/endpoint'; import { createAppRootMockRenderer } from '../../../../../../common/mock/endpoint'; -import { fireEvent } from '@testing-library/dom'; +import { fireEvent } from '@testing-library/react'; import { getMockListResponse } from '../../../test_utils'; describe('Policy artifacts list', () => { diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_settings_form/components/advanced_section.test.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_settings_form/components/advanced_section.test.tsx index 0eb65818b9347..6688c12c7f853 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_settings_form/components/advanced_section.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_settings_form/components/advanced_section.test.tsx @@ -17,7 +17,7 @@ import type { AdvancedSectionProps } from './advanced_section'; import { AdvancedSection } from './advanced_section'; import userEvent from '@testing-library/user-event'; import { AdvancedPolicySchema } from '../../../models/advanced_policy_schema'; -import { within } from '@testing-library/dom'; +import { within } from '@testing-library/react'; import { set } from 'lodash'; jest.mock('../../../../../../common/hooks/use_license'); diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_settings_form/components/event_collection_card.test.tsx b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_settings_form/components/event_collection_card.test.tsx index eeaa22aa14f6b..54ade4d11b4dd 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_settings_form/components/event_collection_card.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/policy/view/policy_settings_form/components/event_collection_card.test.tsx @@ -18,7 +18,7 @@ import { OperatingSystem } from '@kbn/securitysolution-utils'; import { expectIsViewOnly, exactMatchText } from '../mocks'; import userEvent from '@testing-library/user-event'; import { cloneDeep, set } from 'lodash'; -import { within } from '@testing-library/dom'; +import { within } from '@testing-library/react'; describe('Policy Event Collection Card common component', () => { let formProps: EventCollectionCardProps; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/index.test.tsx index 153b24dcf0bf8..cd0a21d99cdfe 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/query_bar/index.test.tsx @@ -21,7 +21,7 @@ import { buildGlobalQuery } from '../helpers'; import type { QueryBarTimelineComponentProps } from '.'; import { QueryBarTimeline, getDataProviderFilter, TIMELINE_FILTER_DROP_AREA } from '.'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; const mockUiSettingsForFilterManager = coreMock.createStart().uiSettings; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/model/rule_assets/prebuilt_rule_asset.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/model/rule_assets/prebuilt_rule_asset.test.ts index 73350b48941db..0ec1d5580f40b 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/model/rule_assets/prebuilt_rule_asset.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/prebuilt_rules/model/rule_assets/prebuilt_rule_asset.test.ts @@ -17,7 +17,7 @@ describe('Prebuilt rule asset schema', () => { const result = PrebuiltRuleAsset.safeParse(payload); expectParseError(result); expect(stringifyZodError(result.error)).toMatchInlineSnapshot( - `"name: Required, description: Required, risk_score: Required, severity: Required, Invalid input, rule_id: Required, version: Required"` + `"name: Required, description: Required, risk_score: Required, severity: Required, rule_id: Required, and 26 more"` ); }); @@ -40,7 +40,7 @@ describe('Prebuilt rule asset schema', () => { const result = PrebuiltRuleAsset.safeParse(payload); expectParseError(result); expect(stringifyZodError(result.error)).toMatchInlineSnapshot( - `"name: Required, description: Required, risk_score: Required, severity: Required, Invalid input, version: Required"` + `"name: Required, description: Required, risk_score: Required, severity: Required, version: Required, and 25 more"` ); }); @@ -176,7 +176,9 @@ describe('Prebuilt rule asset schema', () => { const result = PrebuiltRuleAsset.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", index.0: Expected string, received number, index.0: Expected string, received number, type: Invalid literal value, expected \\"saved_query\\", and 20 more"` + ); }); test('saved_query type can have filters with it', () => { @@ -198,7 +200,9 @@ describe('Prebuilt rule asset schema', () => { const result = PrebuiltRuleAsset.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", filters: Expected array, received string, filters: Expected array, received string, type: Invalid literal value, expected \\"saved_query\\", and 20 more"` + ); }); test('language validates with kuery', () => { @@ -231,7 +235,9 @@ describe('Prebuilt rule asset schema', () => { const result = PrebuiltRuleAsset.safeParse(payload); expectParseError(result); - expect(stringifyZodError(result.error)).toMatchInlineSnapshot(`"Invalid input"`); + expect(stringifyZodError(result.error)).toMatchInlineSnapshot( + `"type: Invalid literal value, expected \\"eql\\", language: Invalid literal value, expected \\"eql\\", language: Invalid enum value. Expected 'kuery' | 'lucene', received 'something-made-up', type: Invalid literal value, expected \\"saved_query\\", saved_id: Required, and 19 more"` + ); }); test('max_signals cannot be negative', () => { 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 e68e84acf6029..f65d788945deb 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 @@ -34,7 +34,7 @@ import type { import { getEndpointAuthzInitialStateMock } from '../../../../../common/endpoint/service/authz/mocks'; import type { EndpointAuthz } from '../../../../../common/endpoint/types/authz'; -import { riskEngineDataClientMock } from '../../../risk_engine/risk_engine_data_client.mock'; +import { riskEngineDataClientMock } from '../../../entity_analytics/risk_engine/risk_engine_data_client.mock'; export const createMockClients = () => { const core = coreMock.createRequestHandlerContext(); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/route.test.ts index 428010033c5b2..cd01a251a3c75 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_actions/route.test.ts @@ -486,7 +486,7 @@ describe('Perform bulk action route', () => { }); const result = server.validate(request); expect(result.badRequest).toHaveBeenCalledWith( - 'Invalid value "undefined" supplied to "action",Invalid value "undefined" supplied to "edit"' + 'action: Invalid literal value, expected "delete", action: Invalid literal value, expected "disable", action: Invalid literal value, expected "enable", action: Invalid literal value, expected "export", action: Invalid literal value, expected "duplicate", and 2 more' ); }); @@ -498,7 +498,7 @@ describe('Perform bulk action route', () => { }); const result = server.validate(request); expect(result.badRequest).toHaveBeenCalledWith( - 'Invalid value "unknown" supplied to "action",Invalid value "undefined" supplied to "edit"' + 'action: Invalid literal value, expected "delete", action: Invalid literal value, expected "disable", action: Invalid literal value, expected "enable", action: Invalid literal value, expected "export", action: Invalid literal value, expected "duplicate", and 2 more' ); }); @@ -531,7 +531,9 @@ describe('Perform bulk action route', () => { body: { ...getPerformBulkActionSchemaMock(), ids: 'test fake' }, }); const result = server.validate(request); - expect(result.badRequest).toHaveBeenCalledWith('Invalid value "test fake" supplied to "ids"'); + expect(result.badRequest).toHaveBeenCalledWith( + 'ids: Expected array, received string, action: Invalid literal value, expected "delete", ids: Expected array, received string, ids: Expected array, received string, action: Invalid literal value, expected "enable", and 7 more' + ); }); it('rejects payload if there is more than 100 ids in payload', async () => { @@ -577,7 +579,9 @@ describe('Perform bulk action route', () => { body: { ...getPerformBulkActionSchemaMock(), ids: [] }, }); const result = server.validate(request); - expect(result.badRequest).toHaveBeenCalledWith('Invalid value "[]" supplied to "ids"'); + expect(result.badRequest).toHaveBeenCalledWith( + 'ids: Array must contain at least 1 element(s)' + ); }); it('rejects payloads if property "edit" actions is empty', async () => { @@ -588,7 +592,7 @@ describe('Perform bulk action route', () => { }); const result = server.validate(request); expect(result.badRequest).toHaveBeenCalledWith( - expect.stringContaining('Invalid value "[]" supplied to "edit"') + expect.stringContaining('edit: Array must contain at least 1 element(s)') ); }); @@ -601,7 +605,9 @@ describe('Perform bulk action route', () => { }); const result = server.validate(request); expect(result.badRequest).toHaveBeenCalledWith( - expect.stringContaining('Invalid value "invalid" supplied to "dry_run"') + expect.stringContaining( + "dry_run: Invalid enum value. Expected 'true' | 'false', received 'invalid', dry_run: Expected boolean, received string" + ) ); }); }); 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 14022e9e44af2..8af5eeaa1a021 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 @@ -20,22 +20,24 @@ import { MAX_RULES_TO_UPDATE_IN_PARALLEL, RULES_TABLE_MAX_PAGE_SIZE, } from '../../../../../../../common/constants'; -import type { PerformBulkActionResponse } from '../../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import type { + BulkEditActionResponse, + PerformBulkActionResponse, +} from '../../../../../../../common/api/detection_engine/rule_management'; import { - BulkActionType, + BulkActionTypeEnum, PerformBulkActionRequestBody, PerformBulkActionRequestQuery, -} from '../../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +} from '../../../../../../../common/api/detection_engine/rule_management'; import type { NormalizedRuleError, RuleDetailsInError, - BulkEditActionResponse, BulkEditActionResults, BulkEditActionSummary, } from '../../../../../../../common/api/detection_engine'; import type { SetupPlugins } from '../../../../../../plugin'; import type { SecuritySolutionPluginRouter } from '../../../../../../types'; -import { buildRouteValidation } from '../../../../../../utils/build_validation/route_validation'; +import { buildRouteValidationWithZod } from '../../../../../../utils/build_validation/route_validation'; import { routeLimitedConcurrencyTag } from '../../../../../../utils/route_limited_concurrency_tag'; import type { PromisePoolError, PromisePoolOutcome } from '../../../../../../utils/promise_pool'; import { initPromisePool } from '../../../../../../utils/promise_pool'; @@ -249,8 +251,8 @@ export const performBulkActionRoute = ( version: '2023-10-31', validate: { request: { - body: buildRouteValidation(PerformBulkActionRequestBody), - query: buildRouteValidation(PerformBulkActionRequestQuery), + body: buildRouteValidationWithZod(PerformBulkActionRequestBody), + query: buildRouteValidationWithZod(PerformBulkActionRequestQuery), }, }, }, @@ -272,10 +274,10 @@ export const performBulkActionRoute = ( }); } - const isDryRun = request.query.dry_run === 'true'; + const isDryRun = request.query.dry_run; // dry run is not supported for export, as it doesn't change ES state and has different response format(exported JSON file) - if (isDryRun && body.action === BulkActionType.export) { + if (isDryRun && body.action === BulkActionTypeEnum.export) { return siemResponse.error({ body: `Export action doesn't support dry_run mode`, statusCode: 400, @@ -318,7 +320,7 @@ export const performBulkActionRoute = ( // handling this action before switch statement as bulkEditRules fetch rules within // rulesClient method, hence there is no need to use fetchRulesByQueryOrIds utility - if (body.action === BulkActionType.edit && !isDryRun) { + if (body.action === BulkActionTypeEnum.edit && !isDryRun) { const { rules, errors, skipped } = await bulkEditRules({ rulesClient, filter: query, @@ -348,7 +350,7 @@ export const performBulkActionRoute = ( let deleted: RuleAlertType[] = []; switch (body.action) { - case BulkActionType.enable: + case BulkActionTypeEnum.enable: bulkActionOutcome = await initPromisePool({ concurrency: MAX_RULES_TO_UPDATE_IN_PARALLEL, items: rules, @@ -375,7 +377,7 @@ export const performBulkActionRoute = ( .map(({ result }) => result) .filter((rule): rule is RuleAlertType => rule !== null); break; - case BulkActionType.disable: + case BulkActionTypeEnum.disable: bulkActionOutcome = await initPromisePool({ concurrency: MAX_RULES_TO_UPDATE_IN_PARALLEL, items: rules, @@ -403,7 +405,7 @@ export const performBulkActionRoute = ( .filter((rule): rule is RuleAlertType => rule !== null); break; - case BulkActionType.delete: + case BulkActionTypeEnum.delete: bulkActionOutcome = await initPromisePool({ concurrency: MAX_RULES_TO_UPDATE_IN_PARALLEL, items: rules, @@ -427,7 +429,7 @@ export const performBulkActionRoute = ( .filter((rule): rule is RuleAlertType => rule !== null); break; - case BulkActionType.duplicate: + case BulkActionTypeEnum.duplicate: bulkActionOutcome = await initPromisePool({ concurrency: MAX_RULES_TO_UPDATE_IN_PARALLEL, items: rules, @@ -486,7 +488,7 @@ export const performBulkActionRoute = ( .filter((rule): rule is RuleAlertType => rule !== null); break; - case BulkActionType.export: + case BulkActionTypeEnum.export: const exported = await getExportByObjectIds( rulesClient, exceptionsClient, @@ -510,7 +512,7 @@ export const performBulkActionRoute = ( // will be processed only when isDryRun === true // during dry run only validation is getting performed and rule is not saved in ES - case BulkActionType.edit: + case BulkActionTypeEnum.edit: bulkActionOutcome = await initPromisePool({ concurrency: MAX_RULES_TO_UPDATE_IN_PARALLEL, items: rules, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_patch_rules/route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_patch_rules/route.test.ts index fc3d87d32b432..ca3cde890b738 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_patch_rules/route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/bulk_patch_rules/route.test.ts @@ -191,7 +191,9 @@ describe('Bulk patch rules route', () => { }); const result = server.validate(request); - expect(result.badRequest).toHaveBeenCalledWith('0: Invalid input'); + expect(result.badRequest).toHaveBeenCalledWith( + '0.type: Invalid literal value, expected "eql", 0.language: Invalid literal value, expected "eql", 0.type: Invalid literal value, expected "query", 0.type: Invalid literal value, expected "saved_query", 0.type: Invalid literal value, expected "threshold", and 5 more' + ); }); test('allows rule type of query and custom from and interval', async () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/create_rule/route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/create_rule/route.test.ts index 5fed0b4e3446a..a1d74b1445508 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/create_rule/route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/create_rule/route.test.ts @@ -236,7 +236,9 @@ describe('Create rule route', () => { }, }); const result = await server.validate(request); - expect(result.badRequest).toHaveBeenCalledWith('Invalid input'); + expect(result.badRequest).toHaveBeenCalledWith( + 'type: Invalid literal value, expected "eql", language: Invalid literal value, expected "eql", type: Invalid literal value, expected "saved_query", saved_id: Required, type: Invalid literal value, expected "threshold", and 18 more' + ); }); }); }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/find_rules/route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/find_rules/route.test.ts index 76d63ddcd54b0..b9a68994a0e58 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/find_rules/route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/find_rules/route.test.ts @@ -76,7 +76,7 @@ describe('Find rules route', () => { expect(result.ok).toHaveBeenCalled(); }); - test('rejects unknown query params', async () => { + test('ignores unknown query params', async () => { const request = requestMock.create({ method: 'get', path: DETECTION_ENGINE_RULES_URL_FIND, @@ -86,7 +86,7 @@ describe('Find rules route', () => { }); const result = server.validate(request); - expect(result.badRequest).toHaveBeenCalledWith('invalid keys "invalid_value"'); + expect(result.ok).toHaveBeenCalled(); }); }); }); 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 76496d26cb856..3cbd164586a9d 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 @@ -18,7 +18,7 @@ import { import type { SecuritySolutionPluginRouter } from '../../../../../../types'; import { findRules } from '../../../logic/search/find_rules'; import { buildSiemResponse } from '../../../../routes/utils'; -import { buildRouteValidation } from '../../../../../../utils/build_validation/route_validation'; +import { buildRouteValidationWithZod } from '../../../../../../utils/build_validation/route_validation'; import { transformFindAlerts } from '../../../utils/utils'; export const findRulesRoute = (router: SecuritySolutionPluginRouter, logger: Logger) => { @@ -35,7 +35,7 @@ export const findRulesRoute = (router: SecuritySolutionPluginRouter, logger: Log version: '2023-10-31', validate: { request: { - query: buildRouteValidation(FindRulesRequestQuery), + query: buildRouteValidationWithZod(FindRulesRequestQuery), }, }, }, @@ -63,11 +63,7 @@ export const findRulesRoute = (router: SecuritySolutionPluginRouter, logger: Log }); const transformed = transformFindAlerts(rules); - if (transformed == null) { - return siemResponse.error({ statusCode: 500, body: 'Internal error transforming' }); - } else { - return response.ok({ body: transformed ?? {} }); - } + return response.ok({ body: transformed ?? {} }); } catch (err) { const error = transformError(err); return siemResponse.error({ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/patch_rule/route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/patch_rule/route.test.ts index 677556f314239..1255287cf52f5 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/patch_rule/route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/patch_rule/route.test.ts @@ -199,7 +199,9 @@ describe('Patch rule route', () => { }); const result = server.validate(request); - expect(result.badRequest).toHaveBeenCalledWith('Invalid input'); + expect(result.badRequest).toHaveBeenCalledWith( + 'type: Invalid literal value, expected "eql", language: Invalid literal value, expected "eql", type: Invalid literal value, expected "query", type: Invalid literal value, expected "saved_query", type: Invalid literal value, expected "threshold", and 5 more' + ); }); test('allows rule type of query and custom from and interval', async () => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/update_rule/route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/update_rule/route.test.ts index e580f5cc11662..f95b10fa6154f 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/update_rule/route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/api/rules/update_rule/route.test.ts @@ -23,7 +23,7 @@ import { getUpdateRulesSchemaMock, } from '../../../../../../../common/api/detection_engine/model/rule_schema/mocks'; import { getQueryRuleParams } from '../../../../rule_schema/mocks'; -import { RESPONSE_ACTION_TYPES } from '../../../../../../../common/api/detection_engine/model/rule_response_actions'; +import { ResponseActionTypesEnum } from '../../../../../../../common/api/detection_engine/model/rule_response_actions'; jest.mock('../../../../../machine_learning/authz'); @@ -245,7 +245,7 @@ describe('Update rule route', () => { ...getQueryRuleParams(), responseActions: [ { - actionTypeId: RESPONSE_ACTION_TYPES.ENDPOINT, + actionTypeId: ResponseActionTypesEnum['.endpoint'], params: { command: 'isolate', comment: '', @@ -283,7 +283,9 @@ describe('Update rule route', () => { }, }); const result = await server.validate(request); - expect(result.badRequest).toHaveBeenCalledWith('Invalid input'); + expect(result.badRequest).toHaveBeenCalledWith( + 'type: Invalid literal value, expected "eql", language: Invalid literal value, expected "eql", type: Invalid literal value, expected "saved_query", saved_id: Required, type: Invalid literal value, expected "threshold", and 18 more' + ); }); }); }); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/action_to_rules_client_operation.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/action_to_rules_client_operation.test.ts index e598715e8f9ec..e214b7dc3b341 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/action_to_rules_client_operation.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/action_to_rules_client_operation.test.ts @@ -5,13 +5,16 @@ * 2.0. */ -import { BulkActionEditType } from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { BulkActionEditTypeEnum } from '../../../../../../common/api/detection_engine/rule_management'; import { bulkEditActionToRulesClientOperation } from './action_to_rules_client_operation'; describe('bulkEditActionToRulesClientOperation', () => { test('should transform tags bulk edit actions correctly', () => { expect( - bulkEditActionToRulesClientOperation({ type: BulkActionEditType.add_tags, value: ['test'] }) + bulkEditActionToRulesClientOperation({ + type: BulkActionEditTypeEnum.add_tags, + value: ['test'], + }) ).toEqual([ { field: 'tags', @@ -22,7 +25,7 @@ describe('bulkEditActionToRulesClientOperation', () => { }); expect( - bulkEditActionToRulesClientOperation({ type: BulkActionEditType.set_tags, value: ['test'] }) + bulkEditActionToRulesClientOperation({ type: BulkActionEditTypeEnum.set_tags, value: ['test'] }) ).toEqual([ { field: 'tags', @@ -32,7 +35,10 @@ describe('bulkEditActionToRulesClientOperation', () => { ]); expect( - bulkEditActionToRulesClientOperation({ type: BulkActionEditType.delete_tags, value: ['test'] }) + bulkEditActionToRulesClientOperation({ + type: BulkActionEditTypeEnum.delete_tags, + value: ['test'], + }) ).toEqual([ { field: 'tags', @@ -44,7 +50,7 @@ describe('bulkEditActionToRulesClientOperation', () => { test('should transform schedule bulk edit correctly', () => { expect( bulkEditActionToRulesClientOperation({ - type: BulkActionEditType.set_schedule, + type: BulkActionEditTypeEnum.set_schedule, value: { interval: '100m', lookback: '10m', diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/action_to_rules_client_operation.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/action_to_rules_client_operation.ts index dfd4ee64c0787..eac694f97944b 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/action_to_rules_client_operation.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/action_to_rules_client_operation.ts @@ -8,8 +8,8 @@ import type { BulkEditOperation } from '@kbn/alerting-plugin/server'; import { transformNormalizedRuleToAlertAction } from '../../../../../../common/detection_engine/transform_actions'; -import type { BulkActionEditForRuleAttributes } from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; -import { BulkActionEditType } from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import type { BulkActionEditForRuleAttributes } from '../../../../../../common/api/detection_engine/rule_management'; +import { BulkActionEditTypeEnum } from '../../../../../../common/api/detection_engine/rule_management'; import { assertUnreachable } from '../../../../../../common/utility_types'; import { transformToActionFrequency } from '../../normalization/rule_actions'; @@ -23,7 +23,7 @@ export const bulkEditActionToRulesClientOperation = ( ): BulkEditOperation[] => { switch (action.type) { // tags actions - case BulkActionEditType.add_tags: + case BulkActionEditTypeEnum.add_tags: return [ { field: 'tags', @@ -32,7 +32,7 @@ export const bulkEditActionToRulesClientOperation = ( }, ]; - case BulkActionEditType.delete_tags: + case BulkActionEditTypeEnum.delete_tags: return [ { field: 'tags', @@ -41,7 +41,7 @@ export const bulkEditActionToRulesClientOperation = ( }, ]; - case BulkActionEditType.set_tags: + case BulkActionEditTypeEnum.set_tags: return [ { field: 'tags', @@ -51,7 +51,7 @@ export const bulkEditActionToRulesClientOperation = ( ]; // rule actions - case BulkActionEditType.add_rule_actions: + case BulkActionEditTypeEnum.add_rule_actions: return [ { field: 'actions', @@ -62,7 +62,7 @@ export const bulkEditActionToRulesClientOperation = ( }, ]; - case BulkActionEditType.set_rule_actions: + case BulkActionEditTypeEnum.set_rule_actions: return [ { field: 'actions', @@ -74,7 +74,7 @@ export const bulkEditActionToRulesClientOperation = ( ]; // schedule actions - case BulkActionEditType.set_schedule: + case BulkActionEditTypeEnum.set_schedule: return [ { field: 'schedule', 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 76034819b508d..fd2f1644480c0 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 @@ -7,7 +7,7 @@ import type { RulesClient } from '@kbn/alerting-plugin/server'; -import type { BulkActionEditPayload } from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import type { BulkActionEditPayload } from '../../../../../../common/api/detection_engine/rule_management'; import type { MlAuthz } from '../../../../machine_learning/authz'; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/rule_params_modifier.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/rule_params_modifier.test.ts index 0337558099532..93044fc0fed18 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/rule_params_modifier.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/rule_params_modifier.test.ts @@ -6,7 +6,7 @@ */ import { addItemsToArray, deleteItemsFromArray, ruleParamsModifier } from './rule_params_modifier'; -import { BulkActionEditType } from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { BulkActionEditTypeEnum } from '../../../../../../common/api/detection_engine/rule_management'; import type { RuleAlertType } from '../../../rule_schema'; describe('addItemsToArray', () => { @@ -47,7 +47,7 @@ describe('ruleParamsModifier', () => { test('should increment version if rule is custom (immutable === false)', () => { const { modifiedParams } = ruleParamsModifier(ruleParamsMock, [ { - type: BulkActionEditType.add_index_patterns, + type: BulkActionEditTypeEnum.add_index_patterns, value: ['my-index-*'], }, ]); @@ -57,7 +57,7 @@ describe('ruleParamsModifier', () => { test('should not increment version if rule is prebuilt (immutable === true)', () => { const { modifiedParams } = ruleParamsModifier({ ...ruleParamsMock, immutable: true }, [ { - type: BulkActionEditType.add_index_patterns, + type: BulkActionEditTypeEnum.add_index_patterns, value: ['my-index-*'], }, ]); @@ -130,7 +130,7 @@ describe('ruleParamsModifier', () => { { ...ruleParamsMock, index: existingIndexPatterns } as RuleAlertType['params'], [ { - type: BulkActionEditType.add_index_patterns, + type: BulkActionEditTypeEnum.add_index_patterns, value: indexPatternsToAdd, }, ] @@ -194,7 +194,7 @@ describe('ruleParamsModifier', () => { { ...ruleParamsMock, index: existingIndexPatterns } as RuleAlertType['params'], [ { - type: BulkActionEditType.delete_index_patterns, + type: BulkActionEditTypeEnum.delete_index_patterns, value: indexPatternsToDelete, }, ] @@ -249,7 +249,7 @@ describe('ruleParamsModifier', () => { { ...ruleParamsMock, index: existingIndexPatterns } as RuleAlertType['params'], [ { - type: BulkActionEditType.set_index_patterns, + type: BulkActionEditTypeEnum.set_index_patterns, value: indexPatternsToOverwrite, }, ] @@ -267,7 +267,7 @@ describe('ruleParamsModifier', () => { { dataViewId: testDataViewId } as RuleAlertType['params'], [ { - type: BulkActionEditType.delete_index_patterns, + type: BulkActionEditTypeEnum.delete_index_patterns, value: ['index-2-*'], }, ] @@ -281,7 +281,7 @@ describe('ruleParamsModifier', () => { { dataViewId: 'test-data-view', index: ['test-*'] } as RuleAlertType['params'], [ { - type: BulkActionEditType.set_index_patterns, + type: BulkActionEditTypeEnum.set_index_patterns, value: ['index'], overwrite_data_views: true, }, @@ -296,7 +296,7 @@ describe('ruleParamsModifier', () => { { dataViewId: 'test-data-view', index: ['test-*'] } as RuleAlertType['params'], [ { - type: BulkActionEditType.add_index_patterns, + type: BulkActionEditTypeEnum.add_index_patterns, value: ['index'], overwrite_data_views: true, }, @@ -311,7 +311,7 @@ describe('ruleParamsModifier', () => { { dataViewId: 'test-data-view', index: ['test-*', 'index'] } as RuleAlertType['params'], [ { - type: BulkActionEditType.delete_index_patterns, + type: BulkActionEditTypeEnum.delete_index_patterns, value: ['index'], overwrite_data_views: true, }, @@ -327,7 +327,7 @@ describe('ruleParamsModifier', () => { { dataViewId: 'test-data-view', index: undefined } as RuleAlertType['params'], [ { - type: BulkActionEditType.delete_index_patterns, + type: BulkActionEditTypeEnum.delete_index_patterns, value: ['index'], overwrite_data_views: true, }, @@ -342,7 +342,7 @@ describe('ruleParamsModifier', () => { expect(() => ruleParamsModifier({ type: 'machine_learning' } as RuleAlertType['params'], [ { - type: BulkActionEditType.add_index_patterns, + type: BulkActionEditTypeEnum.add_index_patterns, value: ['my-index-*'], }, ]) @@ -355,7 +355,7 @@ describe('ruleParamsModifier', () => { expect(() => ruleParamsModifier({ type: 'machine_learning' } as RuleAlertType['params'], [ { - type: BulkActionEditType.delete_index_patterns, + type: BulkActionEditTypeEnum.delete_index_patterns, value: ['my-index-*'], }, ]) @@ -368,7 +368,7 @@ describe('ruleParamsModifier', () => { expect(() => ruleParamsModifier({ type: 'machine_learning' } as RuleAlertType['params'], [ { - type: BulkActionEditType.set_index_patterns, + type: BulkActionEditTypeEnum.set_index_patterns, value: ['my-index-*'], }, ]) @@ -381,7 +381,7 @@ describe('ruleParamsModifier', () => { expect(() => ruleParamsModifier({ type: 'esql' } as RuleAlertType['params'], [ { - type: BulkActionEditType.add_index_patterns, + type: BulkActionEditTypeEnum.add_index_patterns, value: ['my-index-*'], }, ]) @@ -392,7 +392,7 @@ describe('ruleParamsModifier', () => { expect(() => ruleParamsModifier({ type: 'esql' } as RuleAlertType['params'], [ { - type: BulkActionEditType.delete_index_patterns, + type: BulkActionEditTypeEnum.delete_index_patterns, value: ['my-index-*'], }, ]) @@ -403,7 +403,7 @@ describe('ruleParamsModifier', () => { expect(() => ruleParamsModifier({ type: 'esql' } as RuleAlertType['params'], [ { - type: BulkActionEditType.set_index_patterns, + type: BulkActionEditTypeEnum.set_index_patterns, value: ['my-index-*'], }, ]) @@ -417,7 +417,7 @@ describe('ruleParamsModifier', () => { test('should set timeline', () => { const { modifiedParams, isParamsUpdateSkipped } = ruleParamsModifier(ruleParamsMock, [ { - type: BulkActionEditType.set_timeline, + type: BulkActionEditTypeEnum.set_timeline, value: { timeline_id: '91832785-286d-4ebe-b884-1a208d111a70', timeline_title: 'Test timeline', @@ -438,7 +438,7 @@ describe('ruleParamsModifier', () => { const FROM_IN_SECONDS = (INTERVAL_IN_MINUTES + LOOKBACK_IN_MINUTES) * 60; const { modifiedParams, isParamsUpdateSkipped } = ruleParamsModifier(ruleParamsMock, [ { - type: BulkActionEditType.set_schedule, + type: BulkActionEditTypeEnum.set_schedule, value: { interval: `${INTERVAL_IN_MINUTES}m`, lookback: `${LOOKBACK_IN_MINUTES}m`, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/rule_params_modifier.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/rule_params_modifier.ts index a519aee713bec..2994d2bf7f157 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/rule_params_modifier.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/rule_params_modifier.ts @@ -12,8 +12,8 @@ import type { RuleAlertType } from '../../../rule_schema'; import type { BulkActionEditForRuleParams, BulkActionEditPayloadIndexPatterns, -} from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; -import { BulkActionEditType } from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +} from '../../../../../../common/api/detection_engine/rule_management'; +import { BulkActionEditTypeEnum } from '../../../../../../common/api/detection_engine/rule_management'; import { invariant } from '../../../../../../common/utils/invariant'; export const addItemsToArray = (arr: T[], items: T[]): T[] => @@ -52,11 +52,11 @@ const shouldSkipIndexPatternsBulkAction = ( return true; } - if (action.type === BulkActionEditType.add_index_patterns) { + if (action.type === BulkActionEditTypeEnum.add_index_patterns) { return hasIndexPatterns(indexPatterns, action); } - if (action.type === BulkActionEditType.delete_index_patterns) { + if (action.type === BulkActionEditTypeEnum.delete_index_patterns) { return hasNotIndexPattern(indexPatterns, action); } @@ -80,7 +80,7 @@ const applyBulkActionEditToRuleParams = ( switch (action.type) { // index_patterns actions // index pattern is not present in machine learning rule type, so we throw error on it - case BulkActionEditType.add_index_patterns: { + case BulkActionEditTypeEnum.add_index_patterns: { invariant( ruleParams.type !== 'machine_learning', "Index patterns can't be added. Machine learning rule doesn't have index patterns property" @@ -102,7 +102,7 @@ const applyBulkActionEditToRuleParams = ( ruleParams.index = addItemsToArray(ruleParams.index ?? [], action.value); break; } - case BulkActionEditType.delete_index_patterns: { + case BulkActionEditTypeEnum.delete_index_patterns: { invariant( ruleParams.type !== 'machine_learning', "Index patterns can't be deleted. Machine learning rule doesn't have index patterns property" @@ -129,7 +129,7 @@ const applyBulkActionEditToRuleParams = ( } break; } - case BulkActionEditType.set_index_patterns: { + case BulkActionEditTypeEnum.set_index_patterns: { invariant( ruleParams.type !== 'machine_learning', "Index patterns can't be overwritten. Machine learning rule doesn't have index patterns property" @@ -152,7 +152,7 @@ const applyBulkActionEditToRuleParams = ( break; } // timeline actions - case BulkActionEditType.set_timeline: { + case BulkActionEditTypeEnum.set_timeline: { ruleParams = { ...ruleParams, timelineId: action.value.timeline_id || undefined, @@ -162,7 +162,7 @@ const applyBulkActionEditToRuleParams = ( break; } // update look-back period in from and meta.from fields - case BulkActionEditType.set_schedule: { + case BulkActionEditTypeEnum.set_schedule: { const interval = parseInterval(action.value.interval) ?? moment.duration(0); const parsedFrom = parseInterval(action.value.lookback) ?? moment.duration(0); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/split_bulk_edit_actions.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/split_bulk_edit_actions.test.ts index 5bde6c29e6082..cdaa6ed1afb80 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/split_bulk_edit_actions.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/split_bulk_edit_actions.test.ts @@ -5,20 +5,20 @@ * 2.0. */ -import type { BulkActionEditPayload } from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; -import { BulkActionEditType } from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import type { BulkActionEditPayload } from '../../../../../../common/api/detection_engine/rule_management'; +import { BulkActionEditTypeEnum } from '../../../../../../common/api/detection_engine/rule_management'; import { splitBulkEditActions } from './split_bulk_edit_actions'; const bulkEditActions: BulkActionEditPayload[] = [ - { type: BulkActionEditType.add_index_patterns, value: ['test'] }, - { type: BulkActionEditType.set_index_patterns, value: ['test'] }, - { type: BulkActionEditType.delete_index_patterns, value: ['test'] }, - { type: BulkActionEditType.add_tags, value: ['test'] }, - { type: BulkActionEditType.delete_tags, value: ['test'] }, - { type: BulkActionEditType.set_tags, value: ['test'] }, + { type: BulkActionEditTypeEnum.add_index_patterns, value: ['test'] }, + { type: BulkActionEditTypeEnum.set_index_patterns, value: ['test'] }, + { type: BulkActionEditTypeEnum.delete_index_patterns, value: ['test'] }, + { type: BulkActionEditTypeEnum.add_tags, value: ['test'] }, + { type: BulkActionEditTypeEnum.delete_tags, value: ['test'] }, + { type: BulkActionEditTypeEnum.set_tags, value: ['test'] }, { - type: BulkActionEditType.set_timeline, + type: BulkActionEditTypeEnum.set_timeline, value: { timeline_id: 'a-1', timeline_title: 'Test title' }, }, ]; @@ -28,16 +28,16 @@ describe('splitBulkEditActions', () => { const { attributesActions, paramsActions } = splitBulkEditActions(bulkEditActions); expect(attributesActions).toEqual([ - { type: BulkActionEditType.add_tags, value: ['test'] }, - { type: BulkActionEditType.delete_tags, value: ['test'] }, - { type: BulkActionEditType.set_tags, value: ['test'] }, + { type: BulkActionEditTypeEnum.add_tags, value: ['test'] }, + { type: BulkActionEditTypeEnum.delete_tags, value: ['test'] }, + { type: BulkActionEditTypeEnum.set_tags, value: ['test'] }, ]); expect(paramsActions).toEqual([ - { type: BulkActionEditType.add_index_patterns, value: ['test'] }, - { type: BulkActionEditType.set_index_patterns, value: ['test'] }, - { type: BulkActionEditType.delete_index_patterns, value: ['test'] }, + { type: BulkActionEditTypeEnum.add_index_patterns, value: ['test'] }, + { type: BulkActionEditTypeEnum.set_index_patterns, value: ['test'] }, + { type: BulkActionEditTypeEnum.delete_index_patterns, value: ['test'] }, { - type: BulkActionEditType.set_timeline, + type: BulkActionEditTypeEnum.set_timeline, value: { timeline_id: 'a-1', timeline_title: 'Test title' }, }, ]); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/split_bulk_edit_actions.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/split_bulk_edit_actions.ts index 2896acbea0e85..da626722155ed 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/split_bulk_edit_actions.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/split_bulk_edit_actions.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { BulkActionEditType } from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import { BulkActionEditTypeEnum } from '../../../../../../common/api/detection_engine/rule_management'; import type { BulkActionEditPayload, BulkActionEditForRuleAttributes, BulkActionEditForRuleParams, -} from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +} from '../../../../../../common/api/detection_engine/rule_management'; /** * Split bulk edit actions in 2 chunks: actions applied to params and @@ -29,15 +29,15 @@ export const splitBulkEditActions = (actions: BulkActionEditPayload[]) => { return actions.reduce((acc, action) => { switch (action.type) { - case BulkActionEditType.set_schedule: + case BulkActionEditTypeEnum.set_schedule: acc.attributesActions.push(action); acc.paramsActions.push(action); break; - case BulkActionEditType.add_tags: - case BulkActionEditType.set_tags: - case BulkActionEditType.delete_tags: - case BulkActionEditType.add_rule_actions: - case BulkActionEditType.set_rule_actions: + case BulkActionEditTypeEnum.add_tags: + case BulkActionEditTypeEnum.set_tags: + case BulkActionEditTypeEnum.delete_tags: + case BulkActionEditTypeEnum.add_rule_actions: + case BulkActionEditTypeEnum.set_rule_actions: acc.attributesActions.push(action); break; default: diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/utils.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/utils.ts index 214fc16b40a49..d624d9033f299 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/utils.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/utils.ts @@ -4,7 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { BulkActionEditType } from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import type { BulkActionEditType } from '../../../../../../common/api/detection_engine/rule_management'; +import { BulkActionEditTypeEnum } from '../../../../../../common/api/detection_engine/rule_management'; /** * helper utility that defines whether bulk edit action is related to index patterns, i.e. one of: @@ -14,7 +15,7 @@ import { BulkActionEditType } from '../../../../../../common/api/detection_engin */ export const isIndexPatternsBulkEditAction = (editAction: BulkActionEditType) => [ - BulkActionEditType.add_index_patterns, - BulkActionEditType.delete_index_patterns, - BulkActionEditType.set_index_patterns, + BulkActionEditTypeEnum.add_index_patterns, + BulkActionEditTypeEnum.delete_index_patterns, + BulkActionEditTypeEnum.set_index_patterns, ].includes(editAction); diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/validations.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/validations.ts index fc8d13c27c567..4a1aef9ed28d7 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/validations.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/bulk_actions/validations.ts @@ -10,8 +10,8 @@ import { invariant } from '../../../../../../common/utils/invariant'; import { isMlRule } from '../../../../../../common/machine_learning/helpers'; import { isEsqlRule } from '../../../../../../common/detection_engine/utils'; import { BulkActionsDryRunErrCode } from '../../../../../../common/constants'; -import type { BulkActionEditPayload } from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; -import { BulkActionEditType } from '../../../../../../common/api/detection_engine/rule_management/bulk_actions/bulk_actions_route'; +import type { BulkActionEditPayload } from '../../../../../../common/api/detection_engine/rule_management'; +import { BulkActionEditTypeEnum } from '../../../../../../common/api/detection_engine/rule_management'; import type { RuleAlertType } from '../../../rule_schema'; import { isIndexPatternsBulkEditAction } from './utils'; import { throwDryRunError } from './dry_run'; @@ -100,7 +100,9 @@ export const validateBulkEditRule = async ({ */ const istEditApplicableToImmutableRule = (edit: BulkActionEditPayload[]): boolean => { return edit.every(({ type }) => - [BulkActionEditType.set_rule_actions, BulkActionEditType.add_rule_actions].includes(type) + [BulkActionEditTypeEnum.set_rule_actions, BulkActionEditTypeEnum.add_rule_actions].includes( + type + ) ); }; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/search/find_rules.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/search/find_rules.ts index 8fb5f348ae224..892610df03bea 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/search/find_rules.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/search/find_rules.ts @@ -5,42 +5,29 @@ * 2.0. */ -import * as t from 'io-ts'; - import type { FindResult, RulesClient } from '@kbn/alerting-plugin/server'; -import { NonEmptyString, UUID } from '@kbn/securitysolution-io-ts-types'; -import type { FindRulesSortFieldOrUndefined } from '../../../../../../common/api/detection_engine/rule_management'; +import type { FindRulesSortField } from '../../../../../../common/api/detection_engine/rule_management'; -import type { - FieldsOrUndefined, - PageOrUndefined, - PerPageOrUndefined, - QueryFilterOrUndefined, - SortOrderOrUndefined, -} from '../../../../../../common/api/detection_engine'; +import type { Page, PerPage, SortOrder } from '../../../../../../common/api/detection_engine'; import type { RuleParams } from '../../../rule_schema'; import { enrichFilterWithRuleTypeMapping } from './enrich_filter_with_rule_type_mappings'; import { transformSortField } from './transform_sort_field'; -type HasReferences = t.TypeOf; -const HasReferences = t.type({ - type: NonEmptyString, - id: UUID, -}); - -type HasReferencesOrUndefined = t.TypeOf; -const HasReferencesOrUndefined = t.union([HasReferences, t.undefined]); +interface HasReferences { + type: string; + id: string; +} export interface FindRuleOptions { rulesClient: RulesClient; - filter: QueryFilterOrUndefined; - fields: FieldsOrUndefined; - sortField: FindRulesSortFieldOrUndefined; - sortOrder: SortOrderOrUndefined; - page: PageOrUndefined; - perPage: PerPageOrUndefined; - hasReference?: HasReferencesOrUndefined; + filter: string | undefined; + fields: string[] | undefined; + sortField: FindRulesSortField | undefined; + sortOrder: SortOrder | undefined; + page: Page | undefined; + perPage: PerPage | undefined; + hasReference?: HasReferences | undefined; } export const findRules = ({ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/search/transform_sort_field.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/search/transform_sort_field.ts index 53573879d07df..b55e51882345a 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/search/transform_sort_field.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/logic/search/transform_sort_field.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { FindRulesSortFieldOrUndefined } from '../../../../../../common/api/detection_engine/rule_management'; +import type { FindRulesSortField } from '../../../../../../common/api/detection_engine/rule_management'; import { assertUnreachable } from '../../../../../../common/utility_types'; /** @@ -37,7 +37,7 @@ import { assertUnreachable } from '../../../../../../common/utility_types'; * @param sortField Sort field parameter from the request * @returns Sort field matching the Alerting framework schema */ -export function transformSortField(sortField: FindRulesSortFieldOrUndefined): string | undefined { +export function transformSortField(sortField?: FindRulesSortField): string | undefined { if (!sortField) { return undefined; } diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/utils/validate.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/utils/validate.test.ts index 07b9c9d0cbcd8..a513e8468d577 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/utils/validate.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_management/utils/validate.test.ts @@ -113,7 +113,8 @@ describe('validate', () => { const validatedOrError = transformValidateBulkError('rule-1', ruleAlert); const expected: BulkError = { error: { - message: 'Invalid input', + message: + 'name: Required, type: Invalid literal value, expected "eql", language: Invalid literal value, expected "eql", name: Required, name: Required, and 22 more', status_code: 500, }, rule_id: 'rule-1', diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.test.ts index c01f09f1b0534..cf6054c689cdd 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.test.ts @@ -9,8 +9,8 @@ import { serverMock, requestContextMock, requestMock } from '../../../../routes/ import { GET_RULE_EXECUTION_EVENTS_URL, - LogLevel, - RuleExecutionEventType, + LogLevelEnum, + RuleExecutionEventTypeEnum, } from '../../../../../../../common/api/detection_engine/rule_monitoring'; import { getRuleExecutionEventsResponseMock } from '../../../../../../../common/api/detection_engine/rule_monitoring/mocks'; import type { GetExecutionEventsArgs } from '../../../logic/rule_execution_log'; @@ -35,8 +35,8 @@ describe('getRuleExecutionEventsRoute', () => { ruleId: '04128c15-0d1b-4716-a4c5-46997ac7f3bd', }, query: { - event_types: `${RuleExecutionEventType['status-change']}`, - log_levels: `${LogLevel.debug},${LogLevel.info}`, + event_types: `${RuleExecutionEventTypeEnum['status-change']}`, + log_levels: `${LogLevelEnum.debug},${LogLevelEnum.info}`, page: 3, }, }); @@ -44,8 +44,8 @@ describe('getRuleExecutionEventsRoute', () => { it('passes request arguments to rule execution log', async () => { const expectedArgs: GetExecutionEventsArgs = { ruleId: '04128c15-0d1b-4716-a4c5-46997ac7f3bd', - eventTypes: [RuleExecutionEventType['status-change']], - logLevels: [LogLevel.debug, LogLevel.info], + eventTypes: [RuleExecutionEventTypeEnum['status-change']], + logLevels: [LogLevelEnum.debug, LogLevelEnum.info], sortOrder: 'desc', page: 3, perPage: 20, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.ts index 1049cbb5c89e1..4a01a6550cabc 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/api/rule_execution_logs/get_rule_execution_events/get_rule_execution_events_route.ts @@ -7,7 +7,7 @@ import { transformError } from '@kbn/securitysolution-es-utils'; import type { IKibanaResponse } from '@kbn/core/server'; -import { buildRouteValidation } from '../../../../../../utils/build_validation/route_validation'; +import { buildRouteValidationWithZod } from '../../../../../../utils/build_validation/route_validation'; import { buildSiemResponse } from '../../../../routes/utils'; import type { SecuritySolutionPluginRouter } from '../../../../../../types'; @@ -36,8 +36,8 @@ export const getRuleExecutionEventsRoute = (router: SecuritySolutionPluginRouter version: '1', validate: { request: { - params: buildRouteValidation(GetRuleExecutionEventsRequestParams), - query: buildRouteValidation(GetRuleExecutionEventsRequestQuery), + params: buildRouteValidationWithZod(GetRuleExecutionEventsRequestParams), + query: buildRouteValidationWithZod(GetRuleExecutionEventsRequestQuery), }, }, }, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/detection_engine_health/event_log/aggregations/rule_execution_stats.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/detection_engine_health/event_log/aggregations/rule_execution_stats.ts index 4151355419586..5b667770ffa5d 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/detection_engine_health/event_log/aggregations/rule_execution_stats.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/detection_engine_health/event_log/aggregations/rule_execution_stats.ts @@ -5,31 +5,32 @@ * 2.0. */ -import { mapValues } from 'lodash'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import { mapValues } from 'lodash'; import type { AggregatedMetric, + HealthOverviewStats, + LogLevel, NumberOfDetectedGaps, NumberOfExecutions, NumberOfLoggedMessages, - HealthOverviewStats, - TopMessages, RuleExecutionStatus, + TopMessages, } from '../../../../../../../../common/api/detection_engine/rule_monitoring'; import { - RuleExecutionEventType, + LogLevelEnum, + RuleExecutionEventTypeEnum, RuleExecutionStatusEnum, - LogLevel, } from '../../../../../../../../common/api/detection_engine/rule_monitoring'; -import { DEFAULT_PERCENTILES } from '../../../utils/es_aggregations'; -import type { RawData } from '../../../utils/normalization'; -import * as f from '../../../event_log/event_log_fields'; import { ALERTING_PROVIDER, RULE_EXECUTION_LOG_PROVIDER, } from '../../../event_log/event_log_constants'; +import * as f from '../../../event_log/event_log_fields'; +import { DEFAULT_PERCENTILES } from '../../../utils/es_aggregations'; +import type { RawData } from '../../../utils/normalization'; export type RuleExecutionStatsAggregationLevel = 'whole-interval' | 'histogram'; @@ -74,7 +75,7 @@ export const getRuleExecutionStatsAggregation = ( bool: { filter: [ { term: { [f.EVENT_PROVIDER]: RULE_EXECUTION_LOG_PROVIDER } }, - { term: { [f.EVENT_ACTION]: RuleExecutionEventType['status-change'] } }, + { term: { [f.EVENT_ACTION]: RuleExecutionEventTypeEnum['status-change'] } }, ], must_not: [ { @@ -101,7 +102,7 @@ export const getRuleExecutionStatsAggregation = ( bool: { filter: [ { term: { [f.EVENT_PROVIDER]: RULE_EXECUTION_LOG_PROVIDER } }, - { term: { [f.EVENT_ACTION]: RuleExecutionEventType['execution-metrics'] } }, + { term: { [f.EVENT_ACTION]: RuleExecutionEventTypeEnum['execution-metrics'] } }, ], }, }, @@ -144,8 +145,8 @@ export const getRuleExecutionStatsAggregation = ( { terms: { [f.EVENT_ACTION]: [ - RuleExecutionEventType['status-change'], - RuleExecutionEventType.message, + RuleExecutionEventTypeEnum['status-change'], + RuleExecutionEventTypeEnum.message, ], }, }, @@ -162,7 +163,7 @@ export const getRuleExecutionStatsAggregation = ( ? { errors: { filter: { - term: { [f.LOG_LEVEL]: LogLevel.error }, + term: { [f.LOG_LEVEL]: LogLevelEnum.error }, }, aggs: { topErrors: { @@ -176,7 +177,7 @@ export const getRuleExecutionStatsAggregation = ( }, warnings: { filter: { - term: { [f.LOG_LEVEL]: LogLevel.warn }, + term: { [f.LOG_LEVEL]: LogLevelEnum.warn }, }, aggs: { topWarnings: { @@ -263,11 +264,11 @@ const normalizeNumberOfLoggedMessages = ( return { total: Number(messageContainingEvents.doc_count || 0), by_level: { - error: getMessageCount(LogLevel.error), - warn: getMessageCount(LogLevel.warn), - info: getMessageCount(LogLevel.info), - debug: getMessageCount(LogLevel.debug), - trace: getMessageCount(LogLevel.trace), + error: getMessageCount(LogLevelEnum.error), + warn: getMessageCount(LogLevelEnum.warn), + info: getMessageCount(LogLevelEnum.info), + debug: getMessageCount(LogLevelEnum.debug), + trace: getMessageCount(LogLevelEnum.trace), }, }; }; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/event_log/register_event_log_provider.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/event_log/register_event_log_provider.ts index 61a321c427205..6c1accab273ad 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/event_log/register_event_log_provider.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/event_log/register_event_log_provider.ts @@ -12,6 +12,6 @@ import { RULE_EXECUTION_LOG_PROVIDER } from './event_log_constants'; export const registerEventLogProvider = (eventLogService: IEventLogService) => { eventLogService.registerProviderActions( RULE_EXECUTION_LOG_PROVIDER, - Object.keys(RuleExecutionEventType) + RuleExecutionEventType.options ); }; diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/client_for_executors/client.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/client_for_executors/client.ts index 101884b284ebc..8e9a2970f5dbf 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/client_for_executors/client.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/client_for_executors/client.ts @@ -16,9 +16,9 @@ import type { import type { RuleExecutionSettings, RuleExecutionStatus, + LogLevel, } from '../../../../../../../common/api/detection_engine/rule_monitoring'; import { - LogLevel, logLevelFromExecutionStatus, LogLevelSetting, logLevelToNumber, @@ -38,6 +38,7 @@ import type { StatusChangeArgs, } from './client_interface'; import type { RuleExecutionMetrics } from '../../../../../../../common/api/detection_engine/rule_monitoring/model'; +import { LogLevelEnum } from '../../../../../../../common/api/detection_engine/rule_monitoring/model'; export const createRuleExecutionLogClientForExecutors = ( settings: RuleExecutionSettings, @@ -59,23 +60,23 @@ export const createRuleExecutionLogClientForExecutors = ( }, trace(...messages: string[]): void { - writeMessage(messages, LogLevel.trace); + writeMessage(messages, LogLevelEnum.trace); }, debug(...messages: string[]): void { - writeMessage(messages, LogLevel.debug); + writeMessage(messages, LogLevelEnum.debug); }, info(...messages: string[]): void { - writeMessage(messages, LogLevel.info); + writeMessage(messages, LogLevelEnum.info); }, warn(...messages: string[]): void { - writeMessage(messages, LogLevel.warn); + writeMessage(messages, LogLevelEnum.warn); }, error(...messages: string[]): void { - writeMessage(messages, LogLevel.error); + writeMessage(messages, LogLevelEnum.error); }, async logStatusChange(args: StatusChangeArgs): Promise { @@ -107,19 +108,19 @@ export const createRuleExecutionLogClientForExecutors = ( const writeMessageToConsole = (message: string, logLevel: LogLevel, logMeta: ExtMeta): void => { switch (logLevel) { - case LogLevel.trace: + case LogLevelEnum.trace: logger.trace(`${message} ${baseLogSuffix}`, logMeta); break; - case LogLevel.debug: + case LogLevelEnum.debug: logger.debug(`${message} ${baseLogSuffix}`, logMeta); break; - case LogLevel.info: + case LogLevelEnum.info: logger.info(`${message} ${baseLogSuffix}`, logMeta); break; - case LogLevel.warn: + case LogLevelEnum.warn: logger.warn(`${message} ${baseLogSuffix}`, logMeta); break; - case LogLevel.error: + case LogLevelEnum.error: logger.error(`${message} ${baseLogSuffix}`, logMeta); break; default: @@ -152,7 +153,7 @@ export const createRuleExecutionLogClientForExecutors = ( const writeExceptionToConsole = (e: unknown, message: string, logMeta: ExtMeta): void => { const logReason = e instanceof Error ? e.stack ?? e.message : String(e); - writeMessageToConsole(`${message}. Reason: ${logReason}`, LogLevel.error, logMeta); + writeMessageToConsole(`${message}. Reason: ${logReason}`, LogLevelEnum.error, logMeta); }; const writeStatusChangeToConsole = (args: NormalizedStatusChangeArgs, logMeta: ExtMeta): void => { diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/event_log/event_log_reader.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/event_log/event_log_reader.ts index fae8b6cfe9f5c..669f3d7e5ee04 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/event_log/event_log_reader.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/event_log/event_log_reader.ts @@ -9,7 +9,6 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import type { IEventLogClient, IValidatedEvent } from '@kbn/event-log-plugin/server'; import { MAX_EXECUTION_EVENTS_DISPLAYED } from '@kbn/securitysolution-rules'; -import { prepareKQLStringParam } from '../../../../../../../common/utils/kql'; import type { GetRuleExecutionEventsResponse, GetRuleExecutionResultsResponse, @@ -17,10 +16,11 @@ import type { } from '../../../../../../../common/api/detection_engine/rule_monitoring'; import { LogLevel, - logLevelFromString, + LogLevelEnum, RuleExecutionEventType, - ruleExecutionEventTypeFromString, + RuleExecutionEventTypeEnum, } from '../../../../../../../common/api/detection_engine/rule_monitoring'; +import { prepareKQLStringParam } from '../../../../../../../common/utils/kql'; import { assertUnreachable } from '../../../../../../../common/utility_types'; import { invariant } from '../../../../../../../common/utils/invariant'; @@ -38,11 +38,11 @@ import { } from './aggregations/execution_results'; import type { ExecutionUuidAggResult } from './aggregations/execution_results/types'; -import * as f from '../../event_log/event_log_fields'; import { RULE_EXECUTION_LOG_PROVIDER, RULE_SAVED_OBJECT_TYPE, } from '../../event_log/event_log_constants'; +import * as f from '../../event_log/event_log_fields'; export interface IEventLogReader { getExecutionEvents(args: GetExecutionEventsArgs): Promise; @@ -211,25 +211,27 @@ const normalizeEventSequence = (event: RawEvent): number => { const normalizeLogLevel = (event: RawEvent): LogLevel => { const value = event.log?.level; if (!value) { - return LogLevel.debug; + return LogLevelEnum.debug; } - return logLevelFromString(value) ?? LogLevel.trace; + const result = LogLevel.safeParse(value); + return result.success ? result.data : LogLevelEnum.trace; }; const normalizeEventType = (event: RawEvent): RuleExecutionEventType => { const value = event.event?.action; invariant(value, 'Required "event.action" field is not found'); - return ruleExecutionEventTypeFromString(value) ?? RuleExecutionEventType.message; + const result = RuleExecutionEventType.safeParse(value); + return result.success ? result.data : RuleExecutionEventTypeEnum.message; }; const normalizeEventMessage = (event: RawEvent, type: RuleExecutionEventType): string => { - if (type === RuleExecutionEventType.message) { + if (type === RuleExecutionEventTypeEnum.message) { return event.message || ''; } - if (type === RuleExecutionEventType['status-change']) { + if (type === RuleExecutionEventTypeEnum['status-change']) { invariant( event.kibana?.alert?.rule?.execution?.status, 'Required "kibana.alert.rule.execution.status" field is not found' @@ -241,7 +243,7 @@ const normalizeEventMessage = (event: RawEvent, type: RuleExecutionEventType): s return `Rule changed status to "${status}". ${message}`; } - if (type === RuleExecutionEventType['execution-metrics']) { + if (type === RuleExecutionEventTypeEnum['execution-metrics']) { invariant( event.kibana?.alert?.rule?.execution?.metrics, 'Required "kibana.alert.rule.execution.metrics" field is not found' diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/event_log/event_log_writer.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/event_log/event_log_writer.ts index 89696e7175a30..b0963546100e2 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/event_log/event_log_writer.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_monitoring/logic/rule_execution_log/event_log/event_log_writer.ts @@ -8,17 +8,20 @@ import { SavedObjectsUtils } from '@kbn/core/server'; import type { IEventLogService } from '@kbn/event-log-plugin/server'; import { SAVED_OBJECT_REL_PRIMARY } from '@kbn/event-log-plugin/server'; +import type { LogLevel } from '../../../../../../../common/api/detection_engine/rule_monitoring'; import { - LogLevel, logLevelFromExecutionStatus, logLevelToNumber, - RuleExecutionEventType, ruleExecutionStatusToNumber, } from '../../../../../../../common/api/detection_engine/rule_monitoring'; import type { RuleExecutionMetrics, RuleExecutionStatus, } from '../../../../../../../common/api/detection_engine/rule_monitoring/model'; +import { + LogLevelEnum, + RuleExecutionEventTypeEnum, +} from '../../../../../../../common/api/detection_engine/rule_monitoring/model'; import { RULE_SAVED_OBJECT_TYPE, RULE_EXECUTION_LOG_PROVIDER, @@ -74,7 +77,7 @@ export const createEventLogWriter = (eventLogService: IEventLogService): IEventL }, event: { kind: 'event', - action: RuleExecutionEventType.message, + action: RuleExecutionEventTypeEnum.message, sequence: sequence++, severity: logLevelToNumber(args.logLevel), }, @@ -116,7 +119,7 @@ export const createEventLogWriter = (eventLogService: IEventLogService): IEventL }, event: { kind: 'event', - action: RuleExecutionEventType['status-change'], + action: RuleExecutionEventTypeEnum['status-change'], sequence: sequence++, severity: logLevelToNumber(logLevel), }, @@ -148,7 +151,7 @@ export const createEventLogWriter = (eventLogService: IEventLogService): IEventL }, logExecutionMetrics: (args: ExecutionMetricsArgs): void => { - const logLevel = LogLevel.debug; + const logLevel = LogLevelEnum.debug; eventLogger.logEvent({ '@timestamp': nowISO(), rule: { @@ -159,7 +162,7 @@ export const createEventLogWriter = (eventLogService: IEventLogService): IEventL }, event: { kind: 'metric', - action: RuleExecutionEventType['execution-metrics'], + action: RuleExecutionEventTypeEnum['execution-metrics'], sequence: sequence++, severity: logLevelToNumber(logLevel), }, diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions/schedule_notification_response_actions.test.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions/schedule_notification_response_actions.test.ts index fcec7e98c06c2..672434bfc94d0 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions/schedule_notification_response_actions.test.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions/schedule_notification_response_actions.test.ts @@ -7,7 +7,7 @@ import { getScheduleNotificationResponseActionsService } from './schedule_notification_response_actions'; import type { RuleResponseAction } from '../../../../common/api/detection_engine/model/rule_response_actions'; -import { RESPONSE_ACTION_TYPES } from '../../../../common/api/detection_engine/model/rule_response_actions'; +import { ResponseActionTypesEnum } from '../../../../common/api/detection_engine/model/rule_response_actions'; describe('ScheduleNotificationResponseActions', () => { const signalOne = { agent: { id: 'agent-id-1' }, _id: 'alert-id-1', user: { id: 'S-1-5-20' } }; @@ -68,7 +68,7 @@ describe('ScheduleNotificationResponseActions', () => { it('should handle osquery response actions with query', async () => { const responseActions: RuleResponseAction[] = [ { - actionTypeId: RESPONSE_ACTION_TYPES.OSQUERY, + actionTypeId: ResponseActionTypesEnum['.osquery'], params: { ...defaultQueryParams, query: simpleQuery, @@ -86,7 +86,7 @@ describe('ScheduleNotificationResponseActions', () => { it('should handle osquery response actions with packs', async () => { const responseActions: RuleResponseAction[] = [ { - actionTypeId: RESPONSE_ACTION_TYPES.OSQUERY, + actionTypeId: ResponseActionTypesEnum['.osquery'], params: { ...defaultPackParams, queries: [ diff --git a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions/schedule_notification_response_actions.ts b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions/schedule_notification_response_actions.ts index 25efe01d15f05..a02fafe69d8f6 100644 --- a/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions/schedule_notification_response_actions.ts +++ b/x-pack/plugins/security_solution/server/lib/detection_engine/rule_response_actions/schedule_notification_response_actions.ts @@ -8,7 +8,7 @@ import { each } from 'lodash'; import type { EndpointAppContextService } from '../../../endpoint/endpoint_app_context_services'; import type { SetupPlugins } from '../../../plugin_contract'; -import { RESPONSE_ACTION_TYPES } from '../../../../common/api/detection_engine/model/rule_response_actions'; +import { ResponseActionTypesEnum } from '../../../../common/api/detection_engine/model/rule_response_actions'; import { osqueryResponseAction } from './osquery_response_action'; import { endpointResponseAction } from './endpoint_response_action'; import type { ScheduleNotificationActions } from '../rule_types/types'; @@ -29,14 +29,14 @@ export const getScheduleNotificationResponseActionsService = each(responseActions, (responseAction) => { if ( - responseAction.actionTypeId === RESPONSE_ACTION_TYPES.OSQUERY && + responseAction.actionTypeId === ResponseActionTypesEnum['.osquery'] && osqueryCreateActionService ) { osqueryResponseAction(responseAction, osqueryCreateActionService, { alerts, }); } - if (responseAction.actionTypeId === RESPONSE_ACTION_TYPES.ENDPOINT) { + if (responseAction.actionTypeId === ResponseActionTypesEnum['.endpoint']) { endpointResponseAction(responseAction, endpointAppContextService, { alerts, }); diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/calculate_and_persist_risk_scores.mock.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/calculate_and_persist_risk_scores.mock.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/risk_engine/calculate_and_persist_risk_scores.mock.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/calculate_and_persist_risk_scores.mock.ts diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/calculate_and_persist_risk_scores.test.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/calculate_and_persist_risk_scores.test.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/risk_engine/calculate_and_persist_risk_scores.test.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/calculate_and_persist_risk_scores.test.ts diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/calculate_and_persist_risk_scores.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/calculate_and_persist_risk_scores.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/risk_engine/calculate_and_persist_risk_scores.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/calculate_and_persist_risk_scores.ts diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/calculate_risk_scores.mock.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/calculate_risk_scores.mock.ts similarity index 97% rename from x-pack/plugins/security_solution/server/lib/risk_engine/calculate_risk_scores.mock.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/calculate_risk_scores.mock.ts index 183a00eb0fe5c..c81d1336c162b 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/calculate_risk_scores.mock.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/calculate_risk_scores.mock.ts @@ -9,7 +9,7 @@ import { ALERT_RISK_SCORE, ALERT_RULE_NAME, } from '@kbn/rule-registry-plugin/common/technical_rule_data_field_names'; -import { RiskCategories } from '../../../common/risk_engine'; +import { RiskCategories } from '../../../../common/risk_engine'; import type { CalculateRiskScoreAggregations, CalculateScoresResponse, diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/calculate_risk_scores.test.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/calculate_risk_scores.test.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/risk_engine/calculate_risk_scores.test.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/calculate_risk_scores.test.ts diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/calculate_risk_scores.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/calculate_risk_scores.ts similarity index 97% rename from x-pack/plugins/security_solution/server/lib/risk_engine/calculate_risk_scores.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/calculate_risk_scores.ts index a5c22b867b72f..ecacf95020251 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/calculate_risk_scores.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/calculate_risk_scores.ts @@ -22,9 +22,9 @@ import type { IdentifierType, RiskWeights, RiskScore, -} from '../../../common/risk_engine'; -import { RiskCategories } from '../../../common/risk_engine'; -import { withSecuritySpan } from '../../utils/with_security_span'; +} from '../../../../common/risk_engine'; +import { RiskCategories } from '../../../../common/risk_engine'; +import { withSecuritySpan } from '../../../utils/with_security_span'; import { getAfterKeyForIdentifierType, getFieldForIdentifierAgg } from './helpers'; import { buildCategoryCountDeclarations, diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/configurations.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/configurations.ts similarity index 97% rename from x-pack/plugins/security_solution/server/lib/risk_engine/configurations.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/configurations.ts index 6f9a49bb47bbb..35547187e4ddc 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/configurations.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/configurations.ts @@ -5,8 +5,8 @@ * 2.0. */ import type { FieldMap } from '@kbn/alerts-as-data-utils'; -import type { IdentifierType } from '../../../common/risk_engine'; -import { RiskScoreEntity, riskScoreBaseIndexName } from '../../../common/risk_engine'; +import type { IdentifierType } from '../../../../common/risk_engine'; +import { RiskScoreEntity, riskScoreBaseIndexName } from '../../../../common/risk_engine'; import type { IIndexPatternString } from './utils/create_datastream'; const commonRiskFields: FieldMap = { diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/get_risk_inputs_index.mock.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/get_risk_inputs_index.mock.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/risk_engine/get_risk_inputs_index.mock.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/get_risk_inputs_index.mock.ts diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/get_risk_inputs_index.test.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/get_risk_inputs_index.test.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/risk_engine/get_risk_inputs_index.test.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/get_risk_inputs_index.test.ts diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/get_risk_inputs_index.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/get_risk_inputs_index.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/risk_engine/get_risk_inputs_index.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/get_risk_inputs_index.ts diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/helpers.test.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/helpers.test.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/risk_engine/helpers.test.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/helpers.test.ts diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/helpers.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/helpers.ts similarity index 97% rename from x-pack/plugins/security_solution/server/lib/risk_engine/helpers.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/helpers.ts index 90a7b0c54c275..09836ff94fe2d 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/helpers.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/helpers.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { AfterKey, AfterKeys, IdentifierType } from '../../../common/risk_engine'; +import type { AfterKey, AfterKeys, IdentifierType } from '../../../../common/risk_engine'; import type { CalculateAndPersistScoresResponse } from './types'; export const getFieldForIdentifierAgg = (identifierType: IdentifierType): string => diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/risk_engine_data_client.mock.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_engine_data_client.mock.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/risk_engine/risk_engine_data_client.mock.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_engine_data_client.mock.ts diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/risk_engine_data_client.test.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_engine_data_client.test.ts similarity index 99% rename from x-pack/plugins/security_solution/server/lib/risk_engine/risk_engine_data_client.test.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_engine_data_client.test.ts index 8dc2da15c2e18..619952859fc0f 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/risk_engine_data_client.test.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_engine_data_client.test.ts @@ -67,7 +67,7 @@ jest.mock('./utils/create_datastream', () => ({ createDataStream: jest.fn(), })); -jest.mock('../risk_score/transform/helpers/transforms', () => ({ +jest.mock('../../risk_score/transform/helpers/transforms', () => ({ createAndStartTransform: jest.fn(), })); diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/risk_engine_data_client.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_engine_data_client.ts similarity index 97% rename from x-pack/plugins/security_solution/server/lib/risk_engine/risk_engine_data_client.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_engine_data_client.ts index 269f4b6dad9fd..ea564ffe2395c 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/risk_engine_data_client.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_engine_data_client.ts @@ -26,13 +26,13 @@ import { import { createDataStream } from './utils/create_datastream'; import type { RiskEngineDataWriter as Writer } from './risk_engine_data_writer'; import { RiskEngineDataWriter } from './risk_engine_data_writer'; -import type { InitRiskEngineResult } from '../../../common/risk_engine'; +import type { InitRiskEngineResult } from '../../../../common/risk_engine'; import { RiskEngineStatus, getRiskScoreLatestIndex, MAX_SPACES_COUNT, RiskScoreEntity, -} from '../../../common/risk_engine'; +} from '../../../../common/risk_engine'; import { getLegacyTransforms, getLatestTransformId, @@ -48,7 +48,7 @@ import { import { getRiskInputsIndex } from './get_risk_inputs_index'; import { removeRiskScoringTask, startRiskScoringTask } from './tasks'; import { createIndex } from './utils/create_index'; -import { bulkDeleteSavedObjects } from '../risk_score/prebuilt_saved_objects/helpers/bulk_delete_saved_objects'; +import { bulkDeleteSavedObjects } from '../../risk_score/prebuilt_saved_objects/helpers/bulk_delete_saved_objects'; interface InitOpts { namespace: string; diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/risk_engine_data_writer.test.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_engine_data_writer.test.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/risk_engine/risk_engine_data_writer.test.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_engine_data_writer.test.ts diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/risk_engine_data_writer.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_engine_data_writer.ts similarity index 97% rename from x-pack/plugins/security_solution/server/lib/risk_engine/risk_engine_data_writer.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_engine_data_writer.ts index a897dd0462f69..8e859449bb32d 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/risk_engine_data_writer.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_engine_data_writer.ts @@ -7,7 +7,7 @@ import type { BulkOperationContainer } from '@elastic/elasticsearch/lib/api/types'; import type { Logger, ElasticsearchClient } from '@kbn/core/server'; -import type { IdentifierType, RiskScore } from '../../../common/risk_engine'; +import type { IdentifierType, RiskScore } from '../../../../common/risk_engine'; interface WriterBulkResponse { errors: string[]; diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/risk_score_service.mock.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_score_service.mock.ts similarity index 94% rename from x-pack/plugins/security_solution/server/lib/risk_engine/risk_score_service.mock.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_score_service.mock.ts index 54fd66c7d3e97..68b5b55dbda42 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/risk_score_service.mock.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_score_service.mock.ts @@ -6,7 +6,7 @@ */ import type { RiskScoreService } from './risk_score_service'; -import type { RiskScore } from '../../../common/risk_engine'; +import type { RiskScore } from '../../../../common/risk_engine'; const createRiskScoreMock = (overrides: Partial = {}): RiskScore => ({ '@timestamp': '2023-02-15T00:15:19.231Z', diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/risk_score_service.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_score_service.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/risk_engine/risk_score_service.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_score_service.ts diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/risk_weights.test.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_weights.test.ts similarity index 97% rename from x-pack/plugins/security_solution/server/lib/risk_engine/risk_weights.test.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_weights.test.ts index 0bc25121771bd..40b3ee800b1bd 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/risk_weights.test.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_weights.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { RiskWeightTypes, RiskCategories } from '../../../common/risk_engine'; +import { RiskWeightTypes, RiskCategories } from '../../../../common/risk_engine'; import { buildCategoryAssignment, buildCategoryWeights, diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/risk_weights.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_weights.ts similarity index 96% rename from x-pack/plugins/security_solution/server/lib/risk_engine/risk_weights.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_weights.ts index 34ab491b74b04..225887f2dce55 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/risk_weights.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/risk_weights.ts @@ -12,8 +12,8 @@ import type { RiskCategoryRiskWeight, RiskWeight, RiskWeights, -} from '../../../common/risk_engine'; -import { RiskCategories, RiskWeightTypes } from '../../../common/risk_engine'; +} from '../../../../common/risk_engine'; +import { RiskCategories, RiskWeightTypes } from '../../../../common/risk_engine'; const RISK_CATEGORIES = Object.values(RiskCategories); diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/index.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/index.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/risk_engine/routes/index.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/index.ts diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_disable_route.test.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/risk_engine_disable_route.test.ts similarity index 88% rename from x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_disable_route.test.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/risk_engine_disable_route.test.ts index e7c162ddd08e8..23e58896199a9 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_disable_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/risk_engine_disable_route.test.ts @@ -8,15 +8,15 @@ import { taskManagerMock } from '@kbn/task-manager-plugin/server/mocks'; import { riskEngineDisableRoute } from './risk_engine_disable_route'; -import { RISK_ENGINE_DISABLE_URL } from '../../../../common/constants'; +import { RISK_ENGINE_DISABLE_URL } from '../../../../../common/constants'; import { serverMock, requestContextMock, requestMock, -} from '../../detection_engine/routes/__mocks__'; +} from '../../../detection_engine/routes/__mocks__'; import { riskEngineDataClientMock } from '../risk_engine_data_client.mock'; -describe('risk score calculation route', () => { +describe('risk score disable route', () => { let server: ReturnType; let context: ReturnType; let mockTaskManagerStart: ReturnType; @@ -78,7 +78,7 @@ describe('risk score calculation route', () => { const response = await server.inject(request, context); expect(response.status).toEqual(500); - expect(response.body.message.message).toEqual('something went wrong'); + expect(response.body.message).toEqual('something went wrong'); }); }); @@ -94,10 +94,8 @@ describe('risk score calculation route', () => { expect(response.status).toEqual(400); expect(response.body).toEqual({ - message: { - message: - 'Task Manager is unavailable, but is required to disable the risk engine. Please enable the taskManager plugin and try again.', - }, + message: + 'Task Manager is unavailable, but is required by the risk engine. Please enable the taskManager plugin and try again.', status_code: 400, }); }); diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_disable_route.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/risk_engine_disable_route.ts similarity index 80% rename from x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_disable_route.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/risk_engine_disable_route.ts index b5ae6287c40fd..dde7ddbee9e83 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_disable_route.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/risk_engine_disable_route.ts @@ -8,9 +8,10 @@ import type { StartServicesAccessor } from '@kbn/core/server'; import { buildSiemResponse } from '@kbn/lists-plugin/server/routes/utils'; import { transformError } from '@kbn/securitysolution-es-utils'; -import { RISK_ENGINE_DISABLE_URL, APP_ID } from '../../../../common/constants'; -import type { StartPlugins } from '../../../plugin'; -import type { SecuritySolutionPluginRouter } from '../../../types'; +import { RISK_ENGINE_DISABLE_URL, APP_ID } from '../../../../../common/constants'; +import type { StartPlugins } from '../../../../plugin'; +import type { SecuritySolutionPluginRouter } from '../../../../types'; +import { TASK_MANAGER_UNAVAILABLE_ERROR } from './translations'; export const riskEngineDisableRoute = ( router: SecuritySolutionPluginRouter, @@ -34,10 +35,7 @@ export const riskEngineDisableRoute = ( if (!taskManager) { return siemResponse.error({ statusCode: 400, - body: { - message: - 'Task Manager is unavailable, but is required to disable the risk engine. Please enable the taskManager plugin and try again.', - }, + body: TASK_MANAGER_UNAVAILABLE_ERROR, }); } @@ -50,6 +48,7 @@ export const riskEngineDisableRoute = ( return siemResponse.error({ statusCode: error.statusCode, body: { message: error.message, full_error: JSON.stringify(e) }, + bypassErrorFormat: true, }); } }); diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_enable_route.test.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/risk_engine_enable_route.test.ts similarity index 88% rename from x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_enable_route.test.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/risk_engine_enable_route.test.ts index 8ef30ae60e368..79a6c88c4fadf 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_enable_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/risk_engine_enable_route.test.ts @@ -8,15 +8,15 @@ import { taskManagerMock } from '@kbn/task-manager-plugin/server/mocks'; import { riskEngineEnableRoute } from './risk_engine_enable_route'; -import { RISK_ENGINE_ENABLE_URL } from '../../../../common/constants'; +import { RISK_ENGINE_ENABLE_URL } from '../../../../../common/constants'; import { serverMock, requestContextMock, requestMock, -} from '../../detection_engine/routes/__mocks__'; +} from '../../../detection_engine/routes/__mocks__'; import { riskEngineDataClientMock } from '../risk_engine_data_client.mock'; -describe('risk score calculation route', () => { +describe('risk score enable route', () => { let server: ReturnType; let context: ReturnType; let mockTaskManagerStart: ReturnType; @@ -78,7 +78,7 @@ describe('risk score calculation route', () => { const response = await server.inject(request, context); expect(response.status).toEqual(500); - expect(response.body.message.message).toEqual('something went wrong'); + expect(response.body.message).toEqual('something went wrong'); }); }); @@ -94,10 +94,8 @@ describe('risk score calculation route', () => { expect(response.status).toEqual(400); expect(response.body).toEqual({ - message: { - message: - 'Task Manager is unavailable, but is required to enable the risk engine. Please enable the taskManager plugin and try again.', - }, + message: + 'Task Manager is unavailable, but is required by the risk engine. Please enable the taskManager plugin and try again.', status_code: 400, }); }); diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_enable_route.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/risk_engine_enable_route.ts similarity index 80% rename from x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_enable_route.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/risk_engine_enable_route.ts index af5eb77374bba..bebc8b7236bb8 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_enable_route.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/risk_engine_enable_route.ts @@ -8,9 +8,10 @@ import type { StartServicesAccessor } from '@kbn/core/server'; import { buildSiemResponse } from '@kbn/lists-plugin/server/routes/utils'; import { transformError } from '@kbn/securitysolution-es-utils'; -import { RISK_ENGINE_ENABLE_URL, APP_ID } from '../../../../common/constants'; -import type { StartPlugins } from '../../../plugin'; -import type { SecuritySolutionPluginRouter } from '../../../types'; +import { RISK_ENGINE_ENABLE_URL, APP_ID } from '../../../../../common/constants'; +import { TASK_MANAGER_UNAVAILABLE_ERROR } from './translations'; +import type { StartPlugins } from '../../../../plugin'; +import type { SecuritySolutionPluginRouter } from '../../../../types'; export const riskEngineEnableRoute = ( router: SecuritySolutionPluginRouter, @@ -29,14 +30,10 @@ export const riskEngineEnableRoute = ( const [_, { taskManager }] = await getStartServices(); const securitySolution = await context.securitySolution; const riskEngineClient = securitySolution.getRiskEngineDataClient(); - if (!taskManager) { return siemResponse.error({ statusCode: 400, - body: { - message: - 'Task Manager is unavailable, but is required to enable the risk engine. Please enable the taskManager plugin and try again.', - }, + body: TASK_MANAGER_UNAVAILABLE_ERROR, }); } @@ -49,6 +46,7 @@ export const riskEngineEnableRoute = ( return siemResponse.error({ statusCode: error.statusCode, body: { message: error.message, full_error: JSON.stringify(e) }, + bypassErrorFormat: true, }); } }); diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_init_route.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/risk_engine_init_route.ts similarity index 86% rename from x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_init_route.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/risk_engine_init_route.ts index 2a0a5fafc70b0..e5b719dfbc42f 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_init_route.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/risk_engine_init_route.ts @@ -8,10 +8,10 @@ import type { StartServicesAccessor } from '@kbn/core/server'; import { buildSiemResponse } from '@kbn/lists-plugin/server/routes/utils'; import { transformError } from '@kbn/securitysolution-es-utils'; -import { RISK_ENGINE_INIT_URL, APP_ID } from '../../../../common/constants'; -import type { StartPlugins } from '../../../plugin'; - -import type { SecuritySolutionPluginRouter } from '../../../types'; +import { RISK_ENGINE_INIT_URL, APP_ID } from '../../../../../common/constants'; +import type { StartPlugins } from '../../../../plugin'; +import { TASK_MANAGER_UNAVAILABLE_ERROR } from './translations'; +import type { SecuritySolutionPluginRouter } from '../../../../types'; export const riskEngineInitRoute = ( router: SecuritySolutionPluginRouter, @@ -36,10 +36,7 @@ export const riskEngineInitRoute = ( if (!taskManager) { return siemResponse.error({ statusCode: 400, - body: { - message: - 'Task Manager is unavailable, but is required to initialize the risk engine. Please enable the taskManager plugin and try again.', - }, + body: TASK_MANAGER_UNAVAILABLE_ERROR, }); } @@ -67,6 +64,7 @@ export const riskEngineInitRoute = ( message: initResultResponse.errors.join('\n'), full_error: initResultResponse, }, + bypassErrorFormat: true, }); } return response.ok({ body: { result: initResultResponse } }); @@ -76,6 +74,7 @@ export const riskEngineInitRoute = ( return siemResponse.error({ statusCode: error.statusCode, body: { message: error.message, full_error: JSON.stringify(e) }, + bypassErrorFormat: true, }); } }); diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_status_route.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/risk_engine_status_route.ts similarity index 89% rename from x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_status_route.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/risk_engine_status_route.ts index d741ee5dd23ff..a7d649c0d7784 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_engine_status_route.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/risk_engine_status_route.ts @@ -7,9 +7,9 @@ import { buildSiemResponse } from '@kbn/lists-plugin/server/routes/utils'; import { transformError } from '@kbn/securitysolution-es-utils'; -import { RISK_ENGINE_STATUS_URL, APP_ID } from '../../../../common/constants'; +import { RISK_ENGINE_STATUS_URL, APP_ID } from '../../../../../common/constants'; -import type { SecuritySolutionPluginRouter } from '../../../types'; +import type { SecuritySolutionPluginRouter } from '../../../../types'; export const riskEngineStatusRoute = (router: SecuritySolutionPluginRouter) => { router.versioned @@ -44,6 +44,7 @@ export const riskEngineStatusRoute = (router: SecuritySolutionPluginRouter) => { return siemResponse.error({ statusCode: error.statusCode, body: { message: error.message, full_error: JSON.stringify(e) }, + bypassErrorFormat: true, }); } }); diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_score_calculation_route.test.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/risk_score_calculation_route.test.ts similarity index 97% rename from x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_score_calculation_route.test.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/risk_score_calculation_route.test.ts index 2792727ae74f1..7cf7b5304a01d 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_score_calculation_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/risk_score_calculation_route.test.ts @@ -9,12 +9,12 @@ import { riskScoreCalculationRoute } from './risk_score_calculation_route'; import { loggerMock } from '@kbn/logging-mocks'; -import { RISK_SCORE_CALCULATION_URL } from '../../../../common/constants'; +import { RISK_SCORE_CALCULATION_URL } from '../../../../../common/constants'; import { serverMock, requestContextMock, requestMock, -} from '../../detection_engine/routes/__mocks__'; +} from '../../../detection_engine/routes/__mocks__'; import { riskScoreServiceFactory } from '../risk_score_service'; import { riskScoreServiceMock } from '../risk_score_service.mock'; import { getRiskInputsIndex } from '../get_risk_inputs_index'; diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_score_calculation_route.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/risk_score_calculation_route.ts similarity index 88% rename from x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_score_calculation_route.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/risk_score_calculation_route.ts index 1b02c4a10fd25..cfbd80afb0d5f 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_score_calculation_route.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/risk_score_calculation_route.ts @@ -12,10 +12,10 @@ import { APP_ID, DEFAULT_RISK_SCORE_PAGE_SIZE, RISK_SCORE_CALCULATION_URL, -} from '../../../../common/constants'; -import { riskScoreCalculationRequestSchema } from '../../../../common/risk_engine/risk_score_calculation/request_schema'; -import type { SecuritySolutionPluginRouter } from '../../../types'; -import { buildRouteValidation } from '../../../utils/build_validation/route_validation'; +} from '../../../../../common/constants'; +import { riskScoreCalculationRequestSchema } from '../../../../../common/risk_engine/risk_score_calculation/request_schema'; +import type { SecuritySolutionPluginRouter } from '../../../../types'; +import { buildRouteValidation } from '../../../../utils/build_validation/route_validation'; import { riskScoreServiceFactory } from '../risk_score_service'; import { getRiskInputsIndex } from '../get_risk_inputs_index'; @@ -89,6 +89,7 @@ export const riskScoreCalculationRoute = (router: SecuritySolutionPluginRouter, return siemResponse.error({ statusCode: error.statusCode, body: { message: error.message, full_error: JSON.stringify(e) }, + bypassErrorFormat: true, }); } } diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_score_preview_route.test.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/risk_score_preview_route.test.ts similarity index 97% rename from x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_score_preview_route.test.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/risk_score_preview_route.test.ts index 72963995594a8..ba87e94c3ccc2 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_score_preview_route.test.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/risk_score_preview_route.test.ts @@ -7,13 +7,13 @@ import { loggerMock } from '@kbn/logging-mocks'; -import { RISK_SCORE_PREVIEW_URL } from '../../../../common/constants'; -import { RiskCategories, RiskWeightTypes } from '../../../../common/risk_engine'; +import { RISK_SCORE_PREVIEW_URL } from '../../../../../common/constants'; +import { RiskCategories, RiskWeightTypes } from '../../../../../common/risk_engine'; import { serverMock, requestContextMock, requestMock, -} from '../../detection_engine/routes/__mocks__'; +} from '../../../detection_engine/routes/__mocks__'; import { getRiskInputsIndex } from '../get_risk_inputs_index'; import { riskScoreServiceFactory } from '../risk_score_service'; import { riskScoreServiceMock } from '../risk_score_service.mock'; diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_score_preview_route.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/risk_score_preview_route.ts similarity index 89% rename from x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_score_preview_route.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/risk_score_preview_route.ts index 9a1a5f2b83d7c..05f80c526a927 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/routes/risk_score_preview_route.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/risk_score_preview_route.ts @@ -13,10 +13,10 @@ import { APP_ID, DEFAULT_RISK_SCORE_PAGE_SIZE, RISK_SCORE_PREVIEW_URL, -} from '../../../../common/constants'; -import { riskScorePreviewRequestSchema } from '../../../../common/risk_engine/risk_score_preview/request_schema'; -import type { SecuritySolutionPluginRouter } from '../../../types'; -import { buildRouteValidation } from '../../../utils/build_validation/route_validation'; +} from '../../../../../common/constants'; +import { riskScorePreviewRequestSchema } from '../../../../../common/risk_engine/risk_score_preview/request_schema'; +import type { SecuritySolutionPluginRouter } from '../../../../types'; +import { buildRouteValidation } from '../../../../utils/build_validation/route_validation'; import { riskScoreServiceFactory } from '../risk_score_service'; import { getRiskInputsIndex } from '../get_risk_inputs_index'; @@ -91,6 +91,7 @@ export const riskScorePreviewRoute = (router: SecuritySolutionPluginRouter, logg return siemResponse.error({ statusCode: error.statusCode, body: { message: error.message, full_error: JSON.stringify(e) }, + bypassErrorFormat: true, }); } } diff --git a/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/translations.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/translations.ts new file mode 100644 index 0000000000000..648ec23ea6b3c --- /dev/null +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/translations.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 { i18n } from '@kbn/i18n'; + +export const TASK_MANAGER_UNAVAILABLE_ERROR = i18n.translate( + 'xpack.securitySolution.api.riskEngine.taskManagerUnavailable', + { + defaultMessage: + 'Task Manager is unavailable, but is required by the risk engine. Please enable the taskManager plugin and try again.', + } +); diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/saved_object/index.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/saved_object/index.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/risk_engine/saved_object/index.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/saved_object/index.ts diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/saved_object/risk_engine_configuration_type.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/saved_object/risk_engine_configuration_type.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/risk_engine/saved_object/risk_engine_configuration_type.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/saved_object/risk_engine_configuration_type.ts diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/schema/risk_score_apis.yml b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/schema/risk_score_apis.yml similarity index 100% rename from x-pack/plugins/security_solution/server/lib/risk_engine/schema/risk_score_apis.yml rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/schema/risk_score_apis.yml diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/tasks/constants.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/tasks/constants.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/risk_engine/tasks/constants.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/tasks/constants.ts diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/tasks/helpers.test.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/tasks/helpers.test.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/risk_engine/tasks/helpers.test.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/tasks/helpers.test.ts diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/tasks/helpers.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/tasks/helpers.ts similarity index 97% rename from x-pack/plugins/security_solution/server/lib/risk_engine/tasks/helpers.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/tasks/helpers.ts index dfacb8b78f30a..b2db9b348b55e 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/tasks/helpers.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/tasks/helpers.ts @@ -14,7 +14,7 @@ import { } from '@kbn/core/server'; import { addSpaceIdToPath } from '@kbn/spaces-plugin/server'; -import type { Range } from '../../../../common/risk_engine'; +import type { Range } from '../../../../../common/risk_engine'; export const convertDateToISOString = (dateString: string): string => { const date = datemath.parse(dateString); diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/tasks/index.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/tasks/index.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/risk_engine/tasks/index.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/tasks/index.ts diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/tasks/risk_scoring_task.mock.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/tasks/risk_scoring_task.mock.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/risk_engine/tasks/risk_scoring_task.mock.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/tasks/risk_scoring_task.mock.ts diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/tasks/risk_scoring_task.test.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/tasks/risk_scoring_task.test.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/risk_engine/tasks/risk_scoring_task.test.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/tasks/risk_scoring_task.test.ts diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/tasks/risk_scoring_task.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/tasks/risk_scoring_task.ts similarity index 96% rename from x-pack/plugins/security_solution/server/lib/risk_engine/tasks/risk_scoring_task.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/tasks/risk_scoring_task.ts index b0482b43b5c13..525f2247b63bd 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/tasks/risk_scoring_task.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/tasks/risk_scoring_task.ts @@ -18,8 +18,8 @@ import type { TaskManagerStartContract, } from '@kbn/task-manager-plugin/server'; import type { AnalyticsServiceSetup } from '@kbn/core-analytics-server'; -import type { AfterKeys, IdentifierType } from '../../../../common/risk_engine'; -import type { StartPlugins } from '../../../plugin'; +import type { AfterKeys, IdentifierType } from '../../../../../common/risk_engine'; +import type { StartPlugins } from '../../../../plugin'; import { type RiskScoreService, riskScoreServiceFactory } from '../risk_score_service'; import { RiskEngineDataClient } from '../risk_engine_data_client'; import { isRiskScoreCalculationComplete } from '../helpers'; @@ -30,12 +30,12 @@ import { } from './state'; import { INTERVAL, SCOPE, TIMEOUT, TYPE, VERSION } from './constants'; import { buildScopedInternalSavedObjectsClientUnsafe, convertRangeToISO } from './helpers'; -import { RiskScoreEntity } from '../../../../common/risk_engine/types'; +import { RiskScoreEntity } from '../../../../../common/risk_engine/types'; import { RISK_SCORE_EXECUTION_SUCCESS_EVENT, RISK_SCORE_EXECUTION_ERROR_EVENT, RISK_SCORE_EXECUTION_CANCELLATION_EVENT, -} from '../../telemetry/event_based/events'; +} from '../../../telemetry/event_based/events'; const logFactory = (logger: Logger, taskId: string) => diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/tasks/state.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/tasks/state.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/risk_engine/tasks/state.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/tasks/state.ts diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/types.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/types.ts similarity index 92% rename from x-pack/plugins/security_solution/server/lib/risk_engine/types.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/types.ts index 1e9751ff1388e..f5aeaf4f56428 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/types.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/types.ts @@ -14,7 +14,7 @@ import type { Range, RiskEngineStatus, RiskScore, -} from '../../../common/risk_engine'; +} from '../../../../common/risk_engine'; export interface CalculateScoresParams { afterKeys: AfterKeys; @@ -78,19 +78,15 @@ export interface InitRiskEngineResponse { export interface InitRiskEngineError { body: { - message: { - message: string; - full_error: InitRiskEngineResultResponse | undefined; - } & string; + message: string; + full_error: InitRiskEngineResultResponse | undefined; }; } export interface EnableDisableRiskEngineErrorResponse { body: { - message: { - message: string; - full_error: string; - }; + message: string; + full_error: string; }; } diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/utils/create_datastream.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/utils/create_datastream.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/risk_engine/utils/create_datastream.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/utils/create_datastream.ts diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/utils/create_index.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/utils/create_index.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/risk_engine/utils/create_index.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/utils/create_index.ts diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/utils/retry_transient_es_errors.test.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/utils/retry_transient_es_errors.test.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/risk_engine/utils/retry_transient_es_errors.test.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/utils/retry_transient_es_errors.test.ts diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/utils/retry_transient_es_errors.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/utils/retry_transient_es_errors.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/risk_engine/utils/retry_transient_es_errors.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/utils/retry_transient_es_errors.ts diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/utils/saved_object_configuration.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/utils/saved_object_configuration.ts similarity index 97% rename from x-pack/plugins/security_solution/server/lib/risk_engine/utils/saved_object_configuration.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/utils/saved_object_configuration.ts index 8d1562d805e57..e39f2f73e5df2 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/utils/saved_object_configuration.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/utils/saved_object_configuration.ts @@ -6,7 +6,7 @@ */ import type { SavedObject, SavedObjectsClientContract } from '@kbn/core/server'; -import { getAlertsIndex } from '../../../../common/utils/risk_score_modules'; +import { getAlertsIndex } from '../../../../../common/utils/risk_score_modules'; import type { RiskEngineConfiguration } from '../types'; import { riskEngineConfigurationTypeName } from '../saved_object'; diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/utils/transforms.test.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/utils/transforms.test.ts similarity index 100% rename from x-pack/plugins/security_solution/server/lib/risk_engine/utils/transforms.test.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/utils/transforms.test.ts diff --git a/x-pack/plugins/security_solution/server/lib/risk_engine/utils/transforms.ts b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/utils/transforms.ts similarity index 97% rename from x-pack/plugins/security_solution/server/lib/risk_engine/utils/transforms.ts rename to x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/utils/transforms.ts index d1a544233339e..b78ea9ccfa644 100644 --- a/x-pack/plugins/security_solution/server/lib/risk_engine/utils/transforms.ts +++ b/x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/utils/transforms.ts @@ -14,11 +14,11 @@ import type { TransformPutTransformRequest, TransformGetTransformStatsTransformStats, } from '@elastic/elasticsearch/lib/api/types'; -import { RiskScoreEntity } from '../../../../common/search_strategy'; +import { RiskScoreEntity } from '../../../../../common/search_strategy'; import { getRiskScorePivotTransformId, getRiskScoreLatestTransformId, -} from '../../../../common/utils/risk_score_modules'; +} from '../../../../../common/utils/risk_score_modules'; export const getLegacyTransforms = async ({ namespace, diff --git a/x-pack/plugins/security_solution/server/plugin.ts b/x-pack/plugins/security_solution/server/plugin.ts index adbf06cc1da99..66f22e0c44bef 100644 --- a/x-pack/plugins/security_solution/server/plugin.ts +++ b/x-pack/plugins/security_solution/server/plugin.ts @@ -107,7 +107,7 @@ import { } from '../common/endpoint/constants'; import { AppFeaturesService } from './lib/app_features_service/app_features_service'; -import { registerRiskScoringTask } from './lib/risk_engine/tasks/risk_scoring_task'; +import { registerRiskScoringTask } from './lib/entity_analytics/risk_engine/tasks/risk_scoring_task'; import { registerProtectionUpdatesNoteRoutes } from './endpoint/routes/protection_updates_note'; import { latestRiskScoreIndexPattern, allRiskScoreIndexPattern } from '../common/risk_engine'; import { isEndpointPackageV2 } from '../common/endpoint/utils/package_v2'; 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 be810fd5ae41e..fde473d2a253e 100644 --- a/x-pack/plugins/security_solution/server/request_context_factory.ts +++ b/x-pack/plugins/security_solution/server/request_context_factory.ts @@ -25,7 +25,7 @@ import type { import type { Immutable } from '../common/endpoint/types'; import type { EndpointAuthz } from '../common/endpoint/types/authz'; import type { EndpointAppContextService } from './endpoint/endpoint_app_context_services'; -import { RiskEngineDataClient } from './lib/risk_engine/risk_engine_data_client'; +import { RiskEngineDataClient } from './lib/entity_analytics/risk_engine/risk_engine_data_client'; export interface IRequestContextFactory { create( diff --git a/x-pack/plugins/security_solution/server/routes/index.ts b/x-pack/plugins/security_solution/server/routes/index.ts index d3786ea8acb88..b5b6a5c205e95 100644 --- a/x-pack/plugins/security_solution/server/routes/index.ts +++ b/x-pack/plugins/security_solution/server/routes/index.ts @@ -80,8 +80,8 @@ import { riskEngineInitRoute, riskEngineEnableRoute, riskEngineStatusRoute, -} from '../lib/risk_engine/routes'; -import { riskScoreCalculationRoute } from '../lib/risk_engine/routes/risk_score_calculation_route'; +} from '../lib/entity_analytics/risk_engine/routes'; +import { riskScoreCalculationRoute } from '../lib/entity_analytics/risk_engine/routes/risk_score_calculation_route'; export const initRoutes = ( router: SecuritySolutionPluginRouter, diff --git a/x-pack/plugins/security_solution/server/saved_objects.ts b/x-pack/plugins/security_solution/server/saved_objects.ts index 3f91bcf149ac6..0b1fec5677488 100644 --- a/x-pack/plugins/security_solution/server/saved_objects.ts +++ b/x-pack/plugins/security_solution/server/saved_objects.ts @@ -14,7 +14,7 @@ import { legacyType as legacyRuleActionsType } from './lib/detection_engine/rule import { prebuiltRuleAssetType } from './lib/detection_engine/prebuilt_rules'; import { type as signalsMigrationType } from './lib/detection_engine/migrations/saved_objects'; import { manifestType } from './endpoint/lib/artifacts/saved_object_mappings'; -import { riskEngineConfigurationType } from './lib/risk_engine/saved_object'; +import { riskEngineConfigurationType } from './lib/entity_analytics/risk_engine/saved_object'; const types = [ noteType, diff --git a/x-pack/plugins/security_solution/server/types.ts b/x-pack/plugins/security_solution/server/types.ts index 8326d13ad03a7..c979cc25c172b 100644 --- a/x-pack/plugins/security_solution/server/types.ts +++ b/x-pack/plugins/security_solution/server/types.ts @@ -29,7 +29,7 @@ import type { import type { FrameworkRequest } from './lib/framework'; import type { EndpointAuthz } from '../common/endpoint/types/authz'; import type { EndpointInternalFleetServicesInterface } from './endpoint/services/fleet'; -import type { RiskEngineDataClient } from './lib/risk_engine/risk_engine_data_client'; +import type { RiskEngineDataClient } from './lib/entity_analytics/risk_engine/risk_engine_data_client'; export { AppClient }; diff --git a/x-pack/plugins/serverless_observability/kibana.jsonc b/x-pack/plugins/serverless_observability/kibana.jsonc index 0c68668e473ea..692d721c20a30 100644 --- a/x-pack/plugins/serverless_observability/kibana.jsonc +++ b/x-pack/plugins/serverless_observability/kibana.jsonc @@ -3,7 +3,7 @@ "id": "@kbn/serverless-observability", "owner": [ "@elastic/appex-sharedux", - "@elastic/apm-ui" + "@elastic/obs-ux-management-team" ], "description": "Serverless customizations for observability.", "plugin": { diff --git a/x-pack/plugins/serverless_search/public/application/components/languages/javascript.ts b/x-pack/plugins/serverless_search/public/application/components/languages/javascript.ts index 1302bebff7137..72d865f1030bc 100644 --- a/x-pack/plugins/serverless_search/public/application/components/languages/javascript.ts +++ b/x-pack/plugins/serverless_search/public/application/components/languages/javascript.ts @@ -20,12 +20,15 @@ const searchResult = await client.search({ console.log(searchResult.hits.hits) `, - configureClient: ({ url, apiKey }) => `const { Client } = require('@elastic/elasticsearch'); + configureClient: ({ + url, + apiKey, + }) => `const { Client } = require('@elastic/elasticsearch-serverless'); const client = new Client({ -node: '${url}', -auth: { + node: '${url}', + auth: { apiKey: '${apiKey}' -} + } });`, docLink: docLinks.jsClient, github: { @@ -44,34 +47,34 @@ const dataset = [ {"name": "Fahrenheit 451", "author": "Ray Bradbury", "release_date": "1953-10-15", "page_count": 227}, {"name": "Brave New World", "author": "Aldous Huxley", "release_date": "1932-06-01", "page_count": 268}, {"name": "The Handmaid's Tale", "author": "Margaret Atwood", "release_date": "1985-06-01", "page_count": 311} - ]; +]; // Index with the bulk helper const result = await client.helpers.bulk({ -datasource: dataset, -onDocument (doc) { - return { index: { _index: 'my-index-name' }}; -} + datasource: dataset, + onDocument (doc) { + return { index: { _index: 'my-index-name' }}; + } }); console.log(result); /** { -total: 6, -failed: 0, -retry: 0, -successful: 6, -noop: 0, -time: 191, -bytes: 787, -aborted: false + total: 6, + failed: 0, + retry: 0, + successful: 6, + noop: 0, + time: 191, + bytes: 787, + aborted: false } */`, ingestDataIndex: ({ apiKey, url, indexName, - }) => `const { Client } = require('@elastic/elasticsearch'); + }) => `const { Client } = require('@elastic/elasticsearch-serverless'); const client = new Client({ node: '${url}', auth: { @@ -91,7 +94,7 @@ const result = await client.helpers.bulk({ }); console.log(result); `, - installClient: 'npm install @elastic/elasticsearch@8', + installClient: 'npm install @elastic/elasticsearch-serverless', name: i18n.translate('xpack.serverlessSearch.languages.javascript', { defaultMessage: 'JavaScript', }), @@ -100,20 +103,20 @@ console.log(result); console.log(resp); /** { -name: 'instance-0000000000', -cluster_name: 'd9dcd35d12fe46dfaa28ec813f65d57b', -cluster_uuid: 'iln8jaivThSezhTkzp0Knw', -version: { - build_flavor: 'default', - build_type: 'docker', - build_hash: 'c94b4700cda13820dad5aa74fae6db185ca5c304', - build_date: '2022-10-24T16:54:16.433628434Z', - build_snapshot: false, - lucene_version: '9.4.1', - minimum_wire_compatibility_version: '7.17.0', - minimum_index_compatibility_version: '7.0.0' -}, -tagline: 'You Know, for Search' + name: 'instance-0000000000', + cluster_name: 'd9dcd35d12fe46dfaa28ec813f65d57b', + cluster_uuid: 'iln8jaivThSezhTkzp0Knw', + version: { + build_flavor: 'default', + build_type: 'docker', + build_hash: 'c94b4700cda13820dad5aa74fae6db185ca5c304', + build_date: '2022-10-24T16:54:16.433628434Z', + build_snapshot: false, + lucene_version: '9.4.1', + minimum_wire_compatibility_version: '7.17.0', + minimum_index_compatibility_version: '7.0.0' + }, + tagline: 'You Know, for Search' } */`, }; diff --git a/x-pack/plugins/serverless_search/public/layout/nav.tsx b/x-pack/plugins/serverless_search/public/layout/nav.tsx index 3aaa1ae62884c..7d4b2fd7d0fd1 100644 --- a/x-pack/plugins/serverless_search/public/layout/nav.tsx +++ b/x-pack/plugins/serverless_search/public/layout/nav.tsx @@ -15,6 +15,7 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; import type { ServerlessPluginStart } from '@kbn/serverless/public'; import type { CloudStart } from '@kbn/cloud-plugin/public'; +import { CONNECTORS_LABEL } from '../../common/i18n_string'; const navigationTree: NavigationTreeDefinition = { body: [ @@ -37,79 +38,60 @@ const navigationTree: NavigationTreeDefinition = { getIsActive: ({ pathNameSerialized, prepend }) => { return pathNameSerialized.startsWith(prepend('/app/dev_tools')); }, + spaceBefore: 'l', }, { - id: 'explore', - title: i18n.translate('xpack.serverlessSearch.nav.explore', { - defaultMessage: 'Explore', + link: 'discover', + spaceBefore: 'm', + }, + { + link: 'dashboards', + getIsActive: ({ pathNameSerialized, prepend }) => { + return pathNameSerialized.startsWith(prepend('/app/dashboards')); + }, + }, + { + link: 'visualize', + title: i18n.translate('xpack.serverlessSearch.nav.visualize', { + defaultMessage: 'Visualizations', }), - children: [ - { - link: 'discover', - }, - { - link: 'dashboards', - getIsActive: ({ pathNameSerialized, prepend }) => { - return pathNameSerialized.startsWith(prepend('/app/dashboards')); - }, - }, - { - link: 'visualize', - title: i18n.translate('xpack.serverlessSearch.nav.visualize', { - defaultMessage: 'Visualizations', - }), - getIsActive: ({ pathNameSerialized, prepend }) => { - return ( - pathNameSerialized.startsWith(prepend('/app/visualize')) || - pathNameSerialized.startsWith(prepend('/app/lens')) || - pathNameSerialized.startsWith(prepend('/app/maps')) - ); - }, - }, - { - link: 'management:triggersActions', - title: i18n.translate('xpack.serverlessSearch.nav.alerts', { - defaultMessage: 'Alerts', - }), - }, - ], + getIsActive: ({ pathNameSerialized, prepend }) => { + return ( + pathNameSerialized.startsWith(prepend('/app/visualize')) || + pathNameSerialized.startsWith(prepend('/app/lens')) || + pathNameSerialized.startsWith(prepend('/app/maps')) + ); + }, }, { - id: 'content', - title: i18n.translate('xpack.serverlessSearch.nav.content', { - defaultMessage: 'Content', + link: 'management:triggersActions', + title: i18n.translate('xpack.serverlessSearch.nav.alerts', { + defaultMessage: 'Alerts', }), - children: [ - { - title: i18n.translate('xpack.serverlessSearch.nav.content.indices', { - defaultMessage: 'Index Management', - }), - link: 'management:index_management', - breadcrumbStatus: - 'hidden' /* management sub-pages set their breadcrumbs themselves */, - }, - { - title: i18n.translate('xpack.serverlessSearch.nav.content.pipelines', { - defaultMessage: 'Pipelines', - }), - link: 'management:ingest_pipelines', - breadcrumbStatus: - 'hidden' /* management sub-pages set their breadcrumbs themselves */, - }, - ], }, { - id: 'security', - title: i18n.translate('xpack.serverlessSearch.nav.security', { - defaultMessage: 'Security', + title: i18n.translate('xpack.serverlessSearch.nav.content.indices', { + defaultMessage: 'Index Management', }), - children: [ - { - link: 'management:api_keys', - breadcrumbStatus: - 'hidden' /* management sub-pages set their breadcrumbs themselves */, - }, - ], + link: 'management:index_management', + breadcrumbStatus: 'hidden' /* management sub-pages set their breadcrumbs themselves */, + spaceBefore: 'm', + }, + { + title: i18n.translate('xpack.serverlessSearch.nav.content.pipelines', { + defaultMessage: 'Pipelines', + }), + link: 'management:ingest_pipelines', + breadcrumbStatus: 'hidden' /* management sub-pages set their breadcrumbs themselves */, + }, + { + title: CONNECTORS_LABEL, + link: 'serverlessConnectors', + }, + { + link: 'management:api_keys', + breadcrumbStatus: 'hidden' /* management sub-pages set their breadcrumbs themselves */, + spaceBefore: 'm', }, ], }, diff --git a/x-pack/plugins/session_view/public/components/detail_panel_alert_tab/index.test.tsx b/x-pack/plugins/session_view/public/components/detail_panel_alert_tab/index.test.tsx index 989c4fd45cfbc..b729824478e2c 100644 --- a/x-pack/plugins/session_view/public/components/detail_panel_alert_tab/index.test.tsx +++ b/x-pack/plugins/session_view/public/components/detail_panel_alert_tab/index.test.tsx @@ -10,7 +10,7 @@ import React from 'react'; import { AppContextTestRender, createAppRootMockRenderer } from '../../test'; import { DetailPanelAlertTab } from '.'; import { mockAlerts } from '../../../common/mocks/constants/session_view_process.mock'; -import { fireEvent } from '@testing-library/dom'; +import { fireEvent } from '@testing-library/react'; import { INVESTIGATED_ALERT_TEST_ID, VIEW_MODE_TOGGLE, ALERTS_TAB_EMPTY_STATE_TEST_ID } from '.'; import { ALERT_LIST_ITEM_TEST_ID, diff --git a/x-pack/plugins/session_view/public/components/session_view_search_bar/index.test.tsx b/x-pack/plugins/session_view/public/components/session_view_search_bar/index.test.tsx index 8b3498f2a11b8..4bfd695530b43 100644 --- a/x-pack/plugins/session_view/public/components/session_view_search_bar/index.test.tsx +++ b/x-pack/plugins/session_view/public/components/session_view_search_bar/index.test.tsx @@ -10,7 +10,7 @@ import { processMock } from '../../../common/mocks/constants/session_view_proces import { AppContextTestRender, createAppRootMockRenderer } from '../../test'; import { SessionViewSearchBar } from '.'; import userEvent from '@testing-library/user-event'; -import { fireEvent } from '@testing-library/dom'; +import { fireEvent } from '@testing-library/react'; describe('SessionViewSearchBar component', () => { let render: () => ReturnType; diff --git a/x-pack/plugins/spaces/server/capabilities/index.ts b/x-pack/plugins/spaces/server/capabilities/index.ts index 745015b50042f..801564d9990b8 100644 --- a/x-pack/plugins/spaces/server/capabilities/index.ts +++ b/x-pack/plugins/spaces/server/capabilities/index.ts @@ -18,5 +18,7 @@ export const setupCapabilities = ( logger: Logger ) => { core.capabilities.registerProvider(capabilitiesProvider); - core.capabilities.registerSwitcher(setupCapabilitiesSwitcher(core, getSpacesService, logger)); + core.capabilities.registerSwitcher(setupCapabilitiesSwitcher(core, getSpacesService, logger), { + capabilityPath: '*', + }); }; diff --git a/x-pack/plugins/stack_connectors/README.md b/x-pack/plugins/stack_connectors/README.md index dc4265e92e042..40199153902c0 100644 --- a/x-pack/plugins/stack_connectors/README.md +++ b/x-pack/plugins/stack_connectors/README.md @@ -6,6 +6,7 @@ The `stack_connectors` plugin provides connector types shipped with Kibana, buil Table of Contents +- [Stack Connectors](#stack-connectors) - [Connector Types](#connector-types) - [ServiceNow ITSM](#servicenow-itsm) - [`params`](#params) @@ -41,13 +42,17 @@ Table of Contents - [Swimlane](#swimlane) - [`params`](#params-5) - [| severity | The severity of the incident. | string _(optional)_ |](#-severity-----the-severity-of-the-incident-----string-optional-) + - [Ospgenie](#ospgenie) + - [`params`](#params-6) + - [PagerDuty](#pagerduty) + - [`params`](#params-7) - [Developing New Connector Types](#developing-new-connector-types) - - [licensing](#licensing) - - [plugin location](#plugin-location) - - [documentation](#documentation) - - [tests](#tests) - - [connector type config and secrets](#connector-type-config-and-secrets) - - [user interface](#user-interface) + - [Licensing](#licensing) + - [Plugin location](#plugin-location) + - [Documentation](#documentation) + - [Tests](#tests) + - [Connector type config and secrets](#connector-type-config-and-secrets) + - [User interface](#user-interface) # Connector Types @@ -346,9 +351,9 @@ for the full list of properties. `subActionParams (createAlert)` -| Property | Description | Type | -| -------- | ------------------------------------------------------------------------------------------------------------- | --------------------- | -| message | The alert message. | string | +| Property | Description | Type | +| -------- | ------------------ | ------ | +| message | The alert message. | string | The optional parameters `alias`, `description`, `responders`, `visibleTo`, `actions`, `tags`, `details`, `entity`, `source`, `priority`, `user`, and `note` are supported. See the [Opsgenie API documentation](https://docs.opsgenie.com/docs/alert-api#create-alert) for more information on their types. @@ -358,6 +363,28 @@ No parameters are required. For the definition of the optional parameters see th --- +## PagerDuty + +The [PagerDuty user documentation `params`](https://www.elastic.co/guide/en/kibana/master/pagerduty-action-type.html) lists configuration properties for the `params`. For more details on these properties, see [PagerDuty v2 event parameters](https://developer.pagerduty.com/docs/ZG9jOjExMDI5NTgx-send-an-alert-event) . + +### `params` + +| Property | Description | Type | +| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- | +| eventAction | The type of event. | `trigger` \| `resolve` \| `acknowledge` | +| dedupKey | All actions sharing this key will be associated with the same PagerDuty alert. This value is used to correlate trigger and resolution. The maximum length is 255 characters. | string | +| summary | An optional text summary of the event. The maximum length is 1024 characters. | string _(optional)_ | +| source | An optional value indicating the affected system, preferably a hostname or fully qualified domain name. Defaults to the Kibana saved object id of the action. | string _(optional)_ | +| severity | The perceived severity of on the affected system. Default: `info`. | `critical` \| `error` \| `warning` \| `info` | +| timestamp | An optional ISO-8601 format date-time, indicating the time the event was detected or generated. | date _(optional)_ | +| component | An optional value indicating the component of the source machine that is responsible for the event, for example `mysql` or `eth0`. | string _(optional)_ | +| group | An optional value indicating the logical grouping of components of a service, for example `app-stack`. | string _(optional)_ | +| class | An optional value indicating the class/type of the event, for example `ping failure` or `cpu load`. | string _(optional)_ | +| links | List of links to add to the event | Array<{ href: string; text: string }> _(optional)_ | +| customDetails | Additional details to add to the event. | object | + +--- + # Developing New Connector Types When creating a new connector type, your plugin will eventually call `server.plugins.actions.setup.registerType()` to register the type with the `actions` plugin, but there are some additional things to think about about and implement. diff --git a/x-pack/plugins/stack_connectors/public/connector_types/swimlane/swimlane_connectors.test.tsx b/x-pack/plugins/stack_connectors/public/connector_types/swimlane/swimlane_connectors.test.tsx index 643d43d8b10b3..cb6652052d65e 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/swimlane/swimlane_connectors.test.tsx +++ b/x-pack/plugins/stack_connectors/public/connector_types/swimlane/swimlane_connectors.test.tsx @@ -7,14 +7,12 @@ import React from 'react'; import { mountWithIntl, nextTick } from '@kbn/test-jest-helpers'; -import { act } from 'react-dom/test-utils'; import SwimlaneActionConnectorFields from './swimlane_connectors'; import { useGetApplication } from './use_get_application'; import { applicationFields, mappings } from './mocks'; import { ConnectorFormTestProvider } from '../lib/test_utils'; -import { waitFor } from '@testing-library/dom'; +import { waitFor, render, act } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { render } from '@testing-library/react'; jest.mock('@kbn/triggers-actions-ui-plugin/public/common/lib/kibana'); jest.mock('./use_get_application'); diff --git a/x-pack/plugins/stack_connectors/server/connector_types/pagerduty/index.test.ts b/x-pack/plugins/stack_connectors/server/connector_types/pagerduty/index.test.ts index 10752e53ae72a..86cdca4740f6d 100644 --- a/x-pack/plugins/stack_connectors/server/connector_types/pagerduty/index.test.ts +++ b/x-pack/plugins/stack_connectors/server/connector_types/pagerduty/index.test.ts @@ -316,6 +316,25 @@ describe('execute()', () => { component: 'the-component', group: 'the-group', class: 'the-class', + customDetails: { + myString: 'foo', + myNumber: 10, + myArray: ['foo', 'baz'], + myBoolean: true, + myObject: { + myNestedObject: 'foo', + }, + }, + links: [ + { + href: 'http://example.com', + text: 'a link', + }, + { + href: 'http://example.com', + text: 'a second link', + }, + ], }; postPagerdutyMock.mockImplementation(() => { @@ -340,9 +359,31 @@ describe('execute()', () => { "data": Object { "dedup_key": "a-dedup-key", "event_action": "trigger", + "links": Array [ + Object { + "href": "http://example.com", + "text": "a link", + }, + Object { + "href": "http://example.com", + "text": "a second link", + }, + ], "payload": Object { "class": "the-class", "component": "the-component", + "custom_details": Object { + "myArray": Array [ + "foo", + "baz", + ], + "myBoolean": true, + "myNumber": 10, + "myObject": Object { + "myNestedObject": "foo", + }, + "myString": "foo", + }, "group": "the-group", "severity": "critical", "source": "the-source", @@ -383,6 +424,25 @@ describe('execute()', () => { component: 'the-component', group: 'the-group', class: 'the-class', + customDetails: { + myString: 'foo', + myNumber: 10, + myArray: ['foo', 'baz'], + myBoolean: true, + myObject: { + myNestedObject: 'foo', + }, + }, + links: [ + { + href: 'http://example.com', + text: 'a link', + }, + { + href: 'http://example.com', + text: 'a second link', + }, + ], }; postPagerdutyMock.mockImplementation(() => { @@ -441,6 +501,25 @@ describe('execute()', () => { component: 'the-component', group: 'the-group', class: 'the-class', + customDetails: { + myString: 'foo', + myNumber: 10, + myArray: ['foo', 'baz'], + myBoolean: true, + myObject: { + myNestedObject: 'foo', + }, + }, + links: [ + { + href: 'http://example.com', + text: 'a link', + }, + { + href: 'http://example.com', + text: 'a second link', + }, + ], }; postPagerdutyMock.mockImplementation(() => { diff --git a/x-pack/plugins/stack_connectors/server/connector_types/pagerduty/index.ts b/x-pack/plugins/stack_connectors/server/connector_types/pagerduty/index.ts index 76a19836b0cda..6d2ee36e6439a 100644 --- a/x-pack/plugins/stack_connectors/server/connector_types/pagerduty/index.ts +++ b/x-pack/plugins/stack_connectors/server/connector_types/pagerduty/index.ts @@ -79,6 +79,9 @@ const PayloadSeveritySchema = schema.oneOf([ schema.literal('info'), ]); +const LinksSchema = schema.arrayOf(schema.object({ href: schema.string(), text: schema.string() })); +const customDetailsSchema = schema.recordOf(schema.string(), schema.any()); + const ParamsSchema = schema.object( { eventAction: schema.maybe(EventActionSchema), @@ -90,6 +93,8 @@ const ParamsSchema = schema.object( component: schema.maybe(schema.string()), group: schema.maybe(schema.string()), class: schema.maybe(schema.string()), + links: schema.maybe(LinksSchema), + customDetails: schema.maybe(customDetailsSchema), }, { validate: validateParams } ); @@ -292,7 +297,9 @@ interface PagerDutyPayload { component?: string; group?: string; class?: string; + custom_details?: Record; }; + links?: Array<{ href: string; text: string }>; } function getBodyForEventAction(actionId: string, params: ActionParamsType): PagerDutyPayload { @@ -301,6 +308,7 @@ function getBodyForEventAction(actionId: string, params: ActionParamsType): Page const data: PagerDutyPayload = { event_action: eventAction, }; + if (params.dedupKey) { data.dedup_key = params.dedupKey; } @@ -318,7 +326,12 @@ function getBodyForEventAction(actionId: string, params: ActionParamsType): Page severity: params.severity || 'info', ...(validatedTimestamp ? { timestamp: moment(validatedTimestamp).toISOString() } : {}), ...omitBy(pick(params, ['component', 'group', 'class']), isUndefined), + ...(params.customDetails ? { custom_details: params.customDetails } : {}), }; + if (params.links) { + data.links = params.links; + } + return data; } diff --git a/x-pack/plugins/synthetics/kibana.jsonc b/x-pack/plugins/synthetics/kibana.jsonc index d03d0d384938f..9e85c2ec6c604 100644 --- a/x-pack/plugins/synthetics/kibana.jsonc +++ b/x-pack/plugins/synthetics/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/synthetics-plugin", - "owner": "@elastic/uptime", + "owner": "@elastic/obs-ux-infra_services-team", "description": "This plugin visualizes data from Synthetics and Heartbeat, and integrates with other Observability solutions.", "plugin": { "id": "synthetics", diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/common/date_picker/synthetics_date_picker.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/date_picker/synthetics_date_picker.test.tsx index a78710dd9994e..1a0ec3002655a 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/common/date_picker/synthetics_date_picker.test.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/common/date_picker/synthetics_date_picker.test.tsx @@ -10,7 +10,7 @@ import { SyntheticsDatePicker } from './synthetics_date_picker'; import { startPlugins } from '../../../utils/testing/__mocks__/synthetics_plugin_start_mock'; import { createMemoryHistory } from 'history'; import { render } from '../../../utils/testing'; -import { fireEvent } from '@testing-library/dom'; +import { fireEvent } from '@testing-library/react'; describe('SyntheticsDatePicker component', () => { jest.setTimeout(10_000); diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/getting_started/simple_monitor_form.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/getting_started/simple_monitor_form.test.tsx index 9c392b6a409f0..322cc2c653ef9 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/getting_started/simple_monitor_form.test.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/getting_started/simple_monitor_form.test.tsx @@ -12,10 +12,9 @@ import { WEBSITE_URL_HELP_TEXT, WEBSITE_URL_LABEL, } from './simple_monitor_form'; -import { screen } from '@testing-library/react'; import { render } from '../../utils/testing'; import React from 'react'; -import { act, fireEvent, waitFor } from '@testing-library/react'; +import { act, fireEvent, waitFor, screen } from '@testing-library/react'; import { syntheticsTestSubjects } from '../../../../../common/constants/data_test_subjects'; import { apiService } from '../../../../utils/api_service'; import * as reduxHooks from 'react-redux'; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_marker/waterfall_marker_icon.test.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_marker/waterfall_marker_icon.test.tsx index 3ebbb2b1c6b57..a91da97ce3a5c 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_marker/waterfall_marker_icon.test.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/components/step_details_page/step_waterfall_chart/waterfall/waterfall_marker/waterfall_marker_icon.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { fireEvent, waitFor } from '@testing-library/dom'; +import { fireEvent, waitFor } from '@testing-library/react'; import { WaterfallMarkerIcon } from './waterfall_marker_icon'; import { TestWrapper } from './waterfall_marker_test_helper'; import { render } from '../../../../../utils/testing'; diff --git a/x-pack/plugins/synthetics/public/apps/synthetics/utils/testing/rtl_helpers.tsx b/x-pack/plugins/synthetics/public/apps/synthetics/utils/testing/rtl_helpers.tsx index 27452ce3254c2..552229fe47346 100644 --- a/x-pack/plugins/synthetics/public/apps/synthetics/utils/testing/rtl_helpers.tsx +++ b/x-pack/plugins/synthetics/public/apps/synthetics/utils/testing/rtl_helpers.tsx @@ -6,12 +6,14 @@ */ import React, { ReactElement, ReactNode } from 'react'; +import { i18n } from '@kbn/i18n'; import { of } from 'rxjs'; // eslint-disable-next-line import/no-extraneous-dependencies import { render as reactTestLibRender, MatcherFunction, RenderOptions, + configure, } from '@testing-library/react'; import { Router } from '@kbn/shared-ux-router'; import { Route } from '@kbn/shared-ux-router'; @@ -21,8 +23,6 @@ import { createMemoryHistory, History } from 'history'; import { CoreStart } from '@kbn/core/public'; import { I18nProvider } from '@kbn/i18n-react'; import { coreMock } from '@kbn/core/public/mocks'; -// eslint-disable-next-line import/no-extraneous-dependencies -import { configure } from '@testing-library/dom'; import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; import { IStorageWrapper } from '@kbn/kibana-utils-plugin/public'; import { KibanaContextProvider, KibanaServices } from '@kbn/kibana-react-plugin/public'; @@ -161,7 +161,13 @@ export const mockCore: () => Partial = () => { exploratoryView: { createExploratoryViewUrl: jest.fn(), getAppDataView: jest.fn(), - ExploratoryViewEmbeddable: () =>
    Embeddable exploratory view
    , + ExploratoryViewEmbeddable: () => ( +
    + {i18n.translate('xpack.synthetics.core.div.embeddableExploratoryViewLabel', { + defaultMessage: 'Embeddable exploratory view', + })} +
    + ), }, }; diff --git a/x-pack/plugins/synthetics/server/routes/monitor_cruds/add_monitor_project.ts b/x-pack/plugins/synthetics/server/routes/monitor_cruds/add_monitor_project.ts index e3ca890d1712e..f878e8bb40c70 100644 --- a/x-pack/plugins/synthetics/server/routes/monitor_cruds/add_monitor_project.ts +++ b/x-pack/plugins/synthetics/server/routes/monitor_cruds/add_monitor_project.ts @@ -102,8 +102,11 @@ export const validatePermissions = async ( const elasticManagedLocationsEnabled = Boolean( - (await server.coreStart?.capabilities.resolveCapabilities(request)).uptime - .elasticManagedLocationsEnabled + ( + await server.coreStart?.capabilities.resolveCapabilities(request, { + capabilityPath: 'uptime.*', + }) + ).uptime.elasticManagedLocationsEnabled ) ?? true; if (!elasticManagedLocationsEnabled) { return ELASTIC_MANAGED_LOCATIONS_DISABLED; diff --git a/x-pack/plugins/synthetics/server/routes/monitor_cruds/edit_monitor.ts b/x-pack/plugins/synthetics/server/routes/monitor_cruds/edit_monitor.ts index c6ff9852b6777..d9e9b918e3fff 100644 --- a/x-pack/plugins/synthetics/server/routes/monitor_cruds/edit_monitor.ts +++ b/x-pack/plugins/synthetics/server/routes/monitor_cruds/edit_monitor.ts @@ -251,8 +251,11 @@ export const validatePermissions = async ( const elasticManagedLocationsEnabled = Boolean( - (await server.coreStart?.capabilities.resolveCapabilities(request)).uptime - .elasticManagedLocationsEnabled + ( + await server.coreStart?.capabilities.resolveCapabilities(request, { + capabilityPath: 'uptime.*', + }) + ).uptime.elasticManagedLocationsEnabled ) ?? true; if (!elasticManagedLocationsEnabled) { return ELASTIC_MANAGED_LOCATIONS_DISABLED; diff --git a/x-pack/plugins/synthetics/server/routes/monitor_cruds/get_api_key.ts b/x-pack/plugins/synthetics/server/routes/monitor_cruds/get_api_key.ts index 0dab70565aeea..53cd56fc24bf6 100644 --- a/x-pack/plugins/synthetics/server/routes/monitor_cruds/get_api_key.ts +++ b/x-pack/plugins/synthetics/server/routes/monitor_cruds/get_api_key.ts @@ -34,8 +34,11 @@ export const getAPIKeySyntheticsRoute: SyntheticsRestApiRouteFactory = () => ({ if (accessToElasticManagedLocations) { const elasticManagedLocationsEnabled = Boolean( - (await server.coreStart?.capabilities.resolveCapabilities(request)).uptime - .elasticManagedLocationsEnabled + ( + await server.coreStart?.capabilities.resolveCapabilities(request, { + capabilityPath: 'uptime.*', + }) + ).uptime.elasticManagedLocationsEnabled ) ?? true; if (!elasticManagedLocationsEnabled) { return response.customError({ diff --git a/x-pack/plugins/synthetics/server/routes/monitor_cruds/get_monitor.ts b/x-pack/plugins/synthetics/server/routes/monitor_cruds/get_monitor.ts index 549c812eec27f..b693718e7a63b 100644 --- a/x-pack/plugins/synthetics/server/routes/monitor_cruds/get_monitor.ts +++ b/x-pack/plugins/synthetics/server/routes/monitor_cruds/get_monitor.ts @@ -52,7 +52,11 @@ export const getSyntheticsMonitorRoute: SyntheticsRestApiRouteFactory = () => ({ } else { // only user with write permissions can decrypt the monitor const canSave = - (await coreStart?.capabilities.resolveCapabilities(request)).uptime.save ?? false; + ( + await coreStart?.capabilities.resolveCapabilities(request, { + capabilityPath: 'uptime.*', + }) + ).uptime.save ?? false; if (!canSave) { return response.forbidden(); } diff --git a/x-pack/plugins/synthetics/server/routes/monitor_cruds/inspect_monitor.ts b/x-pack/plugins/synthetics/server/routes/monitor_cruds/inspect_monitor.ts index 0cbdda79c18eb..78f445190d2e9 100644 --- a/x-pack/plugins/synthetics/server/routes/monitor_cruds/inspect_monitor.ts +++ b/x-pack/plugins/synthetics/server/routes/monitor_cruds/inspect_monitor.ts @@ -54,8 +54,13 @@ export const inspectSyntheticsMonitorRoute: SyntheticsRestApiRouteFactory = () = ); const canSave = - Boolean((await server.coreStart?.capabilities.resolveCapabilities(request)).uptime.save) ?? - false; + Boolean( + ( + await server.coreStart?.capabilities.resolveCapabilities(request, { + capabilityPath: 'uptime.*', + }) + ).uptime.save + ) ?? false; try { const newMonitorId = id ?? uuidV4(); diff --git a/x-pack/plugins/synthetics/server/routes/settings/params/params.ts b/x-pack/plugins/synthetics/server/routes/settings/params/params.ts index 8f9f4f76efd89..01f2dd6465dfd 100644 --- a/x-pack/plugins/synthetics/server/routes/settings/params/params.ts +++ b/x-pack/plugins/synthetics/server/routes/settings/params/params.ts @@ -37,7 +37,11 @@ export const getSyntheticsParamsRoute: SyntheticsRestApiRouteFactory< const encryptedSavedObjectsClient = server.encryptedSavedObjects.getClient(); const canSave = - (await server.coreStart?.capabilities.resolveCapabilities(request)).uptime.save ?? false; + ( + await server.coreStart?.capabilities.resolveCapabilities(request, { + capabilityPath: 'uptime.*', + }) + ).uptime.save ?? false; if (canSave) { if (paramId) { diff --git a/x-pack/plugins/synthetics/server/routes/synthetics_service/get_service_locations.ts b/x-pack/plugins/synthetics/server/routes/synthetics_service/get_service_locations.ts index 24660c537a238..a9142170c9e26 100644 --- a/x-pack/plugins/synthetics/server/routes/synthetics_service/get_service_locations.ts +++ b/x-pack/plugins/synthetics/server/routes/synthetics_service/get_service_locations.ts @@ -23,8 +23,11 @@ export const getServiceLocationsRoute: SyntheticsRestApiRouteFactory = () => ({ }): Promise => { const elasticManagedLocationsEnabled = Boolean( - (await server.coreStart?.capabilities.resolveCapabilities(request)).uptime - .elasticManagedLocationsEnabled + ( + await server.coreStart?.capabilities.resolveCapabilities(request, { + capabilityPath: 'uptime.*', + }) + ).uptime.elasticManagedLocationsEnabled ) ?? true; if (elasticManagedLocationsEnabled) { diff --git a/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row.test.tsx b/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row.test.tsx index 370d7c2da05d5..4f9eacc38ecc5 100644 --- a/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row.test.tsx +++ b/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row.test.tsx @@ -5,14 +5,13 @@ * 2.0. */ -import { render, fireEvent, screen, waitFor } from '@testing-library/react'; +import { render, fireEvent, screen, waitFor, within } from '@testing-library/react'; import React from 'react'; import moment from 'moment-timezone'; import { TransformListRow } from '../../../../common'; import { ExpandedRow } from './expanded_row'; import transformListRow from '../../../../common/__mocks__/transform_list_row.json'; -import { within } from '@testing-library/dom'; jest.mock('../../../../../shared_imports'); jest.mock('../../../../app_dependencies'); diff --git a/x-pack/plugins/transform/server/capabilities.ts b/x-pack/plugins/transform/server/capabilities.ts index 5fd542d428a70..58d47cbb5ca41 100644 --- a/x-pack/plugins/transform/server/capabilities.ts +++ b/x-pack/plugins/transform/server/capabilities.ts @@ -127,50 +127,55 @@ export const setupCapabilities = ( }; }); - core.capabilities.registerSwitcher(async (request, capabilities, useDefaultCapabilities) => { - if (useDefaultCapabilities) { - return {}; - } - - const isSecurityPluginEnabled = securitySetup?.license.isEnabled() ?? false; - const startServices = await core.getStartServices(); - const [, { security: securityStart }] = startServices; + core.capabilities.registerSwitcher( + async (request, capabilities, useDefaultCapabilities) => { + if (useDefaultCapabilities) { + return {}; + } + + const isSecurityPluginEnabled = securitySetup?.license.isEnabled() ?? false; + const startServices = await core.getStartServices(); + const [, { security: securityStart }] = startServices; + + // If security is not enabled or not available, transform should have full permission + if (!isSecurityPluginEnabled || !securityStart) { + return { + transform: getInitialTransformCapabilities(true), + }; + } + + const checkPrivileges = securityStart.authz.checkPrivilegesDynamicallyWithRequest(request); + + const { hasAllRequested, privileges } = await checkPrivileges({ + elasticsearch: { + cluster: APP_CLUSTER_PRIVILEGES, + index: {}, + }, + }); + + const clusterPrivileges: Record = Array.isArray( + privileges?.elasticsearch?.cluster + ) + ? privileges.elasticsearch.cluster.reduce>((acc, p) => { + acc[p.privilege] = p.authorized; + return acc; + }, {}) + : {}; + + const hasOneIndexWithAllPrivileges = false; + + const transformCapabilities = getPrivilegesAndCapabilities( + clusterPrivileges, + hasOneIndexWithAllPrivileges, + hasAllRequested + ).capabilities; - // If security is not enabled or not available, transform should have full permission - if (!isSecurityPluginEnabled || !securityStart) { return { - transform: getInitialTransformCapabilities(true), + transform: transformCapabilities as Record>, }; + }, + { + capabilityPath: 'transform.*', } - - const checkPrivileges = securityStart.authz.checkPrivilegesDynamicallyWithRequest(request); - - const { hasAllRequested, privileges } = await checkPrivileges({ - elasticsearch: { - cluster: APP_CLUSTER_PRIVILEGES, - index: {}, - }, - }); - - const clusterPrivileges: Record = Array.isArray( - privileges?.elasticsearch?.cluster - ) - ? privileges.elasticsearch.cluster.reduce>((acc, p) => { - acc[p.privilege] = p.authorized; - return acc; - }, {}) - : {}; - - const hasOneIndexWithAllPrivileges = false; - - const transformCapabilities = getPrivilegesAndCapabilities( - clusterPrivileges, - hasOneIndexWithAllPrivileges, - hasAllRequested - ).capabilities; - - return { - transform: transformCapabilities as Record>, - }; - }); + ); }; diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index c06aff873c9bf..d00b542c58131 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -9023,7 +9023,6 @@ "xpack.apm.mobile.charts.nct": "Type de connexion réseau", "xpack.apm.mobile.charts.noResultsFound": "Résultat introuvable", "xpack.apm.mobile.charts.osVersion": "Version du système d'exploitation", - "xpack.apm.mobile.coming.soon": "Bientôt disponible", "xpack.apm.mobile.filters.appVersion": "Version de l'application", "xpack.apm.mobile.filters.device": "Appareil", "xpack.apm.mobile.filters.nct": "NCT", @@ -37250,16 +37249,13 @@ "xpack.serverlessSearch.languages.ruby.githubLabel": "elasticsearch-serverless-ruby", "xpack.serverlessSearch.learnMore": "En savoir plus", "xpack.serverlessSearch.nav.alerts": "Alertes", - "xpack.serverlessSearch.nav.content": "Contenu", "xpack.serverlessSearch.nav.content.indices": "Gestion des index", "xpack.serverlessSearch.nav.content.pipelines": "Pipelines", "xpack.serverlessSearch.nav.devTools": "Outils de développement", - "xpack.serverlessSearch.nav.explore": "Explorer", "xpack.serverlessSearch.nav.gettingStarted": "Premiers pas", "xpack.serverlessSearch.nav.mngt": "Gestion", "xpack.serverlessSearch.nav.performance": "Performances", "xpack.serverlessSearch.nav.projectSettings": "Paramètres de projet", - "xpack.serverlessSearch.nav.security": "Sécurité", "xpack.serverlessSearch.next": "Suivant", "xpack.serverlessSearch.optional": "Facultatif", "xpack.serverlessSearch.overview.footer.description": "Votre point de terminaison Elasticsearch est configuré et vous avez effectué quelques requêtes de base. Vous voilà prêt à approfondir les outils et les cas d'utilisation avancés.", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index 5f27f5b60da13..1ce0c2df38db5 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -9038,7 +9038,6 @@ "xpack.apm.mobile.charts.nct": "ネットワーク接続タイプ", "xpack.apm.mobile.charts.noResultsFound": "結果が見つかりませんでした", "xpack.apm.mobile.charts.osVersion": "OSバージョン", - "xpack.apm.mobile.coming.soon": "まもなくリリース", "xpack.apm.mobile.filters.appVersion": "アプリバージョン", "xpack.apm.mobile.filters.device": "デバイス", "xpack.apm.mobile.filters.nct": "NCT", @@ -37248,16 +37247,13 @@ "xpack.serverlessSearch.languages.ruby.githubLabel": "elasticsearch-serverless-ruby", "xpack.serverlessSearch.learnMore": "詳細", "xpack.serverlessSearch.nav.alerts": "アラート", - "xpack.serverlessSearch.nav.content": "コンテンツ", "xpack.serverlessSearch.nav.content.indices": "インデックス管理", "xpack.serverlessSearch.nav.content.pipelines": "パイプライン", "xpack.serverlessSearch.nav.devTools": "開発ツール", - "xpack.serverlessSearch.nav.explore": "探索", "xpack.serverlessSearch.nav.gettingStarted": "はじめて使う", "xpack.serverlessSearch.nav.mngt": "管理", "xpack.serverlessSearch.nav.performance": "パフォーマンス", "xpack.serverlessSearch.nav.projectSettings": "プロジェクト設定", - "xpack.serverlessSearch.nav.security": "セキュリティ", "xpack.serverlessSearch.next": "次へ", "xpack.serverlessSearch.optional": "オプション", "xpack.serverlessSearch.overview.footer.description": "Elasticsearchエンドポイントが設定され、いくつかの基本的なクエリが作成されました。これで、より高度なツールやユースケースを使いこなす準備が整いました。", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 7c8328a39f987..2fd8d38a579a5 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -9037,7 +9037,6 @@ "xpack.apm.mobile.charts.nct": "网络连接类型", "xpack.apm.mobile.charts.noResultsFound": "找不到结果", "xpack.apm.mobile.charts.osVersion": "操作系统版本", - "xpack.apm.mobile.coming.soon": "即将推出", "xpack.apm.mobile.filters.appVersion": "应用版本", "xpack.apm.mobile.filters.device": "设备", "xpack.apm.mobile.filters.nct": "NCT", @@ -37244,16 +37243,13 @@ "xpack.serverlessSearch.languages.ruby.githubLabel": "elasticsearch-serverless-ruby", "xpack.serverlessSearch.learnMore": "了解详情", "xpack.serverlessSearch.nav.alerts": "告警", - "xpack.serverlessSearch.nav.content": "内容", "xpack.serverlessSearch.nav.content.indices": "索引管理", "xpack.serverlessSearch.nav.content.pipelines": "管道", "xpack.serverlessSearch.nav.devTools": "开发工具", - "xpack.serverlessSearch.nav.explore": "浏览", "xpack.serverlessSearch.nav.gettingStarted": "入门", "xpack.serverlessSearch.nav.mngt": "管理", "xpack.serverlessSearch.nav.performance": "性能", "xpack.serverlessSearch.nav.projectSettings": "项目设置", - "xpack.serverlessSearch.nav.security": "安全", "xpack.serverlessSearch.next": "下一步", "xpack.serverlessSearch.optional": "可选", "xpack.serverlessSearch.overview.footer.description": "已设置您的 Elasticsearch 终端,并且您已提出一些基本查询。现在您已准备就绪,可以更深入地了解更多高级工具和用例。", diff --git a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_get_query_delay_setting.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_get_query_delay_setting.test.tsx index bf792e29ed604..c4e3ec261e6e3 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_get_query_delay_setting.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_get_query_delay_setting.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; import { renderHook } from '@testing-library/react-hooks/dom'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { useGetQueryDelaySettings } from './use_get_query_delay_settings'; 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 b9f33ab40c6fc..6ea281765496f 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 @@ -11,7 +11,7 @@ import { RuleStatus } from '../../types'; import { useKibana } from '../../common/lib/kibana'; import { IToasts } from '@kbn/core-notifications-browser'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; jest.mock('../../common/lib/kibana'); jest.mock('../lib/rule_api/aggregate_kuery_filter', () => ({ diff --git a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_rules.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_rules.test.tsx index 1342746223889..1a2c07eaaa9cf 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_rules.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_rules.test.tsx @@ -15,7 +15,7 @@ import { RuleStatus } from '../../types'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { useKibana } from '../../common/lib/kibana'; import { IToasts } from '@kbn/core-notifications-browser'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; jest.mock('../../common/lib/kibana'); jest.mock('../lib/rule_api/rules_kuery_filter', () => ({ diff --git a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_tags_query.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_tags_query.test.tsx index 7e36b5e4290ad..bb2dab67c0d4e 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_tags_query.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_load_tags_query.test.tsx @@ -10,7 +10,7 @@ import { useLoadTagsQuery } from './use_load_tags_query'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { useKibana } from '../../common/lib/kibana'; import { IToasts } from '@kbn/core-notifications-browser'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; const MOCK_TAGS = ['a', 'b', 'c']; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_update_rules_settings.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_update_rules_settings.test.tsx index 6a36a32ed2522..e431a4c2cf7aa 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_update_rules_settings.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_update_rules_settings.test.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { act, renderHook } from '@testing-library/react-hooks/dom'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { useUpdateRuleSettings } from './use_update_rules_settings'; const mockAddDanger = jest.fn(); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_form.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_form.test.tsx index 95e7b0c85ab55..cf12e2ce38af4 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_form.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_form.test.tsx @@ -9,7 +9,7 @@ import React, { lazy } from 'react'; import { ConnectorForm } from './connector_form'; import { actionTypeRegistryMock } from '../../action_type_registry.mock'; import userEvent from '@testing-library/user-event'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { act } from '@testing-library/react'; import { AppMockRenderer, createAppMockRenderer } from '../test_utils'; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_form_fields.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_form_fields.test.tsx index c2a6a86bb446b..45937cee8b22a 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_form_fields.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_form_fields.test.tsx @@ -10,7 +10,7 @@ import { coreMock } from '@kbn/core/public/mocks'; import { FormTestProvider } from '../../components/test_utils'; import { ConnectorFormFields } from './connector_form_fields'; import { actionTypeRegistryMock } from '../../action_type_registry.mock'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { AppMockRenderer, createAppMockRenderer } from '../test_utils'; describe('ConnectorFormFields', () => { diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/create_connector_flyout/index.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/create_connector_flyout/index.test.tsx index 9cc4603025ff3..554fb9aff3c30 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/create_connector_flyout/index.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/create_connector_flyout/index.test.tsx @@ -9,8 +9,7 @@ import React, { lazy } from 'react'; import { actionTypeRegistryMock } from '../../../action_type_registry.mock'; import userEvent from '@testing-library/user-event'; -import { waitFor } from '@testing-library/dom'; -import { act } from '@testing-library/react'; +import { waitFor, act } from '@testing-library/react'; import CreateConnectorFlyout from '.'; import { betaBadgeProps } from '../beta_badge_props'; import { AppMockRenderer, createAppMockRenderer } from '../../test_utils'; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/edit_connector_flyout/index.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/edit_connector_flyout/index.test.tsx index e687189ed0205..a108de1dc6f6c 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/edit_connector_flyout/index.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/edit_connector_flyout/index.test.tsx @@ -9,8 +9,7 @@ import React, { lazy } from 'react'; import { actionTypeRegistryMock } from '../../../action_type_registry.mock'; import userEvent from '@testing-library/user-event'; -import { waitFor } from '@testing-library/dom'; -import { act } from '@testing-library/react'; +import { waitFor, act } from '@testing-library/react'; import EditConnectorFlyout from '.'; import { ActionConnector, EditConnectorTabs, GenericValidationResult } from '../../../../types'; import { betaBadgeProps } from '../beta_badge_props'; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_get_cases.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_get_cases.test.tsx index 5f027e9b57fd0..945028df8118f 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_get_cases.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_get_cases.test.tsx @@ -7,7 +7,7 @@ import { renderHook } from '@testing-library/react-hooks'; import * as api from './apis/bulk_get_cases'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { useKibana } from '../../../../common/lib/kibana'; import { useBulkGetCases } from './use_bulk_get_cases'; import { AppMockRenderer, createAppMockRenderer } from '../../test_utils'; diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_get_maintenance_windows.test.ts b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_get_maintenance_windows.test.ts index e5b45a25b5dea..b46424c286c00 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_get_maintenance_windows.test.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_get_maintenance_windows.test.ts @@ -6,7 +6,7 @@ */ import { renderHook } from '@testing-library/react-hooks'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; import { MaintenanceWindowStatus } from '@kbn/alerting-plugin/common'; import * as api from './apis/bulk_get_maintenance_windows'; import { coreMock } from '@kbn/core/public/mocks'; diff --git a/x-pack/plugins/uptime/kibana.jsonc b/x-pack/plugins/uptime/kibana.jsonc index df0b2e13839cf..c07d0dc342a74 100644 --- a/x-pack/plugins/uptime/kibana.jsonc +++ b/x-pack/plugins/uptime/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/uptime-plugin", - "owner": "@elastic/uptime", + "owner": "@elastic/obs-ux-infra_services-team", "description": "This plugin visualizes data from Heartbeat, and integrates with other Observability solutions.", "plugin": { "id": "uptime", diff --git a/x-pack/plugins/uptime/public/legacy_uptime/components/common/uptime_date_picker.test.tsx b/x-pack/plugins/uptime/public/legacy_uptime/components/common/uptime_date_picker.test.tsx index 1510fe28f1721..66fd680d3fdfe 100644 --- a/x-pack/plugins/uptime/public/legacy_uptime/components/common/uptime_date_picker.test.tsx +++ b/x-pack/plugins/uptime/public/legacy_uptime/components/common/uptime_date_picker.test.tsx @@ -10,7 +10,7 @@ import { UptimeDatePicker } from './uptime_date_picker'; import { startPlugins } from '../../lib/__mocks__/uptime_plugin_start_mock'; import { createMemoryHistory } from 'history'; import { render } from '../../lib/helper/rtl_helpers'; -import { fireEvent } from '@testing-library/dom'; +import { fireEvent } from '@testing-library/react'; describe('UptimeDatePicker component', () => { jest.setTimeout(10_000); diff --git a/x-pack/plugins/uptime/public/legacy_uptime/components/monitor/synthetics/waterfall/components/waterfall.test.tsx b/x-pack/plugins/uptime/public/legacy_uptime/components/monitor/synthetics/waterfall/components/waterfall.test.tsx index 28e82930f3341..7761fe4206fda 100644 --- a/x-pack/plugins/uptime/public/legacy_uptime/components/monitor/synthetics/waterfall/components/waterfall.test.tsx +++ b/x-pack/plugins/uptime/public/legacy_uptime/components/monitor/synthetics/waterfall/components/waterfall.test.tsx @@ -11,7 +11,7 @@ import { renderLegendItem } from '../../step_detail/waterfall/waterfall_chart_wr import { render } from '../../../../../lib/helper/rtl_helpers'; import 'jest-canvas-mock'; -import { waitFor } from '@testing-library/dom'; +import { waitFor } from '@testing-library/react'; describe('waterfall', () => { it('sets the correct height in case of full height', () => { diff --git a/x-pack/plugins/uptime/public/legacy_uptime/components/monitor/synthetics/waterfall/components/waterfall_marker_icon.test.tsx b/x-pack/plugins/uptime/public/legacy_uptime/components/monitor/synthetics/waterfall/components/waterfall_marker_icon.test.tsx index 4241a7238ecd6..4bfe9d2dccfdd 100644 --- a/x-pack/plugins/uptime/public/legacy_uptime/components/monitor/synthetics/waterfall/components/waterfall_marker_icon.test.tsx +++ b/x-pack/plugins/uptime/public/legacy_uptime/components/monitor/synthetics/waterfall/components/waterfall_marker_icon.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { fireEvent, waitFor } from '@testing-library/dom'; +import { fireEvent, waitFor } from '@testing-library/react'; import { render } from '../../../../../lib/helper/rtl_helpers'; import { WaterfallMarkerIcon } from './waterfall_marker_icon'; import { TestWrapper } from './waterfall_marker_test_helper'; diff --git a/x-pack/plugins/uptime/public/legacy_uptime/components/overview/alerts/monitor_status_alert/alert_monitor_status.test.tsx b/x-pack/plugins/uptime/public/legacy_uptime/components/overview/alerts/monitor_status_alert/alert_monitor_status.test.tsx index 6dbef12159a18..c547b66748ffc 100644 --- a/x-pack/plugins/uptime/public/legacy_uptime/components/overview/alerts/monitor_status_alert/alert_monitor_status.test.tsx +++ b/x-pack/plugins/uptime/public/legacy_uptime/components/overview/alerts/monitor_status_alert/alert_monitor_status.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { screen } from '@testing-library/dom'; +import { screen } from '@testing-library/react'; import { AlertMonitorStatusComponent, AlertMonitorStatusProps, diff --git a/x-pack/plugins/uptime/public/legacy_uptime/components/overview/monitor_list/columns/define_connectors.test.tsx b/x-pack/plugins/uptime/public/legacy_uptime/components/overview/monitor_list/columns/define_connectors.test.tsx index 29f0dd189594c..3774e94e190b8 100644 --- a/x-pack/plugins/uptime/public/legacy_uptime/components/overview/monitor_list/columns/define_connectors.test.tsx +++ b/x-pack/plugins/uptime/public/legacy_uptime/components/overview/monitor_list/columns/define_connectors.test.tsx @@ -7,8 +7,7 @@ import React from 'react'; import { DefineAlertConnectors } from './define_connectors'; -import { screen } from '@testing-library/react'; -import { fireEvent } from '@testing-library/dom'; +import { screen, fireEvent } from '@testing-library/react'; import { ENABLE_STATUS_ALERT } from './translations'; import { render } from '../../../../lib/helper/rtl_helpers'; diff --git a/x-pack/plugins/uptime/public/legacy_uptime/components/overview/monitor_list/columns/enable_alert.test.tsx b/x-pack/plugins/uptime/public/legacy_uptime/components/overview/monitor_list/columns/enable_alert.test.tsx index 416dd8e963e9b..2f18c3e89f147 100644 --- a/x-pack/plugins/uptime/public/legacy_uptime/components/overview/monitor_list/columns/enable_alert.test.tsx +++ b/x-pack/plugins/uptime/public/legacy_uptime/components/overview/monitor_list/columns/enable_alert.test.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { EnableMonitorAlert } from './enable_alert'; -import { fireEvent } from '@testing-library/dom'; +import { fireEvent } from '@testing-library/react'; import { DYNAMIC_SETTINGS_DEFAULTS } from '../../../../../../common/constants'; import { makePing } from '../../../../../../common/runtime_types/ping'; diff --git a/x-pack/plugins/uptime/public/legacy_uptime/components/synthetics/check_steps/use_expanded_row.test.tsx b/x-pack/plugins/uptime/public/legacy_uptime/components/synthetics/check_steps/use_expanded_row.test.tsx index f79a93eee53e4..a139abe5d86a0 100644 --- a/x-pack/plugins/uptime/public/legacy_uptime/components/synthetics/check_steps/use_expanded_row.test.tsx +++ b/x-pack/plugins/uptime/public/legacy_uptime/components/synthetics/check_steps/use_expanded_row.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import ReactRouterDom from 'react-router-dom'; import { Route } from '@kbn/shared-ux-router'; -import { fireEvent, screen } from '@testing-library/dom'; +import { fireEvent, screen } from '@testing-library/react'; import { renderHook, act as hooksAct } from '@testing-library/react-hooks'; import { createMemoryHistory } from 'history'; import { EuiButtonIcon } from '@elastic/eui'; diff --git a/x-pack/plugins/uptime/public/legacy_uptime/lib/helper/rtl_helpers.tsx b/x-pack/plugins/uptime/public/legacy_uptime/lib/helper/rtl_helpers.tsx index b2f96c4bac8a3..0b23c089385d7 100644 --- a/x-pack/plugins/uptime/public/legacy_uptime/lib/helper/rtl_helpers.tsx +++ b/x-pack/plugins/uptime/public/legacy_uptime/lib/helper/rtl_helpers.tsx @@ -12,6 +12,7 @@ import { render as reactTestLibRender, MatcherFunction, RenderOptions, + configure, } from '@testing-library/react'; import { Router } from '@kbn/shared-ux-router'; import { Route } from '@kbn/shared-ux-router'; @@ -21,8 +22,6 @@ import { createMemoryHistory, History } from 'history'; import { CoreStart } from '@kbn/core/public'; import { I18nProvider } from '@kbn/i18n-react'; import { coreMock } from '@kbn/core/public/mocks'; -// eslint-disable-next-line import/no-extraneous-dependencies -import { configure } from '@testing-library/dom'; import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; import { IStorageWrapper } from '@kbn/kibana-utils-plugin/public'; import { KibanaContextProvider, KibanaServices } from '@kbn/kibana-react-plugin/public'; diff --git a/x-pack/plugins/uptime/public/legacy_uptime/pages/settings.test.tsx b/x-pack/plugins/uptime/public/legacy_uptime/pages/settings.test.tsx index 5c8fb95448fca..a8144f540a03e 100644 --- a/x-pack/plugins/uptime/public/legacy_uptime/pages/settings.test.tsx +++ b/x-pack/plugins/uptime/public/legacy_uptime/pages/settings.test.tsx @@ -8,7 +8,7 @@ import React from 'react'; import { isValidCertVal, SettingsPage } from './settings'; import { render } from '../lib/helper/rtl_helpers'; -import { fireEvent, waitFor } from '@testing-library/dom'; +import { fireEvent, waitFor } from '@testing-library/react'; import * as alertApi from '../state/api/alerts'; import { DYNAMIC_SETTINGS_DEFAULTS } from '../../../common/constants'; diff --git a/x-pack/plugins/ux/kibana.jsonc b/x-pack/plugins/ux/kibana.jsonc index af8d92f151786..e35cddbabbba6 100644 --- a/x-pack/plugins/ux/kibana.jsonc +++ b/x-pack/plugins/ux/kibana.jsonc @@ -1,7 +1,7 @@ { "type": "plugin", "id": "@kbn/ux-plugin", - "owner": "@elastic/uptime", + "owner": "@elastic/obs-ux-infra_services-team", "plugin": { "id": "ux", "server": true, diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/connector_types/pagerduty.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/connector_types/pagerduty.ts index 81a3c2ef966b9..7148ac962c728 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/connector_types/pagerduty.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/connector_types/pagerduty.ts @@ -175,6 +175,47 @@ export default function pagerdutyTest({ getService }: FtrProviderContext) { }); }); + it('should execute successfully with links and customDetails', async () => { + const { body: result } = await supertest + .post(`/api/actions/connector/${simulatedActionId}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: { + summary: 'just a test', + customDetails: { + myString: 'foo', + myNumber: 10, + myArray: ['foo', 'baz'], + myBoolean: true, + myObject: { + myNestedObject: 'foo', + }, + }, + links: [ + { + href: 'http://example.com', + text: 'a link', + }, + { + href: 'http://example.com', + text: 'a second link', + }, + ], + }, + }) + .expect(200); + + expect(proxyHaveBeenCalled).to.equal(true); + expect(result).to.eql({ + status: 'ok', + connector_id: simulatedActionId, + data: { + message: 'Event processed', + status: 'success', + }, + }); + }); + it('should handle a 40x pagerduty error', async () => { const { body: result } = await supertest .post(`/api/actions/connector/${simulatedActionId}/_execute`) diff --git a/x-pack/test/api_integration/apis/metrics_ui/constants.ts b/x-pack/test/api_integration/apis/metrics_ui/constants.ts index 7fd25f09875b4..13fd1acf7b199 100644 --- a/x-pack/test/api_integration/apis/metrics_ui/constants.ts +++ b/x-pack/test/api_integration/apis/metrics_ui/constants.ts @@ -40,7 +40,7 @@ export const DATES = { }, logs_and_metrics_with_aws: { min: 1564083185000, - max: 1564083493080, + max: 1564083705100, }, }, 'alert-test-data': { diff --git a/x-pack/test/apm_api_integration/tests/mobile/mobile_stats.spec.ts b/x-pack/test/apm_api_integration/tests/mobile/mobile_stats.spec.ts index edc852d97ad2a..f7bb8f328d220 100644 --- a/x-pack/test/apm_api_integration/tests/mobile/mobile_stats.spec.ts +++ b/x-pack/test/apm_api_integration/tests/mobile/mobile_stats.spec.ts @@ -10,7 +10,7 @@ import { apm, timerange } from '@kbn/apm-synthtrace-client'; import { ApmSynthtraceEsClient } from '@kbn/apm-synthtrace'; import { APIReturnType } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; import { ENVIRONMENT_ALL } from '@kbn/apm-plugin/common/environment_filter_values'; -import { sumBy, meanBy } from 'lodash'; +import { meanBy, sumBy } from 'lodash'; import { FtrProviderContext } from '../../common/ftr_provider_context'; type MobileStats = APIReturnType<'GET /internal/apm/mobile-services/{serviceName}/stats'>; @@ -101,6 +101,7 @@ async function generateData({ galaxy10.startNewSession(); huaweiP2.startNewSession(); return [ + galaxy10.appMetrics({ 'application.launch.time': 100 }).timestamp(timestamp), galaxy10 .transaction('Start View - View Appearing', 'Android Activity') .errors(galaxy10.crash({ message: 'error C' }).timestamp(timestamp)) @@ -224,6 +225,14 @@ export default function ApiTest({ getService }: FtrProviderContext) { ); expect(value).to.be(timeseriesMean); }); + it('returns same launch times', () => { + const { value, timeseries } = response.currentPeriod.launchTimes; + const timeseriesMean = meanBy( + timeseries.filter((bucket) => bucket.y !== null), + 'y' + ); + expect(value).to.be(timeseriesMean); + }); }); describe('when filters are applied', () => { @@ -237,6 +246,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { expect(response.currentPeriod.sessions.value).to.eql(0); expect(response.currentPeriod.requests.value).to.eql(0); expect(response.currentPeriod.crashRate.value).to.eql(0); + expect(response.currentPeriod.launchTimes.value).to.eql(null); expect(response.currentPeriod.sessions.timeseries.every((item) => item.y === 0)).to.eql( true @@ -247,6 +257,9 @@ export default function ApiTest({ getService }: FtrProviderContext) { expect(response.currentPeriod.crashRate.timeseries.every((item) => item.y === 0)).to.eql( true ); + expect( + response.currentPeriod.launchTimes.timeseries.every((item) => item.y === null) + ).to.eql(true); }); it('returns the correct values when single filter is applied', async () => { @@ -259,6 +272,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { expect(response.currentPeriod.sessions.value).to.eql(3); expect(response.currentPeriod.requests.value).to.eql(0); expect(response.currentPeriod.crashRate.value).to.eql(3); + expect(response.currentPeriod.launchTimes.value).to.eql(null); }); it('returns the correct values when multiple filters are applied', async () => { @@ -269,6 +283,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { expect(response.currentPeriod.sessions.value).to.eql(3); expect(response.currentPeriod.requests.value).to.eql(3); expect(response.currentPeriod.crashRate.value).to.eql(1); + expect(response.currentPeriod.launchTimes.value).to.eql(100); }); }); }); diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/create_rules_bulk.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/create_rules_bulk.ts index 382e902424b5f..6404da38cdde7 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/create_rules_bulk.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group1/create_rules_bulk.ts @@ -446,7 +446,9 @@ export default ({ getService }: FtrProviderContext): void => { .send([{ ...getSimpleRule(), investigation_fields: ['foo'] }]) .expect(400); - expect(body.message).to.eql('[request body]: 0: Invalid input'); + expect(body.message).to.eql( + '[request body]: 0.investigation_fields: Expected object, received array, 0.type: Invalid literal value, expected "eql", 0.language: Invalid literal value, expected "eql", 0.investigation_fields: Expected object, received array, 0.investigation_fields: Expected object, received array, and 22 more' + ); }); }); }); diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/index.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/index.ts index 350ac868ac90e..ae0bfaa8940e8 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/index.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/index.ts @@ -30,10 +30,5 @@ export default ({ loadTestFile }: FtrProviderContext): void => { loadTestFile(require.resolve('./runtime')); loadTestFile(require.resolve('./throttle')); loadTestFile(require.resolve('./ignore_fields')); - loadTestFile(require.resolve('./risk_engine/init_and_status_apis')); - loadTestFile(require.resolve('./risk_engine/risk_score_preview')); - loadTestFile(require.resolve('./risk_engine/risk_score_calculation')); - loadTestFile(require.resolve('./risk_engine/risk_scoring_task_execution')); - loadTestFile(require.resolve('./risk_engine/telemetry_usage')); }); }; diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/patch_rules.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/patch_rules.ts index 1b2fcee9c7143..b2000305a4dbb 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/patch_rules.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/patch_rules.ts @@ -719,7 +719,9 @@ export default ({ getService }: FtrProviderContext) => { }) .expect(400); - expect(body.message).to.eql('[request body]: Invalid input'); + expect(body.message).to.eql( + '[request body]: investigation_fields: Expected object, received array, investigation_fields: Expected object, received array, investigation_fields: Expected object, received array, investigation_fields: Expected object, received array, investigation_fields: Expected object, received array, and 3 more' + ); }); it('should patch a rule with a legacy investigation field and transform response', async () => { diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/patch_rules_bulk.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/patch_rules_bulk.ts index 4e7010a37dd49..91c18b2cfa6cc 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/patch_rules_bulk.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/patch_rules_bulk.ts @@ -542,7 +542,9 @@ export default ({ getService }: FtrProviderContext) => { ]) .expect(400); - expect(body.message).to.eql('[request body]: 0: Invalid input'); + expect(body.message).to.eql( + '[request body]: 0.investigation_fields: Expected object, received array, 0.investigation_fields: Expected object, received array, 0.investigation_fields: Expected object, received array, 0.investigation_fields: Expected object, received array, 0.investigation_fields: Expected object, received array, and 3 more' + ); }); it('should patch a rule with a legacy investigation field and transform field in response', async () => { diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/perform_bulk_action.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/perform_bulk_action.ts index e9234d47a1816..2529e794089a9 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/perform_bulk_action.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/perform_bulk_action.ts @@ -16,8 +16,8 @@ import { } from '@kbn/security-solution-plugin/common/constants'; import type { RuleResponse } from '@kbn/security-solution-plugin/common/api/detection_engine'; import { - BulkActionType, - BulkActionEditType, + BulkActionTypeEnum, + BulkActionEditTypeEnum, } from '@kbn/security-solution-plugin/common/api/detection_engine/rule_management'; import { getCreateExceptionListDetectionSchemaMock } from '@kbn/lists-plugin/common/schemas/request/create_exception_list_schema.mock'; import { EXCEPTION_LIST_ITEM_URL, EXCEPTION_LIST_URL } from '@kbn/securitysolution-list-constants'; @@ -106,7 +106,7 @@ export default ({ getService }: FtrProviderContext): void => { await createRule(supertest, log, getSimpleRule()); const { body } = await postBulkAction() - .send({ query: '', action: BulkActionType.export }) + .send({ query: '', action: BulkActionTypeEnum.export }) .expect(200) .expect('Content-Type', 'application/ndjson') .expect('Content-Disposition', 'attachment; filename="rules_export.ndjson"') @@ -177,7 +177,7 @@ export default ({ getService }: FtrProviderContext): void => { }; const { body } = await postBulkAction() - .send({ query: '', action: BulkActionType.export }) + .send({ query: '', action: BulkActionTypeEnum.export }) .expect(200) .expect('Content-Type', 'application/ndjson') .expect('Content-Disposition', 'attachment; filename="rules_export.ndjson"') @@ -234,7 +234,7 @@ export default ({ getService }: FtrProviderContext): void => { await createRule(supertest, log, testRule); const { body } = await postBulkAction() - .send({ query: '', action: BulkActionType.delete }) + .send({ query: '', action: BulkActionTypeEnum.delete }) .expect(200); expect(body.attributes.summary).to.eql({ failed: 0, skipped: 0, succeeded: 1, total: 1 }); @@ -269,7 +269,7 @@ export default ({ getService }: FtrProviderContext): void => { expect(sidecarActionsResults.hits.hits[0]?._source?.references[0].id).to.eql(rule1.id); const { body } = await postBulkAction() - .send({ query: '', action: BulkActionType.delete }) + .send({ query: '', action: BulkActionTypeEnum.delete }) .expect(200); expect(body.attributes.summary).to.eql({ failed: 0, skipped: 0, succeeded: 1, total: 1 }); @@ -290,7 +290,7 @@ export default ({ getService }: FtrProviderContext): void => { await createRule(supertest, log, getSimpleRule(ruleId)); const { body } = await postBulkAction() - .send({ query: '', action: BulkActionType.enable }) + .send({ query: '', action: BulkActionTypeEnum.enable }) .expect(200); expect(body.attributes.summary).to.eql({ failed: 0, skipped: 0, succeeded: 1, total: 1 }); @@ -326,7 +326,7 @@ export default ({ getService }: FtrProviderContext): void => { expect(sidecarActionsResults.hits.hits[0]?._source?.references[0].id).to.eql(rule1.id); const { body } = await postBulkAction() - .send({ query: '', action: BulkActionType.enable }) + .send({ query: '', action: BulkActionTypeEnum.enable }) .expect(200); expect(body.attributes.summary).to.eql({ failed: 0, skipped: 0, succeeded: 1, total: 1 }); @@ -363,7 +363,7 @@ export default ({ getService }: FtrProviderContext): void => { await createRule(supertest, log, getSimpleRule(ruleId, true)); const { body } = await postBulkAction() - .send({ query: '', action: BulkActionType.disable }) + .send({ query: '', action: BulkActionTypeEnum.disable }) .expect(200); expect(body.attributes.summary).to.eql({ failed: 0, skipped: 0, succeeded: 1, total: 1 }); @@ -399,7 +399,7 @@ export default ({ getService }: FtrProviderContext): void => { expect(sidecarActionsResults.hits.hits[0]?._source?.references[0].id).to.eql(rule1.id); const { body } = await postBulkAction() - .send({ query: '', action: BulkActionType.disable }) + .send({ query: '', action: BulkActionTypeEnum.disable }) .expect(200); expect(body.attributes.summary).to.eql({ failed: 0, skipped: 0, succeeded: 1, total: 1 }); @@ -437,7 +437,7 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ query: '', - action: BulkActionType.duplicate, + action: BulkActionTypeEnum.duplicate, duplicate: { include_exceptions: false, include_expired_exceptions: false }, }) .expect(200); @@ -516,7 +516,7 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ query: '', - action: BulkActionType.duplicate, + action: BulkActionTypeEnum.duplicate, duplicate: { include_exceptions: true, include_expired_exceptions: true }, }) .expect(200); @@ -622,7 +622,7 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ query: '', - action: BulkActionType.duplicate, + action: BulkActionTypeEnum.duplicate, duplicate: { include_exceptions: true, include_expired_exceptions: false }, }) .expect(200); @@ -696,7 +696,7 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ query: '', - action: BulkActionType.duplicate, + action: BulkActionTypeEnum.duplicate, duplicate: { include_exceptions: false, include_expired_exceptions: false }, }) .expect(200); @@ -778,10 +778,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body: bulkEditResponse } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_tags, + type: BulkActionEditTypeEnum.set_tags, value: tagsToOverwrite, }, ], @@ -835,10 +835,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body: bulkEditResponse } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.delete_tags, + type: BulkActionEditTypeEnum.delete_tags, value: tagsToDelete, }, ], @@ -891,10 +891,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body: bulkEditResponse } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_tags, + type: BulkActionEditTypeEnum.add_tags, value: addedTags, }, ], @@ -925,21 +925,21 @@ export default ({ getService }: FtrProviderContext): void => { existingTags: ['tag1', 'tag2', 'tag3'], tagsToUpdate: [], resultingTags: ['tag1', 'tag2', 'tag3'], - operation: BulkActionEditType.delete_tags, + operation: BulkActionEditTypeEnum.delete_tags, }, { caseName: '0 existing tags - 2 tags = 0 tags', existingTags: [], tagsToUpdate: ['tag4', 'tag5'], resultingTags: [], - operation: BulkActionEditType.delete_tags, + operation: BulkActionEditTypeEnum.delete_tags, }, { caseName: '3 existing tags - 2 other tags (none of them) = 3 tags', existingTags: ['tag1', 'tag2', 'tag3'], tagsToUpdate: ['tag4', 'tag5'], resultingTags: ['tag1', 'tag2', 'tag3'], - operation: BulkActionEditType.delete_tags, + operation: BulkActionEditTypeEnum.delete_tags, }, // Add no-ops { @@ -947,14 +947,14 @@ export default ({ getService }: FtrProviderContext): void => { existingTags: ['tag1', 'tag2', 'tag3'], tagsToUpdate: ['tag1', 'tag2'], resultingTags: ['tag1', 'tag2', 'tag3'], - operation: BulkActionEditType.add_tags, + operation: BulkActionEditTypeEnum.add_tags, }, { caseName: '3 existing tags + 0 tags = 3 tags', existingTags: ['tag1', 'tag2', 'tag3'], tagsToUpdate: [], resultingTags: ['tag1', 'tag2', 'tag3'], - operation: BulkActionEditType.add_tags, + operation: BulkActionEditTypeEnum.add_tags, }, ]; @@ -968,8 +968,8 @@ export default ({ getService }: FtrProviderContext): void => { const { body: bulkEditResponse } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { type: operation, value: tagsToUpdate, @@ -1007,10 +1007,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body: bulkEditResponse } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_index_patterns, + type: BulkActionEditTypeEnum.set_index_patterns, value: ['initial-index-*'], }, ], @@ -1042,10 +1042,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body: bulkEditResponse } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_index_patterns, + type: BulkActionEditTypeEnum.add_index_patterns, value: ['index3-*'], }, ], @@ -1079,10 +1079,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body: bulkEditResponse } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.delete_index_patterns, + type: BulkActionEditTypeEnum.delete_index_patterns, value: ['index2-*'], }, ], @@ -1113,10 +1113,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [mlRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_index_patterns, + type: BulkActionEditTypeEnum.add_index_patterns, value: ['index-*'], }, ], @@ -1143,10 +1143,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [esqlRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_index_patterns, + type: BulkActionEditTypeEnum.add_index_patterns, value: ['index-*'], }, ], @@ -1176,10 +1176,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [rule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.delete_index_patterns, + type: BulkActionEditTypeEnum.delete_index_patterns, value: ['simple-index-*'], }, ], @@ -1209,10 +1209,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [rule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_index_patterns, + type: BulkActionEditTypeEnum.set_index_patterns, value: [], }, ], @@ -1244,21 +1244,21 @@ export default ({ getService }: FtrProviderContext): void => { existingIndexPatterns: ['index1-*', 'index2-*', 'index3-*'], indexPatternsToUpdate: [], resultingIndexPatterns: ['index1-*', 'index2-*', 'index3-*'], - operation: BulkActionEditType.delete_index_patterns, + operation: BulkActionEditTypeEnum.delete_index_patterns, }, { caseName: '0 existing indeces - 2 indeces = 0 indeces', existingIndexPatterns: [], indexPatternsToUpdate: ['index1-*', 'index2-*'], resultingIndexPatterns: [], - operation: BulkActionEditType.delete_index_patterns, + operation: BulkActionEditTypeEnum.delete_index_patterns, }, { caseName: '3 existing indeces - 2 other indeces (none of them) = 3 indeces', existingIndexPatterns: ['index1-*', 'index2-*', 'index3-*'], indexPatternsToUpdate: ['index8-*', 'index9-*'], resultingIndexPatterns: ['index1-*', 'index2-*', 'index3-*'], - operation: BulkActionEditType.delete_index_patterns, + operation: BulkActionEditTypeEnum.delete_index_patterns, }, // Add no-ops { @@ -1266,14 +1266,14 @@ export default ({ getService }: FtrProviderContext): void => { existingIndexPatterns: ['index1-*', 'index2-*', 'index3-*'], indexPatternsToUpdate: ['index1-*', 'index2-*'], resultingIndexPatterns: ['index1-*', 'index2-*', 'index3-*'], - operation: BulkActionEditType.add_index_patterns, + operation: BulkActionEditTypeEnum.add_index_patterns, }, { caseName: '3 existing indeces + 0 indeces = 3 indeces', existingIndexPatterns: ['index1-*', 'index2-*', 'index3-*'], indexPatternsToUpdate: [], resultingIndexPatterns: ['index1-*', 'index2-*', 'index3-*'], - operation: BulkActionEditType.add_index_patterns, + operation: BulkActionEditTypeEnum.add_index_patterns, }, ]; @@ -1296,8 +1296,8 @@ export default ({ getService }: FtrProviderContext): void => { const { body: bulkEditResponse } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { type: operation, value: indexPatternsToUpdate, @@ -1353,10 +1353,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body: setTagsBody } = await postBulkAction().send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_tags, + type: BulkActionEditTypeEnum.set_tags, value: ['reset-tag'], }, ], @@ -1401,10 +1401,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_timeline, + type: BulkActionEditTypeEnum.set_timeline, value: { timeline_id: timelineId, timeline_title: timelineTitle, @@ -1444,10 +1444,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_timeline, + type: BulkActionEditTypeEnum.set_timeline, value: { timeline_id: '', timeline_title: '', @@ -1476,10 +1476,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [mlRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_index_patterns, + type: BulkActionEditTypeEnum.add_index_patterns, value: ['index-*'], }, ], @@ -1509,10 +1509,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [rule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.delete_index_patterns, + type: BulkActionEditTypeEnum.delete_index_patterns, value: ['simple-index-*'], }, ], @@ -1538,10 +1538,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [rule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_tags, + type: BulkActionEditTypeEnum.add_tags, value: ['test'], }, ], @@ -1559,35 +1559,35 @@ export default ({ getService }: FtrProviderContext): void => { describe('prebuilt rules', () => { const cases = [ { - type: BulkActionEditType.add_tags, + type: BulkActionEditTypeEnum.add_tags, value: ['new-tag'], }, { - type: BulkActionEditType.set_tags, + type: BulkActionEditTypeEnum.set_tags, value: ['new-tag'], }, { - type: BulkActionEditType.delete_tags, + type: BulkActionEditTypeEnum.delete_tags, value: ['new-tag'], }, { - type: BulkActionEditType.add_index_patterns, + type: BulkActionEditTypeEnum.add_index_patterns, value: ['test-*'], }, { - type: BulkActionEditType.set_index_patterns, + type: BulkActionEditTypeEnum.set_index_patterns, value: ['test-*'], }, { - type: BulkActionEditType.delete_index_patterns, + type: BulkActionEditTypeEnum.delete_index_patterns, value: ['test-*'], }, { - type: BulkActionEditType.set_timeline, + type: BulkActionEditTypeEnum.set_timeline, value: { timeline_id: 'mock-id', timeline_title: 'mock-title' }, }, { - type: BulkActionEditType.set_schedule, + type: BulkActionEditTypeEnum.set_schedule, value: { interval: '1m', lookback: '1m' }, }, ]; @@ -1599,8 +1599,8 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [prebuiltRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { type, value, @@ -1648,10 +1648,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [createdRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_rule_actions, + type: BulkActionEditTypeEnum.set_rule_actions, value: { throttle: '1h', actions: [ @@ -1706,10 +1706,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [createdRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_rule_actions, + type: BulkActionEditTypeEnum.set_rule_actions, value: { throttle: '1h', actions: [ @@ -1766,10 +1766,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [createdRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_rule_actions, + type: BulkActionEditTypeEnum.set_rule_actions, value: { throttle: '1h', actions: [], @@ -1818,10 +1818,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [createdRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_rule_actions, + type: BulkActionEditTypeEnum.set_rule_actions, value: { throttle: '1h', actions: [ @@ -1871,10 +1871,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [createdRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_rule_actions, + type: BulkActionEditTypeEnum.add_rule_actions, value: { throttle: '1h', actions: [ @@ -1931,10 +1931,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [createdRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_rule_actions, + type: BulkActionEditTypeEnum.add_rule_actions, value: { throttle: '1h', actions: [ @@ -2004,10 +2004,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [createdRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_rule_actions, + type: BulkActionEditTypeEnum.add_rule_actions, value: { throttle: '1h', actions: [ @@ -2069,10 +2069,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [createdRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_rule_actions, + type: BulkActionEditTypeEnum.add_rule_actions, value: { throttle: '1h', actions: [], @@ -2120,10 +2120,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [createdRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_rule_actions, + type: BulkActionEditTypeEnum.add_rule_actions, value: { throttle: '1h', actions: [], @@ -2147,10 +2147,10 @@ export default ({ getService }: FtrProviderContext): void => { describe('prebuilt rules', () => { const cases = [ { - type: BulkActionEditType.set_rule_actions, + type: BulkActionEditTypeEnum.set_rule_actions, }, { - type: BulkActionEditType.add_rule_actions, + type: BulkActionEditTypeEnum.add_rule_actions, }, ]; cases.forEach(({ type }) => { @@ -2162,8 +2162,8 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [prebuiltRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { type, value: { @@ -2220,10 +2220,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [prebuiltRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_rule_actions, + type: BulkActionEditTypeEnum.set_rule_actions, value: { throttle: '1h', actions: [ @@ -2235,7 +2235,7 @@ export default ({ getService }: FtrProviderContext): void => { }, }, { - type: BulkActionEditType.set_tags, + type: BulkActionEditTypeEnum.set_tags, value: ['tag-1'], }, ], @@ -2290,10 +2290,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [createdRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_rule_actions, + type: BulkActionEditTypeEnum.set_rule_actions, value: { throttle: payloadThrottle, actions: [], @@ -2331,62 +2331,63 @@ export default ({ getService }: FtrProviderContext): void => { expectedThrottle: undefined, }, ]; - [BulkActionEditType.set_rule_actions, BulkActionEditType.add_rule_actions].forEach( - (ruleAction) => { - casesForNonEmptyActions.forEach(({ payloadThrottle, expectedThrottle }) => { - it(`throttle is updated correctly for rule action "${ruleAction}", if payload throttle="${payloadThrottle}" and actions non empty`, async () => { - // create a new connector - const webHookConnector = await createWebHookConnector(); - - const ruleId = 'ruleId'; - const createdRule = await createRule(supertest, log, getSimpleRule(ruleId)); - - const { body } = await postBulkAction() - .send({ - ids: [createdRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ - { - type: BulkActionEditType.set_rule_actions, - value: { - throttle: payloadThrottle, - actions: [ - { - id: webHookConnector.id, - group: 'default', - params: { body: '{}' }, - }, - ], - }, + [ + BulkActionEditTypeEnum.set_rule_actions, + BulkActionEditTypeEnum.add_rule_actions, + ].forEach((ruleAction) => { + casesForNonEmptyActions.forEach(({ payloadThrottle, expectedThrottle }) => { + it(`throttle is updated correctly for rule action "${ruleAction}", if payload throttle="${payloadThrottle}" and actions non empty`, async () => { + // create a new connector + const webHookConnector = await createWebHookConnector(); + + const ruleId = 'ruleId'; + const createdRule = await createRule(supertest, log, getSimpleRule(ruleId)); + + const { body } = await postBulkAction() + .send({ + ids: [createdRule.id], + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ + { + type: BulkActionEditTypeEnum.set_rule_actions, + value: { + throttle: payloadThrottle, + actions: [ + { + id: webHookConnector.id, + group: 'default', + params: { body: '{}' }, + }, + ], }, - ], - }) - .expect(200); - - // Check that the updated rule is returned with the response - expect(body.attributes.results.updated[0].throttle).to.eql(expectedThrottle); - - const expectedActions = body.attributes.results.updated[0].actions.map( - (action: any) => ({ - ...action, - frequency: { - summary: true, - throttle: payloadThrottle !== 'rule' ? payloadThrottle : null, - notifyWhen: - payloadThrottle !== 'rule' ? 'onThrottleInterval' : 'onActiveAlert', }, - }) - ); + ], + }) + .expect(200); + + // Check that the updated rule is returned with the response + expect(body.attributes.results.updated[0].throttle).to.eql(expectedThrottle); + + const expectedActions = body.attributes.results.updated[0].actions.map( + (action: any) => ({ + ...action, + frequency: { + summary: true, + throttle: payloadThrottle !== 'rule' ? payloadThrottle : null, + notifyWhen: + payloadThrottle !== 'rule' ? 'onThrottleInterval' : 'onActiveAlert', + }, + }) + ); - // Check that the updates have been persisted - const { body: rule } = await fetchRule(ruleId).expect(200); + // Check that the updates have been persisted + const { body: rule } = await fetchRule(ruleId).expect(200); - expect(rule.throttle).to.eql(expectedThrottle); - expect(rule.actions).to.eql(expectedActions); - }); + expect(rule.throttle).to.eql(expectedThrottle); + expect(rule.actions).to.eql(expectedActions); }); - } - ); + }); + }); }); describe('notifyWhen', () => { @@ -2409,10 +2410,10 @@ export default ({ getService }: FtrProviderContext): void => { await postBulkAction() .send({ ids: [createdRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_rule_actions, + type: BulkActionEditTypeEnum.set_rule_actions, value: { throttle: payload.throttle, actions: [], @@ -2443,10 +2444,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_schedule, + type: BulkActionEditTypeEnum.set_schedule, value: { interval, lookback, @@ -2458,8 +2459,8 @@ export default ({ getService }: FtrProviderContext): void => { expect(body.statusCode).to.eql(400); expect(body.error).to.eql('Bad Request'); - expect(body.message).to.contain('Invalid value "0m" supplied to "edit,value,interval"'); - expect(body.message).to.contain('Invalid value "-1m" supplied to "edit,value,lookback"'); + expect(body.message).to.contain('edit.0.value.interval: Invalid'); + expect(body.message).to.contain('edit.0.value.lookback: Invalid'); }); it('should update schedule values in rules with a valid payload', async () => { @@ -2473,10 +2474,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_schedule, + type: BulkActionEditTypeEnum.set_schedule, value: { interval, lookback, @@ -2511,10 +2512,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body: setIndexBody } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_index_patterns, + type: BulkActionEditTypeEnum.add_index_patterns, value: ['initial-index-*'], overwrite_data_views: true, }, @@ -2552,10 +2553,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body: setIndexBody } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_index_patterns, + type: BulkActionEditTypeEnum.add_index_patterns, value: ['initial-index-*'], overwrite_data_views: false, }, @@ -2597,10 +2598,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body: setIndexBody } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_index_patterns, + type: BulkActionEditTypeEnum.set_index_patterns, value: ['initial-index-*'], overwrite_data_views: true, }, @@ -2638,10 +2639,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_index_patterns, + type: BulkActionEditTypeEnum.set_index_patterns, value: [], overwrite_data_views: true, }, @@ -2674,10 +2675,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body: setIndexBody } = await postBulkAction() .send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_index_patterns, + type: BulkActionEditTypeEnum.set_index_patterns, value: ['initial-index-*'], overwrite_data_views: false, }, @@ -2720,10 +2721,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [rule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.delete_index_patterns, + type: BulkActionEditTypeEnum.delete_index_patterns, value: ['simple-index-*'], overwrite_data_views: true, }, @@ -2761,10 +2762,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [rule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.delete_index_patterns, + type: BulkActionEditTypeEnum.delete_index_patterns, value: ['simple-index-*'], overwrite_data_views: true, }, @@ -2797,10 +2798,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [rule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.delete_index_patterns, + type: BulkActionEditTypeEnum.delete_index_patterns, value: ['simple-index-*'], overwrite_data_views: false, }, @@ -2830,14 +2831,14 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [rule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.add_index_patterns, + type: BulkActionEditTypeEnum.add_index_patterns, value: ['initial-index-*'], }, { - type: BulkActionEditType.add_tags, + type: BulkActionEditTypeEnum.add_tags, value: ['tag3'], }, ], @@ -2868,16 +2869,16 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [rule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ // Valid operation { - type: BulkActionEditType.add_index_patterns, + type: BulkActionEditTypeEnum.add_index_patterns, value: ['initial-index-*'], }, // Operation to be skipped { - type: BulkActionEditType.add_tags, + type: BulkActionEditTypeEnum.add_tags, value: ['tag1'], }, ], @@ -2908,16 +2909,16 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [rule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ // Operation to be skipped { - type: BulkActionEditType.add_index_patterns, + type: BulkActionEditTypeEnum.add_index_patterns, value: ['index1-*'], }, // Operation to be skipped { - type: BulkActionEditType.add_tags, + type: BulkActionEditTypeEnum.add_tags, value: ['tag1'], }, ], @@ -2949,10 +2950,10 @@ export default ({ getService }: FtrProviderContext): void => { Array.from({ length: 10 }).map(() => postBulkAction().send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_timeline, + type: BulkActionEditTypeEnum.set_timeline, value: { timeline_id: timelineId, timeline_title: timelineTitle, @@ -2978,10 +2979,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ ids: [id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_timeline, + type: BulkActionEditTypeEnum.set_timeline, value: { timeline_id: timelineId, timeline_title: timelineTitle, @@ -3033,7 +3034,7 @@ export default ({ getService }: FtrProviderContext): void => { it('should export rules with legacy investigation_fields and transform legacy field in response', async () => { const { body } = await postBulkAction() - .send({ query: '', action: BulkActionType.export }) + .send({ query: '', action: BulkActionTypeEnum.export }) .expect(200) .expect('Content-Type', 'application/ndjson') .expect('Content-Disposition', 'attachment; filename="rules_export.ndjson"') @@ -3094,7 +3095,7 @@ export default ({ getService }: FtrProviderContext): void => { it('should delete rules with investigation fields and transform legacy field in response', async () => { const { body } = await postBulkAction() - .send({ query: '', action: BulkActionType.delete }) + .send({ query: '', action: BulkActionTypeEnum.delete }) .expect(200); expect(body.attributes.summary).to.eql({ failed: 0, skipped: 0, succeeded: 3, total: 3 }); @@ -3124,7 +3125,7 @@ export default ({ getService }: FtrProviderContext): void => { it('should enable rules with legacy investigation fields and transform legacy field in response', async () => { const { body } = await postBulkAction() - .send({ query: '', action: BulkActionType.enable }) + .send({ query: '', action: BulkActionTypeEnum.enable }) .expect(200); expect(body.attributes.summary).to.eql({ failed: 0, skipped: 0, succeeded: 3, total: 3 }); @@ -3188,7 +3189,7 @@ export default ({ getService }: FtrProviderContext): void => { it('should disable rules with legacy investigation fields and transform legacy field in response', async () => { const { body } = await postBulkAction() - .send({ query: '', action: BulkActionType.disable }) + .send({ query: '', action: BulkActionTypeEnum.disable }) .expect(200); expect(body.attributes.summary).to.eql({ failed: 0, skipped: 0, succeeded: 3, total: 3 }); @@ -3251,7 +3252,7 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postBulkAction() .send({ query: '', - action: BulkActionType.duplicate, + action: BulkActionTypeEnum.duplicate, duplicate: { include_exceptions: false, include_expired_exceptions: false }, }) .expect(200); @@ -3353,10 +3354,10 @@ export default ({ getService }: FtrProviderContext): void => { it('should edit rules with legacy investigation fields', async () => { const { body } = await postBulkAction().send({ query: '', - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_tags, + type: BulkActionEditTypeEnum.set_tags, value: ['reset-tag'], }, ], diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/perform_bulk_action_dry_run.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/perform_bulk_action_dry_run.ts index a6df465d09f68..f1df03187379c 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/perform_bulk_action_dry_run.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/perform_bulk_action_dry_run.ts @@ -12,8 +12,8 @@ import { getCreateEsqlRulesSchemaMock } from '@kbn/security-solution-plugin/comm import expect from 'expect'; import { - BulkActionType, - BulkActionEditType, + BulkActionTypeEnum, + BulkActionEditTypeEnum, } from '@kbn/security-solution-plugin/common/api/detection_engine/rule_management'; import { FtrProviderContext } from '../../common/ftr_provider_context'; import { @@ -65,7 +65,7 @@ export default ({ getService }: FtrProviderContext): void => { await createRule(supertest, log, getSimpleRule()); const { body } = await postDryRunBulkAction() - .send({ action: BulkActionType.export }) + .send({ action: BulkActionTypeEnum.export }) .expect(400); expect(body).toEqual({ @@ -80,7 +80,7 @@ export default ({ getService }: FtrProviderContext): void => { await createRule(supertest, log, testRule); const { body } = await postDryRunBulkAction() - .send({ action: BulkActionType.delete }) + .send({ action: BulkActionTypeEnum.delete }) .expect(200); expect(body.attributes.summary).toEqual({ failed: 0, skipped: 0, succeeded: 1, total: 1 }); @@ -101,7 +101,7 @@ export default ({ getService }: FtrProviderContext): void => { await createRule(supertest, log, getSimpleRule(ruleId)); const { body } = await postDryRunBulkAction() - .send({ action: BulkActionType.enable }) + .send({ action: BulkActionTypeEnum.enable }) .expect(200); expect(body.attributes.summary).toEqual({ failed: 0, skipped: 0, succeeded: 1, total: 1 }); @@ -123,7 +123,7 @@ export default ({ getService }: FtrProviderContext): void => { await createRule(supertest, log, getSimpleRule(ruleId, true)); const { body } = await postDryRunBulkAction() - .send({ action: BulkActionType.disable }) + .send({ action: BulkActionTypeEnum.disable }) .expect(200); expect(body.attributes.summary).toEqual({ failed: 0, skipped: 0, succeeded: 1, total: 1 }); @@ -146,7 +146,7 @@ export default ({ getService }: FtrProviderContext): void => { await createRule(supertest, log, ruleToDuplicate); const { body } = await postDryRunBulkAction() - .send({ action: BulkActionType.disable }) + .send({ action: BulkActionTypeEnum.disable }) .expect(200); expect(body.attributes.summary).toEqual({ failed: 0, skipped: 0, succeeded: 1, total: 1 }); @@ -172,10 +172,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postDryRunBulkAction() .send({ - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_tags, + type: BulkActionEditTypeEnum.set_tags, value: ['reset-tag'], }, ], @@ -208,10 +208,10 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postDryRunBulkAction() .send({ ids: [immutableRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { - type: BulkActionEditType.set_tags, + type: BulkActionEditTypeEnum.set_tags, value: ['reset-tag'], }, ], @@ -242,9 +242,9 @@ export default ({ getService }: FtrProviderContext): void => { describe('validate updating index pattern for machine learning rule', () => { const actions = [ - BulkActionEditType.add_index_patterns, - BulkActionEditType.set_index_patterns, - BulkActionEditType.delete_index_patterns, + BulkActionEditTypeEnum.add_index_patterns, + BulkActionEditTypeEnum.set_index_patterns, + BulkActionEditTypeEnum.delete_index_patterns, ]; actions.forEach((editAction) => { @@ -254,8 +254,8 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postDryRunBulkAction() .send({ ids: [mlRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { type: editAction, value: [], @@ -295,9 +295,9 @@ export default ({ getService }: FtrProviderContext): void => { describe('validate updating index pattern for ES|QL rule', () => { const actions = [ - BulkActionEditType.add_index_patterns, - BulkActionEditType.set_index_patterns, - BulkActionEditType.delete_index_patterns, + BulkActionEditTypeEnum.add_index_patterns, + BulkActionEditTypeEnum.set_index_patterns, + BulkActionEditTypeEnum.delete_index_patterns, ]; actions.forEach((editAction) => { @@ -307,8 +307,8 @@ export default ({ getService }: FtrProviderContext): void => { const { body } = await postDryRunBulkAction() .send({ ids: [esqlRule.id], - action: BulkActionType.edit, - [BulkActionType.edit]: [ + action: BulkActionTypeEnum.edit, + [BulkActionTypeEnum.edit]: [ { type: editAction, value: [], diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/update_rules.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/update_rules.ts index 7c2d88620924f..d88ed8a898f90 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/update_rules.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/update_rules.ts @@ -566,7 +566,8 @@ export default ({ getService }: FtrProviderContext) => { expect(body).to.eql({ error: 'Bad Request', - message: '[request body]: Invalid input', + message: + '[request body]: type: Invalid literal value, expected "eql", language: Invalid literal value, expected "eql", type: Invalid literal value, expected "query", type: Invalid literal value, expected "saved_query", saved_id: Required, and 14 more', statusCode: 400, }); }); @@ -955,7 +956,9 @@ export default ({ getService }: FtrProviderContext) => { .send(updatedRule) .expect(400); - expect(body.message).to.eql('[request body]: Invalid input'); + expect(body.message).to.eql( + '[request body]: investigation_fields: Expected object, received array, type: Invalid literal value, expected "eql", language: Invalid literal value, expected "eql", investigation_fields: Expected object, received array, investigation_fields: Expected object, received array, and 22 more' + ); }); it('unsets legacy investigation fields when field not specified for update', async () => { diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/update_rules_bulk.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/update_rules_bulk.ts index b5dbf7fca40f2..a3defbb6d1c82 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/update_rules_bulk.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/update_rules_bulk.ts @@ -853,7 +853,9 @@ export default ({ getService }: FtrProviderContext) => { ]) .expect(400); - expect(body.message).to.eql('[request body]: 0: Invalid input'); + expect(body.message).to.eql( + '[request body]: 0.investigation_fields: Expected object, received array, 0.type: Invalid literal value, expected "eql", 0.language: Invalid literal value, expected "eql", 0.investigation_fields: Expected object, received array, 0.investigation_fields: Expected object, received array, and 22 more' + ); }); it('updates a rule with legacy investigation fields and transforms field in response', async () => { diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/rule_execution_logic/query.ts b/x-pack/test/detection_engine_api_integration/security_and_spaces/rule_execution_logic/query.ts index 69425ac7fa4fc..4c38edaf0cd28 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/rule_execution_logic/query.ts +++ b/x-pack/test/detection_engine_api_integration/security_and_spaces/rule_execution_logic/query.ts @@ -28,7 +28,7 @@ import { v4 as uuidv4 } from 'uuid'; import { QueryRuleCreateProps, - BulkActionType, + BulkActionTypeEnum, AlertSuppressionMissingFieldsStrategyEnum, } from '@kbn/security-solution-plugin/common/api/detection_engine'; import { RuleExecutionStatusEnum } from '@kbn/security-solution-plugin/common/api/detection_engine/rule_monitoring'; @@ -2296,7 +2296,7 @@ export default ({ getService }: FtrProviderContext) => { .post(DETECTION_ENGINE_RULES_BULK_ACTION) .set('kbn-xsrf', 'true') .set('elastic-api-version', '2023-10-31') - .send({ query: '', action: BulkActionType.enable }) + .send({ query: '', action: BulkActionTypeEnum.enable }) .expect(200); // Confirming that enabling did not migrate rule, so rule diff --git a/x-pack/test/functional/apps/infra/home_page.ts b/x-pack/test/functional/apps/infra/home_page.ts index 8c0cc688cb582..27cc61ca0c273 100644 --- a/x-pack/test/functional/apps/infra/home_page.ts +++ b/x-pack/test/functional/apps/infra/home_page.ts @@ -238,12 +238,12 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await retry.try(async () => { const nodesWithValue = await pageObjects.infraHome.getNodesWithValues(); expect(nodesWithValue).to.eql([ - { name: 'demo-stack-apache-01', value: 1.4, color: '#6092c0' }, - { name: 'demo-stack-mysql-01', value: 1.2, color: '#82a7cd' }, - { name: 'demo-stack-nginx-01', value: 1.1, color: '#93b1d3' }, - { name: 'demo-stack-redis-01', value: 1, color: '#a2bcd9' }, + { name: 'demo-stack-apache-01', value: 1.2, color: '#6092c0' }, + { name: 'demo-stack-mysql-01', value: 1, color: '#93b1d3' }, + { name: 'demo-stack-nginx-01', value: 0.9, color: '#b2c7df' }, + { name: 'demo-stack-redis-01', value: 0.8, color: '#b2c7df' }, { name: 'demo-stack-haproxy-01', value: 0.8, color: '#c2d2e6' }, - { name: 'demo-stack-client-01', value: 0.6, color: '#f0f4f9' }, + { name: 'demo-stack-client-01', value: 0.5, color: '#f0f4f9' }, ]); }); }); @@ -256,12 +256,12 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await retry.try(async () => { const nodesWithValue = await pageObjects.infraHome.getNodesWithValues(); expect(nodesWithValue).to.eql([ - { name: 'demo-stack-client-01', value: 0.6, color: '#f0f4f9' }, + { name: 'demo-stack-client-01', value: 0.5, color: '#f0f4f9' }, { name: 'demo-stack-haproxy-01', value: 0.8, color: '#c2d2e6' }, - { name: 'demo-stack-redis-01', value: 1, color: '#a2bcd9' }, - { name: 'demo-stack-nginx-01', value: 1.1, color: '#93b1d3' }, - { name: 'demo-stack-mysql-01', value: 1.2, color: '#82a7cd' }, - { name: 'demo-stack-apache-01', value: 1.4, color: '#6092c0' }, + { name: 'demo-stack-redis-01', value: 0.8, color: '#b2c7df' }, + { name: 'demo-stack-nginx-01', value: 0.9, color: '#b2c7df' }, + { name: 'demo-stack-mysql-01', value: 1, color: '#93b1d3' }, + { name: 'demo-stack-apache-01', value: 1.2, color: '#6092c0' }, ]); }); }); @@ -282,7 +282,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await retry.try(async () => { const nodesWithValue = await pageObjects.infraHome.getNodesWithValues(); expect(nodesWithValue).to.eql([ - { name: 'demo-stack-apache-01', value: 1.4, color: '#6092c0' }, + { name: 'demo-stack-apache-01', value: 1.2, color: '#6092c0' }, ]); }); await pageObjects.infraHome.clearSearchTerm(); @@ -295,12 +295,12 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await retry.try(async () => { const nodesWithValue = await pageObjects.infraHome.getNodesWithValues(); expect(nodesWithValue).to.eql([ - { name: 'demo-stack-client-01', value: 0.6, color: '#6092c0' }, + { name: 'demo-stack-client-01', value: 0.5, color: '#6092c0' }, { name: 'demo-stack-haproxy-01', value: 0.8, color: '#b5c9df' }, - { name: 'demo-stack-redis-01', value: 1, color: '#f1d9b9' }, - { name: 'demo-stack-nginx-01', value: 1.1, color: '#eec096' }, - { name: 'demo-stack-mysql-01', value: 1.2, color: '#eba47a' }, - { name: 'demo-stack-apache-01', value: 1.4, color: '#e7664c' }, + { name: 'demo-stack-redis-01', value: 0.8, color: '#d0dcea' }, + { name: 'demo-stack-nginx-01', value: 0.9, color: '#d0dcea' }, + { name: 'demo-stack-mysql-01', value: 1, color: '#eec096' }, + { name: 'demo-stack-apache-01', value: 1.2, color: '#e7664c' }, ]); }); }); diff --git a/x-pack/test/security_solution_api_integration/README.md b/x-pack/test/security_solution_api_integration/README.md index ebdf649e1e2bb..c0162a0abb041 100644 --- a/x-pack/test/security_solution_api_integration/README.md +++ b/x-pack/test/security_solution_api_integration/README.md @@ -28,7 +28,7 @@ ex: ``` -## Adding new security area's tests +# Adding new security area's tests 1. Within the `test_suites` directory, create a new area folder. 2. Introduce `ess.config` and `serverless.config` files to reference the new test files and incorporate any additional custom properties defined in the `CreateTestConfigOptions` interface. @@ -36,7 +36,7 @@ ex: 4. Append a new entry in the `ftr_configs.yml` file to enable the execution of the newly added tests within the CI pipeline. -## Testing locally +# Testing locally In the `package.json` file, you'll find commands to configure the server for each environment and to run tests against that specific environment. These commands adhere to the Mocha tagging system, allowing for the inclusion and exclusion of tags, mirroring the setup of the CI pipeline. @@ -44,49 +44,55 @@ In the `package.json` file, you'll find commands to configure the server for eac In this project, you can run various commands to execute tests and workflows, each of which can be customized by specifying different parameters. Below, how to define the commands based on the parameters and their order. -### Command Structure - -The command structure follows this pattern: - -- ``: The name of the specific command or test case. -- ``: The test folder or workflow you want to run. -- ``: The type of operation, either "server" or "runner." -- ``: The testing environment, such as "serverlessEnv," "essEnv," or "qaEnv." -- ``: The license folder the test is defined under such as "default_license", by default the value is "default_license" -- ``: The area the test is defined under, such as "detection_engine", by default the value is "detection_engine" - -### Serverless and Ess Configuration - -- When using "serverless" or "ess" in the script, it specifies the correct configuration file for the tests. -- "Serverless" and "ess" help determine the configuration specific to the chosen test. - -### serverlessEnv, essEnv, qaEnv Grep Command - -- 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. - - -### Command Examples - -Here are some command examples using the provided parameters: - -1. **Run the server for "exception_workflows" in the "serverlessEnv" environment:** - ```shell - npm run initialize-server 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 exceptions/workflows serverless serverlessEnv - ``` -3. **Run tests for "exception_workflows" using the serverless runner in the "qaEnv" environment:** - ```shell - npm run run-tests exceptions/workflows serverless qaEnv - ``` -4. **Run the server for "exception_workflows" in the "essEnv" environment:** - ```shell - npm run initialize-server exceptions/workflows ess - ``` -5. **Run tests for "exception_workflows" using the ess runner in the "essEnv" environment:** - ```shell - npm run run-tests exceptions/workflows ess essEnv - ``` \ No newline at end of file +1. Server Initialization and running tests for ex: (Detections Response - Default License): + + The command structure follows this pattern + - `` can be either "server" or "runner," allowing you to either set up the server or execute the tests against the designated server. + - ``: The area the test is defined under, such as "detection_engine, entity_analytics,.." + - ``: The license folder the test is defined under such as "default_license, basic_license,..." + + #### `initialize-server:dr:default` + + - Command: `node ./scripts/index.js server detections_response default_license` + - Description: Initiates the server for the Detections Response area with the default license. + #### `run-tests:dr:default` + + - Command: `node ./scripts/index.js runner detections_response default_license` + - 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 qaEnv + ``` + 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 + ``` \ No newline at end of file diff --git a/x-pack/test/security_solution_api_integration/ftr_provider_context.d.ts b/x-pack/test/security_solution_api_integration/ftr_provider_context.d.ts index ae275fcecf99d..3a44ea9db01fe 100644 --- a/x-pack/test/security_solution_api_integration/ftr_provider_context.d.ts +++ b/x-pack/test/security_solution_api_integration/ftr_provider_context.d.ts @@ -4,7 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ +import { GenericFtrProviderContext } from '@kbn/test'; -import type { FtrProviderContext } from '../../test_serverless/api_integration/ftr_provider_context'; +import { services } from '../../test_serverless/api_integration/services'; -export type { FtrProviderContext }; +export type FtrProviderContext = GenericFtrProviderContext; diff --git a/x-pack/test/security_solution_api_integration/package.json b/x-pack/test/security_solution_api_integration/package.json index 24696f0c00bf0..a2bbd939fade2 100644 --- a/x-pack/test/security_solution_api_integration/package.json +++ b/x-pack/test/security_solution_api_integration/package.json @@ -7,6 +7,8 @@ "scripts": { "initialize-server:dr:default": "node ./scripts/index.js server detections_response default_license", "run-tests:dr:default": "node ./scripts/index.js runner detections_response default_license", + "initialize-server:ea:default": "node ./scripts/index.js server entity_analytics default_license", + "run-tests:ea:default": "node ./scripts/index.js runner entity_analytics default_license", "exception_workflows:server:serverless": "npm run initialize-server:dr:default exceptions/workflows serverless", "exception_workflows:runner:serverless": "npm run run-tests:dr:default exceptions/workflows serverless serverlessEnv", "exception_workflows:qa:serverless": "npm run run-tests:dr:default exceptions/workflows serverless qaEnv", @@ -41,6 +43,11 @@ "alerts:runner:serverless": "npm run run-tests:dr:default alerts serverless serverlessEnv", "alerts:qa:serverless": "npm run run-tests:dr:default alerts serverless qaEnv", "alerts:server:ess": "npm run initialize-server:dr:default alerts ess", - "alerts:runner:ess": "npm run run-tests:dr:default alerts ess essEnv" + "alerts:runner:ess": "npm run run-tests:dr:default alerts ess essEnv", + "entity_analytics:server:serverless": "npm run initialize-server:ea:default risk_engine serverless", + "entity_analytics:runner:serverless": "npm run run-tests:ea:default risk_engine serverless serverlessEnv", + "entity_analytics:qa:serverless": "npm run run-tests:ea:default risk_engine serverless qaEnv", + "entity_analytics:server:ess": "npm run initialize-server:ea:default risk_engine ess", + "entity_analytics:runner:ess": "npm run run-tests:ea:default risk_engine ess essEnv" } } diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/rule_creation/create_rules.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/rule_creation/create_rules.ts index 97b602c4db617..5ace976f1f4fc 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/rule_creation/create_rules.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/default_license/rule_creation/create_rules.ts @@ -467,7 +467,8 @@ export default ({ getService }: FtrProviderContext) => { expect(body).to.eql({ error: 'Bad Request', - message: '[request body]: Invalid input', + message: + '[request body]: type: Invalid literal value, expected "eql", language: Invalid literal value, expected "eql", type: Invalid literal value, expected "query", type: Invalid literal value, expected "saved_query", saved_id: Required, and 14 more', statusCode: 400, }); }); @@ -574,7 +575,9 @@ export default ({ getService }: FtrProviderContext) => { .send(rule) .expect(400); - expect(body.message).to.eql('[request body]: Invalid input'); + expect(body.message).to.eql( + '[request body]: investigation_fields: Expected object, received array, type: Invalid literal value, expected "eql", language: Invalid literal value, expected "eql", investigation_fields: Expected object, received array, investigation_fields: Expected object, received array, and 22 more' + ); }); }); }); diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/alerts/get_alerts_by_ids.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/alerts/get_alerts_by_ids.ts index ce2b7ed1a4cf4..1cfc922d76677 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/alerts/get_alerts_by_ids.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/alerts/get_alerts_by_ids.ts @@ -14,6 +14,7 @@ import type { RiskEnrichmentFields } from '@kbn/security-solution-plugin/server/ import { DETECTION_ENGINE_QUERY_SIGNALS_URL as DETECTION_ENGINE_QUERY_ALERTS_URL } from '@kbn/security-solution-plugin/common/constants'; import { countDownTest } from '../count_down_test'; import { getQueryAlertsId } from './get_query_alerts_ids'; +import { routeWithNamespace } from '../route_with_namespace'; /** * Given an array of rule ids this will return only alerts based on that rule id both @@ -25,12 +26,14 @@ export const getAlertsByIds = async ( supertest: SuperTest.SuperTest, log: ToolingLog, ids: string[], - size?: number + size?: number, + namespace?: string ): Promise> => { const alertsOpen = await countDownTest>( async () => { + const route = routeWithNamespace(DETECTION_ENGINE_QUERY_ALERTS_URL, namespace); const response = await supertest - .post(DETECTION_ENGINE_QUERY_ALERTS_URL) + .post(route) .set('kbn-xsrf', 'true') .send(getQueryAlertsId(ids, size)); if (response.status !== 200) { diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/alerts/wait_for_alerts_to_be_present.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/alerts/wait_for_alerts_to_be_present.ts index e638bacf738c2..f7e873f98d4c7 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/alerts/wait_for_alerts_to_be_present.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/alerts/wait_for_alerts_to_be_present.ts @@ -21,11 +21,12 @@ export const waitForAlertsToBePresent = async ( supertest: SuperTest.SuperTest, log: ToolingLog, numberOfAlerts = 1, - alertIds: string[] + alertIds: string[], + namespace?: string ): Promise => { await waitFor( async () => { - const alertsOpen = await getAlertsByIds(supertest, log, alertIds, numberOfAlerts); + const alertsOpen = await getAlertsByIds(supertest, log, alertIds, numberOfAlerts, namespace); return alertsOpen.hits.hits.length >= numberOfAlerts; }, 'waitForAlertsToBePresent', diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/data_generator/README.md b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/data_generator/README.md new file mode 100644 index 0000000000000..e737e7b133929 --- /dev/null +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/data_generator/README.md @@ -0,0 +1,606 @@ +# Data Generator for functional tests + +Helper to generate and index documents for using in Kibana functional tests + +- [Data Generator for functional tests](#data-generator-for-functional-tests) + - [DataGenerator](#datagenerator) + - [Initialization](#initialization) + - [Prerequisites](#prerequisites) + - [dataGeneratorFactory](#datageneratorfactory) + - [methods](#methods) + - [**indexListOfDocuments**](#indexlistofdocuments) + - [**indexGeneratedDocuments**](#indexgenerateddocuments) + - [**indexEnhancedDocuments**](#indexenhanceddocuments) + - [Utils](#utils) + - [**generateDocuments**](#generatedocuments) + - [**enhanceDocument**](#enhancedocument) + - [**enhanceDocuments**](#enhancedocuments) + - [Usage](#usage) + - [create test query rule that queries indexed documents within a test](#create-test-query-rule-that-queries-indexed-documents-within-a-test) + +## DataGenerator + +### Initialization + + +#### Prerequisites +1. Create index mappings in `x-pack/test/functional/es_archives/security_solution` + - create folder for index `foo_bar` + - add mappings file `mappings.json` in it + +
    + x-pack/test/functional/es_archives/security_solution/foo_bar/mappings.json + + ```JSON + { + "type": "index", + "value": { + "index": "foo_bar", + "mappings": { + "properties": { + "id": { + "type": "keyword" + }, + "@timestamp": { + "type": "date" + }, + "foo": { + "type": "keyword" + }, + } + }, + "settings": { + "index": { + "number_of_replicas": "1", + "number_of_shards": "1" + } + } + } + } + ``` +
    +2. Add in `before` of the test file index initialization + + ```ts + const esArchiver = getService('esArchiver'); + + before(async () => { + await esArchiver.load( + 'x-pack/test/functional/es_archives/security_solution/foo_bar' + ); + }); + + ``` + +3. Add in `after` of the test file index removal + + ```ts + const esArchiver = getService('esArchiver'); + + before(async () => { + await esArchiver.unload( + 'x-pack/test/functional/es_archives/security_solution/foo_bar' + ); + }); + + ``` + +#### dataGeneratorFactory + +`DataGeneratorParams` + +| Property | Description | Type | +| --------------- | ------------------------------------------------------ | ------ | +| es | ES client | `ESClient` | +| index | index where document will be added | `string` | +| log | log client | `LogClient`| + +1. import and initialize factory + + ```ts + import { dataGeneratorFactory } from '../../utils/data_generator'; + + const es = getService('es'); + const log = getService('log'); + + const { indexListOfDocuments, indexGeneratedDocuments } = dataGeneratorFactory({ + es, + index: 'foo_bar', + log, + }); + + ``` +2. Factory will return 2 methods which can be used to index documents into `foo_bar` + +where `getService` is method from `FtrProviderContext` + +### methods + +#### **indexListOfDocuments** + +| Property | Description | Type | +| --------------- | ------------------------------------------------------ | ------ | +| documents | list of documents to index | `Record` | + +Will index list of documents to `foo_bar` index as defined in `dataGeneratorFactory` params + +```ts + await indexListOfDocuments([{ foo: "bar" }, { id: "test-1" }]) + +``` + +#### **indexGeneratedDocuments** + +Will generate 10 documents in defined interval and index them in `foo_bar` index as defined in `dataGeneratorFactory` params +Method receives same parameters as [generateDocuments](#generateDocuments) util. + +```ts + await indexGeneratedDocuments({ + docsCount: 10, + interval: ['2020-10-28T07:30:00.000Z', '2020-10-30T07:30:00.000Z'], + seed: (i, id, timestamp) => ({ id, '@timestamp': timestamp, seq: i }) + }) + +``` + +#### **indexEnhancedDocuments** + +Will index list of enhanced documents to `foo_bar` index as defined in `dataGeneratorFactory` params +Method receives same parameters as [enhanceDocuments](#enhanceDocuments) util. + +```ts + await indexEnhancedDocuments({ + interval: ['1996-02-15T13:02:37.531Z', '2000-02-15T13:02:37.531Z'], + documents: [{ foo: 'bar' }, { foo: 'bar-1' }, { foo: 'bar-2' }] + }) + +``` + +## Utils + +### **generateDocuments** + +Util `generateDocuments` can generate list of documents based on basic seed function + + Seed callback will receive sequential number of document of document, generated id, timestamp. + Can be used to generate custom document with large set of options depends on needs. See examples below. + + | Property | Description | Type | + | --------------- | ------------------------------------------------------ | ------ | + | docsCount | number of documents to generate | `number` | + | seed | function that receives sequential number of document, generated id, timestamp as arguments and can used it create a document | `(index: number, id: string, timestamp: string) => Document` | + | interval | interval in which generate documents, defined by '@timestamp' field | `[string \| Date string \| Date]` _(optional)_ | + +Examples: + + 1. Generate 10 documents with random id, timestamp in interval between '2020-10-28T07:30:00.000Z', '2020-10-30T07:30:00.000Z', and field `seq` that represents sequential number of document + + ```ts + + const documents = generateDocuments({ + docsCount: 10, + interval: ['2020-10-28T07:30:00.000Z', '2020-10-30T07:30:00.000Z'], + seed: (i, id, timestamp) => ({ id, '@timestamp': timestamp, seq: i }) + }) + ``` + +
    +Generated docs + + ```JSON + [ + { + "id": "87d3d231-13c8-4d03-9ae4-d40781b3b2d1", + "@timestamp": "2020-10-30T04:00:55.790Z", + "seq": 0 + }, + { + "id": "90b99797-d0da-460d-86fd-eca40bedff39", + "@timestamp": "2020-10-28T08:43:01.117Z", + "seq": 1 + }, + { + "id": "809c05be-f401-4e31-86e1-55be8af4fac4", + "@timestamp": "2020-10-29T15:06:23.054Z", + "seq": 2 + }, + { + "id": "a2720f82-5401-4eab-b2eb-444a8425c937", + "@timestamp": "2020-10-29T23:19:47.790Z", + "seq": 3 + }, + { + "id": "e36e4418-4e89-4388-97df-97085b3fca92", + "@timestamp": "2020-10-29T09:14:00.966Z", + "seq": 4 + }, + { + "id": "4747adb3-0603-4651-8c0f-0c7df037f779", + "@timestamp": "2020-10-28T14:23:50.500Z", + "seq": 5 + }, + { + "id": "1fbfd873-b0ca-4cda-9c96-9a044622e712", + "@timestamp": "2020-10-28T10:00:20.995Z", + "seq": 6 + }, + { + "id": "9173cf93-1f9f-4f91-be5e-1e6888cb3aae", + "@timestamp": "2020-10-28T08:52:27.830Z", + "seq": 7 + }, + { + "id": "53245337-e383-4b28-9975-acbd79901b7c", + "@timestamp": "2020-10-29T08:58:02.385Z", + "seq": 8 + }, + { + "id": "0c700d33-df10-426e-8f71-677f437923ec", + "@timestamp": "2020-10-29T16:33:10.240Z", + "seq": 9 + } + ] + ``` + +
    + + 2. Generate 3 identical documents `{foo: bar}` + + ```ts + + const documents = generateDocuments({ + docsCount: 3, + seed: () => ({ foo: 'bar' }) + }) + ``` + +
    +Generated docs + + ```JSON + [ + { + "foo": "bar" + }, + { + "foo": "bar" + }, + { + "foo": "bar" + } + ] + ``` + +
    + + 3. Generate 5 documents with custom ingested timestamp, with no interval. If interval not defined, timestamp will be current time + + ```ts + + const documents = generateDocuments({ + docsCount: 5, + seed: (i, id, timestamp) => ({ foo: 'bar', event: { ingested: timestamp } }) + }) + ``` + +
    +Generated docs + + ```JSON + [ + { + "foo": "bar", + "event": { + "ingested": "2023-02-15T13:02:37.531Z" + } + }, + { + "foo": "bar", + "event": { + "ingested": "2023-02-15T13:02:37.531Z" + } + }, + { + "foo": "bar", + "event": { + "ingested": "2023-02-15T13:02:37.531Z" + } + }, + { + "foo": "bar", + "event": { + "ingested": "2023-02-15T13:02:37.531Z" + } + }, + { + "foo": "bar", + "event": { + "ingested": "2023-02-15T13:02:37.531Z" + } + } + ] + ``` + +
    + + 4. Generate 4 documents with custom if based on sequential number id + + ```ts + + const documents = generateDocuments({ + docsCount: 4, + seed: (i) => ({ foo: 'bar', id: `id-${i}`}) + }) + ``` + +
    +Generated docs + + ```JSON + [ + { + "foo": "bar", + "id": "id-0" + }, + { + "foo": "bar", + "id": "id-1" + }, + { + "foo": "bar", + "id": "id-2" + }, + { + "foo": "bar", + "id": "id-3" + } + ] + ``` + +
    + + +### **enhanceDocument** + +Adds generated `uuidv4` id and current time as `@timestamp` to document if `id`, `timestamp` params are not specified + + +`EnhanceDocumentOptions` + +| Property | Description | Type | +| --------------- | ------------------------------------------------------ | ------ | +| id | id for document | `string` _(optional)_ | +| timestamp | timestamp for document | `string` _(optional)_ | +| document | document to enhance | `Record` | + +Examples: + +1. Enhance document with generated `uuidv4` id and current time as `@timestamp` + + ```ts + const document = enhanceDocument({ + document: { foo: 'bar' }, + }); + ``` +
    + document + + ```JSON + { + "foo": "bar", + "id": "b501a64f-0dd4-4275-a38c-889be6a15a4d", + "@timestamp": "2023-02-15T17:21:21.429Z" + } + ``` + +
    + +2. Enhance document with generated `uuidv4` id and predefined timestamp + + + ```ts + const document = enhanceDocument({ + timestamp: '1996-02-15T13:02:37.531Z', + document: { foo: 'bar' }, + }); + ``` +
    + document + + ```JSON + { + "foo": "bar", + "id": "7b7460bf-e173-4744-af15-2c01ac52963b", + "@timestamp": "1996-02-15T13:02:37.531Z" + } + ``` + +
    + +3. Enhance document with predefined id and and current time as `@timestamp` + + + ```ts + const document = enhanceDocument({ + id: 'test-id', + document: { foo: 'bar' }, + }); + ``` +
    + document + + ```JSON + { + "foo": "bar", + "id": "test-id", + "@timestamp": "2023-02-15T17:21:21.429Z" + } + ``` +
    + +### **enhanceDocuments** + + + +Adds generated `uuidv4` `id` property to list of documents if `id` parameter is not specified. +Adds `@timestamp` in defined interval to list of documents. If it's not specified, `@timestamp` will be added as current time + +| Property | Description | Type | +| --------------- | ------------------------------------------------------ | ------ | +| documents | documents to enhance | `Record[]` | +| id | id for documents | `string` _(optional)_ | +| interval | interval in which generate documents, defined by '@timestamp' field | `[string \| Date string \| Date]` _(optional)_ | + +Examples: + +1. Enhance documents with generated `uuidv4` id and current time as `@timestamp` + + ```ts + const documents = enhanceDocuments({ + documents: [{ foo: 'bar' }, { foo: 'bar-1' }, { foo: 'bar-2' }] + }); + ``` +
    + documents + + ```JSON + [ + { + "foo": "bar", + "id": "c55ddd6b-3cf2-4ebf-94d6-4eeeb4e5b655", + "@timestamp": "2023-02-16T16:43:13.573Z" + }, + { + "foo": "bar-1", + "id": "61b157b9-5f1f-4d99-a5bf-072069f5139d", + "@timestamp": "2023-02-16T16:43:13.573Z" + }, + { + "foo": "bar-2", + "id": "04929927-6d9e-4ccc-b083-250e3fe2d7a7", + "@timestamp": "2023-02-16T16:43:13.573Z" + } + ] + ``` + +
    + +2. Enhance document with generated `uuidv4` id and timestamp in predefined interval + + ```ts + const documents = enhanceDocuments({ + interval: ['1996-02-15T13:02:37.531Z', '2000-02-15T13:02:37.531Z'], + documents: [{ foo: 'bar' }, { foo: 'bar-1' }, { foo: 'bar-2' }] + }); + ``` +
    + documents + + ```JSON + [ + { + "foo": "bar", + "id": "883a67cb-0a57-4711-bdf9-e8a394a52460", + "@timestamp": "1998-07-04T15:16:46.587Z" + }, + { + "foo": "bar-1", + "id": "70691d9e-1030-412f-8ae1-c6db50e90e91", + "@timestamp": "1998-05-15T07:00:52.339Z" + }, + { + "foo": "bar-2", + "id": "b2140328-5cc4-4532-947e-30b8fd830ed7", + "@timestamp": "1999-09-01T21:50:38.957Z" + } + ] + ``` + +
    + +3. Enhance documents with predefined id and and current time as `@timestamp` + + ```ts + const documents = enhanceDocuments({ + id: 'test-id', + documents: [{ foo: 'bar' }, { foo: 'bar-1' }, { foo: 'bar-2' }] + }); + ``` +
    + documents + + ```JSON + [ + { + "foo": "bar", + "id": "test-id", + "@timestamp": "2023-02-16T16:43:13.574Z" + }, + { + "foo": "bar-1", + "id": "test-id", + "@timestamp": "2023-02-16T16:43:13.574Z" + }, + { + "foo": "bar-2", + "id": "test-id", + "@timestamp": "2023-02-16T16:43:13.574Z" + } + ] + + ``` +
    + +## Usage + +### create test query rule that queries indexed documents within a test + +When documents generated and indexed, there might be a need to create a test rule that targets only these documents. So, documents generated in the test, will be used only in context of this test. + +There are few possible ways to do this + +1. Create new index every time for a new test. Thus, newly indexed documents, will be the only documents present in test index. It might be costly operation, as it will require to create new index for each test, that re-initialize dataGeneratorFactory, or delete index after rule's run + +2. Use the same id or specific field in documents. + For example: + + ```ts + + const id = uuidv4(); + const firstTimestamp = new Date().toISOString(); + const firstDocument = { + id, + '@timestamp': firstTimestamp, + agent: { + name: 'agent-1', + }, + }; + await indexListOfDocuments([firstDocument, firstDocument]); + + const rule: QueryRuleCreateProps = { + ...getRuleForSignalTesting(['ecs_compliant']), + query: `id:${id}`, + }; + + + ``` + + All documents will have the same `id` and can be queried by following `id:${id}` + +3. Use utility method `getKQLQueryFromDocumentList` that will create query from all ids in generated documents + + ```ts + const { documents } = await indexGeneratedDocuments({ + docsCount: 4, + document: { foo: 'bar' }, + enhance: true, + }); + + const query = getKQLQueryFromDocumentList(documents); + const rule = { + ...getRuleForSignalTesting(['ecs_non_compliant']), + query, + }; + ``` + + util will generate the following query: `(id: "f6ca3ee1-407c-4685-a94b-11ef4ed5136b" or id: "2a7358b2-8cad-47ce-83b7-e4418c266f3e" or id: "9daec569-0ba1-4c46-a0c6-e340cee1c5fb" or id: "b03c2fdf-0ca1-447c-b8c6-2cc5a663ffe2")`, that will include all generated documents \ No newline at end of file diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/data_generator/data_generator_factory.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/data_generator/data_generator_factory.ts new file mode 100644 index 0000000000000..7842d105e40b0 --- /dev/null +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/data_generator/data_generator_factory.ts @@ -0,0 +1,75 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { Client } from '@elastic/elasticsearch'; +import { ToolingLog } from '@kbn/tooling-log'; +import type { BulkResponse } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import { indexDocuments } from './index_documents'; +import { generateDocuments } from './generate_documents'; +import { enhanceDocuments, EnhanceDocumentsOptions } from './enhance_documents'; +import type { GenerateDocumentsParams } from './generate_documents'; +import type { Document } from './types'; + +interface DataGeneratorParams { + es: Client; + documents: Array>; + index: string; + log: ToolingLog; +} + +interface DataGeneratorResponse { + response: BulkResponse; + documents: Document[]; +} + +interface DataGenerator { + indexListOfDocuments: (docs: Document[]) => Promise; + indexGeneratedDocuments: (params: GenerateDocumentsParams) => Promise; + indexEnhancedDocuments: (params: EnhanceDocumentsOptions) => Promise; +} + +/** + * initialize {@link DataGenerator} + * @param param.es - ES client + * @param params.index - index where document will be added + * @param params.log - logClient + * @returns methods of {@link DataGenerator} + */ +export const dataGeneratorFactory = ({ + es, + index, + log, +}: Omit): DataGenerator => { + return { + indexListOfDocuments: async (documents: DataGeneratorParams['documents']) => { + const response = await indexDocuments({ es, index, documents, log }); + + return { + documents, + response, + }; + }, + indexGeneratedDocuments: async (params: GenerateDocumentsParams) => { + const documents = generateDocuments(params); + const response = await indexDocuments({ es, index, documents, log }); + + return { + documents, + response, + }; + }, + indexEnhancedDocuments: async (params: EnhanceDocumentsOptions) => { + const documents = enhanceDocuments(params); + const response = await indexDocuments({ es, index, documents, log }); + + return { + documents, + response, + }; + }, + }; +}; diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/data_generator/enhance_document.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/data_generator/enhance_document.ts new file mode 100644 index 0000000000000..f2e244edb90b3 --- /dev/null +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/data_generator/enhance_document.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 { v4 as uuidv4 } from 'uuid'; + +interface EnhanceDocumentOptions { + id?: string; + timestamp?: string; + document: Record; +} + +/** + * enhances document with generated id and timestamp + * @param {string} options.id - optional id, if not provided randomly generated + * @param {string} options.timestamp - optional timestamp of document, if not provided current time + * @param {Record} options.document - document that will be enhanced + */ +export const enhanceDocument = (options: EnhanceDocumentOptions) => { + const id = options?.id ?? uuidv4(); + const timestamp = options?.timestamp ?? new Date().toISOString(); + return { + ...options.document, + id, + '@timestamp': timestamp, + }; +}; diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/data_generator/enhance_documents.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/data_generator/enhance_documents.ts new file mode 100644 index 0000000000000..5d701afe166ed --- /dev/null +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/data_generator/enhance_documents.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 type { IndexingInterval, Document } from './types'; +import { getTimestamp } from './get_timestamp'; +import { enhanceDocument } from './enhance_document'; + +export interface EnhanceDocumentsOptions { + interval?: IndexingInterval; + documents: Document[]; + id?: string; +} + +/** + * enhances documents with generated id and timestamp within interval + * @param {string} options.id - optional id, if not provided randomly generated + * @param {string} options.interval - optional interval of document, if not provided set as a current time + * @param {Record[]} options.documents - documents that will be enhanced + */ +export const enhanceDocuments = ({ documents, interval, id }: EnhanceDocumentsOptions) => { + return documents.map((document) => + enhanceDocument({ + document, + id, + timestamp: getTimestamp(interval), + }) + ); +}; diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/data_generator/generate_documents.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/data_generator/generate_documents.ts new file mode 100644 index 0000000000000..c9ba960867a43 --- /dev/null +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/data_generator/generate_documents.ts @@ -0,0 +1,39 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { v4 as uuidv4 } from 'uuid'; +import { getTimestamp } from './get_timestamp'; + +import type { Document, IndexingInterval } from './types'; + +type DocumentSeedFunc = (index: number, id: string, timestamp: string) => Document; + +export interface GenerateDocumentsParams { + interval?: IndexingInterval; + docsCount: number; + seed: DocumentSeedFunc; +} + +/** + * + * @param param.interval - interval in which generate documents, defined by '@timestamp' field + * @param param.docsCount - number of document to generate + * @param param.seed - seed function. Function that receives index of document, generated id, timestamp as arguments and can used it create a document + * @returns generated Documents + */ +export const generateDocuments = ({ docsCount, interval, seed }: GenerateDocumentsParams) => { + const documents = []; + + for (let i = 0; i < docsCount; i++) { + const id = uuidv4(); + const timestamp = getTimestamp(interval); + + documents.push(seed(i, id, timestamp)); + } + + return documents; +}; diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/data_generator/get_kql_query_from_documents_list.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/data_generator/get_kql_query_from_documents_list.ts new file mode 100644 index 0000000000000..3347c2120d4a4 --- /dev/null +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/data_generator/get_kql_query_from_documents_list.ts @@ -0,0 +1,41 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import type { Document } from './types'; + +/** + * returns KQL query from a list documents that includes all documents by their ids. + * it can be used later to create test rules that will query only these documents + * ```ts + * const documents = [ + { + foo: 'bar', + id: 'f07df596-65ec-4ab1-b0b2-f3b69558ed26', + '@timestamp': '2020-10-29T07:10:51.989Z', + }, + { + foo: 'bar', + id: 'e07614f9-1dc5-4849-90c4-31362bbdf8d0', + '@timestamp': '2020-10-30T00:32:48.987Z', + }, + { + foo: 'test', + id: 'e03a5b12-77e6-4aa3-b0be-fbe5b0843f07', + '@timestamp': '2020-10-29T03:40:35.318Z', + }, + ]; + + const query = getKQLQueryFromDocumentList(documents); + + // query equals to + // (id: "f07df596-65ec-4ab1-b0b2-f3b69558ed26" or id: "e07614f9-1dc5-4849-90c4-31362bbdf8d0" or id: "e03a5b12-77e6-4aa3-b0be-fbe5b0843f07") + * ``` + */ +export const getKQLQueryFromDocumentList = (documents: Document[]) => { + const orClauses = documents.map(({ id }) => `id: "${id}"`).join(' or '); + + return `(${orClauses})`; +}; 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 new file mode 100644 index 0000000000000..e828767a39650 --- /dev/null +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/data_generator/get_timestamp.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 faker from 'faker'; +import type { IndexingInterval } from './types'; + +export const getTimestamp = (interval?: IndexingInterval) => { + if (interval) { + return faker.date.between(...interval).toISOString(); + } + + return new Date().toISOString(); +}; diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/data_generator/index.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/data_generator/index.ts new file mode 100644 index 0000000000000..4cd56dd896554 --- /dev/null +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/data_generator/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. + */ + +export * from './data_generator_factory'; +export * from './enhance_document'; +export * from './enhance_documents'; +export * from './generate_documents'; +export * from './get_kql_query_from_documents_list'; +export * from './get_timestamp'; +export * from './index_documents'; diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/data_generator/index_documents.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/data_generator/index_documents.ts new file mode 100644 index 0000000000000..5408e11b25015 --- /dev/null +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/data_generator/index_documents.ts @@ -0,0 +1,39 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { Client } from '@elastic/elasticsearch'; +import type { BulkResponse } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import { ToolingLog } from '@kbn/tooling-log'; + +interface IndexDocumentsParams { + es: Client; + documents: Array>; + index: string; + log: ToolingLog; +} + +type IndexDocuments = (params: IndexDocumentsParams) => Promise; + +/** + * Indexes documents into provided index + */ +export const indexDocuments: IndexDocuments = async ({ es, documents, index, log }) => { + const operations = documents.flatMap((doc: object) => [{ index: { _index: index } }, doc]); + + const response = await es.bulk({ refresh: true, operations }); + + // throw error if document wasn't indexed, so test will be terminated earlier and no false positives can happen + response.items.some(({ index: responseIndex } = {}) => { + if (responseIndex?.error) { + log.error( + `Failed to index document in non_ecs_fields test suits: "${responseIndex.error?.reason}"` + ); + throw Error(responseIndex.error.message); + } + }); + return response; +}; diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/data_generator/types.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/data_generator/types.ts new file mode 100644 index 0000000000000..bbf54be68cfee --- /dev/null +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/data_generator/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. + */ + +export type IndexingInterval = [string | Date, string | Date]; + +export type Document = Record; diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/index.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/index.ts index 56d166c501b6b..9af5821d08ac3 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/index.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/utils/index.ts @@ -8,6 +8,8 @@ export * from './rules'; export * from './exception_list_and_item'; export * from './alerts'; export * from './actions'; +export * from './data_generator'; + export * from './rules/get_rule_so_by_id'; export * from './rules/create_rule_saved_object'; export * from './rules/get_rule_with_legacy_investigation_fields'; @@ -18,4 +20,5 @@ export * from './count_down_es'; export * from './update_username'; export * from './refresh_index'; export * from './wait_for'; +export * from './route_with_namespace'; export * from './wait_for_index_to_populate'; diff --git a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/configs/ess.config.ts b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/configs/ess.config.ts new file mode 100644 index 0000000000000..bb4e078746d58 --- /dev/null +++ b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/configs/ess.config.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 { FtrConfigProviderContext } from '@kbn/test'; +export default async function ({ readConfigFile }: FtrConfigProviderContext) { + const functionalConfig = await readConfigFile( + require.resolve('../../../../../config/ess/config.base.trial') + ); + + return { + ...functionalConfig.getAll(), + testFiles: [require.resolve('..')], + junit: { + reportName: 'Entity Analytics API Integration Tests - ESS - Risk Engine', + }, + }; +} diff --git a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/configs/serverless.config.ts b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/configs/serverless.config.ts new file mode 100644 index 0000000000000..e28df5b9c3506 --- /dev/null +++ b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/configs/serverless.config.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 { createTestConfig } from '../../../../../config/serverless/config.base'; + +export default createTestConfig({ + testFiles: [require.resolve('..')], + junit: { + reportName: 'Entity Analytics API Integration Tests - Serverless - Risk Engine', + }, +}); diff --git a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/index.ts b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/index.ts new file mode 100644 index 0000000000000..878725cd32f9a --- /dev/null +++ b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/index.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 { FtrProviderContext } from '../../../../ftr_provider_context'; + +export default function ({ loadTestFile }: FtrProviderContext) { + describe('Entity Analytics - Risk Engine', function () { + loadTestFile(require.resolve('./init_and_status_apis')); + loadTestFile(require.resolve('./risk_score_calculation')); + loadTestFile(require.resolve('./risk_score_preview')); + loadTestFile(require.resolve('./risk_scoring_task/task_execution')); + loadTestFile(require.resolve('./risk_scoring_task/task_execution_nondefault_spaces')); + loadTestFile(require.resolve('./telemetry_usage')); + }); +} diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/init_and_status_apis.ts b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/init_and_status_apis.ts similarity index 93% rename from x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/init_and_status_apis.ts rename to x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/init_and_status_apis.ts index 480ebd9d9c845..c88a30e8b42d8 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/init_and_status_apis.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/init_and_status_apis.ts @@ -6,23 +6,20 @@ */ import expect from '@kbn/expect'; -import { riskEngineConfigurationTypeName } from '@kbn/security-solution-plugin/server/lib/risk_engine/saved_object'; -import { FtrProviderContext } from '../../../common/ftr_provider_context'; +import { riskEngineConfigurationTypeName } from '@kbn/security-solution-plugin/server/lib/entity_analytics/risk_engine/saved_object'; + import { - cleanRiskEngineConfig, legacyTransformIds, createLegacyTransforms, clearLegacyTransforms, riskEngineRouteHelpersFactory, - clearTransforms, installLegacyRiskScore, getLegacyRiskScoreDashboards, clearLegacyDashboards, - deleteRiskEngineTask, - deleteAllRiskScores, -} from './utils'; + cleanRiskEngine, +} from '../../utils'; +import { FtrProviderContext } from '../../../../ftr_provider_context'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const es = getService('es'); const supertest = getService('supertest'); @@ -30,37 +27,17 @@ export default ({ getService }: FtrProviderContext) => { const riskEngineRoutes = riskEngineRouteHelpersFactory(supertest); const log = getService('log'); - describe('Risk Engine', () => { + describe('@ess @serverless init_and_status_apis', () => { beforeEach(async () => { - await cleanRiskEngineConfig({ kibanaServer }); - await deleteRiskEngineTask({ es, log }); - await deleteAllRiskScores(log, es); - await clearTransforms({ - es, - log, - }); + await cleanRiskEngine({ kibanaServer, es, log }); }); afterEach(async () => { - await cleanRiskEngineConfig({ - kibanaServer, - }); - await clearLegacyTransforms({ - es, - log, - }); - await clearTransforms({ - es, - log, - }); - await clearLegacyDashboards({ - supertest, - log, - }); - await deleteRiskEngineTask({ es, log }); + await cleanRiskEngine({ kibanaServer, es, log }); + await clearLegacyTransforms({ es, log }); + await clearLegacyDashboards({ supertest, log }); }); - // FLAKY: https://github.com/elastic/kibana/issues/168376 describe('init api', () => { it('should return response with success status', async () => { const response = await riskEngineRoutes.init(); diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/risk_score_calculation.ts b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/risk_score_calculation.ts similarity index 95% rename from x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/risk_score_calculation.ts rename to x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/risk_score_calculation.ts index f03214e301dd1..74e37b4737f71 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/risk_score_calculation.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/risk_score_calculation.ts @@ -6,12 +6,16 @@ */ import expect from '@kbn/expect'; +import { X_ELASTIC_INTERNAL_ORIGIN_REQUEST } from '@kbn/core-http-common'; + import { RISK_SCORE_CALCULATION_URL } from '@kbn/security-solution-plugin/common/constants'; import type { RiskScore } from '@kbn/security-solution-plugin/common/risk_engine'; import { v4 as uuidv4 } from 'uuid'; -import { FtrProviderContext } from '../../../common/ftr_provider_context'; -import { deleteAllAlerts, deleteAllRules } from '../../../utils'; -import { dataGeneratorFactory } from '../../../utils/data_generator'; +import { + deleteAllAlerts, + deleteAllRules, + dataGeneratorFactory, +} from '../../../detections_response/utils'; import { buildDocument, createAndSyncRuleAndAlertsFactory, @@ -19,9 +23,9 @@ import { readRiskScores, normalizeScores, waitForRiskScoresToBePresent, -} from './utils'; +} from '../../utils'; +import { FtrProviderContext } from '../../../../ftr_provider_context'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext): void => { const supertest = getService('supertest'); const esArchiver = getService('esArchiver'); @@ -39,6 +43,7 @@ export default ({ getService }: FtrProviderContext): void => { .post(RISK_SCORE_CALCULATION_URL) .set('kbn-xsrf', 'true') .set('elastic-api-version', '1') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') .send(body) .expect(200); return result; @@ -63,7 +68,7 @@ export default ({ getService }: FtrProviderContext): void => { }); }; - describe('Risk Engine - Risk Scoring Calculation API', () => { + describe('@ess @serverless Risk Scoring Calculation API', () => { context('with auditbeat data', () => { const { indexListOfDocuments } = dataGeneratorFactory({ es, diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/risk_score_preview.ts b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/risk_score_preview.ts similarity index 97% rename from x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/risk_score_preview.ts rename to x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/risk_score_preview.ts index 31f8a86efc56e..ae1fdb82d0953 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/risk_score_preview.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/risk_score_preview.ts @@ -10,17 +10,22 @@ import { ALERT_RISK_SCORE } from '@kbn/rule-data-utils'; import { RISK_SCORE_PREVIEW_URL } from '@kbn/security-solution-plugin/common/constants'; import type { RiskScore } from '@kbn/security-solution-plugin/common/risk_engine'; import { v4 as uuidv4 } from 'uuid'; -import { FtrProviderContext } from '../../../common/ftr_provider_context'; -import { createSignalsIndex, deleteAllAlerts, deleteAllRules } from '../../../utils'; -import { dataGeneratorFactory } from '../../../utils/data_generator'; +import { X_ELASTIC_INTERNAL_ORIGIN_REQUEST } from '@kbn/core-http-common'; +import { + createAlertsIndex, + deleteAllAlerts, + deleteAllRules, + dataGeneratorFactory, +} from '../../../detections_response/utils'; import { buildDocument, createAndSyncRuleAndAlertsFactory, deleteAllRiskScores, sanitizeScores, -} from './utils'; +} from '../../utils'; + +import { FtrProviderContext } from '../../../../ftr_provider_context'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext): void => { const supertest = getService('supertest'); const esArchiver = getService('esArchiver'); @@ -37,6 +42,7 @@ export default ({ getService }: FtrProviderContext): void => { const { body: result } = await supertest .post(RISK_SCORE_PREVIEW_URL) .set('elastic-api-version', '1') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') .set('kbn-xsrf', 'true') .send({ ...defaultBody, ...body }) .expect(200); @@ -56,7 +62,7 @@ export default ({ getService }: FtrProviderContext): void => { return await previewRiskScores({ body: {} }); }; - describe('Risk Engine - Risk Scoring Preview API', () => { + describe('@ess @serverless Risk Scoring Preview API', () => { context('with auditbeat data', () => { const { indexListOfDocuments } = dataGeneratorFactory({ es, @@ -78,7 +84,7 @@ export default ({ getService }: FtrProviderContext): void => { await deleteAllAlerts(supertest, log, es); await deleteAllRules(supertest, log); - await createSignalsIndex(supertest, log); + await createAlertsIndex(supertest, log); }); afterEach(async () => { diff --git a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/risk_scoring_task/ftr_provider_context_with_spaces.d.ts b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/risk_scoring_task/ftr_provider_context_with_spaces.d.ts new file mode 100644 index 0000000000000..922a5d9d25b71 --- /dev/null +++ b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/risk_scoring_task/ftr_provider_context_with_spaces.d.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 { GenericFtrProviderContext } from '@kbn/test'; + +import { SpacesServiceProvider } from '../../../../../../common/services/spaces'; +import { services as serverlessServices } from '../../../../../../../test_serverless/api_integration/services'; + +const services = { + ...serverlessServices, + spaces: SpacesServiceProvider, +}; +export type FtrProviderContextWithSpaces = GenericFtrProviderContext; diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/risk_scoring_task_execution.ts b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/risk_scoring_task/task_execution.ts similarity index 67% rename from x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/risk_scoring_task_execution.ts rename to x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/risk_scoring_task/task_execution.ts index 6a95d236a9d0a..53c70bc90efb9 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/risk_scoring_task_execution.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/risk_scoring_task/task_execution.ts @@ -7,27 +7,25 @@ import expect from '@kbn/expect'; import { v4 as uuidv4 } from 'uuid'; -import { FtrProviderContext } from '../../../common/ftr_provider_context'; -import { deleteAllAlerts, deleteAllRules } from '../../../utils'; -import { dataGeneratorFactory } from '../../../utils/data_generator'; +import { + deleteAllAlerts, + deleteAllRules, + dataGeneratorFactory, +} from '../../../../detections_response/utils'; import { buildDocument, createAndSyncRuleAndAlertsFactory, - deleteRiskEngineTask, - deleteAllRiskScores, readRiskScores, waitForRiskScoresToBePresent, normalizeScores, riskEngineRouteHelpersFactory, updateRiskEngineConfigSO, getRiskEngineTask, - cleanRiskEngineConfig, waitForRiskEngineTaskToBeGone, - deleteRiskScoreIndices, - clearTransforms, -} from './utils'; + cleanRiskEngine, +} from '../../../utils'; +import { FtrProviderContext } from '../../../../../ftr_provider_context'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext): void => { const supertest = getService('supertest'); const esArchiver = getService('esArchiver'); @@ -38,7 +36,7 @@ export default ({ getService }: FtrProviderContext): void => { const createAndSyncRuleAndAlerts = createAndSyncRuleAndAlertsFactory({ supertest, log }); const riskEngineRoutes = riskEngineRouteHelpersFactory(supertest); - describe('Risk Engine - Risk Scoring Task', () => { + describe('@ess @serverless Risk Scoring Task Execution', () => { context('with auditbeat data', () => { const { indexListOfDocuments } = dataGeneratorFactory({ es, @@ -57,21 +55,15 @@ export default ({ getService }: FtrProviderContext): void => { }); beforeEach(async () => { - await cleanRiskEngineConfig({ kibanaServer }); - await deleteRiskEngineTask({ es, log }); - await deleteAllRiskScores(log, es); + await cleanRiskEngine({ kibanaServer, es, log }); await deleteAllAlerts(supertest, log, es); await deleteAllRules(supertest, log); - await clearTransforms({ es, log }); }); afterEach(async () => { - await cleanRiskEngineConfig({ kibanaServer }); - await deleteRiskEngineTask({ es, log }); - await deleteAllRiskScores(log, es); + await cleanRiskEngine({ kibanaServer, es, log }); await deleteAllAlerts(supertest, log, es); await deleteAllRules(supertest, log); - await clearTransforms({ es, log }); }); describe('with some alerts containing hosts', () => { @@ -101,7 +93,7 @@ export default ({ getService }: FtrProviderContext): void => { await riskEngineRoutes.init(); }); - it('calculates and persists risk scores for alert documents', async () => { + it('@skipInQA calculates and persists risk scores for alert documents', async () => { await waitForRiskScoresToBePresent({ es, log, scoreCount: 10 }); const scores = await readRiskScores(es); @@ -112,7 +104,7 @@ export default ({ getService }: FtrProviderContext): void => { ); }); - it('starts the latest transform', async () => { + it('@skipInQA starts the latest transform', async () => { await waitForRiskScoresToBePresent({ es, log, scoreCount: 10 }); const transformStats = await es.transform.getTransformStats({ @@ -122,7 +114,7 @@ export default ({ getService }: FtrProviderContext): void => { expect(transformStats.transforms[0].state).to.eql('started'); }); - describe('disabling and re-enabling the risk engine', () => { + describe('@skipInQA disabling and re-enabling the risk engine', () => { beforeEach(async () => { await waitForRiskScoresToBePresent({ es, log, scoreCount: 10 }); await riskEngineRoutes.disable(); @@ -144,7 +136,7 @@ export default ({ getService }: FtrProviderContext): void => { }); }); - describe('disabling the risk engine', () => { + describe('@skipInQA disabling the risk engine', () => { beforeEach(async () => { await waitForRiskScoresToBePresent({ es, log, scoreCount: 10 }); }); @@ -223,7 +215,7 @@ export default ({ getService }: FtrProviderContext): void => { await riskEngineRoutes.init(); }); - it('calculates and persists risk scores for both types of entities', async () => { + it('@skipInQA calculates and persists risk scores for both types of entities', async () => { await waitForRiskScoresToBePresent({ es, log, scoreCount: 20 }); const riskScores = await readRiskScores(es); @@ -235,74 +227,6 @@ export default ({ getService }: FtrProviderContext): void => { expect(scoredIdentifiers.includes('user.name')).to.be(true); }); }); - - describe('with alerts in a non-default space', () => { - let namespace: string; - let index: string[]; - let documentId: string; - let createAndSyncRuleAndAlertsForOtherSpace: ReturnType< - typeof createAndSyncRuleAndAlertsFactory - >; - - beforeEach(async () => { - documentId = uuidv4(); - namespace = uuidv4(); - index = [`risk-score.risk-score-${namespace}`]; - - createAndSyncRuleAndAlertsForOtherSpace = createAndSyncRuleAndAlertsFactory({ - supertest, - log, - namespace, - }); - const riskEngineRoutesForNamespace = riskEngineRouteHelpersFactory(supertest, namespace); - - const spaces = getService('spaces'); - await spaces.create({ - id: namespace, - name: namespace, - disabledFeatures: [], - }); - - const baseEvent = buildDocument({ host: { name: 'host-1' } }, documentId); - await indexListOfDocuments( - Array(10) - .fill(baseEvent) - .map((_baseEvent, _index) => ({ - ..._baseEvent, - 'host.name': `host-${_index}`, - })) - ); - - await createAndSyncRuleAndAlertsForOtherSpace({ - query: `id: ${documentId}`, - alerts: 10, - riskScore: 40, - }); - - await riskEngineRoutesForNamespace.init(); - }); - - afterEach(async () => { - await getService('spaces').delete(namespace); - await deleteRiskScoreIndices({ log, es, namespace }); - }); - - it('calculates and persists risk scores for alert documents', async () => { - await waitForRiskScoresToBePresent({ - es, - log, - scoreCount: 10, - index, - }); - - const scores = await readRiskScores(es, index); - expect(normalizeScores(scores).map(({ id_value: idValue }) => idValue)).to.eql( - Array(10) - .fill(0) - .map((_, _index) => `host-${_index}`) - ); - }); - }); }); }); }; diff --git a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/risk_scoring_task/task_execution_nondefault_spaces.ts b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/risk_scoring_task/task_execution_nondefault_spaces.ts new file mode 100644 index 0000000000000..cf9bf98f88d9d --- /dev/null +++ b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/risk_scoring_task/task_execution_nondefault_spaces.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 expect from '@kbn/expect'; +import { v4 as uuidv4 } from 'uuid'; +import { + deleteAllAlerts, + deleteAllRules, + dataGeneratorFactory, +} from '../../../../detections_response/utils'; +import { + buildDocument, + createAndSyncRuleAndAlertsFactory, + readRiskScores, + waitForRiskScoresToBePresent, + normalizeScores, + riskEngineRouteHelpersFactory, + cleanRiskEngine, + deleteRiskScoreIndices, +} from '../../../utils'; + +import { FtrProviderContextWithSpaces } from './ftr_provider_context_with_spaces'; + +export default ({ getService }: FtrProviderContextWithSpaces): void => { + const supertest = getService('supertest'); + const esArchiver = getService('esArchiver'); + const es = getService('es'); + const log = getService('log'); + const kibanaServer = getService('kibanaServer'); + + describe('@ess Risk Scoring Task in non-default space', () => { + context('with auditbeat data', () => { + const { indexListOfDocuments } = dataGeneratorFactory({ + es, + index: 'ecs_compliant', + log, + }); + + before(async () => { + await esArchiver.load('x-pack/test/functional/es_archives/security_solution/ecs_compliant'); + }); + + after(async () => { + await esArchiver.unload( + 'x-pack/test/functional/es_archives/security_solution/ecs_compliant' + ); + }); + + beforeEach(async () => { + await cleanRiskEngine({ kibanaServer, es, log }); + await deleteAllAlerts(supertest, log, es); + await deleteAllRules(supertest, log); + }); + + afterEach(async () => { + await cleanRiskEngine({ kibanaServer, es, log }); + await deleteAllAlerts(supertest, log, es); + await deleteAllRules(supertest, log); + }); + describe('with alerts in a non-default space', () => { + let namespace: string; + let index: string[]; + let documentId: string; + let createAndSyncRuleAndAlertsForOtherSpace: ReturnType< + typeof createAndSyncRuleAndAlertsFactory + >; + + beforeEach(async () => { + documentId = uuidv4(); + namespace = uuidv4(); + index = [`risk-score.risk-score-${namespace}`]; + + createAndSyncRuleAndAlertsForOtherSpace = createAndSyncRuleAndAlertsFactory({ + supertest, + log, + namespace, + }); + const riskEngineRoutesForNamespace = riskEngineRouteHelpersFactory(supertest, namespace); + + const spaces = getService('spaces'); + await spaces.create({ + id: namespace, + name: namespace, + disabledFeatures: [], + }); + + const baseEvent = buildDocument({ host: { name: 'host-1' } }, documentId); + await indexListOfDocuments( + Array(10) + .fill(baseEvent) + .map((_baseEvent, _index) => ({ + ..._baseEvent, + 'host.name': `host-${_index}`, + })) + ); + + await createAndSyncRuleAndAlertsForOtherSpace({ + query: `id: ${documentId}`, + alerts: 10, + riskScore: 40, + }); + + await riskEngineRoutesForNamespace.init(); + }); + + afterEach(async () => { + await getService('spaces').delete(namespace); + await deleteRiskScoreIndices({ log, es, namespace }); + }); + + it('calculates and persists risk scores for alert documents', async () => { + await waitForRiskScoresToBePresent({ + es, + log, + scoreCount: 10, + index, + }); + + const scores = await readRiskScores(es, index); + expect(normalizeScores(scores).map(({ id_value: idValue }) => idValue)).to.eql( + Array(10) + .fill(0) + .map((_, _index) => `host-${_index}`) + ); + }); + }); + }); + }); +}; diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/telemetry_usage.ts b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/telemetry_usage.ts similarity index 78% rename from x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/telemetry_usage.ts rename to x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/telemetry_usage.ts index 2e7888fe00591..f68a8c1dd3e60 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/telemetry_usage.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/default_license/risk_engine/telemetry_usage.ts @@ -7,21 +7,21 @@ import expect from '@kbn/expect'; import { v4 as uuidv4 } from 'uuid'; -import type { FtrProviderContext } from '../../../../common/ftr_provider_context'; -import { deleteAllRules, deleteAllAlerts, getRiskEngineStats } from '../../../utils'; +import { + deleteAllRules, + deleteAllAlerts, + dataGeneratorFactory, +} from '../../../detections_response/utils'; import { buildDocument, createAndSyncRuleAndAlertsFactory, - deleteRiskEngineTask, - deleteRiskScoreIndices, waitForRiskScoresToBePresent, riskEngineRouteHelpersFactory, - cleanRiskEngineConfig, - clearTransforms, -} from './utils'; -import { dataGeneratorFactory } from '../../../utils/data_generator'; + cleanRiskEngine, + getRiskEngineStats, +} from '../../utils'; +import { FtrProviderContext } from '../../../../ftr_provider_context'; -// eslint-disable-next-line import/no-default-export export default ({ getService }: FtrProviderContext) => { const supertest = getService('supertest'); const esArchiver = getService('esArchiver'); @@ -32,7 +32,7 @@ export default ({ getService }: FtrProviderContext) => { const createAndSyncRuleAndAlerts = createAndSyncRuleAndAlertsFactory({ supertest, log }); const riskEngineRoutes = riskEngineRouteHelpersFactory(supertest); - describe('Risk engine telemetry', async () => { + describe('@ess @serverless telemetry', async () => { const { indexListOfDocuments } = dataGeneratorFactory({ es, index: 'ecs_compliant', @@ -49,12 +49,9 @@ export default ({ getService }: FtrProviderContext) => { }); beforeEach(async () => { - await cleanRiskEngineConfig({ kibanaServer }); - await deleteRiskEngineTask({ es, log }); - await deleteRiskScoreIndices({ log, es }); + await cleanRiskEngine({ kibanaServer, es, log }); await deleteAllAlerts(supertest, log, es); await deleteAllRules(supertest, log); - await clearTransforms({ es, log }); }); describe('Risk engine not enabled', () => { @@ -67,7 +64,6 @@ export default ({ getService }: FtrProviderContext) => { }); }); - // FLAKY: https://github.com/elastic/kibana/issues/168429 describe('Risk engine enabled', () => { let hostId: string; let userId: string; @@ -105,12 +101,9 @@ export default ({ getService }: FtrProviderContext) => { }); afterEach(async () => { - await cleanRiskEngineConfig({ kibanaServer }); - await deleteRiskEngineTask({ es, log }); - await deleteRiskScoreIndices({ log, es }); + await cleanRiskEngine({ kibanaServer, es, log }); await deleteAllAlerts(supertest, log, es); await deleteAllRules(supertest, log); - await clearTransforms({ es, log }); }); it('should return riskEngineMetrics with expected values', async () => { @@ -132,8 +125,6 @@ export default ({ getService }: FtrProviderContext) => { all_host_risk_scores_total_day: 10, }; expect(otherStats).to.eql(expected); - expect(allRiskScoreIndexSize).to.be.greaterThan(0); - expect(uniqueRiskScoreIndexSize).to.be.greaterThan(0); }); }); }); diff --git a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/utils/get_risk_engine_stats.ts b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/utils/get_risk_engine_stats.ts new file mode 100644 index 0000000000000..c5343372ce99a --- /dev/null +++ b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/utils/get_risk_engine_stats.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 type { ToolingLog } from '@kbn/tooling-log'; +import type SuperTest from 'supertest'; +import type { DetectionMetrics } from '@kbn/security-solution-plugin/server/usage/detections/types'; +import type { RiskEngineMetrics } from '@kbn/security-solution-plugin/server/usage/risk_engine/types'; +import { + ELASTIC_HTTP_VERSION_HEADER, + X_ELASTIC_INTERNAL_ORIGIN_REQUEST, +} from '@kbn/core-http-common'; + +import { getStatsUrl } from '../../../../detection_engine_api_integration/utils/get_stats_url'; +import { + getDetectionMetricsFromBody, + getRiskEngineMetricsFromBody, +} from '../../../../detection_engine_api_integration/utils/get_detection_metrics_from_body'; + +/** + * Gets the stats from the stats endpoint. + * @param supertest The supertest agent. + * @returns The detection metrics + */ +export const getStats = async ( + supertest: SuperTest.SuperTest, + log: ToolingLog +): Promise => { + const response = await supertest + .post(getStatsUrl()) + .set('kbn-xsrf', 'true') + .set(ELASTIC_HTTP_VERSION_HEADER, '2') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') + .send({ unencrypted: true, refreshCache: true }); + if (response.status !== 200) { + log.error( + `Did not get an expected 200 "ok" when getting the stats for detections. CI issues could happen. Suspect this line if you are seeing CI issues. body: ${JSON.stringify( + response.body + )}, status: ${JSON.stringify(response.status)}` + ); + } + + return getDetectionMetricsFromBody(response.body); +}; + +/** + * Gets the stats from the stats endpoint. + * @param supertest The supertest agent. + * @returns The detection metrics + */ +export const getRiskEngineStats = async ( + supertest: SuperTest.SuperTest, + log: ToolingLog +): Promise => { + const response = await supertest + .post(getStatsUrl()) + .set('kbn-xsrf', 'true') + .set(ELASTIC_HTTP_VERSION_HEADER, '2') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') + .send({ unencrypted: true, refreshCache: true }); + if (response.status !== 200) { + log.error( + `Did not get an expected 200 "ok" when getting the stats for risk engine. CI issues could happen. Suspect this line if you are seeing CI issues. body: ${JSON.stringify( + response.body + )}, status: ${JSON.stringify(response.status)}` + ); + } + + return getRiskEngineMetricsFromBody(response.body); +}; diff --git a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/utils/index.ts b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/utils/index.ts new file mode 100644 index 0000000000000..00eb2adafd2e8 --- /dev/null +++ b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/utils/index.ts @@ -0,0 +1,8 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +export * from './risk_engine'; +export * from './get_risk_engine_stats'; diff --git a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/utils.ts b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/utils/risk_engine.ts similarity index 87% rename from x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/utils.ts rename to x-pack/test/security_solution_api_integration/test_suites/entity_analytics/utils/risk_engine.ts index 7af59dfab7cf8..48c7763d7a9d6 100644 --- a/x-pack/test/detection_engine_api_integration/security_and_spaces/group10/risk_engine/utils.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/utils/risk_engine.ts @@ -5,13 +5,16 @@ * 2.0. */ -import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common'; +import { + ELASTIC_HTTP_VERSION_HEADER, + X_ELASTIC_INTERNAL_ORIGIN_REQUEST, +} from '@kbn/core-http-common'; import { v4 as uuidv4 } from 'uuid'; import SuperTest from 'supertest'; import type { Client } from '@elastic/elasticsearch'; import type { ToolingLog } from '@kbn/tooling-log'; import type { EcsRiskScore, RiskScore } from '@kbn/security-solution-plugin/common/risk_engine'; -import { riskEngineConfigurationTypeName } from '@kbn/security-solution-plugin/server/lib/risk_engine/saved_object'; +import { riskEngineConfigurationTypeName } from '@kbn/security-solution-plugin/server/lib/entity_analytics/risk_engine/saved_object'; import type { KbnClient } from '@kbn/test'; import { RISK_ENGINE_INIT_URL, @@ -21,13 +24,13 @@ import { } from '@kbn/security-solution-plugin/common/constants'; import { createRule, - waitForSignalsToBePresent, + waitForAlertsToBePresent, waitForRuleSuccess, - getRuleForSignalTesting, + getRuleForAlertTesting, countDownTest, waitFor, routeWithNamespace, -} from '../../../utils'; +} from '../../detections_response/utils'; const sanitizeScore = (score: Partial): Partial => { delete score['@timestamp']; @@ -79,7 +82,7 @@ export const createAndSyncRuleAndAlertsFactory = query: string; riskScoreOverride?: string; }): Promise => { - const rule = getRuleForSignalTesting(['ecs_compliant']); + const rule = getRuleForAlertTesting(['ecs_compliant']); const { id } = await createRule( supertest, log, @@ -99,7 +102,7 @@ export const createAndSyncRuleAndAlertsFactory = namespace ); await waitForRuleSuccess({ supertest, log, id, namespace }); - await waitForSignalsToBePresent(supertest, log, alerts, [id], namespace); + await waitForAlertsToBePresent(supertest, log, alerts, [id], namespace); }; export const deleteRiskScoreIndices = async ({ @@ -119,7 +122,7 @@ export const deleteRiskScoreIndices = async ({ }), ]); } catch (e) { - log.error(`Error deleting risk score indices: ${e.message}`); + log.warning(`Error deleting risk score indices: ${e.message}`); } }; @@ -302,6 +305,24 @@ export const cleanRiskEngineConfig = async ({ } }; +/** + * General helper for cleaning up risk engine artifacts. This should be used before and after any risk engine tests so as not to pollute the test environment. + */ +export const cleanRiskEngine = async ({ + es, + kibanaServer, + log, +}: { + es: Client; + kibanaServer: KbnClient; + log: ToolingLog; +}): Promise => { + await deleteRiskEngineTask({ es, log }); + await cleanRiskEngineConfig({ kibanaServer }); + await clearTransforms({ es, log }); + await deleteRiskScoreIndices({ log, es }); +}; + export const updateRiskEngineConfigSO = async ({ attributes, kibanaServer, @@ -344,7 +365,7 @@ export const clearTransforms = async ({ force: true, }); } catch (e) { - log.error(`Error deleting risk_score_latest_transform_default: ${e.message}`); + log.warning(`Error deleting risk_score_latest_transform_default: ${e.message}`); } }; @@ -364,7 +385,7 @@ export const clearLegacyTransforms = async ({ try { await Promise.all(transforms); } catch (e) { - log.error(`Error deleting legacy transforms: ${e.message}`); + log.warning(`Error deleting legacy transforms: ${e.message}`); } }; @@ -381,6 +402,7 @@ export const clearLegacyDashboards = async ({ '/internal/risk_score/prebuilt_content/saved_objects/_bulk_delete/hostRiskScoreDashboards' ) .set('kbn-xsrf', 'true') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') .send() .expect(200); @@ -389,10 +411,11 @@ export const clearLegacyDashboards = async ({ '/internal/risk_score/prebuilt_content/saved_objects/_bulk_delete/userRiskScoreDashboards' ) .set('kbn-xsrf', 'true') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') .send() .expect(200); } catch (e) { - log.error(`Error deleting legacy dashboards: ${e.message}`); + log.warning(`Error deleting legacy dashboards: ${e.message}`); } }; @@ -450,6 +473,7 @@ export const riskEngineRouteHelpersFactory = ( .post(routeWithNamespace(RISK_ENGINE_INIT_URL, namespace)) .set('kbn-xsrf', 'true') .set('elastic-api-version', '1') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') .send() .expect(200), @@ -466,6 +490,7 @@ export const riskEngineRouteHelpersFactory = ( .post(routeWithNamespace(RISK_ENGINE_ENABLE_URL, namespace)) .set('kbn-xsrf', 'true') .set('elastic-api-version', '1') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') .send() .expect(200), @@ -474,6 +499,7 @@ export const riskEngineRouteHelpersFactory = ( .post(routeWithNamespace(RISK_ENGINE_DISABLE_URL, namespace)) .set('kbn-xsrf', 'true') .set('elastic-api-version', '1') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') .send() .expect(200), }); @@ -487,6 +513,7 @@ export const installLegacyRiskScore = async ({ .post('/internal/risk_score') .set('kbn-xsrf', 'true') .set(ELASTIC_HTTP_VERSION_HEADER, '1') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') .send({ riskScoreEntity: 'host' }) .expect(200); @@ -494,6 +521,7 @@ export const installLegacyRiskScore = async ({ .post('/internal/risk_score') .set('kbn-xsrf', 'true') .set(ELASTIC_HTTP_VERSION_HEADER, '1') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') .send({ riskScoreEntity: 'user' }) .expect(200); @@ -503,6 +531,7 @@ export const installLegacyRiskScore = async ({ ) .set('kbn-xsrf', 'true') .set(ELASTIC_HTTP_VERSION_HEADER, '1') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') .send() .expect(200); @@ -512,6 +541,7 @@ export const installLegacyRiskScore = async ({ ) .set('kbn-xsrf', 'true') .set(ELASTIC_HTTP_VERSION_HEADER, '1') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') .send() .expect(200); }; diff --git a/x-pack/test/security_solution_api_integration/tsconfig.json b/x-pack/test/security_solution_api_integration/tsconfig.json index b2e2715a52ccd..2c3b9082ac7cc 100644 --- a/x-pack/test/security_solution_api_integration/tsconfig.json +++ b/x-pack/test/security_solution_api_integration/tsconfig.json @@ -30,6 +30,7 @@ "@kbn/core-saved-objects-server", "@kbn/core", "@kbn/alerting-plugin", + "@kbn/core-http-common", "@kbn/securitysolution-ecs" ] } diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_alerts/alert_status.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_alerts/alert_status.cy.ts index c55c8f62dc4a9..2ec99abb00db4 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_alerts/alert_status.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_alerts/alert_status.cy.ts @@ -37,10 +37,13 @@ import { visit } from '../../../tasks/navigation'; import { ALERTS_URL } from '../../../urls/navigation'; -// FLAKY: https://github.com/elastic/kibana/issues/169091 -describe('Changing alert status', () => { +describe('Changing alert status', { tags: ['@ess', '@serverless'] }, () => { before(() => { - cy.task('esArchiverLoad', { archiveName: 'auditbeat_big' }); + cy.task('esArchiverLoad', { archiveName: 'auditbeat_multiple' }); + }); + + after(() => { + cy.task('esArchiverUnload', 'auditbeat_multiple'); }); context('Opening alerts', { tags: ['@ess', '@serverless'] }, () => { @@ -56,10 +59,6 @@ describe('Changing alert status', () => { waitForAlerts(); }); - after(() => { - cy.task('esArchiverUnload', 'auditbeat_big'); - }); - it('can mark a closed alert as open', () => { waitForAlertsToPopulate(); cy.get(ALERTS_COUNT) diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_alerts/alert_tags.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_alerts/alert_tags.cy.ts index ee3955576a272..162c63ad3ce48 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_alerts/alert_tags.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_alerts/alert_tags.cy.ts @@ -26,19 +26,24 @@ import { } from '../../../screens/alerts'; describe('Alert tagging', { tags: ['@ess', '@serverless'] }, () => { + before(() => { + cy.task('esArchiverLoad', { archiveName: 'endpoint' }); + cy.task('esArchiverLoad', { archiveName: 'auditbeat_multiple' }); + }); + + after(() => { + cy.task('esArchiverUnload', 'endpoint'); + cy.task('esArchiverUnload', 'auditbeat_multiple'); + }); + beforeEach(() => { login(); deleteAlertsAndRules(); - cy.task('esArchiverLoad', { archiveName: 'endpoint' }); createRule(getNewRule({ rule_id: 'new custom rule' })); visitWithTimeRange(ALERTS_URL); waitForAlertsToPopulate(); }); - afterEach(() => { - cy.task('esArchiverUnload', 'endpoint'); - }); - it('Add and remove a tag using the alert bulk action menu', () => { // Add a tag to one alert selectNumberOfAlerts(1); @@ -66,13 +71,13 @@ describe('Alert tagging', { tags: ['@ess', '@serverless'] }, () => { updateAlertTags(); cy.get(ALERTS_TABLE_ROW_LOADER).should('not.exist'); // Then add tags to both alerts - selectNumberOfAlerts(2); + selectNumberOfAlerts(5); openAlertTaggingBulkActionMenu(); cy.get(MIXED_ALERT_TAG).contains('Duplicate'); clickAlertTag('Duplicate'); updateAlertTags(); cy.get(ALERTS_TABLE_ROW_LOADER).should('not.exist'); - selectNumberOfAlerts(2); + selectNumberOfAlerts(5); openAlertTaggingBulkActionMenu(); cy.get(SELECTED_ALERT_TAG).contains('Duplicate'); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/event_correlation_rule.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/event_correlation_rule.cy.ts index eeca0d06bcc57..b895460661858 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/event_correlation_rule.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/event_correlation_rule.cy.ts @@ -71,7 +71,7 @@ describe('EQL rules', { tags: ['@ess', '@serverless'] }, () => { const mitreAttack = rule.threat; const expectedMitre = formatMitreAttackDescription(mitreAttack ?? []); const expectedNumberOfRules = 1; - const expectedNumberOfAlerts = '2 alerts'; + const expectedNumberOfAlerts = '1 alert'; it('Creates and enables a new EQL rule', function () { visit(CREATE_RULE_URL); @@ -143,11 +143,12 @@ describe('EQL rules', { tags: ['@ess', '@serverless'] }, () => { const rule = getEqlSequenceRule(); - beforeEach(() => { - cy.task('esArchiverLoad', { archiveName: 'auditbeat_big' }); + before(() => { + cy.task('esArchiverLoad', { archiveName: 'auditbeat_multiple' }); }); - afterEach(() => { - cy.task('esArchiverUnload', 'auditbeat_big'); + + after(() => { + cy.task('esArchiverUnload', 'auditbeat_multiple'); }); it('Creates and enables a new EQL rule with a sequence', function () { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/override.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/override.cy.ts index 7b8e5b0744c72..585cd9187f3e0 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/override.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_creation/override.cy.ts @@ -146,8 +146,8 @@ describe('Rules override', { tags: ['@ess', '@serverless'] }, () => { cy.get(ALERTS_COUNT) .invoke('text') .should('match', /^[1-9].+$/); // Any number of alerts - cy.get(ALERT_GRID_CELL).contains('auditbeat'); - cy.get(ALERT_GRID_CELL).contains('critical'); + cy.get(ALERT_GRID_CELL).contains('winlogbeat'); + cy.get(ALERT_GRID_CELL).contains('high'); cy.get(ALERT_GRID_CELL).contains('80'); }); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules_actions.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules_actions.cy.ts index d543843641b78..ac6c723dbc0c6 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules_actions.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/rule_management/rule_actions/bulk_actions/bulk_edit_rules_actions.cy.ts @@ -76,7 +76,7 @@ const expectedSlackMessage = 'Slack action test message'; describe( 'Detection rules, bulk edit of rule actions', - { tags: ['@ess', '@serverless', '@brokenInServerlessQA'] }, + { tags: ['@ess', '@serverless', '@brokenInServerless', '@brokenInServerlessQA'] }, () => { beforeEach(() => { login(); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_analytics_management_page.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_analytics_management_page.cy.ts index a676fe5038d3e..24d13322f7d9d 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_analytics_management_page.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/entity_analytics_management_page.cy.ts @@ -38,7 +38,6 @@ import { previewErrorButtonClick, } from '../../tasks/entity_analytics'; -// TODO: https://github.com/elastic/kibana/issues/161539 describe( 'Entity analytics management page', { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/rule_details_flow/add_edit_endpoint_exception.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/rule_details_flow/add_edit_endpoint_exception.cy.ts index 7474fd2e5cf2d..8ec40a0e36436 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/rule_details_flow/add_edit_endpoint_exception.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/rule_details_flow/add_edit_endpoint_exception.cy.ts @@ -50,179 +50,182 @@ import { createEndpointExceptionListItem, } from '../../../tasks/api_calls/exceptions'; -// TODO: https://github.com/elastic/kibana/issues/161539 -describe( - 'Add endpoint exception from rule details', - { tags: ['@ess', '@serverless', '@brokenInServerless'] }, - () => { - const ITEM_NAME = 'Sample Exception List Item'; - const NEW_ITEM_NAME = 'Exception item-EDITED'; - const ITEM_FIELD = 'event.code'; - const FIELD_DIFFERENT_FROM_EXISTING_ITEM_FIELD = 'agent.type'; - +describe('Add endpoint exception from rule details', { tags: ['@ess', '@serverless'] }, () => { + const ITEM_NAME = 'Sample Exception List Item'; + const NEW_ITEM_NAME = 'Exception item-EDITED'; + const ITEM_FIELD = 'event.code'; + const FIELD_DIFFERENT_FROM_EXISTING_ITEM_FIELD = 'agent.type'; + + before(() => { + cy.task('esArchiverLoad', { archiveName: 'auditbeat_multiple' }); + }); + + after(() => { + cy.task('esArchiverUnload', 'auditbeat_multiple'); + }); + + beforeEach(() => { + deleteExceptionLists(); + deleteEndpointExceptionList(); + login(); + deleteAlertsAndRules(); + }); + + describe('without exception items', () => { beforeEach(() => { - deleteExceptionLists(); - deleteEndpointExceptionList(); - login(); - deleteAlertsAndRules(); - }); - - describe('without exception items', () => { - beforeEach(() => { - createEndpointExceptionList().then((response) => { - createRule( - getNewRule({ - query: 'event.code:*', - index: ['auditbeat*'], - exceptions_list: [ - { - id: response.body.id, - list_id: response.body.list_id, - type: response.body.type, - namespace_type: response.body.namespace_type, - }, - ], - rule_id: '2', - enabled: false, - }) - ).then((rule) => visitRuleDetailsPage(rule.body.id, { tab: 'endpoint_exceptions' })); - }); + createEndpointExceptionList().then((response) => { + createRule( + getNewRule({ + query: 'event.code:*', + index: ['auditbeat*'], + exceptions_list: [ + { + id: response.body.id, + list_id: response.body.list_id, + type: response.body.type, + namespace_type: response.body.namespace_type, + }, + ], + rule_id: '2', + enabled: false, + }) + ).then((rule) => visitRuleDetailsPage(rule.body.id, { tab: 'endpoint_exceptions' })); }); + }); - it('creates an exception item', () => { - // when no exceptions exist, empty component shows with action to add exception - cy.get(NO_EXCEPTIONS_EXIST_PROMPT).should('exist'); + it('creates an exception item', () => { + // when no exceptions exist, empty component shows with action to add exception + cy.get(NO_EXCEPTIONS_EXIST_PROMPT).should('exist'); - // open add exception modal - openExceptionFlyoutFromEmptyViewerPrompt(); + // open add exception modal + openExceptionFlyoutFromEmptyViewerPrompt(); - // submit button is disabled if no paramerters were added - cy.get(CONFIRM_BTN).should('have.attr', 'disabled'); + // submit button is disabled if no paramerters were added + cy.get(CONFIRM_BTN).should('have.attr', 'disabled'); - // for endpoint exceptions, must specify OS - selectOs('windows'); + // for endpoint exceptions, must specify OS + selectOs('windows'); - // add exception item conditions - addExceptionConditions({ - field: 'event.code', - operator: 'is', - values: ['foo'], - }); + // add exception item conditions + addExceptionConditions({ + field: 'event.code', + operator: 'is', + values: ['foo'], + }); - // Name is required so want to check that submit is still disabled - cy.get(CONFIRM_BTN).should('have.attr', 'disabled'); + // Name is required so want to check that submit is still disabled + cy.get(CONFIRM_BTN).should('have.attr', 'disabled'); - // add exception item name - addExceptionFlyoutItemName(ITEM_NAME); + // add exception item name + addExceptionFlyoutItemName(ITEM_NAME); - // Option to add to rule or add to list should NOT appear - cy.get(ADD_TO_RULE_OR_LIST_SECTION).should('not.exist'); + // Option to add to rule or add to list should NOT appear + cy.get(ADD_TO_RULE_OR_LIST_SECTION).should('not.exist'); - // not testing close alert functionality here, just ensuring that the options appear as expected - cy.get(CLOSE_SINGLE_ALERT_CHECKBOX).should('not.exist'); - cy.get(CLOSE_ALERTS_CHECKBOX).should('exist'); + // not testing close alert functionality here, just ensuring that the options appear as expected + cy.get(CLOSE_SINGLE_ALERT_CHECKBOX).should('not.exist'); + cy.get(CLOSE_ALERTS_CHECKBOX).should('exist'); - // submit - submitNewExceptionItem(); + // submit + submitNewExceptionItem(); - // new exception item displays - cy.get(EXCEPTION_ITEM_VIEWER_CONTAINER).should('have.length', 1); - }); + // new exception item displays + cy.get(EXCEPTION_ITEM_VIEWER_CONTAINER).should('have.length', 1); }); + }); + + describe('with exception items', () => { + beforeEach(() => { + createEndpointExceptionList().then((response) => { + createEndpointExceptionListItem({ + comments: [], + description: 'Exception list item', + entries: [ + { + field: ITEM_FIELD, + operator: 'included', + type: 'match', + value: 'foo', + }, + ], + name: ITEM_NAME, + tags: [], + type: 'simple', + os_types: ['windows'], + }); - describe('with exception items', () => { - beforeEach(() => { - createEndpointExceptionList().then((response) => { - createEndpointExceptionListItem({ - comments: [], - description: 'Exception list item', - entries: [ + createRule( + getNewRule({ + name: 'Rule with exceptions', + query: 'event.code:*', + index: ['auditbeat*'], + exceptions_list: [ { - field: ITEM_FIELD, - operator: 'included', - type: 'match', - value: 'foo', + id: response.body.id, + list_id: response.body.list_id, + type: response.body.type, + namespace_type: response.body.namespace_type, }, ], - name: ITEM_NAME, - tags: [], - type: 'simple', - os_types: ['windows'], - }); - - createRule( - getNewRule({ - name: 'Rule with exceptions', - query: 'event.code:*', - index: ['auditbeat*'], - exceptions_list: [ - { - id: response.body.id, - list_id: response.body.list_id, - type: response.body.type, - namespace_type: response.body.namespace_type, - }, - ], - rule_id: '2', - enabled: false, - }) - ).then((rule) => { - visitRuleDetailsPage(rule.body.id, { tab: 'endpoint_exceptions' }); - waitForRuleDetailsPageToBeLoaded('Rule with exceptions'); - }); + rule_id: '2', + enabled: false, + }) + ).then((rule) => { + visitRuleDetailsPage(rule.body.id, { tab: 'endpoint_exceptions' }); + waitForRuleDetailsPageToBeLoaded('Rule with exceptions'); }); }); + }); - it('edits an endpoint exception item', () => { - // displays existing exception items - cy.get(EXCEPTION_ITEM_VIEWER_CONTAINER).should('have.length', 1); - cy.get(NO_EXCEPTIONS_EXIST_PROMPT).should('not.exist'); - cy.get(EXCEPTION_CARD_ITEM_NAME).should('have.text', ITEM_NAME); - cy.get(EXCEPTION_CARD_ITEM_CONDITIONS).should('have.text', ` ${ITEM_FIELD}IS foo`); + it('edits an endpoint exception item', () => { + // displays existing exception items + cy.get(EXCEPTION_ITEM_VIEWER_CONTAINER).should('have.length', 1); + cy.get(NO_EXCEPTIONS_EXIST_PROMPT).should('not.exist'); + cy.get(EXCEPTION_CARD_ITEM_NAME).should('have.text', ITEM_NAME); + cy.get(EXCEPTION_CARD_ITEM_CONDITIONS).should('have.text', ` ${ITEM_FIELD}IS foo`); - // open edit exception modal - openEditException(); + // open edit exception modal + openEditException(); - // edit exception item name - editExceptionFlyoutItemName(NEW_ITEM_NAME); + // edit exception item name + editExceptionFlyoutItemName(NEW_ITEM_NAME); - // check that the existing item's field is being populated - cy.get(EXCEPTION_ITEM_CONTAINER) - .eq(0) - .find(FIELD_INPUT_PARENT) - .eq(0) - .should('have.text', ITEM_FIELD); - cy.get(VALUES_INPUT).should('have.text', 'foo'); + // check that the existing item's field is being populated + cy.get(EXCEPTION_ITEM_CONTAINER) + .eq(0) + .find(FIELD_INPUT_PARENT) + .eq(0) + .should('have.text', ITEM_FIELD); + cy.get(VALUES_INPUT).should('have.text', 'foo'); - // edit conditions - editException(FIELD_DIFFERENT_FROM_EXISTING_ITEM_FIELD, 0, 0); + // edit conditions + editException(FIELD_DIFFERENT_FROM_EXISTING_ITEM_FIELD, 0, 0); - // submit - submitEditedExceptionItem(); + // submit + submitEditedExceptionItem(); - // new exception item displays - cy.get(EXCEPTION_ITEM_VIEWER_CONTAINER).should('have.length', 1); + // new exception item displays + cy.get(EXCEPTION_ITEM_VIEWER_CONTAINER).should('have.length', 1); - // check that updates stuck - cy.get(EXCEPTION_CARD_ITEM_NAME).should('have.text', NEW_ITEM_NAME); - cy.get(EXCEPTION_CARD_ITEM_CONDITIONS).should('have.text', ' agent.typeIS foo'); - }); + // check that updates stuck + cy.get(EXCEPTION_CARD_ITEM_NAME).should('have.text', NEW_ITEM_NAME); + cy.get(EXCEPTION_CARD_ITEM_CONDITIONS).should('have.text', ' agent.typeIS foo'); + }); - it('allows user to search for items', () => { - cy.get(EXCEPTION_ITEM_VIEWER_CONTAINER).should('have.length', 1); + it('allows user to search for items', () => { + cy.get(EXCEPTION_ITEM_VIEWER_CONTAINER).should('have.length', 1); - // can search for an exception value - searchForExceptionItem('foo'); + // can search for an exception value + searchForExceptionItem('foo'); - // new exception item displays - cy.get(EXCEPTION_ITEM_VIEWER_CONTAINER).should('have.length', 1); + // new exception item displays + cy.get(EXCEPTION_ITEM_VIEWER_CONTAINER).should('have.length', 1); - // displays empty search result view if no matches found - searchForExceptionItem('abc'); + // displays empty search result view if no matches found + searchForExceptionItem('abc'); - // new exception item displays - cy.get(NO_EXCEPTIONS_SEARCH_RESULTS_PROMPT).should('exist'); - }); + // new exception item displays + cy.get(NO_EXCEPTIONS_SEARCH_RESULTS_PROMPT).should('exist'); }); - } -); + }); +}); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/shared_exception_lists_management/manage_exceptions.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/shared_exception_lists_management/manage_exceptions.cy.ts index eba0c3a64570f..023140d420f2a 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/shared_exception_lists_management/manage_exceptions.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/exceptions/shared_exception_lists_management/manage_exceptions.cy.ts @@ -6,6 +6,7 @@ */ import type { RuleResponse } from '@kbn/security-solution-plugin/common/api/detection_engine'; +import { MAX_COMMENT_LENGTH } from '@kbn/security-solution-plugin/common/constants'; import { getNewRule } from '../../../objects/rule'; import { login } from '../../../tasks/login'; import { visit } from '../../../tasks/navigation'; @@ -20,9 +21,7 @@ import { submitEditedExceptionItem, submitNewExceptionItem, deleteFirstExceptionItemInListDetailPage, - dismissExceptionItemErrorCallOut, addExceptionHugeComment, - submitNewExceptionItemWithFailure, editExceptionComment, } from '../../../tasks/exceptions'; import { EXCEPTIONS_URL } from '../../../urls/navigation'; @@ -42,7 +41,6 @@ import { } from '../../../tasks/exceptions_table'; import { visitRuleDetailsPage } from '../../../tasks/rule_details'; import { deleteEndpointExceptionList, deleteExceptionLists } from '../../../tasks/common'; -import { closeErrorToast } from '../../../tasks/alerts_detection_rules'; describe('Add, edit and delete exception', { tags: ['@ess', '@serverless'] }, () => { beforeEach(() => { @@ -147,7 +145,7 @@ describe('Add, edit and delete exception', { tags: ['@ess', '@serverless'] }, () cy.get(EMPTY_EXCEPTIONS_VIEWER).should('exist'); }); - it('should handle huge text as a comment gracefully and allow user create exception item after user updates the comment', function () { + it('should not allow to add huge text as a comment', function () { createSharedExceptionList( { name: 'Newly created list', description: 'This is my list.' }, true @@ -173,26 +171,19 @@ describe('Add, edit and delete exception', { tags: ['@ess', '@serverless'] }, () linkFirstSharedListOnExceptionFlyout(); // add exception comment which is super long - addExceptionHugeComment([...new Array(5000).keys()].map((_) => `Test text!`).join('')); - - // submit - submitNewExceptionItemWithFailure(); + addExceptionHugeComment( + [...new Array(MAX_COMMENT_LENGTH + 1).keys()].map((_) => 'a').join('') + ); - // Failed to add exception due to comment length and submit button should be disabled + // submit button should be disabled due to comment length cy.get(CONFIRM_BTN).should('have.attr', 'disabled'); - // Close error toast - closeErrorToast(); - - // Dismiss error callout - dismissExceptionItemErrorCallOut(); - - // Submit button should be enabled after we dismissed error callout - cy.get(CONFIRM_BTN).should('not.have.attr', 'disabled'); - // update exception comment to a reasonable (length wise) text editExceptionComment('Exceptional comment'); + // submit button should be enabled + cy.get(CONFIRM_BTN).should('not.have.attr', 'disabled'); + // submit submitNewExceptionItem(); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/dashboards/entity_analytics.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/dashboards/entity_analytics.cy.ts index 83b9d086db5f2..7bb492d51d25c 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/dashboards/entity_analytics.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/dashboards/entity_analytics.cy.ts @@ -57,9 +57,9 @@ import { import { deleteRiskEngineConfiguration } from '../../../tasks/api_calls/risk_engine'; import { enableRiskEngine } from '../../../tasks/entity_analytics'; -const TEST_USER_ALERTS = 2; +const TEST_USER_ALERTS = 1; const TEST_USER_NAME = 'test'; -const SIEM_KIBANA_HOST_ALERTS = 2; +const SIEM_KIBANA_HOST_ALERTS = 1; const SIEM_KIBANA_HOST_NAME = 'siem-kibana'; const DATE_FORMAT = 'MMM D, YYYY @ HH:mm:ss.SSS'; const DATE_BEFORE_ALERT_CREATION = moment().format(DATE_FORMAT); @@ -67,10 +67,15 @@ const OLDEST_DATE = moment('2019-01-19T16:22:56.217Z').format(DATE_FORMAT); describe('Entity Analytics Dashboard', { tags: ['@ess', '@serverless'] }, () => { before(() => { + cy.task('esArchiverLoad', { archiveName: 'auditbeat_multiple' }); login(); deleteRiskEngineConfiguration(); }); + after(() => { + cy.task('esArchiverUnload', 'auditbeat_multiple'); + }); + describe('legacy risk score', () => { describe('Without data', () => { beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/events_viewer.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/events_viewer.cy.ts index 20884e070cf9a..0a211a58feba3 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/events_viewer.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/hosts/events_viewer.cy.ts @@ -48,11 +48,11 @@ const defaultHeadersInDefaultEcsCategory = [ describe('Events Viewer', { tags: ['@ess', '@serverless'] }, () => { before(() => { - cy.task('esArchiverLoad', { archiveName: 'auditbeat_big' }); + cy.task('esArchiverLoad', { archiveName: 'auditbeat_multiple' }); }); after(() => { - cy.task('esArchiverUnload', 'auditbeat_big'); + cy.task('esArchiverUnload', 'auditbeat_multiple'); }); context('Fields rendering', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/explore/overview/overview.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/explore/overview/overview.cy.ts index 0fcb7f86cd0de..1205d2420b7ab 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/explore/overview/overview.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/explore/overview/overview.cy.ts @@ -64,13 +64,6 @@ describe('Overview Page', { tags: ['@ess', '@serverless', '@serverlessQA'] }, () }); describe('Overview page with no data', { tags: '@brokenInServerless' }, () => { - before(() => { - cy.task('esArchiverUnload', 'auditbeat'); - }); - after(() => { - cy.task('esArchiverLoad', { archiveName: 'auditbeat' }); - }); - it('Splash screen should be here', () => { login(); visitWithTimeRange(OVERVIEW_URL); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_cell_actions.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_cell_actions.cy.ts index 84cfcc8b52aad..911b870d08347 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_cell_actions.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_cell_actions.cy.ts @@ -105,7 +105,7 @@ describe('Alerts cell actions', { tags: ['@ess', '@serverless'] }, () => { .first() .invoke('text') .then((severityVal) => { - scrollAlertTableColumnIntoView(ALERT_TABLE_SEVERITY_VALUES); + scrollAlertTableColumnIntoView(ALERT_TABLE_SEVERITY_HEADER); addAlertPropertyToTimeline(ALERT_TABLE_SEVERITY_VALUES, 0); openActiveTimeline(); cy.get(PROVIDER_BADGE) @@ -138,7 +138,7 @@ describe('Alerts cell actions', { tags: ['@ess', '@serverless'] }, () => { .first() .invoke('text') .then(() => { - scrollAlertTableColumnIntoView(ALERT_TABLE_SEVERITY_VALUES); + scrollAlertTableColumnIntoView(ALERT_TABLE_SEVERITY_HEADER); showTopNAlertProperty(ALERT_TABLE_SEVERITY_VALUES, 0); cy.get(SHOW_TOP_N_HEADER).first().should('have.text', `Top kibana.alert.severity`); }); @@ -157,7 +157,7 @@ describe('Alerts cell actions', { tags: ['@ess', '@serverless'] }, () => { .first() .invoke('text') .then(() => { - scrollAlertTableColumnIntoView(ALERT_TABLE_SEVERITY_VALUES); + scrollAlertTableColumnIntoView(ALERT_TABLE_SEVERITY_HEADER); cy.window().then((win) => { cy.stub(win, 'prompt').returns('DISABLED WINDOW PROMPT'); }); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_charts.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_charts.cy.ts index 1868435825597..426193bbf72ba 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_charts.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_charts.cy.ts @@ -38,14 +38,14 @@ describe( }); it('Filter in/out should add a filter to KQL bar', function () { - const expectedNumberOfAlerts = 2; + const expectedNumberOfAlerts = 1; clickAlertsHistogramLegend(); clickAlertsHistogramLegendFilterFor(ruleConfigs.name); cy.get(GLOBAL_SEARCH_BAR_FILTER_ITEM).should( 'have.text', `kibana.alert.rule.name: ${ruleConfigs.name}` ); - cy.get(ALERTS_COUNT).should('have.text', `${expectedNumberOfAlerts} alerts`); + cy.get(ALERTS_COUNT).should('have.text', `${expectedNumberOfAlerts} alert`); clickAlertsHistogramLegend(); clickAlertsHistogramLegendFilterOut(ruleConfigs.name); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_details.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_details.cy.ts index ee51f507e37c7..9ab0d07569421 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_details.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/alerts_details.cy.ts @@ -54,8 +54,8 @@ describe('Alert details flyout', { tags: ['@ess', '@serverless'] }, () => { it('should update the table when status of the alert is updated', () => { cy.get(OVERVIEW_RULE).should('be.visible'); - cy.get(ALERTS_TABLE_COUNT).should('have.text', '2 alerts'); - cy.get(ALERT_SUMMARY_SEVERITY_DONUT_CHART).should('contain.text', '2alerts'); + cy.get(ALERTS_TABLE_COUNT).should('have.text', '1 alert'); + cy.get(ALERT_SUMMARY_SEVERITY_DONUT_CHART).should('contain.text', '1alert'); expandFirstAlert(); changeAlertStatusTo('acknowledged'); cy.get(ALERTS_TABLE_COUNT).should('have.text', '1 alert'); diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/building_block_alerts.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/building_block_alerts.cy.ts index d913d1701c2c8..718feeca31533 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/building_block_alerts.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/building_block_alerts.cy.ts @@ -19,11 +19,11 @@ const EXPECTED_NUMBER_OF_ALERTS = 5; describe('Alerts generated by building block rules', { tags: ['@ess', '@serverless'] }, () => { before(() => { - cy.task('esArchiverLoad', { archiveName: 'auditbeat_big' }); + cy.task('esArchiverLoad', { archiveName: 'auditbeat_multiple' }); }); after(() => { - cy.task('esArchiverUnload', 'auditbeat_big'); + cy.task('esArchiverUnload', 'auditbeat_multiple'); }); beforeEach(() => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/changing_alert_status.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/changing_alert_status.cy.ts index 3ee54dd437942..f06fad0cd43ee 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/changing_alert_status.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/changing_alert_status.cy.ts @@ -42,11 +42,11 @@ import { ALERTS_URL } from '../../../urls/navigation'; // Iusse tracked in: https://github.com/elastic/kibana/issues/167809 describe('Changing alert status', { tags: ['@ess', '@brokenInServerless'] }, () => { before(() => { - cy.task('esArchiverLoad', { archiveName: 'auditbeat_big' }); + cy.task('esArchiverLoad', { archiveName: 'auditbeat_multiple' }); }); after(() => { - cy.task('esArchiverUnload', 'auditbeat_big'); + cy.task('esArchiverUnload', 'auditbeat_multiple'); }); context('Opening alerts', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/detection_page_filters.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/detection_page_filters.cy.ts index 55b0817483ff6..dd29284f6c0ce 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/detection_page_filters.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/detection_page_filters.cy.ts @@ -235,7 +235,7 @@ describe(`Detections : Page Filters`, { tags: ['@ess', '@serverless'] }, () => { cy.get(ALERTS_COUNT) .invoke('text') .should((newAlertCount) => { - expect(newAlertCount.split(' ')[0]).eq(String(parseInt(originalAlertCount, 10) - 1)); + expect(newAlertCount.split(' ')[0]).eq(String(parseInt(originalAlertCount, 10))); }); }); }); @@ -318,7 +318,7 @@ describe(`Detections : Page Filters`, { tags: ['@ess', '@serverless'] }, () => { togglePageFilterPopover(0); cy.get(OPTION_SELECTABLE(0, 'open')).should('be.visible'); cy.get(OPTION_SELECTABLE(0, 'open')).should('contain.text', 'open'); - cy.get(OPTION_SELECTABLE(0, 'open')).get(OPTION_SELECTABLE_COUNT).should('have.text', 2); + cy.get(OPTION_SELECTABLE(0, 'open')).get(OPTION_SELECTABLE_COUNT).should('have.text', 1); }); it('should take kqlQuery into account', () => { diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_prevalence_tab.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_prevalence_tab.cy.ts index d0f12799c795a..38fd4ffb7496a 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_prevalence_tab.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/expandable_flyout/alert_details_left_panel_prevalence_tab.cy.ts @@ -70,7 +70,7 @@ describe( .and('contain.text', 'test'); cy.get(DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_PREVALENCE_TABLE_ALERT_COUNT_CELL).should( 'contain.text', - 2 + 1 ); cy.get(DOCUMENT_DETAILS_FLYOUT_INSIGHTS_TAB_PREVALENCE_TABLE_DOC_COUNT_CELL).should( 'contain.text', diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/investigate_in_timeline.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/investigate_in_timeline.cy.ts index db3fad7b57b2d..0570557d33f21 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/investigate_in_timeline.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/alerts/investigate_in_timeline.cy.ts @@ -65,10 +65,12 @@ describe('Investigate in timeline', { tags: ['@ess', '@serverless'] }, () => { // Click on the last button that lets us investigate in timeline. // We expect this to be the `process.args` row. + cy.get(ALERT_FLYOUT).find(SUMMARY_VIEW_INVESTIGATE_IN_TIMELINE_BUTTON).eq(5).scrollIntoView(); cy.get(ALERT_FLYOUT) .find(SUMMARY_VIEW_INVESTIGATE_IN_TIMELINE_BUTTON) - .last() - .should('have.text', alertCount) + .eq(5) + .should('be.visible') + .and('have.text', alertCount) .click(); // Make sure a new timeline is created and opened diff --git a/x-pack/test/security_solution_cypress/cypress/screens/common/filter_group.ts b/x-pack/test/security_solution_cypress/cypress/screens/common/filter_group.ts index a4c069c2e2467..0f037a9955726 100644 --- a/x-pack/test/security_solution_cypress/cypress/screens/common/filter_group.ts +++ b/x-pack/test/security_solution_cypress/cypress/screens/common/filter_group.ts @@ -7,37 +7,22 @@ import { getDataTestSubjectSelector } from '../../helpers/common'; -export const FILTER_GROUP_LOADING = '[data-test-subj="filter-group__loading"]'; -export const FILTER_GROUP_ITEMS = '[data-test-subj="filter-group__items"]'; -export const FILTER_GROUP_CLEAR = '[data-test-subj="filter-group__clear"]'; - +export const CONTROL_GROUP = '[data-test-subj="controls-group"]'; export const CONTROL_FRAMES = '[data-test-subj="control-frame"]'; export const CONTROL_FRAME_TITLE = '[data-test-subj="control-frame-title"]'; -export const CONTROL_FRAME_DRAG_HANDLE = '.controlFrame__dragHandle'; - export const OPTION_LIST_LABELS = '.controlFrame__labelToolTip'; export const OPTION_LIST_VALUES = (idx: number) => `[data-test-subj="optionsList-control-${idx}"]`; export const OPTION_LIST_CLEAR_BTN = '.presentationUtil__floatingActions [aria-label="Clear"]'; -export const OPTION_LIST_NUMBER_OFF = '.euiFilterButton__notification'; - export const OPTION_LISTS_LOADING = '.optionsList--filterBtnWrapper .euiLoadingSpinner'; -export const OPTION_LISTS_EXISTS = '[data-test-subj="optionsList-control-selection-exists"]'; - -export const OPTION_LIST_ACTIVE_CLEAR_SELECTION = - '[data-test-subj="optionsList-control-clear-all-selections"]'; - export const OPTION_SELECTABLE = (popoverIndex: number, value: string) => `#control-popover-${popoverIndex} [data-test-subj="optionsList-control-selection-${value}"]`; -export const OPTION_IGNORED = (popoverIndex: number, value: string) => - `#control-popover-${popoverIndex} [data-test-subj="optionsList-control-ignored-selection-${value}"]`; - export const OPTION_SELECTABLE_COUNT = getDataTestSubjectSelector( 'optionsList-document-count-badge' ); @@ -61,8 +46,6 @@ export const DETECTION_PAGE_FILTER_GROUP_RESET_BUTTON = export const FILTER_GROUP_CONTEXT_EDIT_CONTROLS = '[data-test-subj="filter-group__context--edit"]'; -export const FILTER_GROUP_CONTEXT_SAVE_CONTROLS = '[data-test-subj="filter-group__context--save"]'; - export const FILTER_GROUP_CONTEXT_DISCARD_CHANGES = '[data-test-subj="filter-group__context--discard"]'; @@ -70,10 +53,6 @@ export const FILTER_GROUP_ADD_CONTROL = '[data-test-subj="filter-group__add-cont export const FILTER_GROUP_SAVE_CHANGES = '[data-test-subj="filter-group__save"]'; -export const FILTER_GROUP_DISCARD_CHANGES = '[data-test-subj="filter-group__discard"]'; - -export const FILTER_GROUP_SAVE_CHANGES_POPOVER = '[data-test-subj="filter-group__save-popover"]'; - export const FILTER_GROUP_EDIT_CONTROLS_PANEL = '[data-test-subj="control-editor-flyout"]'; export const FILTER_GROUP_EDIT_CONTROL_PANEL_ITEMS = { diff --git a/x-pack/test/security_solution_cypress/cypress/screens/overview.ts b/x-pack/test/security_solution_cypress/cypress/screens/overview.ts index 442fcf621fc95..37b95f6ba6f59 100644 --- a/x-pack/test/security_solution_cypress/cypress/screens/overview.ts +++ b/x-pack/test/security_solution_cypress/cypress/screens/overview.ts @@ -55,7 +55,7 @@ const STAT_PACKAGE = { domId: '[data-test-subj="host-stat-auditbeatPackage"]', }; const STAT_PROCESS = { - value: '2', + value: '1', domId: '[data-test-subj="host-stat-auditbeatProcess"]', }; const STAT_USER = { diff --git a/x-pack/test/security_solution_cypress/cypress/support/e2e.ts b/x-pack/test/security_solution_cypress/cypress/support/e2e.ts index eb3488178485f..b0961b77a2bba 100644 --- a/x-pack/test/security_solution_cypress/cypress/support/e2e.ts +++ b/x-pack/test/security_solution_cypress/cypress/support/e2e.ts @@ -16,7 +16,7 @@ import { setupUsers } from './setup_users'; import { CLOUD_SERVERLESS, IS_SERVERLESS } from '../env_var_names_constants'; before(() => { - cy.task('esArchiverLoad', { archiveName: 'auditbeat' }); + cy.task('esArchiverLoad', { archiveName: 'auditbeat_single' }); }); if (!Cypress.env(IS_SERVERLESS) && !Cypress.env(CLOUD_SERVERLESS)) { diff --git a/x-pack/test/security_solution_cypress/cypress/tasks/alerts.ts b/x-pack/test/security_solution_cypress/cypress/tasks/alerts.ts index 23b5d106cb6cf..cc1a06d3545de 100644 --- a/x-pack/test/security_solution_cypress/cypress/tasks/alerts.ts +++ b/x-pack/test/security_solution_cypress/cypress/tasks/alerts.ts @@ -75,6 +75,7 @@ import { OPTION_LIST_VALUES, OPTION_LIST_CLEAR_BTN, OPTION_SELECTABLE, + CONTROL_GROUP, } from '../screens/common/filter_group'; import { LOADING_SPINNER } from '../screens/common/page'; import { ALERTS_URL } from '../urls/navigation'; @@ -189,7 +190,7 @@ export const closePageFilterPopover = (filterIndex: number) => { }; export const clearAllSelections = (filterIndex: number) => { - cy.scrollTo('top'); + cy.get(CONTROL_GROUP).scrollIntoView(); recurse( () => { cy.get(CONTROL_FRAME_TITLE).eq(filterIndex).realHover(); diff --git a/x-pack/test/security_solution_cypress/cypress/tasks/exceptions.ts b/x-pack/test/security_solution_cypress/cypress/tasks/exceptions.ts index 00d6c2d405b87..4ed5ff5ef2f8d 100644 --- a/x-pack/test/security_solution_cypress/cypress/tasks/exceptions.ts +++ b/x-pack/test/security_solution_cypress/cypress/tasks/exceptions.ts @@ -237,8 +237,9 @@ export const addExceptionComment = (comment: string) => { export const addExceptionHugeComment = (comment: string) => { cy.get(EXCEPTION_COMMENTS_ACCORDION_BTN).click(); + cy.get(EXCEPTION_COMMENT_TEXT_AREA).type(` {backspace}`); cy.get(EXCEPTION_COMMENT_TEXT_AREA).invoke('val', comment); - cy.get(EXCEPTION_COMMENT_TEXT_AREA).type(`!{backspace}`); + cy.get(EXCEPTION_COMMENT_TEXT_AREA).type(` {backspace}`); cy.get(EXCEPTION_COMMENT_TEXT_AREA).should('have.value', comment); }; diff --git a/x-pack/test/security_solution_cypress/es_archives/auditbeat_big/data.json b/x-pack/test/security_solution_cypress/es_archives/auditbeat_multiple/data.json similarity index 100% rename from x-pack/test/security_solution_cypress/es_archives/auditbeat_big/data.json rename to x-pack/test/security_solution_cypress/es_archives/auditbeat_multiple/data.json diff --git a/x-pack/test/security_solution_cypress/es_archives/auditbeat_big/mappings.json b/x-pack/test/security_solution_cypress/es_archives/auditbeat_multiple/mappings.json similarity index 100% rename from x-pack/test/security_solution_cypress/es_archives/auditbeat_big/mappings.json rename to x-pack/test/security_solution_cypress/es_archives/auditbeat_multiple/mappings.json diff --git a/x-pack/test/security_solution_cypress/es_archives/auditbeat/data.json b/x-pack/test/security_solution_cypress/es_archives/auditbeat_single/data.json similarity index 50% rename from x-pack/test/security_solution_cypress/es_archives/auditbeat/data.json rename to x-pack/test/security_solution_cypress/es_archives/auditbeat_single/data.json index a4e42ac0335a9..cb9a035e8d19d 100644 --- a/x-pack/test/security_solution_cypress/es_archives/auditbeat/data.json +++ b/x-pack/test/security_solution_cypress/es_archives/auditbeat_single/data.json @@ -1,126 +1,3 @@ -{ - "type": "doc", - "value": { - "id": "_aZE5nwBOpWiDweSth_F", - "index": "auditbeat-2022", - "source": { - "@timestamp" : "2022-03-04T19:41:33.045Z", - "host" : { - "hostname" : "test.local", - "architecture" : "x86_64", - "os" : { - "platform" : "darwin", - "version" : "10.16", - "family" : "darwin", - "name" : "Mac OS X", - "kernel" : "21.3.0", - "build" : "21D62", - "type" : "macos" - }, - "id" : "44426D67-79AB-547C-7777-440AB8F5DDD2", - "ip" : [ - "fe80::bade:48ff:fe00:1122", - "fe81::4ab:9565:1199:be3", - "192.168.5.175", - "fe80::40d7:d0ff:fe66:f55", - "fe81::40d8:d0ff:fe66:f55", - "fe82::c2c:6bdf:3307:dce0", - "fe83::5069:fcd5:e31c:7059", - "fe80::ce81:b2c:bd2c:69e", - "fe80::febc:bbc1:c517:827b", - "fe80::6d09:bee6:55a5:539d", - "fe80::c920:752e:1e0e:edc9", - "fe80::a4a:ca38:761f:83e2" - ], - "mac" : [ - "ad:df:48:00:11:22", - "a6:86:e7:ae:5a:b6", - "a9:83:e7:ae:5a:b6", - "43:d8:d0:66:0f:55", - "42:d8:d0:66:0f:57", - "82:70:c7:c2:3c:01", - "82:70:c6:c2:4c:00", - "82:76:a6:c2:3c:05", - "82:70:c6:b2:3c:04", - "82:71:a6:c2:3c:01" - ], - "name" : "siem-kibana" - }, - "agent" : { - "type" : "auditbeat", - "version" : "8.1.0", - "ephemeral_id" : "f6df090f-656a-4a79-a6a1-0c8671c9752d", - "id" : "0ebd469b-c164-4734-00e6-96d018098dc7", - "name" : "test.local" - }, - "event" : { - "module" : "system", - "dataset" : "process", - "kind" : "event", - "category" : [ - "process" - ], - "type" : [ - "start" - ], - "action" : "process_started" - }, - "destination": { - "port": 80 - }, - "process" : { - "start" : "2022-03-04T19:41:32.902Z", - "pid" : 30884, - "working_directory" : "/Users/test/security_solution", - "hash" : { - "sha1" : "ae2d46c38fa207efbea5fcecd6294eebbf5af00f" - }, - "parent" : { - "pid" : 777 - }, - "executable" : "/bin/zsh", - "name" : "zsh", - "args" : [ - "-zsh" - ], - "entity_id" : "q6pltOhTWlQx3BCD", - "entry_leader": { - "entity_id": "q6pltOhTWlQx3BCD", - "name": "fake entry", - "pid": 2342342 - } - }, - "message" : "Process zsh (PID: 27884) by user test STARTED", - "user" : { - "id" : "505", - "group" : { - "name" : "staff", - "id" : "20" - }, - "effective" : { - "id" : "505", - "group" : { - "id" : "20" - } - }, - "saved" : { - "id" : "505", - "group" : { - "id" : "20" - } - }, - "name" : "test" - }, - "service" : { - "type" : "system" - }, - "ecs" : { - "version" : "8.0.0" - } - } - } -} - { "type": "doc", "value": { diff --git a/x-pack/test/security_solution_cypress/es_archives/auditbeat/mappings.json b/x-pack/test/security_solution_cypress/es_archives/auditbeat_single/mappings.json similarity index 100% rename from x-pack/test/security_solution_cypress/es_archives/auditbeat/mappings.json rename to x-pack/test/security_solution_cypress/es_archives/auditbeat_single/mappings.json diff --git a/x-pack/test/security_solution_cypress/package.json b/x-pack/test/security_solution_cypress/package.json index 67125c9c55daa..0e34d7867d37a 100644 --- a/x-pack/test/security_solution_cypress/package.json +++ b/x-pack/test/security_solution_cypress/package.json @@ -7,7 +7,7 @@ "scripts": { "cypress": "NODE_OPTIONS=--openssl-legacy-provider ../../../node_modules/.bin/cypress", "cypress:open:ess": "TZ=UTC NODE_OPTIONS=--openssl-legacy-provider node ../../plugins/security_solution/scripts/start_cypress_parallel open --spec './cypress/e2e/**/*.cy.ts' --config-file ../../test/security_solution_cypress/cypress/cypress.config.ts --ftr-config-file ../../test/security_solution_cypress/cli_config", - "cypress:run:ess": "yarn cypress:ess --spec './cypress/e2e/exceptions/shared_exception_lists_management/**/*.cy.ts'", + "cypress:run:ess": "yarn cypress:ess --spec './cypress/e2e/!(investigations|explore)/**/*.cy.ts'", "cypress:run:cases:ess": "yarn cypress:ess --spec './cypress/e2e/explore/cases/*.cy.ts'", "cypress:ess": "TZ=UTC NODE_OPTIONS=--openssl-legacy-provider node ../../plugins/security_solution/scripts/start_cypress_parallel run --config-file ../../test/security_solution_cypress/cypress/cypress_ci.config.ts --ftr-config-file ../../test/security_solution_cypress/cli_config", "cypress:run:respops:ess": "yarn cypress:ess --spec './cypress/e2e/(detection_response|exceptions)/**/*.cy.ts'", @@ -21,7 +21,7 @@ "cypress:cloud:serverless": "TZ=UTC NODE_OPTIONS=--openssl-legacy-provider NODE_TLS_REJECT_UNAUTHORIZED=0 ../../../node_modules/.bin/cypress", "cypress:open:cloud:serverless": "yarn cypress:cloud:serverless open --config-file ./cypress/cypress_serverless.config.ts --env CLOUD_SERVERLESS=true", "cypress:open:serverless": "yarn cypress:serverless open --config-file ../../test/security_solution_cypress/cypress/cypress_serverless.config.ts --spec './cypress/e2e/**/*.cy.ts'", - "cypress:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/exceptions/shared_exception_lists_management/**/*.cy.ts'", + "cypress:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/!(investigations|explore)/**/*.cy.ts'", "cypress:run:cloud:serverless": "yarn cypress:cloud:serverless run --config-file ./cypress/cypress_ci_serverless.config.ts --env CLOUD_SERVERLESS=true", "cypress:investigations:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/investigations/**/*.cy.ts'", "cypress:explore:run:serverless": "yarn cypress:serverless --spec './cypress/e2e/explore/**/*.cy.ts'", 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 03f229f21b47a..8796dcfe93773 100644 --- a/x-pack/test_serverless/functional/test_suites/search/navigation.ts +++ b/x-pack/test_serverless/functional/test_suites/search/navigation.ts @@ -72,20 +72,16 @@ export default function ({ getPageObject, getService }: FtrProviderContext) { it("management apps from the sidenav hide the 'stack management' root from the breadcrumbs", async () => { await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'management:triggersActions' }); - await svlCommonNavigation.breadcrumbs.expectBreadcrumbTexts(['Explore', 'Alerts', 'Rules']); + await svlCommonNavigation.breadcrumbs.expectBreadcrumbTexts(['Alerts', 'Rules']); await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'management:index_management' }); - await svlCommonNavigation.breadcrumbs.expectBreadcrumbTexts([ - 'Content', - 'Index Management', - 'Indices', - ]); + await svlCommonNavigation.breadcrumbs.expectBreadcrumbTexts(['Index Management', 'Indices']); await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'management:ingest_pipelines' }); - await svlCommonNavigation.breadcrumbs.expectBreadcrumbTexts(['Content', 'Ingest Pipelines']); + await svlCommonNavigation.breadcrumbs.expectBreadcrumbTexts(['Ingest Pipelines']); await svlCommonNavigation.sidenav.clickLink({ deepLinkId: 'management:api_keys' }); - await svlCommonNavigation.breadcrumbs.expectBreadcrumbTexts(['Security', 'API keys']); + await svlCommonNavigation.breadcrumbs.expectBreadcrumbTexts(['API keys']); }); it('navigate management', async () => { diff --git a/yarn.lock b/yarn.lock index 0d11dd72a0359..68faac71450cc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4304,6 +4304,10 @@ version "0.0.0" uid "" +"@kbn/error-boundary-example-plugin@link:examples/error_boundary": + version "0.0.0" + uid "" + "@kbn/es-archiver@link:packages/kbn-es-archiver": version "0.0.0" uid "" @@ -8251,7 +8255,7 @@ resolved "https://registry.yarnpkg.com/@testim/chrome-version/-/chrome-version-1.1.3.tgz#fbb68696899d7b8c1b9b891eded9c04fe2cd5529" integrity sha512-g697J3WxV/Zytemz8aTuKjTGYtta9+02kva3C1xc7KXB8GdbfE1akGJIsZLyY/FSh2QrnE+fiB7vmWU3XNcb6A== -"@testing-library/dom@^8.0.0", "@testing-library/dom@^8.19.0": +"@testing-library/dom@^8.0.0": version "8.19.0" resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-8.19.0.tgz#bd3f83c217ebac16694329e413d9ad5fdcfd785f" integrity sha512-6YWYPPpxG3e/xOo6HIWwB/58HukkwIVTOaZ0VwdMVjhRUX/01E4FtQbck9GazOOj7MXHc5RBzMrU86iBJHbI+A== @@ -20473,10 +20477,10 @@ kdbush@^4.0.2: resolved "https://registry.yarnpkg.com/kdbush/-/kdbush-4.0.2.tgz#2f7b7246328b4657dd122b6c7f025fbc2c868e39" integrity sha512-WbCVYJ27Sz8zi9Q7Q0xHC+05iwkm3Znipc2XTlrnJbsHMYktW4hPhXUE8Ys1engBrvffoSCqbil1JQAa7clRpA== -kea@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/kea/-/kea-2.4.2.tgz#53af42702f2c8962422e456e5dd943391bad26e9" - integrity sha512-cdGds/gsJsbo/KbVAMk5/tTr229eDibVT1wmPPxPO/10zYb8GFoP3udBIQb+Hop5qGEu2wIHVdXwJvXqSS8JAg== +kea@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/kea/-/kea-2.6.0.tgz#774a82188e0fb52cdb18b72843a875ee857f3807" + integrity sha512-+yaLyZx8h2v96aL01XIRZjqA8Qk4fIUziznSKnkjDItUU8YnH75xER6+vMHT5EHC3MJeSScxIx5UuqZl30DBdg== keyv@^3.0.0: version "3.0.0"