diff --git a/.backportrc.json b/.backportrc.json index a62729789a26c..58dfbf669671f 100644 --- a/.backportrc.json +++ b/.backportrc.json @@ -3,6 +3,7 @@ "repoName": "kibana", "targetBranchChoices": [ "main", + "8.15", "8.14", "8.13", "8.12", @@ -51,7 +52,7 @@ "backport" ], "branchLabelMapping": { - "^v8.15.0$": "main", + "^v8.16.0$": "main", "^v(\\d+).(\\d+).\\d+$": "$1.$2" }, "autoMerge": true, diff --git a/.buildkite/pipeline-resource-definitions/kibana-on-merge.yml b/.buildkite/pipeline-resource-definitions/kibana-on-merge.yml index 497968f39ad95..3240cf5e01777 100644 --- a/.buildkite/pipeline-resource-definitions/kibana-on-merge.yml +++ b/.buildkite/pipeline-resource-definitions/kibana-on-merge.yml @@ -20,7 +20,7 @@ spec: spec: env: SLACK_NOTIFICATIONS_CHANNEL: '#kibana-operations-alerts' - GITHUB_BUILD_COMMIT_STATUS_ENABLED: 'true' + ELASTIC_GITHUB_BUILD_COMMIT_STATUS_ENABLED: 'true' GITHUB_COMMIT_STATUS_CONTEXT: buildkite/on-merge REPORT_FAILED_TESTS_TO_GITHUB: 'true' ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true' diff --git a/.buildkite/pipeline-resource-definitions/kibana-pr.yml b/.buildkite/pipeline-resource-definitions/kibana-pr.yml index af697452130fc..4d6275843327e 100644 --- a/.buildkite/pipeline-resource-definitions/kibana-pr.yml +++ b/.buildkite/pipeline-resource-definitions/kibana-pr.yml @@ -20,9 +20,9 @@ spec: spec: env: ELASTIC_PR_COMMENTS_ENABLED: 'true' - GITHUB_BUILD_COMMIT_STATUS_ENABLED: 'true' + ELASTIC_GITHUB_BUILD_COMMIT_STATUS_ENABLED: 'true' + ELASTIC_GITHUB_STEP_COMMIT_STATUS_ENABLED: 'true' GITHUB_BUILD_COMMIT_STATUS_CONTEXT: kibana-ci - GITHUB_STEP_COMMIT_STATUS_ENABLED: 'true' allow_rebuilds: true branch_configuration: '' cancel_intermediate_builds: true diff --git a/.buildkite/pipeline-resource-definitions/kibana-serverless-emergency-release.yml b/.buildkite/pipeline-resource-definitions/kibana-serverless-emergency-release.yml new file mode 100644 index 0000000000000..5911095262ac1 --- /dev/null +++ b/.buildkite/pipeline-resource-definitions/kibana-serverless-emergency-release.yml @@ -0,0 +1,30 @@ +# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json +apiVersion: backstage.io/v1alpha1 +kind: Resource +metadata: + name: buildkite-pipeline-kibana-emergency-release + description: Emergency release + links: + - title: Pipeline + url: https://buildkite.com/elastic/kibana-emergency-release +spec: + type: buildkite-pipeline + owner: group:kibana-operations + system: buildkite + implementation: + apiVersion: buildkite.elastic.dev/v1 + kind: Pipeline + metadata: + name: kibana / emergency release + spec: + repository: elastic/kibana + provider_settings: + trigger_mode: none + pipeline_file: ".buildkite/pipelines/emergency_release.yml" + teams: + kibana-operations: + access_level: MANAGE_BUILD_AND_READ + kibana-release-operators: + access_level: BUILD_AND_READ + everyone: + access_level: READ_ONLY diff --git a/.buildkite/pipeline-resource-definitions/kibana-serverless-quality-gates.yml b/.buildkite/pipeline-resource-definitions/kibana-serverless-quality-gates.yml new file mode 100644 index 0000000000000..1f57f2ca83250 --- /dev/null +++ b/.buildkite/pipeline-resource-definitions/kibana-serverless-quality-gates.yml @@ -0,0 +1,33 @@ +# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json +apiVersion: backstage.io/v1alpha1 +kind: Resource +metadata: + name: kibana-tests-pipeline + description: Definition of the kibana pipeline + links: + - title: Pipeline + url: https://buildkite.com/elastic/kibana-tests +spec: + type: buildkite-pipeline + owner: group:kibana-tech-leads + system: buildkite + implementation: + apiVersion: buildkite.elastic.dev/v1 + kind: Pipeline + metadata: + name: kibana-tests + description: Pipeline that tests the service integration in various environments + spec: + repository: elastic/kibana + pipeline_file: ./.buildkite/pipelines/quality-gates/pipeline.kibana-tests.yaml + provider_settings: + trigger_mode: none + teams: + kibana-operations: + access_level: MANAGE_BUILD_AND_READ + kibana-release-operators: + access_level: BUILD_AND_READ + cloud-tooling: + access_level: BUILD_AND_READ + everyone: + access_level: READ_ONLY diff --git a/.buildkite/pipeline-resource-definitions/locations.yml b/.buildkite/pipeline-resource-definitions/locations.yml index ccbc41c60ece1..c4e07b0d055c1 100644 --- a/.buildkite/pipeline-resource-definitions/locations.yml +++ b/.buildkite/pipeline-resource-definitions/locations.yml @@ -27,6 +27,8 @@ spec: - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-performance-data-set-extraction-daily.yml - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-pr.yml - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-purge-cloud-deployments.yml + - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-serverless-emergency-release.yml + - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-serverless-quality-gates.yml - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-serverless-quality-gates-emergency.yml - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-serverless-release-testing.yml - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-serverless-release.yml diff --git a/.buildkite/pipelines/security_solution_quality_gate/mki_periodic/mki_periodic_explore.yml b/.buildkite/pipelines/security_solution_quality_gate/mki_periodic/mki_periodic_explore.yml index 7aff13525a2fc..7697da4b3edaf 100644 --- a/.buildkite/pipelines/security_solution_quality_gate/mki_periodic/mki_periodic_explore.yml +++ b/.buildkite/pipelines/security_solution_quality_gate/mki_periodic/mki_periodic_explore.yml @@ -17,3 +17,66 @@ steps: automatic: - exit_status: '-1' limit: 1 + + - group: "API MKI - Explore" + key: api_test_explore + steps: + - label: Running explore:hosts:runner:qa:serverless + command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh explore:hosts:runner:qa:serverless + key: explore:hosts:runner:qa:serverless + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-4 + preemptible: true + timeout_in_minutes: 120 + retry: + automatic: + - exit_status: "1" + limit: 2 + + - label: Running explore:network:runner:qa:serverless + command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh explore:network:runner:qa:serverless + key: explore:network:runner:qa:serverless + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-4 + preemptible: true + timeout_in_minutes: 120 + retry: + automatic: + - exit_status: "1" + limit: 2 + + - label: Running explore:overview:runner:qa:serverless + command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh explore:overview:runner:qa:serverless + key: explore:overview:runner:qa:serverless + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-4 + preemptible: true + timeout_in_minutes: 120 + retry: + automatic: + - exit_status: "1" + limit: 2 + + - label: Running explore:users:runner:qa:serverless + command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh explore:users:runner:qa:serverless + key: explore:users:runner:qa:serverless + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-4 + preemptible: true + timeout_in_minutes: 120 + retry: + automatic: + - exit_status: "1" + limit: 2 diff --git a/.buildkite/pipelines/security_solution_quality_gate/mki_periodic/mki_periodic_gen_ai.yml b/.buildkite/pipelines/security_solution_quality_gate/mki_periodic/mki_periodic_gen_ai.yml index 2d84e7d4e0315..3fe69ca56c38b 100644 --- a/.buildkite/pipelines/security_solution_quality_gate/mki_periodic/mki_periodic_gen_ai.yml +++ b/.buildkite/pipelines/security_solution_quality_gate/mki_periodic/mki_periodic_gen_ai.yml @@ -1,6 +1,6 @@ steps: - command: .buildkite/scripts/pipelines/security_solution_quality_gate/security_solution_cypress/mki_security_solution_cypress.sh cypress:run:qa:serverless:ai_assistant - label: "Cypress MKI - GenAI + label: "Cypress MKI - GenAI" key: test_ai_assistant env: BK_TEST_SUITE_KEY: "serverless-cypress-gen-ai" diff --git a/.buildkite/pipelines/security_solution_quality_gate/mki_periodic/mki_periodic_investigations.yml b/.buildkite/pipelines/security_solution_quality_gate/mki_periodic/mki_periodic_investigations.yml index d19d709231e31..0988bf6ecf6b8 100644 --- a/.buildkite/pipelines/security_solution_quality_gate/mki_periodic/mki_periodic_investigations.yml +++ b/.buildkite/pipelines/security_solution_quality_gate/mki_periodic/mki_periodic_investigations.yml @@ -17,3 +17,36 @@ steps: automatic: - exit_status: '-1' limit: 1 + + - group: "API MKI - Investigations" + key: api_test_investigations + steps: + - label: Running investigations:timeline:runner:qa:serverless + command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh investigations:timeline:runner:qa:serverless + key: investigations:timeline:runner:qa:serverless + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-4 + preemptible: true + timeout_in_minutes: 120 + retry: + automatic: + - exit_status: "1" + limit: 2 + + - label: Running investigations:saved-objects:runner:qa:serverless + command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh investigations:saved-objects:runner:qa:serverless + key: investigations:saved-objects:runner:qa:serverless + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-4 + preemptible: true + timeout_in_minutes: 120 + retry: + automatic: + - exit_status: "1" + limit: 2 diff --git a/.buildkite/pipelines/security_solution_quality_gate/mki_quality_gate/mki_quality_gate_explore.yml b/.buildkite/pipelines/security_solution_quality_gate/mki_quality_gate/mki_quality_gate_explore.yml index e60f4509fcb3e..2c518fa24efab 100644 --- a/.buildkite/pipelines/security_solution_quality_gate/mki_quality_gate/mki_quality_gate_explore.yml +++ b/.buildkite/pipelines/security_solution_quality_gate/mki_quality_gate/mki_quality_gate_explore.yml @@ -17,3 +17,66 @@ steps: automatic: - exit_status: '-1' limit: 1 + + - group: "API MKI - Explore" + key: api_test_explore + steps: + - label: Running explore:hosts:runner:qa:serverless:release + command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh explore:hosts:runner:qa:serverless:release + key: explore:hosts:runner:qa:serverless:release + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-4 + preemptible: true + timeout_in_minutes: 120 + retry: + automatic: + - exit_status: "1" + limit: 2 + + - label: Running explore:network:runner:qa:serverless:release + command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh explore:network:runner:qa:serverless:release + key: explore:network:runner:qa:serverless:release + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-4 + preemptible: true + timeout_in_minutes: 120 + retry: + automatic: + - exit_status: "1" + limit: 2 + + - label: Running explore:overview:runner:qa:serverless:release + command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh explore:overview:runner:qa:serverless:release + key: explore:overview:runner:qa:serverless:release + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-4 + preemptible: true + timeout_in_minutes: 120 + retry: + automatic: + - exit_status: "1" + limit: 2 + + - label: Running explore:users:runner:qa:serverless:release + command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh explore:users:runner:qa:serverless:release + key: explore:users:runner:qa:serverless:release + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-4 + preemptible: true + timeout_in_minutes: 120 + retry: + automatic: + - exit_status: "1" + limit: 2 diff --git a/.buildkite/pipelines/security_solution_quality_gate/mki_quality_gate/mki_quality_gate_investigations.yml b/.buildkite/pipelines/security_solution_quality_gate/mki_quality_gate/mki_quality_gate_investigations.yml index ed46611989b87..d3f57e40ec2cb 100644 --- a/.buildkite/pipelines/security_solution_quality_gate/mki_quality_gate/mki_quality_gate_investigations.yml +++ b/.buildkite/pipelines/security_solution_quality_gate/mki_quality_gate/mki_quality_gate_investigations.yml @@ -17,3 +17,36 @@ steps: automatic: - exit_status: '-1' limit: 1 + + - group: "API MKI - Investigations" + key: api_test_investigations + steps: + - label: Running investigations:timeline:runner:qa:serverless:release + command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh investigations:timeline:runner:qa:serverless:release + key: investigations:timeline:runner:qa:serverless:release + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-4 + preemptible: true + timeout_in_minutes: 120 + retry: + automatic: + - exit_status: "1" + limit: 2 + + - label: Running investigations:saved-objects:runner:qa:serverless:release + command: .buildkite/scripts/pipelines/security_solution_quality_gate/api_integration/api-integration-tests.sh investigations:saved-objects:runner:qa:serverless:release + key: investigations:saved-objects:runner:qa:serverless:release + agents: + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-prod + provider: gcp + machineType: n2-standard-4 + preemptible: true + timeout_in_minutes: 120 + retry: + automatic: + - exit_status: "1" + limit: 2 diff --git a/.buildkite/scripts/lifecycle/post_build.sh b/.buildkite/scripts/lifecycle/post_build.sh index 3ca36e9d04b78..c0fb7edde1b0a 100755 --- a/.buildkite/scripts/lifecycle/post_build.sh +++ b/.buildkite/scripts/lifecycle/post_build.sh @@ -5,7 +5,7 @@ set -euo pipefail BUILD_SUCCESSFUL=$(ts-node "$(dirname "${0}")/build_status.ts") export BUILD_SUCCESSFUL -if [[ "${GITHUB_BUILD_COMMIT_STATUS_ENABLED:-}" != "true" ]]; then +if [[ "${ELASTIC_GITHUB_BUILD_COMMIT_STATUS_ENABLED:-}" != "true" ]]; then "$(dirname "${0}")/commit_status_complete.sh" fi diff --git a/.buildkite/scripts/lifecycle/pre_build.sh b/.buildkite/scripts/lifecycle/pre_build.sh index b8ccaf04f9bb9..91d8adda85eb1 100755 --- a/.buildkite/scripts/lifecycle/pre_build.sh +++ b/.buildkite/scripts/lifecycle/pre_build.sh @@ -4,7 +4,7 @@ set -euo pipefail source .buildkite/scripts/common/util.sh -if [[ "${GITHUB_BUILD_COMMIT_STATUS_ENABLED:-}" != "true" ]]; then +if [[ "${ELASTIC_GITHUB_BUILD_COMMIT_STATUS_ENABLED:-}" != "true" ]]; then "$(dirname "${0}")/commit_status_start.sh" fi diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index dc6b68ce36159..4b07769194de8 100644 --- a/api_docs/actions.mdx +++ b/api_docs/actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/actions title: "actions" image: https://source.unsplash.com/400x175/?github description: API docs for the actions plugin -date: 2024-07-03 +date: 2024-07-05 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 bdb13f3bd5dda..b05467df78795 100644 --- a/api_docs/advanced_settings.mdx +++ b/api_docs/advanced_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/advancedSettings title: "advancedSettings" image: https://source.unsplash.com/400x175/?github description: API docs for the advancedSettings plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings'] --- import advancedSettingsObj from './advanced_settings.devdocs.json'; diff --git a/api_docs/ai_assistant_management_selection.mdx b/api_docs/ai_assistant_management_selection.mdx index 9387fe6325bc5..f3af3e971b5b8 100644 --- a/api_docs/ai_assistant_management_selection.mdx +++ b/api_docs/ai_assistant_management_selection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiAssistantManagementSelection title: "aiAssistantManagementSelection" image: https://source.unsplash.com/400x175/?github description: API docs for the aiAssistantManagementSelection plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiAssistantManagementSelection'] --- import aiAssistantManagementSelectionObj from './ai_assistant_management_selection.devdocs.json'; diff --git a/api_docs/aiops.devdocs.json b/api_docs/aiops.devdocs.json index 5d8cd183f7416..e0f9a16baedb0 100644 --- a/api_docs/aiops.devdocs.json +++ b/api_docs/aiops.devdocs.json @@ -786,6 +786,29 @@ "path": "x-pack/plugins/aiops/public/hooks/use_aiops_app_context.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "aiops", + "id": "def-public.AiopsAppDependencies.observabilityAIAssistant", + "type": "Object", + "tags": [], + "label": "observabilityAIAssistant", + "description": [ + "Observability AI Assistant" + ], + "signature": [ + { + "pluginId": "observabilityAIAssistant", + "scope": "public", + "docId": "kibObservabilityAIAssistantPluginApi", + "section": "def-public.ObservabilityAIAssistantPublicStart", + "text": "ObservabilityAIAssistantPublicStart" + }, + " | undefined" + ], + "path": "x-pack/plugins/aiops/public/hooks/use_aiops_app_context.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -1068,6 +1091,22 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "aiops", + "id": "def-public.LogRateAnalysisAppStateProps.showContextualInsights", + "type": "CompoundType", + "tags": [], + "label": "showContextualInsights", + "description": [ + "Optional flag to indicate whether to show contextual insights" + ], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/plugins/aiops/public/components/log_rate_analysis/log_rate_analysis_app_state.tsx", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "aiops", "id": "def-public.LogRateAnalysisAppStateProps.showFrozenDataTierChoice", diff --git a/api_docs/aiops.mdx b/api_docs/aiops.mdx index abc6c59ade9e7..d3fda268fe0f6 100644 --- a/api_docs/aiops.mdx +++ b/api_docs/aiops.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiops title: "aiops" image: https://source.unsplash.com/400x175/?github description: API docs for the aiops plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops'] --- import aiopsObj from './aiops.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) for questi | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 72 | 0 | 9 | 2 | +| 74 | 0 | 9 | 2 | ## Client diff --git a/api_docs/alerting.devdocs.json b/api_docs/alerting.devdocs.json index 010cbaafd57b4..6bd7532c969ce 100644 --- a/api_docs/alerting.devdocs.json +++ b/api_docs/alerting.devdocs.json @@ -8794,7 +8794,7 @@ { "parentPluginId": "alerting", "id": "def-common.Rule.alertDelay", - "type": "Object", + "type": "CompoundType", "tags": [], "label": "alertDelay", "description": [], @@ -8806,7 +8806,7 @@ "section": "def-common.AlertDelay", "text": "AlertDelay" }, - " | undefined" + " | null | undefined" ], "path": "packages/kbn-alerting-types/rule_types.ts", "deprecated": false, @@ -10456,6 +10456,18 @@ } ], "enums": [ + { + "parentPluginId": "alerting", + "id": "def-common.HealthStatus", + "type": "Enum", + "tags": [], + "label": "HealthStatus", + "description": [], + "path": "packages/kbn-alerting-types/alerting_framework_health_types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "alerting", "id": "def-common.MaintenanceWindowStatus", diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx index 92077cdd9876b..5cbbf695a3445 100644 --- a/api_docs/alerting.mdx +++ b/api_docs/alerting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/alerting title: "alerting" image: https://source.unsplash.com/400x175/?github description: API docs for the alerting plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting'] --- import alertingObj from './alerting.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-o | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 870 | 1 | 838 | 52 | +| 871 | 1 | 839 | 52 | ## Client diff --git a/api_docs/apm.devdocs.json b/api_docs/apm.devdocs.json index 9890cb6043243..d88ea5a9e24d1 100644 --- a/api_docs/apm.devdocs.json +++ b/api_docs/apm.devdocs.json @@ -418,7 +418,7 @@ "label": "APIEndpoint", "description": [], "signature": [ - "\"POST /internal/apm/data_view/static\" | \"GET /internal/apm/data_view/index_pattern\" | \"GET /internal/apm/environments\" | \"GET /internal/apm/services/{serviceName}/errors/groups/main_statistics\" | \"GET /internal/apm/services/{serviceName}/errors/groups/main_statistics_by_transaction_name\" | \"POST /internal/apm/services/{serviceName}/errors/groups/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/errors/{groupId}/samples\" | \"GET /internal/apm/services/{serviceName}/errors/{groupId}/error/{errorId}\" | \"GET /internal/apm/services/{serviceName}/errors/distribution\" | \"GET /internal/apm/services/{serviceName}/errors/{groupId}/top_erroneous_transactions\" | \"POST /internal/apm/latency/overall_distribution/transactions\" | \"GET /internal/apm/services/{serviceName}/metrics/charts\" | \"GET /internal/apm/services/{serviceName}/metrics/nodes\" | \"GET /internal/apm/services/{serviceName}/metrics/serverless/charts\" | \"GET /internal/apm/services/{serviceName}/metrics/serverless/summary\" | \"GET /internal/apm/services/{serviceName}/metrics/serverless/functions_overview\" | \"GET /internal/apm/services/{serviceName}/metrics/serverless/active_instances\" | \"GET /internal/apm/observability_overview\" | \"GET /internal/apm/observability_overview/has_data\" | \"GET /internal/apm/service-map\" | \"GET /internal/apm/service-map/service/{serviceName}\" | \"GET /internal/apm/service-map/dependency\" | \"GET /internal/apm/services\" | \"POST /internal/apm/services/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/metadata/details\" | \"GET /internal/apm/services/{serviceName}/metadata/icons\" | \"GET /internal/apm/services/{serviceName}/agent\" | \"GET /internal/apm/services/{serviceName}/transaction_types\" | \"GET /internal/apm/services/{serviceName}/node/{serviceNodeName}/metadata\" | \"GET /api/apm/services/{serviceName}/annotation/search 2023-10-31\" | \"POST /api/apm/services/{serviceName}/annotation 2023-10-31\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/details/{serviceNodeName}\" | \"GET /internal/apm/services/{serviceName}/throughput\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/main_statistics\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/dependencies\" | \"GET /internal/apm/services/{serviceName}/dependencies/breakdown\" | \"GET /internal/apm/services/{serviceName}/anomaly_charts\" | \"GET /internal/apm/services/{serviceName}/alerts_count\" | \"GET /internal/apm/entities/services\" | \"GET /internal/apm/service-groups\" | \"GET /internal/apm/service-group\" | \"POST /internal/apm/service-group\" | \"DELETE /internal/apm/service-group\" | \"GET /internal/apm/service-group/services\" | \"GET /internal/apm/service-group/counts\" | \"GET /internal/apm/suggestions\" | \"GET /internal/apm/traces/{traceId}\" | \"GET /internal/apm/traces\" | \"GET /internal/apm/traces/{traceId}/root_transaction\" | \"GET /internal/apm/transactions/{transactionId}\" | \"GET /internal/apm/traces/find\" | \"POST /internal/apm/traces/aggregated_critical_path\" | \"GET /internal/apm/traces/{traceId}/transactions/{transactionId}\" | \"GET /internal/apm/traces/{traceId}/spans/{spanId}\" | \"GET /internal/apm/transactions\" | \"GET /internal/apm/services/{serviceName}/transactions/groups/main_statistics\" | \"GET /internal/apm/services/{serviceName}/transactions/groups/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/latency\" | \"GET /internal/apm/services/{serviceName}/transactions/traces/samples\" | \"GET /internal/apm/services/{serviceName}/transaction/charts/breakdown\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/error_rate\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/coldstart_rate\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/coldstart_rate_by_transaction_name\" | \"GET /internal/apm/rule_types/transaction_error_rate/chart_preview\" | \"GET /internal/apm/rule_types/error_count/chart_preview\" | \"GET /internal/apm/rule_types/transaction_duration/chart_preview\" | \"GET /api/apm/settings/agent-configuration 2023-10-31\" | \"GET /api/apm/settings/agent-configuration/view 2023-10-31\" | \"DELETE /api/apm/settings/agent-configuration 2023-10-31\" | \"PUT /api/apm/settings/agent-configuration 2023-10-31\" | \"POST /api/apm/settings/agent-configuration/search 2023-10-31\" | \"GET /api/apm/settings/agent-configuration/environments 2023-10-31\" | \"GET /api/apm/settings/agent-configuration/agent_name 2023-10-31\" | \"GET /internal/apm/settings/anomaly-detection/jobs\" | \"POST /internal/apm/settings/anomaly-detection/jobs\" | \"GET /internal/apm/settings/anomaly-detection/environments\" | \"POST /internal/apm/settings/anomaly-detection/update_to_v3\" | \"GET /internal/apm/settings/apm-index-settings\" | \"GET /internal/apm/settings/apm-indices\" | \"POST /internal/apm/settings/apm-indices/save\" | \"GET /internal/apm/settings/custom_links/transaction\" | \"GET /internal/apm/settings/custom_links\" | \"POST /internal/apm/settings/custom_links\" | \"PUT /internal/apm/settings/custom_links/{id}\" | \"DELETE /internal/apm/settings/custom_links/{id}\" | \"GET /api/apm/sourcemaps 2023-10-31\" | \"POST /api/apm/sourcemaps 2023-10-31\" | \"DELETE /api/apm/sourcemaps/{id} 2023-10-31\" | \"POST /internal/apm/sourcemaps/migrate_fleet_artifacts\" | \"GET /internal/apm/fleet/has_apm_policies\" | \"GET /internal/apm/fleet/agents\" | \"POST /api/apm/fleet/apm_server_schema 2023-10-31\" | \"GET /internal/apm/fleet/apm_server_schema/unsupported\" | \"GET /internal/apm/fleet/migration_check\" | \"POST /internal/apm/fleet/cloud_apm_package_policy\" | \"GET /internal/apm/fleet/java_agent_versions\" | \"GET /internal/apm/dependencies/top_dependencies\" | \"GET /internal/apm/dependencies/upstream_services\" | \"GET /internal/apm/dependencies/metadata\" | \"GET /internal/apm/dependencies/charts/latency\" | \"GET /internal/apm/dependencies/charts/throughput\" | \"GET /internal/apm/dependencies/charts/error_rate\" | \"GET /internal/apm/dependencies/operations\" | \"GET /internal/apm/dependencies/charts/distribution\" | \"GET /internal/apm/dependencies/operations/spans\" | \"GET /internal/apm/correlations/field_candidates/transactions\" | \"GET /internal/apm/correlations/field_value_stats/transactions\" | \"POST /internal/apm/correlations/field_value_pairs/transactions\" | \"POST /internal/apm/correlations/significant_correlations/transactions\" | \"POST /internal/apm/correlations/p_values/transactions\" | \"GET /internal/apm/fallback_to_transactions\" | \"GET /internal/apm/has_data\" | \"GET /internal/apm/event_metadata/{processorEvent}/{id}\" | \"GET /internal/apm/agent_keys\" | \"GET /internal/apm/agent_keys/privileges\" | \"POST /internal/apm/api_key/invalidate\" | \"POST /api/apm/agent_keys 2023-10-31\" | \"GET /internal/apm/storage_explorer\" | \"GET /internal/apm/services/{serviceName}/storage_details\" | \"GET /internal/apm/storage_chart\" | \"GET /internal/apm/storage_explorer/privileges\" | \"GET /internal/apm/storage_explorer_summary_stats\" | \"GET /internal/apm/storage_explorer/is_cross_cluster_search\" | \"GET /internal/apm/storage_explorer/get_services\" | \"GET /internal/apm/traces/{traceId}/span_links/{spanId}/parents\" | \"GET /internal/apm/traces/{traceId}/span_links/{spanId}/children\" | \"GET /internal/apm/services/{serviceName}/infrastructure_attributes\" | \"GET /internal/apm/debug-telemetry\" | \"GET /internal/apm/time_range_metadata\" | \"GET /internal/apm/settings/labs\" | \"GET /internal/apm/get_agents_per_service\" | \"GET /internal/apm/get_latest_agent_versions\" | \"GET /internal/apm/services/{serviceName}/agent_instances\" | \"GET /internal/apm/mobile-services/{serviceName}/error/http_error_rate\" | \"GET /internal/apm/mobile-services/{serviceName}/errors/groups/main_statistics\" | \"POST /internal/apm/mobile-services/{serviceName}/errors/groups/detailed_statistics\" | \"GET /internal/apm/mobile-services/{serviceName}/error_terms\" | \"POST /internal/apm/mobile-services/{serviceName}/crashes/groups/detailed_statistics\" | \"GET /internal/apm/mobile-services/{serviceName}/crashes/groups/main_statistics\" | \"GET /internal/apm/mobile-services/{serviceName}/crashes/distribution\" | \"GET /internal/apm/services/{serviceName}/mobile/filters\" | \"GET /internal/apm/mobile-services/{serviceName}/most_used_charts\" | \"GET /internal/apm/mobile-services/{serviceName}/transactions/charts/sessions\" | \"GET /internal/apm/mobile-services/{serviceName}/transactions/charts/http_requests\" | \"GET /internal/apm/mobile-services/{serviceName}/stats\" | \"GET /internal/apm/mobile-services/{serviceName}/location/stats\" | \"GET /internal/apm/mobile-services/{serviceName}/terms\" | \"GET /internal/apm/mobile-services/{serviceName}/main_statistics\" | \"GET /internal/apm/mobile-services/{serviceName}/detailed_statistics\" | \"GET /internal/apm/diagnostics\" | \"POST /internal/apm/assistant/get_apm_timeseries\" | \"GET /internal/apm/assistant/get_downstream_dependencies\" | \"GET /internal/apm/services/{serviceName}/profiling/flamegraph\" | \"GET /internal/apm/profiling/status\" | \"GET /internal/apm/services/{serviceName}/profiling/functions\" | \"GET /internal/apm/services/{serviceName}/profiling/hosts/flamegraph\" | \"GET /internal/apm/services/{serviceName}/profiling/hosts/functions\" | \"POST /internal/apm/custom-dashboard\" | \"DELETE /internal/apm/custom-dashboard\" | \"GET /internal/apm/services/{serviceName}/dashboards\"" + "\"POST /internal/apm/data_view/static\" | \"GET /internal/apm/data_view/index_pattern\" | \"GET /internal/apm/environments\" | \"GET /internal/apm/services/{serviceName}/errors/groups/main_statistics\" | \"GET /internal/apm/services/{serviceName}/errors/groups/main_statistics_by_transaction_name\" | \"POST /internal/apm/services/{serviceName}/errors/groups/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/errors/{groupId}/samples\" | \"GET /internal/apm/services/{serviceName}/errors/{groupId}/error/{errorId}\" | \"GET /internal/apm/services/{serviceName}/errors/distribution\" | \"GET /internal/apm/services/{serviceName}/errors/{groupId}/top_erroneous_transactions\" | \"POST /internal/apm/latency/overall_distribution/transactions\" | \"GET /internal/apm/services/{serviceName}/metrics/charts\" | \"GET /internal/apm/services/{serviceName}/metrics/nodes\" | \"GET /internal/apm/services/{serviceName}/metrics/serverless/charts\" | \"GET /internal/apm/services/{serviceName}/metrics/serverless/summary\" | \"GET /internal/apm/services/{serviceName}/metrics/serverless/functions_overview\" | \"GET /internal/apm/services/{serviceName}/metrics/serverless/active_instances\" | \"GET /internal/apm/observability_overview\" | \"GET /internal/apm/observability_overview/has_data\" | \"GET /internal/apm/service-map\" | \"GET /internal/apm/service-map/service/{serviceName}\" | \"GET /internal/apm/service-map/dependency\" | \"GET /internal/apm/services\" | \"POST /internal/apm/services/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/metadata/details\" | \"GET /internal/apm/services/{serviceName}/metadata/icons\" | \"GET /internal/apm/services/{serviceName}/agent\" | \"GET /internal/apm/services/{serviceName}/transaction_types\" | \"GET /internal/apm/services/{serviceName}/node/{serviceNodeName}/metadata\" | \"GET /api/apm/services/{serviceName}/annotation/search 2023-10-31\" | \"POST /api/apm/services/{serviceName}/annotation 2023-10-31\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/details/{serviceNodeName}\" | \"GET /internal/apm/services/{serviceName}/throughput\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/main_statistics\" | \"GET /internal/apm/services/{serviceName}/service_overview_instances/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/dependencies\" | \"GET /internal/apm/services/{serviceName}/dependencies/breakdown\" | \"GET /internal/apm/services/{serviceName}/anomaly_charts\" | \"GET /internal/apm/services/{serviceName}/alerts_count\" | \"GET /internal/apm/entities/services\" | \"GET /internal/apm/entities/services/{serviceName}/logs_rate_timeseries\" | \"GET /internal/apm/entities/services/{serviceName}/logs_error_rate_timeseries\" | \"GET /internal/apm/service-groups\" | \"GET /internal/apm/service-group\" | \"POST /internal/apm/service-group\" | \"DELETE /internal/apm/service-group\" | \"GET /internal/apm/service-group/services\" | \"GET /internal/apm/service-group/counts\" | \"GET /internal/apm/suggestions\" | \"GET /internal/apm/traces/{traceId}\" | \"GET /internal/apm/traces\" | \"GET /internal/apm/traces/{traceId}/root_transaction\" | \"GET /internal/apm/transactions/{transactionId}\" | \"GET /internal/apm/traces/find\" | \"POST /internal/apm/traces/aggregated_critical_path\" | \"GET /internal/apm/traces/{traceId}/transactions/{transactionId}\" | \"GET /internal/apm/traces/{traceId}/spans/{spanId}\" | \"GET /internal/apm/transactions\" | \"GET /internal/apm/services/{serviceName}/transactions/groups/main_statistics\" | \"GET /internal/apm/services/{serviceName}/transactions/groups/detailed_statistics\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/latency\" | \"GET /internal/apm/services/{serviceName}/transactions/traces/samples\" | \"GET /internal/apm/services/{serviceName}/transaction/charts/breakdown\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/error_rate\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/coldstart_rate\" | \"GET /internal/apm/services/{serviceName}/transactions/charts/coldstart_rate_by_transaction_name\" | \"GET /internal/apm/rule_types/transaction_error_rate/chart_preview\" | \"GET /internal/apm/rule_types/error_count/chart_preview\" | \"GET /internal/apm/rule_types/transaction_duration/chart_preview\" | \"GET /api/apm/settings/agent-configuration 2023-10-31\" | \"GET /api/apm/settings/agent-configuration/view 2023-10-31\" | \"DELETE /api/apm/settings/agent-configuration 2023-10-31\" | \"PUT /api/apm/settings/agent-configuration 2023-10-31\" | \"POST /api/apm/settings/agent-configuration/search 2023-10-31\" | \"GET /api/apm/settings/agent-configuration/environments 2023-10-31\" | \"GET /api/apm/settings/agent-configuration/agent_name 2023-10-31\" | \"GET /internal/apm/settings/anomaly-detection/jobs\" | \"POST /internal/apm/settings/anomaly-detection/jobs\" | \"GET /internal/apm/settings/anomaly-detection/environments\" | \"POST /internal/apm/settings/anomaly-detection/update_to_v3\" | \"GET /internal/apm/settings/apm-index-settings\" | \"GET /internal/apm/settings/apm-indices\" | \"POST /internal/apm/settings/apm-indices/save\" | \"GET /internal/apm/settings/custom_links/transaction\" | \"GET /internal/apm/settings/custom_links\" | \"POST /internal/apm/settings/custom_links\" | \"PUT /internal/apm/settings/custom_links/{id}\" | \"DELETE /internal/apm/settings/custom_links/{id}\" | \"GET /api/apm/sourcemaps 2023-10-31\" | \"POST /api/apm/sourcemaps 2023-10-31\" | \"DELETE /api/apm/sourcemaps/{id} 2023-10-31\" | \"POST /internal/apm/sourcemaps/migrate_fleet_artifacts\" | \"GET /internal/apm/fleet/has_apm_policies\" | \"GET /internal/apm/fleet/agents\" | \"POST /api/apm/fleet/apm_server_schema 2023-10-31\" | \"GET /internal/apm/fleet/apm_server_schema/unsupported\" | \"GET /internal/apm/fleet/migration_check\" | \"POST /internal/apm/fleet/cloud_apm_package_policy\" | \"GET /internal/apm/fleet/java_agent_versions\" | \"GET /internal/apm/dependencies/top_dependencies\" | \"GET /internal/apm/dependencies/upstream_services\" | \"GET /internal/apm/dependencies/metadata\" | \"GET /internal/apm/dependencies/charts/latency\" | \"GET /internal/apm/dependencies/charts/throughput\" | \"GET /internal/apm/dependencies/charts/error_rate\" | \"GET /internal/apm/dependencies/operations\" | \"GET /internal/apm/dependencies/charts/distribution\" | \"GET /internal/apm/dependencies/operations/spans\" | \"GET /internal/apm/correlations/field_candidates/transactions\" | \"GET /internal/apm/correlations/field_value_stats/transactions\" | \"POST /internal/apm/correlations/field_value_pairs/transactions\" | \"POST /internal/apm/correlations/significant_correlations/transactions\" | \"POST /internal/apm/correlations/p_values/transactions\" | \"GET /internal/apm/fallback_to_transactions\" | \"GET /internal/apm/has_data\" | \"GET /internal/apm/event_metadata/{processorEvent}/{id}\" | \"GET /internal/apm/agent_keys\" | \"GET /internal/apm/agent_keys/privileges\" | \"POST /internal/apm/api_key/invalidate\" | \"POST /api/apm/agent_keys 2023-10-31\" | \"GET /internal/apm/storage_explorer\" | \"GET /internal/apm/services/{serviceName}/storage_details\" | \"GET /internal/apm/storage_chart\" | \"GET /internal/apm/storage_explorer/privileges\" | \"GET /internal/apm/storage_explorer_summary_stats\" | \"GET /internal/apm/storage_explorer/is_cross_cluster_search\" | \"GET /internal/apm/storage_explorer/get_services\" | \"GET /internal/apm/traces/{traceId}/span_links/{spanId}/parents\" | \"GET /internal/apm/traces/{traceId}/span_links/{spanId}/children\" | \"GET /internal/apm/services/{serviceName}/infrastructure_attributes\" | \"GET /internal/apm/debug-telemetry\" | \"GET /internal/apm/time_range_metadata\" | \"GET /internal/apm/settings/labs\" | \"GET /internal/apm/get_agents_per_service\" | \"GET /internal/apm/get_latest_agent_versions\" | \"GET /internal/apm/services/{serviceName}/agent_instances\" | \"GET /internal/apm/mobile-services/{serviceName}/error/http_error_rate\" | \"GET /internal/apm/mobile-services/{serviceName}/errors/groups/main_statistics\" | \"POST /internal/apm/mobile-services/{serviceName}/errors/groups/detailed_statistics\" | \"GET /internal/apm/mobile-services/{serviceName}/error_terms\" | \"POST /internal/apm/mobile-services/{serviceName}/crashes/groups/detailed_statistics\" | \"GET /internal/apm/mobile-services/{serviceName}/crashes/groups/main_statistics\" | \"GET /internal/apm/mobile-services/{serviceName}/crashes/distribution\" | \"GET /internal/apm/services/{serviceName}/mobile/filters\" | \"GET /internal/apm/mobile-services/{serviceName}/most_used_charts\" | \"GET /internal/apm/mobile-services/{serviceName}/transactions/charts/sessions\" | \"GET /internal/apm/mobile-services/{serviceName}/transactions/charts/http_requests\" | \"GET /internal/apm/mobile-services/{serviceName}/stats\" | \"GET /internal/apm/mobile-services/{serviceName}/location/stats\" | \"GET /internal/apm/mobile-services/{serviceName}/terms\" | \"GET /internal/apm/mobile-services/{serviceName}/main_statistics\" | \"GET /internal/apm/mobile-services/{serviceName}/detailed_statistics\" | \"GET /internal/apm/diagnostics\" | \"POST /internal/apm/assistant/get_apm_timeseries\" | \"GET /internal/apm/assistant/get_downstream_dependencies\" | \"GET /internal/apm/services/{serviceName}/profiling/flamegraph\" | \"GET /internal/apm/profiling/status\" | \"GET /internal/apm/services/{serviceName}/profiling/functions\" | \"GET /internal/apm/services/{serviceName}/profiling/hosts/flamegraph\" | \"GET /internal/apm/services/{serviceName}/profiling/hosts/functions\" | \"POST /internal/apm/custom-dashboard\" | \"DELETE /internal/apm/custom-dashboard\" | \"GET /internal/apm/services/{serviceName}/dashboards\"" ], "path": "x-pack/plugins/observability_solution/apm/server/routes/apm_routes/get_global_apm_server_route_repository.ts", "deprecated": false, @@ -472,14 +472,24 @@ "<{ serviceName: ", "StringC", "; }>; query: ", + "IntersectionC", + "<[", "TypeC", "<{ start: ", "Type", "; end: ", "Type", - "; }>; }> | undefined; handler: ({}: ", + "; }>, ", + "PartialC", + "<{ checkFor: ", + "UnionC", + "<[", + "LiteralC", + "<\"entities\">, ", + "LiteralC", + "<\"services\">]>; }>]>; }> | undefined; handler: ({}: ", "APMRouteHandlerResources", - " & { params: { path: { serviceName: string; }; query: { start: number; end: number; }; }; }) => Promise<{ serviceDashboards: ", + " & { params: { path: { serviceName: string; }; query: { start: number; end: number; } & { checkFor?: \"entities\" | \"services\" | undefined; }; }; }) => Promise<{ serviceDashboards: ", "SavedApmCustomDashboard", "[]; }>; } & ", "APMRouteCreateOptions", @@ -5661,6 +5671,114 @@ "SavedServiceGroup", "[]; }>; } & ", "APMRouteCreateOptions", + "; \"GET /internal/apm/entities/services/{serviceName}/logs_error_rate_timeseries\": { endpoint: \"GET /internal/apm/entities/services/{serviceName}/logs_error_rate_timeseries\"; params?: ", + "TypeC", + "<{ path: ", + "TypeC", + "<{ serviceName: ", + "StringC", + "; }>; query: ", + "IntersectionC", + "<[", + "TypeC", + "<{ environment: ", + "UnionC", + "<[", + "LiteralC", + "<\"ENVIRONMENT_NOT_DEFINED\">, ", + "LiteralC", + "<\"ENVIRONMENT_ALL\">, ", + "BrandC", + "<", + "StringC", + ", ", + { + "pluginId": "@kbn/io-ts-utils", + "scope": "common", + "docId": "kibKbnIoTsUtilsPluginApi", + "section": "def-common.NonEmptyStringBrand", + "text": "NonEmptyStringBrand" + }, + ">]>; }>, ", + "TypeC", + "<{ kuery: ", + "StringC", + "; }>, ", + "TypeC", + "<{ start: ", + "Type", + "; end: ", + "Type", + "; }>]>; }> | undefined; handler: ({}: ", + "APMRouteHandlerResources", + " & { params: { path: { serviceName: string; }; query: { environment: \"ENVIRONMENT_NOT_DEFINED\" | \"ENVIRONMENT_ALL\" | ", + "Branded", + "; } & { kuery: string; } & { start: number; end: number; }; }; }) => Promise<{ currentPeriod: ", + "LogsErrorRateTimeseriesReturnType", + "; }>; } & ", + "APMRouteCreateOptions", + "; \"GET /internal/apm/entities/services/{serviceName}/logs_rate_timeseries\": { endpoint: \"GET /internal/apm/entities/services/{serviceName}/logs_rate_timeseries\"; params?: ", + "TypeC", + "<{ path: ", + "TypeC", + "<{ serviceName: ", + "StringC", + "; }>; query: ", + "IntersectionC", + "<[", + "TypeC", + "<{ environment: ", + "UnionC", + "<[", + "LiteralC", + "<\"ENVIRONMENT_NOT_DEFINED\">, ", + "LiteralC", + "<\"ENVIRONMENT_ALL\">, ", + "BrandC", + "<", + "StringC", + ", ", + { + "pluginId": "@kbn/io-ts-utils", + "scope": "common", + "docId": "kibKbnIoTsUtilsPluginApi", + "section": "def-common.NonEmptyStringBrand", + "text": "NonEmptyStringBrand" + }, + ">]>; }>, ", + "TypeC", + "<{ kuery: ", + "StringC", + "; }>, ", + "TypeC", + "<{ start: ", + "Type", + "; end: ", + "Type", + "; }>]>; }> | undefined; handler: ({}: ", + "APMRouteHandlerResources", + " & { params: { path: { serviceName: string; }; query: { environment: \"ENVIRONMENT_NOT_DEFINED\" | \"ENVIRONMENT_ALL\" | ", + "Branded", + "; } & { kuery: string; } & { start: number; end: number; }; }; }) => Promise<{ currentPeriod: ", + "LogsRateTimeseriesReturnType", + "; }>; } & ", + "APMRouteCreateOptions", "; \"GET /internal/apm/entities/services\": { endpoint: \"GET /internal/apm/entities/services\"; params?: ", "TypeC", "<{ query: ", diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx index 15485cb19df8b..f8b92abb4cc06 100644 --- a/api_docs/apm.mdx +++ b/api_docs/apm.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/apm title: "apm" image: https://source.unsplash.com/400x175/?github description: API docs for the apm plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm'] --- import apmObj from './apm.devdocs.json'; diff --git a/api_docs/apm_data_access.mdx b/api_docs/apm_data_access.mdx index 74df82f1091fd..1d1fde3fe31e3 100644 --- a/api_docs/apm_data_access.mdx +++ b/api_docs/apm_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/apmDataAccess title: "apmDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the apmDataAccess plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apmDataAccess'] --- import apmDataAccessObj from './apm_data_access.devdocs.json'; diff --git a/api_docs/assets_data_access.mdx b/api_docs/assets_data_access.mdx index 8be547ae4bb79..7b7ca0bfacbb0 100644 --- a/api_docs/assets_data_access.mdx +++ b/api_docs/assets_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/assetsDataAccess title: "assetsDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the assetsDataAccess plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'assetsDataAccess'] --- import assetsDataAccessObj from './assets_data_access.devdocs.json'; diff --git a/api_docs/banners.mdx b/api_docs/banners.mdx index 5a6803a3010f2..97831769f5c7f 100644 --- a/api_docs/banners.mdx +++ b/api_docs/banners.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/banners title: "banners" image: https://source.unsplash.com/400x175/?github description: API docs for the banners plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'banners'] --- import bannersObj from './banners.devdocs.json'; diff --git a/api_docs/bfetch.mdx b/api_docs/bfetch.mdx index ef1c107d45674..0d21d92a90de8 100644 --- a/api_docs/bfetch.mdx +++ b/api_docs/bfetch.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/bfetch title: "bfetch" image: https://source.unsplash.com/400x175/?github description: API docs for the bfetch plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'bfetch'] --- import bfetchObj from './bfetch.devdocs.json'; diff --git a/api_docs/canvas.mdx b/api_docs/canvas.mdx index d9654b4a1ffca..cee5768ef22bf 100644 --- a/api_docs/canvas.mdx +++ b/api_docs/canvas.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/canvas title: "canvas" image: https://source.unsplash.com/400x175/?github description: API docs for the canvas plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'canvas'] --- import canvasObj from './canvas.devdocs.json'; diff --git a/api_docs/cases.mdx b/api_docs/cases.mdx index 8bd66d4b518dc..cab3c752f9772 100644 --- a/api_docs/cases.mdx +++ b/api_docs/cases.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cases title: "cases" image: https://source.unsplash.com/400x175/?github description: API docs for the cases plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cases'] --- import casesObj from './cases.devdocs.json'; diff --git a/api_docs/charts.mdx b/api_docs/charts.mdx index 87a019415b601..eadb27dcea576 100644 --- a/api_docs/charts.mdx +++ b/api_docs/charts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/charts title: "charts" image: https://source.unsplash.com/400x175/?github description: API docs for the charts plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'charts'] --- import chartsObj from './charts.devdocs.json'; diff --git a/api_docs/cloud.mdx b/api_docs/cloud.mdx index cde4a1383375f..4e8402d02c285 100644 --- a/api_docs/cloud.mdx +++ b/api_docs/cloud.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloud title: "cloud" image: https://source.unsplash.com/400x175/?github description: API docs for the cloud plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloud'] --- import cloudObj from './cloud.devdocs.json'; diff --git a/api_docs/cloud_data_migration.mdx b/api_docs/cloud_data_migration.mdx index 3289a8a5c31c7..c9d10bfe44def 100644 --- a/api_docs/cloud_data_migration.mdx +++ b/api_docs/cloud_data_migration.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudDataMigration title: "cloudDataMigration" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudDataMigration plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDataMigration'] --- import cloudDataMigrationObj from './cloud_data_migration.devdocs.json'; diff --git a/api_docs/cloud_defend.devdocs.json b/api_docs/cloud_defend.devdocs.json index a147bd238d697..fc5809fff4cc6 100644 --- a/api_docs/cloud_defend.devdocs.json +++ b/api_docs/cloud_defend.devdocs.json @@ -739,7 +739,7 @@ "label": "CloudDefendStatusCode", "description": [], "signature": [ - "\"unprivileged\" | \"indexed\" | \"indexing\" | \"index-timeout\" | \"not-deployed\" | \"not-installed\"" + "\"indexed\" | \"unprivileged\" | \"indexing\" | \"index-timeout\" | \"not-deployed\" | \"not-installed\"" ], "path": "x-pack/plugins/cloud_defend/common/v1.ts", "deprecated": false, diff --git a/api_docs/cloud_defend.mdx b/api_docs/cloud_defend.mdx index 4c01a05536b3e..5c25e4bf21be6 100644 --- a/api_docs/cloud_defend.mdx +++ b/api_docs/cloud_defend.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudDefend title: "cloudDefend" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudDefend plugin -date: 2024-07-03 +date: 2024-07-05 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 853d76c8a6302..42d1ba40173d2 100644 --- a/api_docs/cloud_experiments.mdx +++ b/api_docs/cloud_experiments.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudExperiments title: "cloudExperiments" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudExperiments plugin -date: 2024-07-03 +date: 2024-07-05 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 2c9584aa65e4d..dca7c5941bac9 100644 --- a/api_docs/cloud_security_posture.mdx +++ b/api_docs/cloud_security_posture.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudSecurityPosture title: "cloudSecurityPosture" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudSecurityPosture plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudSecurityPosture'] --- import cloudSecurityPostureObj from './cloud_security_posture.devdocs.json'; diff --git a/api_docs/console.mdx b/api_docs/console.mdx index 6b5c17fad5ec9..dfd62d9a3e1b0 100644 --- a/api_docs/console.mdx +++ b/api_docs/console.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/console title: "console" image: https://source.unsplash.com/400x175/?github description: API docs for the console plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'console'] --- import consoleObj from './console.devdocs.json'; diff --git a/api_docs/content_management.mdx b/api_docs/content_management.mdx index b9c1fd3dc263d..99d0069fc91ca 100644 --- a/api_docs/content_management.mdx +++ b/api_docs/content_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/contentManagement title: "contentManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the contentManagement plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'contentManagement'] --- import contentManagementObj from './content_management.devdocs.json'; diff --git a/api_docs/controls.devdocs.json b/api_docs/controls.devdocs.json index 06a783deb4ac9..0596e5df7d55e 100644 --- a/api_docs/controls.devdocs.json +++ b/api_docs/controls.devdocs.json @@ -4897,7 +4897,7 @@ "label": "chainingSystem", "description": [], "signature": [ - "\"HIERARCHICAL\" | \"NONE\"" + "\"NONE\" | \"HIERARCHICAL\"" ], "path": "src/plugins/controls/common/control_group/types.ts", "deprecated": false, @@ -7174,7 +7174,7 @@ "label": "chainingSystem", "description": [], "signature": [ - "\"HIERARCHICAL\" | \"NONE\"" + "\"NONE\" | \"HIERARCHICAL\"" ], "path": "src/plugins/controls/common/control_group/types.ts", "deprecated": false, @@ -7728,7 +7728,7 @@ "label": "ControlGroupChainingSystem", "description": [], "signature": [ - "\"HIERARCHICAL\" | \"NONE\"" + "\"NONE\" | \"HIERARCHICAL\"" ], "path": "src/plugins/controls/common/control_group/types.ts", "deprecated": false, diff --git a/api_docs/controls.mdx b/api_docs/controls.mdx index d6ac2357d7cb6..e65e4ecfd6d87 100644 --- a/api_docs/controls.mdx +++ b/api_docs/controls.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/controls title: "controls" image: https://source.unsplash.com/400x175/?github description: API docs for the controls plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'controls'] --- import controlsObj from './controls.devdocs.json'; diff --git a/api_docs/custom_integrations.mdx b/api_docs/custom_integrations.mdx index f76e6db18acb1..a6153a0e3c9d4 100644 --- a/api_docs/custom_integrations.mdx +++ b/api_docs/custom_integrations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/customIntegrations title: "customIntegrations" image: https://source.unsplash.com/400x175/?github description: API docs for the customIntegrations plugin -date: 2024-07-03 +date: 2024-07-05 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 82e936a38ef76..68b38a4d01f19 100644 --- a/api_docs/dashboard.mdx +++ b/api_docs/dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboard title: "dashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the dashboard plugin -date: 2024-07-03 +date: 2024-07-05 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 63821e9da4788..195dc459d3ace 100644 --- a/api_docs/dashboard_enhanced.mdx +++ b/api_docs/dashboard_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboardEnhanced title: "dashboardEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the dashboardEnhanced plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboardEnhanced'] --- import dashboardEnhancedObj from './dashboard_enhanced.devdocs.json'; diff --git a/api_docs/data.mdx b/api_docs/data.mdx index cc8a8cee337a3..75c5b62f7d66c 100644 --- a/api_docs/data.mdx +++ b/api_docs/data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data title: "data" image: https://source.unsplash.com/400x175/?github description: API docs for the data plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data'] --- import dataObj from './data.devdocs.json'; diff --git a/api_docs/data_quality.mdx b/api_docs/data_quality.mdx index 19b39f99558bf..2e4e1e8e4a1e1 100644 --- a/api_docs/data_quality.mdx +++ b/api_docs/data_quality.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataQuality title: "dataQuality" image: https://source.unsplash.com/400x175/?github description: API docs for the dataQuality plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataQuality'] --- import dataQualityObj from './data_quality.devdocs.json'; diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx index f075bef36cfad..a7c878eab02b7 100644 --- a/api_docs/data_query.mdx +++ b/api_docs/data_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-query title: "data.query" image: https://source.unsplash.com/400x175/?github description: API docs for the data.query plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.query'] --- import dataQueryObj from './data_query.devdocs.json'; diff --git a/api_docs/data_search.mdx b/api_docs/data_search.mdx index a34095c5a5682..0168eb195cf97 100644 --- a/api_docs/data_search.mdx +++ b/api_docs/data_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-search title: "data.search" image: https://source.unsplash.com/400x175/?github description: API docs for the data.search plugin -date: 2024-07-03 +date: 2024-07-05 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 f49fd61ec7853..5689b7fd74007 100644 --- a/api_docs/data_view_editor.mdx +++ b/api_docs/data_view_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewEditor title: "dataViewEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewEditor plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewEditor'] --- import dataViewEditorObj from './data_view_editor.devdocs.json'; diff --git a/api_docs/data_view_field_editor.mdx b/api_docs/data_view_field_editor.mdx index ffddbde759530..f717ad496f5ee 100644 --- a/api_docs/data_view_field_editor.mdx +++ b/api_docs/data_view_field_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewFieldEditor title: "dataViewFieldEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewFieldEditor plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewFieldEditor'] --- import dataViewFieldEditorObj from './data_view_field_editor.devdocs.json'; diff --git a/api_docs/data_view_management.mdx b/api_docs/data_view_management.mdx index ff252838359ce..d0051693d59bd 100644 --- a/api_docs/data_view_management.mdx +++ b/api_docs/data_view_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewManagement title: "dataViewManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewManagement plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewManagement'] --- import dataViewManagementObj from './data_view_management.devdocs.json'; diff --git a/api_docs/data_views.devdocs.json b/api_docs/data_views.devdocs.json index d456103f28f6c..0b0e2fb4147bb 100644 --- a/api_docs/data_views.devdocs.json +++ b/api_docs/data_views.devdocs.json @@ -12926,24 +12926,24 @@ "references": [ { "plugin": "data", - "path": "src/plugins/data/common/search/search_source/inspect/inspector_stats.ts" - }, - { - "plugin": "data", - "path": "src/plugins/data/common/search/tabify/response_writer.ts" + "path": "src/plugins/data/public/query/filter_manager/lib/get_display_value.ts" }, { "plugin": "data", - "path": "src/plugins/data/common/search/aggs/param_types/field.ts" + "path": "src/plugins/data/common/search/search_source/inspect/inspector_stats.ts" }, { "plugin": "data", - "path": "src/plugins/data/public/query/filter_manager/lib/get_display_value.ts" + "path": "src/plugins/data/common/search/tabify/response_writer.ts" }, { "plugin": "@kbn/search-errors", "path": "packages/kbn-search-errors/src/painless_error.tsx" }, + { + "plugin": "data", + "path": "src/plugins/data/common/search/aggs/param_types/field.ts" + }, { "plugin": "savedObjectsManagement", "path": "src/plugins/saved_objects_management/public/management_section/objects_table/components/flyout.tsx" diff --git a/api_docs/data_views.mdx b/api_docs/data_views.mdx index 9d7096f7079ab..c455c4b58410e 100644 --- a/api_docs/data_views.mdx +++ b/api_docs/data_views.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViews title: "dataViews" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViews plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViews'] --- import dataViewsObj from './data_views.devdocs.json'; diff --git a/api_docs/data_visualizer.mdx b/api_docs/data_visualizer.mdx index be2f07df93816..65774b82e13f6 100644 --- a/api_docs/data_visualizer.mdx +++ b/api_docs/data_visualizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataVisualizer title: "dataVisualizer" image: https://source.unsplash.com/400x175/?github description: API docs for the dataVisualizer plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataVisualizer'] --- import dataVisualizerObj from './data_visualizer.devdocs.json'; diff --git a/api_docs/dataset_quality.devdocs.json b/api_docs/dataset_quality.devdocs.json index 48297e463fbda..e585856f949a4 100644 --- a/api_docs/dataset_quality.devdocs.json +++ b/api_docs/dataset_quality.devdocs.json @@ -159,7 +159,7 @@ "KeyofC", "<{ logs: null; metrics: null; traces: null; synthetics: null; profiling: null; }>; }>; }> | undefined; handler: ({}: ", "DatasetQualityRouteHandlerResources", - " & { params: { query: { type?: \"metrics\" | \"synthetics\" | \"traces\" | \"logs\" | \"profiling\" | undefined; }; }; }) => Promise<{ integrations: ({ name: string; } & { title?: string | undefined; version?: string | undefined; icons?: ({ path: string; src: string; } & { title?: string | undefined; size?: string | undefined; type?: string | undefined; })[] | undefined; datasets?: { [x: string]: string; } | undefined; dashboards?: { id: string; title: string; }[] | undefined; })[]; }>; } & ", + " & { params: { query: { type?: \"metrics\" | \"synthetics\" | \"traces\" | \"logs\" | \"profiling\" | undefined; }; }; }) => Promise<{ integrations: ({ name: string; } & { title?: string | undefined; version?: string | undefined; icons?: ({ path: string; src: string; } & { title?: string | undefined; size?: string | undefined; type?: string | undefined; })[] | undefined; datasets?: { [x: string]: string; } | undefined; })[]; }>; } & ", "DatasetQualityRouteCreateOptions", "; \"GET /internal/dataset_quality/data_streams/{dataStream}/settings\": { endpoint: \"GET /internal/dataset_quality/data_streams/{dataStream}/settings\"; params?: ", "TypeC", @@ -169,7 +169,7 @@ "StringC", "; }>; }> | undefined; handler: ({}: ", "DatasetQualityRouteHandlerResources", - " & { params: { path: { dataStream: string; }; }; }) => Promise<{ createdOn?: number | null | undefined; }>; } & ", + " & { params: { path: { dataStream: string; }; }; }) => Promise<{ createdOn?: number | null | undefined; integration?: string | undefined; }>; } & ", "DatasetQualityRouteCreateOptions", "; \"GET /internal/dataset_quality/data_streams/{dataStream}/details\": { endpoint: \"GET /internal/dataset_quality/data_streams/{dataStream}/details\"; params?: ", "TypeC", @@ -314,7 +314,7 @@ "KeyofC", "<{ logs: null; metrics: null; traces: null; synthetics: null; profiling: null; }>; }>; }> | undefined; handler: ({}: ", "DatasetQualityRouteHandlerResources", - " & { params: { query: { type?: \"metrics\" | \"synthetics\" | \"traces\" | \"logs\" | \"profiling\" | undefined; }; }; }) => Promise<{ integrations: ({ name: string; } & { title?: string | undefined; version?: string | undefined; icons?: ({ path: string; src: string; } & { title?: string | undefined; size?: string | undefined; type?: string | undefined; })[] | undefined; datasets?: { [x: string]: string; } | undefined; dashboards?: { id: string; title: string; }[] | undefined; })[]; }>; } & ", + " & { params: { query: { type?: \"metrics\" | \"synthetics\" | \"traces\" | \"logs\" | \"profiling\" | undefined; }; }; }) => Promise<{ integrations: ({ name: string; } & { title?: string | undefined; version?: string | undefined; icons?: ({ path: string; src: string; } & { title?: string | undefined; size?: string | undefined; type?: string | undefined; })[] | undefined; datasets?: { [x: string]: string; } | undefined; })[]; }>; } & ", "DatasetQualityRouteCreateOptions", "; \"GET /internal/dataset_quality/data_streams/{dataStream}/settings\": { endpoint: \"GET /internal/dataset_quality/data_streams/{dataStream}/settings\"; params?: ", "TypeC", @@ -324,7 +324,7 @@ "StringC", "; }>; }> | undefined; handler: ({}: ", "DatasetQualityRouteHandlerResources", - " & { params: { path: { dataStream: string; }; }; }) => Promise<{ createdOn?: number | null | undefined; }>; } & ", + " & { params: { path: { dataStream: string; }; }; }) => Promise<{ createdOn?: number | null | undefined; integration?: string | undefined; }>; } & ", "DatasetQualityRouteCreateOptions", "; \"GET /internal/dataset_quality/data_streams/{dataStream}/details\": { endpoint: \"GET /internal/dataset_quality/data_streams/{dataStream}/details\"; params?: ", "TypeC", diff --git a/api_docs/dataset_quality.mdx b/api_docs/dataset_quality.mdx index 104daea12e969..95a1ffa1e20b0 100644 --- a/api_docs/dataset_quality.mdx +++ b/api_docs/dataset_quality.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/datasetQuality title: "datasetQuality" image: https://source.unsplash.com/400x175/?github description: API docs for the datasetQuality plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'datasetQuality'] --- import datasetQualityObj from './dataset_quality.devdocs.json'; diff --git a/api_docs/deprecations_by_api.mdx b/api_docs/deprecations_by_api.mdx index bbcfc14670f17..39f801fd4e63e 100644 --- a/api_docs/deprecations_by_api.mdx +++ b/api_docs/deprecations_by_api.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByApi slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-api title: Deprecated API usage by API description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -18,7 +18,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | ---------------|-----------|-----------| | | ml, stackAlerts | - | | | data, @kbn/search-errors, savedObjectsManagement, unifiedSearch, @kbn/unified-field-list, lens, controls, triggersActionsUi, dataVisualizer, canvas, presentationUtil, logsShared, fleet, ml, @kbn/lens-embeddable-utils, @kbn/ml-data-view-utils, enterpriseSearch, graph, visTypeTimeseries, exploratoryView, stackAlerts, infra, securitySolution, timelines, transform, upgradeAssistant, uptime, ux, maps, dataViewManagement, eventAnnotationListing, inputControlVis, visDefaultEditor, visTypeTimelion, visTypeVega | - | -| | encryptedSavedObjects, ml, logstash, securitySolution, cloudChat | - | +| | encryptedSavedObjects, ml, securitySolution | - | | | actions, savedObjectsTagging, ml, enterpriseSearch | - | | | @kbn/core-saved-objects-browser-internal, @kbn/core, savedObjects, visualizations, aiops, dataVisualizer, ml, dashboardEnhanced, graph, lens, securitySolution, eventAnnotation, @kbn/core-saved-objects-browser-mocks | - | | | @kbn/core, savedObjects, embeddable, visualizations, canvas, graph, ml, @kbn/core-saved-objects-common, @kbn/core-saved-objects-server, actions, @kbn/alerting-types, alerting, savedSearch, enterpriseSearch, securitySolution, taskManager, @kbn/core-saved-objects-server-internal, @kbn/core-saved-objects-api-server | - | @@ -31,7 +31,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | triggersActionsUi | - | | | @kbn/core, visualizations, triggersActionsUi | - | | | ruleRegistry, securitySolution, synthetics, slo | - | -| | security, actions, alerting, files, ruleRegistry, cases, fleet, securitySolution | - | +| | security, actions, alerting, ruleRegistry, files, cases, fleet, securitySolution | - | | | alerting, discover, securitySolution | - | | | @kbn/core-saved-objects-api-browser, @kbn/core-saved-objects-browser-internal, @kbn/core-saved-objects-browser-mocks, @kbn/core-saved-objects-api-server-internal, @kbn/core-saved-objects-import-export-server-internal, @kbn/core-saved-objects-server-internal, fleet, graph, lists, osquery, securitySolution, alerting | - | | | @kbn/core-saved-objects-api-browser, @kbn/core-saved-objects-browser-internal, @kbn/core-saved-objects-browser-mocks, @kbn/core-saved-objects-api-server-internal, @kbn/core-saved-objects-import-export-server-internal, @kbn/core-saved-objects-server-internal, fleet, graph, lists, osquery, securitySolution, alerting | - | @@ -50,7 +50,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | securitySolution | - | | | @kbn/core-saved-objects-api-browser, @kbn/core-saved-objects-browser-internal, @kbn/core-saved-objects-api-server, @kbn/core, home, savedObjectsTagging, canvas, savedObjects, @kbn/core-saved-objects-browser-mocks, @kbn/core-saved-objects-import-export-server-internal, savedObjectsTaggingOss, lists, securitySolution, upgradeAssistant, savedObjectsManagement, @kbn/core-ui-settings-server-internal | - | | | @kbn/core-saved-objects-migration-server-internal, actions, dataViews, data, alerting, lens, cases, savedSearch, canvas, savedObjectsTagging, graph, lists, maps, visualizations, securitySolution, dashboard, @kbn/core-test-helpers-so-type-serializer | - | -| | security, securitySolution, serverlessSearch, cloudLinks, observabilityAIAssistantApp, cases, apm | - | +| | security, securitySolution, cloudLinks, observabilityAIAssistantApp, cases | - | | | security, cases, searchPlayground, securitySolution | - | | | lists, securitySolution, @kbn/securitysolution-io-ts-list-types | - | | | lists, securitySolution, @kbn/securitysolution-io-ts-list-types | - | diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index 08343c9117a7c..5a0e6026d5e85 100644 --- a/api_docs/deprecations_by_plugin.mdx +++ b/api_docs/deprecations_by_plugin.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByPlugin slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-plugin title: Deprecated API usage by plugin description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -497,7 +497,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/apm/common/license_check.test.ts#:~:text=mode), [license_check.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/apm/common/license_check.test.ts#:~:text=mode)+ 2 more | 8.8.0 | | | [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/apm/server/lib/helpers/get_random_sampler/index.ts#:~:text=authc), [get_agent_keys_privileges.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/apm/server/routes/agent_keys/get_agent_keys_privileges.ts#:~:text=authc), [is_superuser.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/apm/server/routes/fleet/is_superuser.ts#:~:text=authc), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/apm/server/lib/helpers/get_random_sampler/index.ts#:~:text=authc), [get_agent_keys_privileges.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/apm/server/routes/agent_keys/get_agent_keys_privileges.ts#:~:text=authc), [is_superuser.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/apm/server/routes/fleet/is_superuser.ts#:~:text=authc) | - | | | [apm_service_groups.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/apm/server/saved_objects/apm_service_groups.ts#:~:text=migrations) | - | -| | [use_current_user.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/apm/public/hooks/use_current_user.ts#:~:text=authc), [use_current_user.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/apm/public/hooks/use_current_user.ts#:~:text=authc) | - | @@ -551,14 +550,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] -## cloudChat - -| Deprecated API | Reference location(s) | Remove By | -| ---------------|-----------|-----------| -| | [chat.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_integrations/cloud_chat/server/routes/chat.ts#:~:text=authc) | - | - - - ## cloudDefend | Deprecated API | Reference location(s) | Remove By | @@ -650,7 +641,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [inspector_stats.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/search_source/inspect/inspector_stats.ts#:~:text=title), [response_writer.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/tabify/response_writer.ts#:~:text=title), [field.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/param_types/field.ts#:~:text=title), [get_display_value.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/query/filter_manager/lib/get_display_value.ts#:~:text=title), [agg_config.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/agg_config.test.ts#:~:text=title), [_terms_other_bucket_helper.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/buckets/_terms_other_bucket_helper.test.ts#:~:text=title), [multi_terms.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/buckets/multi_terms.test.ts#:~:text=title), [multi_terms.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/buckets/multi_terms.test.ts#:~:text=title), [rare_terms.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/buckets/rare_terms.test.ts#:~:text=title), [terms.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/buckets/terms.test.ts#:~:text=title)+ 2 more | - | +| | [get_display_value.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/query/filter_manager/lib/get_display_value.ts#:~:text=title), [inspector_stats.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/search_source/inspect/inspector_stats.ts#:~:text=title), [response_writer.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/tabify/response_writer.ts#:~:text=title), [field.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/param_types/field.ts#:~:text=title), [agg_config.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/agg_config.test.ts#:~:text=title), [_terms_other_bucket_helper.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/buckets/_terms_other_bucket_helper.test.ts#:~:text=title), [multi_terms.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/buckets/multi_terms.test.ts#:~:text=title), [multi_terms.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/buckets/multi_terms.test.ts#:~:text=title), [rare_terms.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/buckets/rare_terms.test.ts#:~:text=title), [terms.test.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/search/aggs/buckets/terms.test.ts#:~:text=title)+ 2 more | - | | | [data_table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/utils/table_inspector_view/components/data_table.tsx#:~:text=executeTriggerActions), [data_table.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/data/public/utils/table_inspector_view/components/data_table.tsx#:~:text=executeTriggerActions) | - | | | [persistable_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/query/filters/persistable_state.ts#:~:text=SavedObjectReference), [persistable_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/query/filters/persistable_state.ts#:~:text=SavedObjectReference), [persistable_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/query/filters/persistable_state.ts#:~:text=SavedObjectReference), [persistable_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/query/persistable_state.ts#:~:text=SavedObjectReference), [persistable_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/query/persistable_state.ts#:~:text=SavedObjectReference), [persistable_state.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/common/query/persistable_state.ts#:~:text=SavedObjectReference) | - | | | [query.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/server/saved_objects/query.ts#:~:text=migrations), [search_telemetry.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/server/saved_objects/search_telemetry.ts#:~:text=migrations), [search_session.ts](https://github.com/elastic/kibana/tree/main/src/plugins/data/server/search/saved_objects/search_session.ts#:~:text=migrations) | - | @@ -1035,7 +1026,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/logstash/public/plugin.ts#:~:text=license%24) | 8.8.0 | -| | [save.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/logstash/server/routes/pipeline/save.ts#:~:text=authc) | - | @@ -1346,8 +1336,8 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | | [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx#:~:text=DeprecatedCellValueElementProps), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx#:~:text=DeprecatedCellValueElementProps) | - | | | [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx#:~:text=DeprecatedRowRenderer), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx#:~:text=DeprecatedRowRenderer) | - | | | [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts#:~:text=BeatFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/search_strategy/endpoint_fields/index.ts#:~:text=BeatFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/search_strategy/endpoint_fields/index.ts#:~:text=BeatFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/search_strategy/endpoint_fields/index.ts#:~:text=BeatFields) | - | -| | [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts#:~:text=BrowserField), [helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts#:~:text=BrowserField), [helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts#:~:text=BrowserField), [helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts#:~:text=BrowserField), [helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts#:~:text=BrowserField), [columns.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx#:~:text=BrowserField), [columns.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx#:~:text=BrowserField), [columns.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx#:~:text=BrowserField), [enrichment_summary.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_summary.tsx#:~:text=BrowserField), [enrichment_summary.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_summary.tsx#:~:text=BrowserField)+ 35 more | - | -| | [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/types/timeline/cells/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/types/timeline/cells/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/types/header_actions/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/types/header_actions/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/lib/kuery/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/lib/kuery/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/lib/kuery/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/lib/kuery/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/lib/kuery/index.ts#:~:text=BrowserFields)+ 105 more | - | +| | [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts#:~:text=BrowserField), [helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts#:~:text=BrowserField), [helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts#:~:text=BrowserField), [helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts#:~:text=BrowserField), [helpers.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts#:~:text=BrowserField), [columns.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx#:~:text=BrowserField), [columns.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx#:~:text=BrowserField), [columns.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx#:~:text=BrowserField), [use_data_view.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/containers/source/use_data_view.tsx#:~:text=BrowserField), [use_data_view.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/containers/source/use_data_view.tsx#:~:text=BrowserField)+ 29 more | - | +| | [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/types/timeline/cells/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/types/timeline/cells/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/types/header_actions/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/types/header_actions/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/lib/kuery/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/lib/kuery/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/lib/kuery/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/lib/kuery/index.ts#:~:text=BrowserFields), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/lib/kuery/index.ts#:~:text=BrowserFields)+ 101 more | - | | | [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts#:~:text=IndexFieldsStrategyRequest), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/search_strategy/endpoint_fields/index.ts#:~:text=IndexFieldsStrategyRequest), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/search_strategy/endpoint_fields/index.ts#:~:text=IndexFieldsStrategyRequest), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/search_strategy/endpoint_fields/index.ts#:~:text=IndexFieldsStrategyRequest), [middleware.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#:~:text=IndexFieldsStrategyRequest), [middleware.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#:~:text=IndexFieldsStrategyRequest) | - | | | [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts#:~:text=IndexFieldsStrategyResponse), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/search_strategy/endpoint_fields/index.ts#:~:text=IndexFieldsStrategyResponse), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/search_strategy/endpoint_fields/index.ts#:~:text=IndexFieldsStrategyResponse), [index.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/search_strategy/endpoint_fields/index.ts#:~:text=IndexFieldsStrategyResponse), [middleware.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#:~:text=IndexFieldsStrategyResponse), [middleware.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/store/middleware.ts#:~:text=IndexFieldsStrategyResponse) | - | | | [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/hooks/types.ts#:~:text=SimpleSavedObject), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/common/hooks/types.ts#:~:text=SimpleSavedObject) | - | @@ -1379,7 +1369,6 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| | | [api_key_routes.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/serverless_search/server/routes/api_key_routes.ts#:~:text=authc), [api_key_routes.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/serverless_search/server/routes/api_key_routes.ts#:~:text=authc) | - | -| | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/serverless_search/public/plugin.ts#:~:text=authc) | - | diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index 7b30e5e3376d3..89f1a7e1e2b2f 100644 --- a/api_docs/deprecations_by_team.mdx +++ b/api_docs/deprecations_by_team.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsDueByTeam slug: /kibana-dev-docs/api-meta/deprecations-due-by-team title: Deprecated APIs due to be removed, by team description: Lists the teams that are referencing deprecated APIs with a remove by date. -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index 03d1852670831..873b5dc295828 100644 --- a/api_docs/dev_tools.mdx +++ b/api_docs/dev_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/devTools title: "devTools" image: https://source.unsplash.com/400x175/?github description: API docs for the devTools plugin -date: 2024-07-03 +date: 2024-07-05 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 6f81e74775d26..c54ddc907bae3 100644 --- a/api_docs/discover.mdx +++ b/api_docs/discover.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discover title: "discover" image: https://source.unsplash.com/400x175/?github description: API docs for the discover plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discover'] --- import discoverObj from './discover.devdocs.json'; diff --git a/api_docs/discover_enhanced.mdx b/api_docs/discover_enhanced.mdx index 8994c4c345eea..d1e33d7a9412c 100644 --- a/api_docs/discover_enhanced.mdx +++ b/api_docs/discover_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discoverEnhanced title: "discoverEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the discoverEnhanced plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverEnhanced'] --- import discoverEnhancedObj from './discover_enhanced.devdocs.json'; diff --git a/api_docs/discover_shared.mdx b/api_docs/discover_shared.mdx index f5436338bdbf3..2cb18d5f59627 100644 --- a/api_docs/discover_shared.mdx +++ b/api_docs/discover_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discoverShared title: "discoverShared" image: https://source.unsplash.com/400x175/?github description: API docs for the discoverShared plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverShared'] --- import discoverSharedObj from './discover_shared.devdocs.json'; diff --git a/api_docs/ecs_data_quality_dashboard.mdx b/api_docs/ecs_data_quality_dashboard.mdx index f128e16198740..f30eb1feada2c 100644 --- a/api_docs/ecs_data_quality_dashboard.mdx +++ b/api_docs/ecs_data_quality_dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ecsDataQualityDashboard title: "ecsDataQualityDashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the ecsDataQualityDashboard plugin -date: 2024-07-03 +date: 2024-07-05 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 7e06bb46c9186..9fc181e353e66 100644 --- a/api_docs/elastic_assistant.mdx +++ b/api_docs/elastic_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/elasticAssistant title: "elasticAssistant" image: https://source.unsplash.com/400x175/?github description: API docs for the elasticAssistant plugin -date: 2024-07-03 +date: 2024-07-05 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 44dae18c90ee7..4e3b02c107bba 100644 --- a/api_docs/embeddable.mdx +++ b/api_docs/embeddable.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/embeddable title: "embeddable" image: https://source.unsplash.com/400x175/?github description: API docs for the embeddable plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddable'] --- import embeddableObj from './embeddable.devdocs.json'; diff --git a/api_docs/embeddable_enhanced.mdx b/api_docs/embeddable_enhanced.mdx index 0145dbadb370b..c47f9e98920bb 100644 --- a/api_docs/embeddable_enhanced.mdx +++ b/api_docs/embeddable_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/embeddableEnhanced title: "embeddableEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the embeddableEnhanced plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddableEnhanced'] --- import embeddableEnhancedObj from './embeddable_enhanced.devdocs.json'; diff --git a/api_docs/encrypted_saved_objects.mdx b/api_docs/encrypted_saved_objects.mdx index 4f26ce7e130d0..a2c87468b1d8a 100644 --- a/api_docs/encrypted_saved_objects.mdx +++ b/api_docs/encrypted_saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/encryptedSavedObjects title: "encryptedSavedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the encryptedSavedObjects plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'encryptedSavedObjects'] --- import encryptedSavedObjectsObj from './encrypted_saved_objects.devdocs.json'; diff --git a/api_docs/enterprise_search.mdx b/api_docs/enterprise_search.mdx index d5a703ea842d7..4e12299180615 100644 --- a/api_docs/enterprise_search.mdx +++ b/api_docs/enterprise_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/enterpriseSearch title: "enterpriseSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the enterpriseSearch plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'enterpriseSearch'] --- import enterpriseSearchObj from './enterprise_search.devdocs.json'; diff --git a/api_docs/entity_manager.mdx b/api_docs/entity_manager.mdx index 529faff211338..6972eeeed8bcd 100644 --- a/api_docs/entity_manager.mdx +++ b/api_docs/entity_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/entityManager title: "entityManager" image: https://source.unsplash.com/400x175/?github description: API docs for the entityManager plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'entityManager'] --- import entityManagerObj from './entity_manager.devdocs.json'; diff --git a/api_docs/es_ui_shared.mdx b/api_docs/es_ui_shared.mdx index 5057e05b31d2d..65e97d46b68b2 100644 --- a/api_docs/es_ui_shared.mdx +++ b/api_docs/es_ui_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/esUiShared title: "esUiShared" image: https://source.unsplash.com/400x175/?github description: API docs for the esUiShared plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esUiShared'] --- import esUiSharedObj from './es_ui_shared.devdocs.json'; diff --git a/api_docs/esql_data_grid.mdx b/api_docs/esql_data_grid.mdx index f3f92191d98d8..322f9f23cef02 100644 --- a/api_docs/esql_data_grid.mdx +++ b/api_docs/esql_data_grid.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/esqlDataGrid title: "esqlDataGrid" image: https://source.unsplash.com/400x175/?github description: API docs for the esqlDataGrid plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esqlDataGrid'] --- import esqlDataGridObj from './esql_data_grid.devdocs.json'; diff --git a/api_docs/event_annotation.mdx b/api_docs/event_annotation.mdx index ba87ac7296fa5..cf11af68862c0 100644 --- a/api_docs/event_annotation.mdx +++ b/api_docs/event_annotation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventAnnotation title: "eventAnnotation" image: https://source.unsplash.com/400x175/?github description: API docs for the eventAnnotation plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotation'] --- import eventAnnotationObj from './event_annotation.devdocs.json'; diff --git a/api_docs/event_annotation_listing.mdx b/api_docs/event_annotation_listing.mdx index 3fde94d1de6d8..5fb0a2f1f3590 100644 --- a/api_docs/event_annotation_listing.mdx +++ b/api_docs/event_annotation_listing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventAnnotationListing title: "eventAnnotationListing" image: https://source.unsplash.com/400x175/?github description: API docs for the eventAnnotationListing plugin -date: 2024-07-03 +date: 2024-07-05 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 20669f8feb9ae..ad96dc844b30c 100644 --- a/api_docs/event_log.mdx +++ b/api_docs/event_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventLog title: "eventLog" image: https://source.unsplash.com/400x175/?github description: API docs for the eventLog plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventLog'] --- import eventLogObj from './event_log.devdocs.json'; diff --git a/api_docs/exploratory_view.mdx b/api_docs/exploratory_view.mdx index 1498927b97b40..9041705626769 100644 --- a/api_docs/exploratory_view.mdx +++ b/api_docs/exploratory_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/exploratoryView title: "exploratoryView" image: https://source.unsplash.com/400x175/?github description: API docs for the exploratoryView plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'exploratoryView'] --- import exploratoryViewObj from './exploratory_view.devdocs.json'; diff --git a/api_docs/expression_error.mdx b/api_docs/expression_error.mdx index 3bd6a5660f961..9e9952a2d04b5 100644 --- a/api_docs/expression_error.mdx +++ b/api_docs/expression_error.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionError title: "expressionError" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionError plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionError'] --- import expressionErrorObj from './expression_error.devdocs.json'; diff --git a/api_docs/expression_gauge.mdx b/api_docs/expression_gauge.mdx index 32e8edb562f3d..eb8944064f041 100644 --- a/api_docs/expression_gauge.mdx +++ b/api_docs/expression_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionGauge title: "expressionGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionGauge plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionGauge'] --- import expressionGaugeObj from './expression_gauge.devdocs.json'; diff --git a/api_docs/expression_heatmap.mdx b/api_docs/expression_heatmap.mdx index 0d28d3b546657..cc1f8283d0596 100644 --- a/api_docs/expression_heatmap.mdx +++ b/api_docs/expression_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionHeatmap title: "expressionHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionHeatmap plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionHeatmap'] --- import expressionHeatmapObj from './expression_heatmap.devdocs.json'; diff --git a/api_docs/expression_image.mdx b/api_docs/expression_image.mdx index 679cd84fc6deb..a65e3f82982de 100644 --- a/api_docs/expression_image.mdx +++ b/api_docs/expression_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionImage title: "expressionImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionImage plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionImage'] --- import expressionImageObj from './expression_image.devdocs.json'; diff --git a/api_docs/expression_legacy_metric_vis.mdx b/api_docs/expression_legacy_metric_vis.mdx index badf9e80fdab7..978677eed9c1c 100644 --- a/api_docs/expression_legacy_metric_vis.mdx +++ b/api_docs/expression_legacy_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionLegacyMetricVis title: "expressionLegacyMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionLegacyMetricVis plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionLegacyMetricVis'] --- import expressionLegacyMetricVisObj from './expression_legacy_metric_vis.devdocs.json'; diff --git a/api_docs/expression_metric.mdx b/api_docs/expression_metric.mdx index 85af108334a96..6d39860882f13 100644 --- a/api_docs/expression_metric.mdx +++ b/api_docs/expression_metric.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetric title: "expressionMetric" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetric plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetric'] --- import expressionMetricObj from './expression_metric.devdocs.json'; diff --git a/api_docs/expression_metric_vis.mdx b/api_docs/expression_metric_vis.mdx index 98fea84569010..d9ceea41fc954 100644 --- a/api_docs/expression_metric_vis.mdx +++ b/api_docs/expression_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetricVis title: "expressionMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetricVis plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetricVis'] --- import expressionMetricVisObj from './expression_metric_vis.devdocs.json'; diff --git a/api_docs/expression_partition_vis.mdx b/api_docs/expression_partition_vis.mdx index 4f7d5e94a4179..ffad446ce9165 100644 --- a/api_docs/expression_partition_vis.mdx +++ b/api_docs/expression_partition_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionPartitionVis title: "expressionPartitionVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionPartitionVis plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionPartitionVis'] --- import expressionPartitionVisObj from './expression_partition_vis.devdocs.json'; diff --git a/api_docs/expression_repeat_image.mdx b/api_docs/expression_repeat_image.mdx index 56eb3eaba9cf2..14284f32b1bca 100644 --- a/api_docs/expression_repeat_image.mdx +++ b/api_docs/expression_repeat_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRepeatImage title: "expressionRepeatImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRepeatImage plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRepeatImage'] --- import expressionRepeatImageObj from './expression_repeat_image.devdocs.json'; diff --git a/api_docs/expression_reveal_image.mdx b/api_docs/expression_reveal_image.mdx index 609bb7a36065a..c97a5201faa86 100644 --- a/api_docs/expression_reveal_image.mdx +++ b/api_docs/expression_reveal_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRevealImage title: "expressionRevealImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRevealImage plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRevealImage'] --- import expressionRevealImageObj from './expression_reveal_image.devdocs.json'; diff --git a/api_docs/expression_shape.devdocs.json b/api_docs/expression_shape.devdocs.json index 63d5a0c2ce2f2..5b9ce734491bf 100644 --- a/api_docs/expression_shape.devdocs.json +++ b/api_docs/expression_shape.devdocs.json @@ -635,7 +635,7 @@ "label": "strokeLinecap", "description": [], "signature": [ - "\"inherit\" | \"butt\" | \"round\" | \"square\" | undefined" + "\"square\" | \"inherit\" | \"butt\" | \"round\" | undefined" ], "path": "src/plugins/expression_shape/public/components/reusable/types.tsx", "deprecated": false, diff --git a/api_docs/expression_shape.mdx b/api_docs/expression_shape.mdx index ec4fd965fd811..c24788860379d 100644 --- a/api_docs/expression_shape.mdx +++ b/api_docs/expression_shape.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionShape title: "expressionShape" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionShape plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionShape'] --- import expressionShapeObj from './expression_shape.devdocs.json'; diff --git a/api_docs/expression_tagcloud.mdx b/api_docs/expression_tagcloud.mdx index a37e6e9682a4b..919828a7861d9 100644 --- a/api_docs/expression_tagcloud.mdx +++ b/api_docs/expression_tagcloud.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionTagcloud title: "expressionTagcloud" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionTagcloud plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionTagcloud'] --- import expressionTagcloudObj from './expression_tagcloud.devdocs.json'; diff --git a/api_docs/expression_x_y.devdocs.json b/api_docs/expression_x_y.devdocs.json index 1d66fc5d9a257..ea7e85c389e76 100644 --- a/api_docs/expression_x_y.devdocs.json +++ b/api_docs/expression_x_y.devdocs.json @@ -417,7 +417,7 @@ "label": "mode", "description": [], "signature": [ - "\"full\" | \"custom\" | \"dataBounds\"" + "\"custom\" | \"full\" | \"dataBounds\"" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", "deprecated": false, @@ -2363,7 +2363,7 @@ "label": "AxisExtentMode", "description": [], "signature": [ - "\"full\" | \"custom\" | \"dataBounds\"" + "\"custom\" | \"full\" | \"dataBounds\"" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", "deprecated": false, @@ -2378,7 +2378,7 @@ "label": "AxisMode", "description": [], "signature": [ - "\"percentage\" | \"normal\" | \"wiggle\" | \"silhouette\"" + "\"normal\" | \"percentage\" | \"wiggle\" | \"silhouette\"" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", "deprecated": false, @@ -3626,7 +3626,7 @@ "label": "YScaleType", "description": [], "signature": [ - "\"log\" | \"time\" | \"linear\" | \"sqrt\"" + "\"log\" | \"sqrt\" | \"time\" | \"linear\"" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", "deprecated": false, diff --git a/api_docs/expression_x_y.mdx b/api_docs/expression_x_y.mdx index a275906908948..59abe2dca7038 100644 --- a/api_docs/expression_x_y.mdx +++ b/api_docs/expression_x_y.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionXY title: "expressionXY" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionXY plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionXY'] --- import expressionXYObj from './expression_x_y.devdocs.json'; diff --git a/api_docs/expressions.mdx b/api_docs/expressions.mdx index 09fbc3602215b..8ee2c2b73a277 100644 --- a/api_docs/expressions.mdx +++ b/api_docs/expressions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressions title: "expressions" image: https://source.unsplash.com/400x175/?github description: API docs for the expressions plugin -date: 2024-07-03 +date: 2024-07-05 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 0a4f1eacbe548..170fe55897530 100644 --- a/api_docs/features.mdx +++ b/api_docs/features.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/features title: "features" image: https://source.unsplash.com/400x175/?github description: API docs for the features plugin -date: 2024-07-03 +date: 2024-07-05 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 090102c9171ba..4096069be54f7 100644 --- a/api_docs/field_formats.mdx +++ b/api_docs/field_formats.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fieldFormats title: "fieldFormats" image: https://source.unsplash.com/400x175/?github description: API docs for the fieldFormats plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldFormats'] --- import fieldFormatsObj from './field_formats.devdocs.json'; diff --git a/api_docs/fields_metadata.mdx b/api_docs/fields_metadata.mdx index 87ffd7bea430b..ee351e76cc4fd 100644 --- a/api_docs/fields_metadata.mdx +++ b/api_docs/fields_metadata.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fieldsMetadata title: "fieldsMetadata" image: https://source.unsplash.com/400x175/?github description: API docs for the fieldsMetadata plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldsMetadata'] --- import fieldsMetadataObj from './fields_metadata.devdocs.json'; diff --git a/api_docs/file_upload.mdx b/api_docs/file_upload.mdx index ce11d343b4852..6c5a752261980 100644 --- a/api_docs/file_upload.mdx +++ b/api_docs/file_upload.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fileUpload title: "fileUpload" image: https://source.unsplash.com/400x175/?github description: API docs for the fileUpload plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fileUpload'] --- import fileUploadObj from './file_upload.devdocs.json'; diff --git a/api_docs/files.mdx b/api_docs/files.mdx index 800d6afef99af..0f532e2a46467 100644 --- a/api_docs/files.mdx +++ b/api_docs/files.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/files title: "files" image: https://source.unsplash.com/400x175/?github description: API docs for the files plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'files'] --- import filesObj from './files.devdocs.json'; diff --git a/api_docs/files_management.mdx b/api_docs/files_management.mdx index f0e4cc2cf1782..003bb7722f52b 100644 --- a/api_docs/files_management.mdx +++ b/api_docs/files_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/filesManagement title: "filesManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the filesManagement plugin -date: 2024-07-03 +date: 2024-07-05 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 21ed516f421a5..f95ea9fb51a40 100644 --- a/api_docs/fleet.mdx +++ b/api_docs/fleet.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fleet title: "fleet" image: https://source.unsplash.com/400x175/?github description: API docs for the fleet plugin -date: 2024-07-03 +date: 2024-07-05 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 b3b9fae7d0533..9c09b4165525a 100644 --- a/api_docs/global_search.mdx +++ b/api_docs/global_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/globalSearch title: "globalSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the globalSearch plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'globalSearch'] --- import globalSearchObj from './global_search.devdocs.json'; diff --git a/api_docs/guided_onboarding.mdx b/api_docs/guided_onboarding.mdx index 06c5c30baf394..5da2eb72da59b 100644 --- a/api_docs/guided_onboarding.mdx +++ b/api_docs/guided_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/guidedOnboarding title: "guidedOnboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the guidedOnboarding plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'guidedOnboarding'] --- import guidedOnboardingObj from './guided_onboarding.devdocs.json'; diff --git a/api_docs/home.mdx b/api_docs/home.mdx index 0d1c2694a6dab..af82e62b16b07 100644 --- a/api_docs/home.mdx +++ b/api_docs/home.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/home title: "home" image: https://source.unsplash.com/400x175/?github description: API docs for the home plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'home'] --- import homeObj from './home.devdocs.json'; diff --git a/api_docs/image_embeddable.mdx b/api_docs/image_embeddable.mdx index e0c40417ab9c2..7fe17c04ee67c 100644 --- a/api_docs/image_embeddable.mdx +++ b/api_docs/image_embeddable.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/imageEmbeddable title: "imageEmbeddable" image: https://source.unsplash.com/400x175/?github description: API docs for the imageEmbeddable plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'imageEmbeddable'] --- import imageEmbeddableObj from './image_embeddable.devdocs.json'; diff --git a/api_docs/index_lifecycle_management.mdx b/api_docs/index_lifecycle_management.mdx index e31e619532b7e..75638860a6c52 100644 --- a/api_docs/index_lifecycle_management.mdx +++ b/api_docs/index_lifecycle_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexLifecycleManagement title: "indexLifecycleManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexLifecycleManagement plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexLifecycleManagement'] --- import indexLifecycleManagementObj from './index_lifecycle_management.devdocs.json'; diff --git a/api_docs/index_management.mdx b/api_docs/index_management.mdx index e7103b2b467da..42e0f4382697a 100644 --- a/api_docs/index_management.mdx +++ b/api_docs/index_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexManagement title: "indexManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexManagement plugin -date: 2024-07-03 +date: 2024-07-05 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 db7c162946a72..b50517f40ddae 100644 --- a/api_docs/infra.mdx +++ b/api_docs/infra.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/infra title: "infra" image: https://source.unsplash.com/400x175/?github description: API docs for the infra plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'infra'] --- import infraObj from './infra.devdocs.json'; diff --git a/api_docs/ingest_pipelines.mdx b/api_docs/ingest_pipelines.mdx index 135f45aac04df..9600524f86f2c 100644 --- a/api_docs/ingest_pipelines.mdx +++ b/api_docs/ingest_pipelines.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ingestPipelines title: "ingestPipelines" image: https://source.unsplash.com/400x175/?github description: API docs for the ingestPipelines plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ingestPipelines'] --- import ingestPipelinesObj from './ingest_pipelines.devdocs.json'; diff --git a/api_docs/inspector.mdx b/api_docs/inspector.mdx index 7e5538ec8b8d5..d9b93991f9cc9 100644 --- a/api_docs/inspector.mdx +++ b/api_docs/inspector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/inspector title: "inspector" image: https://source.unsplash.com/400x175/?github description: API docs for the inspector plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'inspector'] --- import inspectorObj from './inspector.devdocs.json'; diff --git a/api_docs/integration_assistant.mdx b/api_docs/integration_assistant.mdx index a9b4bcad2d866..48eee3ff64eb7 100644 --- a/api_docs/integration_assistant.mdx +++ b/api_docs/integration_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/integrationAssistant title: "integrationAssistant" image: https://source.unsplash.com/400x175/?github description: API docs for the integrationAssistant plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'integrationAssistant'] --- import integrationAssistantObj from './integration_assistant.devdocs.json'; diff --git a/api_docs/interactive_setup.mdx b/api_docs/interactive_setup.mdx index 34317363c6470..d87ce0072ddc5 100644 --- a/api_docs/interactive_setup.mdx +++ b/api_docs/interactive_setup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/interactiveSetup title: "interactiveSetup" image: https://source.unsplash.com/400x175/?github description: API docs for the interactiveSetup plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'interactiveSetup'] --- import interactiveSetupObj from './interactive_setup.devdocs.json'; diff --git a/api_docs/investigate.mdx b/api_docs/investigate.mdx index 9c07563f7066c..5924f46e07de9 100644 --- a/api_docs/investigate.mdx +++ b/api_docs/investigate.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/investigate title: "investigate" image: https://source.unsplash.com/400x175/?github description: API docs for the investigate plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'investigate'] --- import investigateObj from './investigate.devdocs.json'; diff --git a/api_docs/kbn_ace.mdx b/api_docs/kbn_ace.mdx index 6b01f115bca76..7f7ef5e10cda7 100644 --- a/api_docs/kbn_ace.mdx +++ b/api_docs/kbn_ace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ace title: "@kbn/ace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ace plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ace'] --- import kbnAceObj from './kbn_ace.devdocs.json'; diff --git a/api_docs/kbn_actions_types.mdx b/api_docs/kbn_actions_types.mdx index d41c6036a0c50..a1ee03081852f 100644 --- a/api_docs/kbn_actions_types.mdx +++ b/api_docs/kbn_actions_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-actions-types title: "@kbn/actions-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/actions-types plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/actions-types'] --- import kbnActionsTypesObj from './kbn_actions_types.devdocs.json'; diff --git a/api_docs/kbn_aiops_components.mdx b/api_docs/kbn_aiops_components.mdx index 55b7e8836d7de..45894b4a214e3 100644 --- a/api_docs/kbn_aiops_components.mdx +++ b/api_docs/kbn_aiops_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-components title: "@kbn/aiops-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-components plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-components'] --- import kbnAiopsComponentsObj from './kbn_aiops_components.devdocs.json'; diff --git a/api_docs/kbn_aiops_log_pattern_analysis.mdx b/api_docs/kbn_aiops_log_pattern_analysis.mdx index d16d66e67f792..728b7b184bc74 100644 --- a/api_docs/kbn_aiops_log_pattern_analysis.mdx +++ b/api_docs/kbn_aiops_log_pattern_analysis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-log-pattern-analysis title: "@kbn/aiops-log-pattern-analysis" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-log-pattern-analysis plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-log-pattern-analysis'] --- import kbnAiopsLogPatternAnalysisObj from './kbn_aiops_log_pattern_analysis.devdocs.json'; diff --git a/api_docs/kbn_aiops_log_rate_analysis.mdx b/api_docs/kbn_aiops_log_rate_analysis.mdx index 15fbeabbd6f9c..0146f9167221d 100644 --- a/api_docs/kbn_aiops_log_rate_analysis.mdx +++ b/api_docs/kbn_aiops_log_rate_analysis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-log-rate-analysis title: "@kbn/aiops-log-rate-analysis" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-log-rate-analysis plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-log-rate-analysis'] --- import kbnAiopsLogRateAnalysisObj from './kbn_aiops_log_rate_analysis.devdocs.json'; diff --git a/api_docs/kbn_alerting_api_integration_helpers.mdx b/api_docs/kbn_alerting_api_integration_helpers.mdx index c39de91e2952f..79103bb987ef9 100644 --- a/api_docs/kbn_alerting_api_integration_helpers.mdx +++ b/api_docs/kbn_alerting_api_integration_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-api-integration-helpers title: "@kbn/alerting-api-integration-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-api-integration-helpers plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-api-integration-helpers'] --- import kbnAlertingApiIntegrationHelpersObj from './kbn_alerting_api_integration_helpers.devdocs.json'; diff --git a/api_docs/kbn_alerting_comparators.mdx b/api_docs/kbn_alerting_comparators.mdx index 76960053ddcda..d553ea47ef69a 100644 --- a/api_docs/kbn_alerting_comparators.mdx +++ b/api_docs/kbn_alerting_comparators.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-comparators title: "@kbn/alerting-comparators" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-comparators plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-comparators'] --- import kbnAlertingComparatorsObj from './kbn_alerting_comparators.devdocs.json'; diff --git a/api_docs/kbn_alerting_state_types.mdx b/api_docs/kbn_alerting_state_types.mdx index 65880e9357552..e0a2e2476072c 100644 --- a/api_docs/kbn_alerting_state_types.mdx +++ b/api_docs/kbn_alerting_state_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-state-types title: "@kbn/alerting-state-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-state-types plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-state-types'] --- import kbnAlertingStateTypesObj from './kbn_alerting_state_types.devdocs.json'; diff --git a/api_docs/kbn_alerting_types.devdocs.json b/api_docs/kbn_alerting_types.devdocs.json index 0ac97eba41479..399fa3574fcba 100644 --- a/api_docs/kbn_alerting_types.devdocs.json +++ b/api_docs/kbn_alerting_types.devdocs.json @@ -1345,7 +1345,7 @@ { "parentPluginId": "@kbn/alerting-types", "id": "def-common.Rule.alertDelay", - "type": "Object", + "type": "CompoundType", "tags": [], "label": "alertDelay", "description": [], @@ -1357,7 +1357,7 @@ "section": "def-common.AlertDelay", "text": "AlertDelay" }, - " | undefined" + " | null | undefined" ], "path": "packages/kbn-alerting-types/rule_types.ts", "deprecated": false, @@ -2784,6 +2784,21 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/alerting-types", + "id": "def-common.errorMessageHeader", + "type": "string", + "tags": [], + "label": "errorMessageHeader", + "description": [], + "signature": [ + "\"Error validating circuit breaker\"" + ], + "path": "packages/kbn-alerting-types/circuit_breaker_message_header.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/alerting-types", "id": "def-common.IsoWeekday", diff --git a/api_docs/kbn_alerting_types.mdx b/api_docs/kbn_alerting_types.mdx index 79ee704d94f19..cd5435ea70f11 100644 --- a/api_docs/kbn_alerting_types.mdx +++ b/api_docs/kbn_alerting_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-types title: "@kbn/alerting-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-types plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-types'] --- import kbnAlertingTypesObj from './kbn_alerting_types.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-o | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 193 | 0 | 190 | 0 | +| 194 | 0 | 191 | 0 | ## Common diff --git a/api_docs/kbn_alerts_as_data_utils.mdx b/api_docs/kbn_alerts_as_data_utils.mdx index f78730dc16fbb..999beea00823c 100644 --- a/api_docs/kbn_alerts_as_data_utils.mdx +++ b/api_docs/kbn_alerts_as_data_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts-as-data-utils title: "@kbn/alerts-as-data-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts-as-data-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-as-data-utils'] --- import kbnAlertsAsDataUtilsObj from './kbn_alerts_as_data_utils.devdocs.json'; diff --git a/api_docs/kbn_alerts_ui_shared.devdocs.json b/api_docs/kbn_alerts_ui_shared.devdocs.json index ad5bd582ef9ac..db705acc3d45a 100644 --- a/api_docs/kbn_alerts_ui_shared.devdocs.json +++ b/api_docs/kbn_alerts_ui_shared.devdocs.json @@ -1012,8 +1012,8 @@ "pluginId": "@kbn/alerts-ui-shared", "scope": "common", "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-common.RuleFormErrors", - "text": "RuleFormErrors" + "section": "def-common.RuleFormParamsErrors", + "text": "RuleFormParamsErrors" } ], "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", @@ -3181,10 +3181,10 @@ }, { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.RuleFormErrors", + "id": "def-common.RuleFormBaseErrors", "type": "Interface", "tags": [], - "label": "RuleFormErrors", + "label": "RuleFormBaseErrors", "description": [], "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", "deprecated": false, @@ -3192,10 +3192,122 @@ "children": [ { "parentPluginId": "@kbn/alerts-ui-shared", - "id": "def-common.RuleFormErrors.Unnamed", + "id": "def-common.RuleFormBaseErrors.name", + "type": "Array", + "tags": [], + "label": "name", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.RuleFormBaseErrors.interval", + "type": "Array", + "tags": [], + "label": "interval", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.RuleFormBaseErrors.consumer", + "type": "Array", + "tags": [], + "label": "consumer", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.RuleFormBaseErrors.ruleTypeId", + "type": "Array", + "tags": [], + "label": "ruleTypeId", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.RuleFormBaseErrors.actionConnectors", + "type": "Array", + "tags": [], + "label": "actionConnectors", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.RuleFormBaseErrors.alertDelay", + "type": "Array", + "tags": [], + "label": "alertDelay", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.RuleFormBaseErrors.tags", + "type": "Array", + "tags": [], + "label": "tags", + "description": [], + "signature": [ + "string[] | undefined" + ], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.RuleFormParamsErrors", + "type": "Interface", + "tags": [], + "label": "RuleFormParamsErrors", + "description": [], + "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/alerts-ui-shared", + "id": "def-common.RuleFormParamsErrors.Unnamed", "type": "IndexSignature", "tags": [], - "label": "[key: string]: string | string[] | RuleFormErrors", + "label": "[key: string]: string | string[] | RuleFormParamsErrors", "description": [], "signature": [ "[key: string]: string | string[] | ", @@ -3203,8 +3315,8 @@ "pluginId": "@kbn/alerts-ui-shared", "scope": "common", "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-common.RuleFormErrors", - "text": "RuleFormErrors" + "section": "def-common.RuleFormParamsErrors", + "text": "RuleFormParamsErrors" } ], "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", @@ -3691,8 +3803,8 @@ "pluginId": "@kbn/alerts-ui-shared", "scope": "common", "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-common.RuleFormErrors", - "text": "RuleFormErrors" + "section": "def-common.RuleFormParamsErrors", + "text": "RuleFormParamsErrors" } ], "path": "packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts", diff --git a/api_docs/kbn_alerts_ui_shared.mdx b/api_docs/kbn_alerts_ui_shared.mdx index d139fdae38b3d..0dc3ac46a6b5e 100644 --- a/api_docs/kbn_alerts_ui_shared.mdx +++ b/api_docs/kbn_alerts_ui_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts-ui-shared title: "@kbn/alerts-ui-shared" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts-ui-shared plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-ui-shared'] --- import kbnAlertsUiSharedObj from './kbn_alerts_ui_shared.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-o | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 237 | 0 | 223 | 2 | +| 245 | 0 | 231 | 2 | ## Common diff --git a/api_docs/kbn_analytics.mdx b/api_docs/kbn_analytics.mdx index 372c787326141..d14f59b4c5805 100644 --- a/api_docs/kbn_analytics.mdx +++ b/api_docs/kbn_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics title: "@kbn/analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics'] --- import kbnAnalyticsObj from './kbn_analytics.devdocs.json'; diff --git a/api_docs/kbn_analytics_collection_utils.mdx b/api_docs/kbn_analytics_collection_utils.mdx index c92af5dfa18e2..e3da040beaa00 100644 --- a/api_docs/kbn_analytics_collection_utils.mdx +++ b/api_docs/kbn_analytics_collection_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-collection-utils title: "@kbn/analytics-collection-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-collection-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-collection-utils'] --- import kbnAnalyticsCollectionUtilsObj from './kbn_analytics_collection_utils.devdocs.json'; diff --git a/api_docs/kbn_apm_config_loader.mdx b/api_docs/kbn_apm_config_loader.mdx index 4df277626b033..c8147fe40849c 100644 --- a/api_docs/kbn_apm_config_loader.mdx +++ b/api_docs/kbn_apm_config_loader.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-config-loader title: "@kbn/apm-config-loader" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-config-loader plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-config-loader'] --- import kbnApmConfigLoaderObj from './kbn_apm_config_loader.devdocs.json'; diff --git a/api_docs/kbn_apm_data_view.mdx b/api_docs/kbn_apm_data_view.mdx index 436cf4575619d..9551b0f35be68 100644 --- a/api_docs/kbn_apm_data_view.mdx +++ b/api_docs/kbn_apm_data_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-data-view title: "@kbn/apm-data-view" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-data-view plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-data-view'] --- import kbnApmDataViewObj from './kbn_apm_data_view.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace.mdx b/api_docs/kbn_apm_synthtrace.mdx index a7a0c1dba8c61..5bb100e81dfdf 100644 --- a/api_docs/kbn_apm_synthtrace.mdx +++ b/api_docs/kbn_apm_synthtrace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-synthtrace title: "@kbn/apm-synthtrace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-synthtrace plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace'] --- import kbnApmSynthtraceObj from './kbn_apm_synthtrace.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace_client.devdocs.json b/api_docs/kbn_apm_synthtrace_client.devdocs.json index 0456a1802ee4f..c6dbb4c5fa952 100644 --- a/api_docs/kbn_apm_synthtrace_client.devdocs.json +++ b/api_docs/kbn_apm_synthtrace_client.devdocs.json @@ -2631,7 +2631,7 @@ "label": "LogDocument", "description": [], "signature": [ - "{ '@timestamp'?: number | undefined; } & Partial<{ 'input.type': string; 'log.file.path'?: string | undefined; 'service.name'?: string | undefined; 'data_stream.namespace': string; 'data_stream.type': string; 'data_stream.dataset': string; message?: string | undefined; 'error.message'?: string | undefined; 'event.original'?: string | undefined; 'event.dataset': string; 'log.level'?: string | undefined; 'host.name'?: string | undefined; 'container.id'?: string | undefined; 'trace.id'?: string | undefined; 'transaction.id'?: string | undefined; 'agent.id'?: string | undefined; 'agent.name'?: string | undefined; 'orchestrator.cluster.name'?: string | undefined; 'orchestrator.cluster.id'?: string | undefined; 'orchestrator.resource.id'?: string | undefined; 'kubernetes.pod.uid'?: string | undefined; 'aws.s3.bucket.name'?: string | undefined; 'orchestrator.namespace'?: string | undefined; 'container.name'?: string | undefined; 'cloud.provider'?: string | undefined; 'cloud.region'?: string | undefined; 'cloud.availability_zone'?: string | undefined; 'cloud.project.id'?: string | undefined; 'cloud.instance.id'?: string | undefined; 'error.stack_trace'?: string | undefined; 'error.exception.stacktrace'?: string | undefined; 'error.log.stacktrace'?: string | undefined; 'log.custom': Record; }>" + "{ '@timestamp'?: number | undefined; } & Partial<{ 'input.type': string; 'log.file.path'?: string | undefined; 'service.name'?: string | undefined; 'service.environment'?: string | undefined; 'data_stream.namespace': string; 'data_stream.type': string; 'data_stream.dataset': string; message?: string | undefined; 'error.message'?: string | undefined; 'event.original'?: string | undefined; 'event.dataset': string; 'log.level'?: string | undefined; 'host.name'?: string | undefined; 'container.id'?: string | undefined; 'trace.id'?: string | undefined; 'transaction.id'?: string | undefined; 'agent.id'?: string | undefined; 'agent.name'?: string | undefined; 'orchestrator.cluster.name'?: string | undefined; 'orchestrator.cluster.id'?: string | undefined; 'orchestrator.resource.id'?: string | undefined; 'kubernetes.pod.uid'?: string | undefined; 'aws.s3.bucket.name'?: string | undefined; 'orchestrator.namespace'?: string | undefined; 'container.name'?: string | undefined; 'cloud.provider'?: string | undefined; 'cloud.region'?: string | undefined; 'cloud.availability_zone'?: string | undefined; 'cloud.project.id'?: string | undefined; 'cloud.instance.id'?: string | undefined; 'error.stack_trace'?: string | undefined; 'error.exception.stacktrace'?: string | undefined; 'error.log.stacktrace'?: string | undefined; 'log.custom': Record; }>" ], "path": "packages/kbn-apm-synthtrace-client/src/lib/logs/index.ts", "deprecated": false, diff --git a/api_docs/kbn_apm_synthtrace_client.mdx b/api_docs/kbn_apm_synthtrace_client.mdx index de4ec063441a3..217a4c43b045b 100644 --- a/api_docs/kbn_apm_synthtrace_client.mdx +++ b/api_docs/kbn_apm_synthtrace_client.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-synthtrace-client title: "@kbn/apm-synthtrace-client" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-synthtrace-client plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace-client'] --- import kbnApmSynthtraceClientObj from './kbn_apm_synthtrace_client.devdocs.json'; diff --git a/api_docs/kbn_apm_utils.mdx b/api_docs/kbn_apm_utils.mdx index 9db8927805a0d..f449ea59958af 100644 --- a/api_docs/kbn_apm_utils.mdx +++ b/api_docs/kbn_apm_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-utils title: "@kbn/apm-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-utils'] --- import kbnApmUtilsObj from './kbn_apm_utils.devdocs.json'; diff --git a/api_docs/kbn_axe_config.mdx b/api_docs/kbn_axe_config.mdx index 55ceca0a0eade..e802872a31b63 100644 --- a/api_docs/kbn_axe_config.mdx +++ b/api_docs/kbn_axe_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-axe-config title: "@kbn/axe-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/axe-config plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/axe-config'] --- import kbnAxeConfigObj from './kbn_axe_config.devdocs.json'; diff --git a/api_docs/kbn_bfetch_error.mdx b/api_docs/kbn_bfetch_error.mdx index 1ccb67108fb62..c2a80d3300a27 100644 --- a/api_docs/kbn_bfetch_error.mdx +++ b/api_docs/kbn_bfetch_error.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-bfetch-error title: "@kbn/bfetch-error" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/bfetch-error plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/bfetch-error'] --- import kbnBfetchErrorObj from './kbn_bfetch_error.devdocs.json'; diff --git a/api_docs/kbn_calculate_auto.mdx b/api_docs/kbn_calculate_auto.mdx index ccdecc6bbdd5e..666b3dc9d0f75 100644 --- a/api_docs/kbn_calculate_auto.mdx +++ b/api_docs/kbn_calculate_auto.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-calculate-auto title: "@kbn/calculate-auto" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/calculate-auto plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/calculate-auto'] --- import kbnCalculateAutoObj from './kbn_calculate_auto.devdocs.json'; diff --git a/api_docs/kbn_calculate_width_from_char_count.mdx b/api_docs/kbn_calculate_width_from_char_count.mdx index e24e808fd2bbe..e0888218da69a 100644 --- a/api_docs/kbn_calculate_width_from_char_count.mdx +++ b/api_docs/kbn_calculate_width_from_char_count.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-calculate-width-from-char-count title: "@kbn/calculate-width-from-char-count" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/calculate-width-from-char-count plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/calculate-width-from-char-count'] --- import kbnCalculateWidthFromCharCountObj from './kbn_calculate_width_from_char_count.devdocs.json'; diff --git a/api_docs/kbn_cases_components.mdx b/api_docs/kbn_cases_components.mdx index b1598ff97e616..b66c30b43c1f8 100644 --- a/api_docs/kbn_cases_components.mdx +++ b/api_docs/kbn_cases_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cases-components title: "@kbn/cases-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cases-components plugin -date: 2024-07-03 +date: 2024-07-05 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 fdc685fb9231f..d655fbdec118d 100644 --- a/api_docs/kbn_cell_actions.mdx +++ b/api_docs/kbn_cell_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cell-actions title: "@kbn/cell-actions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cell-actions plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cell-actions'] --- import kbnCellActionsObj from './kbn_cell_actions.devdocs.json'; diff --git a/api_docs/kbn_chart_expressions_common.mdx b/api_docs/kbn_chart_expressions_common.mdx index 72122b5c9e511..dac4b2337f9d5 100644 --- a/api_docs/kbn_chart_expressions_common.mdx +++ b/api_docs/kbn_chart_expressions_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-chart-expressions-common title: "@kbn/chart-expressions-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/chart-expressions-common plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/chart-expressions-common'] --- import kbnChartExpressionsCommonObj from './kbn_chart_expressions_common.devdocs.json'; diff --git a/api_docs/kbn_chart_icons.mdx b/api_docs/kbn_chart_icons.mdx index e768edc933618..57d360a9094ed 100644 --- a/api_docs/kbn_chart_icons.mdx +++ b/api_docs/kbn_chart_icons.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-chart-icons title: "@kbn/chart-icons" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/chart-icons plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/chart-icons'] --- import kbnChartIconsObj from './kbn_chart_icons.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_core.mdx b/api_docs/kbn_ci_stats_core.mdx index fd608d74ee8bc..a5c4c731f866a 100644 --- a/api_docs/kbn_ci_stats_core.mdx +++ b/api_docs/kbn_ci_stats_core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-core title: "@kbn/ci-stats-core" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-core plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-core'] --- import kbnCiStatsCoreObj from './kbn_ci_stats_core.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_performance_metrics.mdx b/api_docs/kbn_ci_stats_performance_metrics.mdx index 4fd05957dde77..f2e98e27cc121 100644 --- a/api_docs/kbn_ci_stats_performance_metrics.mdx +++ b/api_docs/kbn_ci_stats_performance_metrics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-performance-metrics title: "@kbn/ci-stats-performance-metrics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-performance-metrics plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-performance-metrics'] --- import kbnCiStatsPerformanceMetricsObj from './kbn_ci_stats_performance_metrics.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_reporter.mdx b/api_docs/kbn_ci_stats_reporter.mdx index 6526802dfde8a..d6c05cca31a98 100644 --- a/api_docs/kbn_ci_stats_reporter.mdx +++ b/api_docs/kbn_ci_stats_reporter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-reporter title: "@kbn/ci-stats-reporter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-reporter plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-reporter'] --- import kbnCiStatsReporterObj from './kbn_ci_stats_reporter.devdocs.json'; diff --git a/api_docs/kbn_cli_dev_mode.mdx b/api_docs/kbn_cli_dev_mode.mdx index 108b32c01af03..9dc71a6f4bf67 100644 --- a/api_docs/kbn_cli_dev_mode.mdx +++ b/api_docs/kbn_cli_dev_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cli-dev-mode title: "@kbn/cli-dev-mode" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cli-dev-mode plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cli-dev-mode'] --- import kbnCliDevModeObj from './kbn_cli_dev_mode.devdocs.json'; diff --git a/api_docs/kbn_code_editor.mdx b/api_docs/kbn_code_editor.mdx index 2baeca00663c1..1b8c4b3b0f5fa 100644 --- a/api_docs/kbn_code_editor.mdx +++ b/api_docs/kbn_code_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-code-editor title: "@kbn/code-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/code-editor plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-editor'] --- import kbnCodeEditorObj from './kbn_code_editor.devdocs.json'; diff --git a/api_docs/kbn_code_editor_mock.mdx b/api_docs/kbn_code_editor_mock.mdx index df29cba4449b2..eed5868d10e4c 100644 --- a/api_docs/kbn_code_editor_mock.mdx +++ b/api_docs/kbn_code_editor_mock.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-code-editor-mock title: "@kbn/code-editor-mock" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/code-editor-mock plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-editor-mock'] --- import kbnCodeEditorMockObj from './kbn_code_editor_mock.devdocs.json'; diff --git a/api_docs/kbn_code_owners.mdx b/api_docs/kbn_code_owners.mdx index ac13d1a8ac50f..812f31285de67 100644 --- a/api_docs/kbn_code_owners.mdx +++ b/api_docs/kbn_code_owners.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-code-owners title: "@kbn/code-owners" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/code-owners plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-owners'] --- import kbnCodeOwnersObj from './kbn_code_owners.devdocs.json'; diff --git a/api_docs/kbn_coloring.mdx b/api_docs/kbn_coloring.mdx index c78e81fb389dd..e92afec8ef344 100644 --- a/api_docs/kbn_coloring.mdx +++ b/api_docs/kbn_coloring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-coloring title: "@kbn/coloring" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/coloring plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/coloring'] --- import kbnColoringObj from './kbn_coloring.devdocs.json'; diff --git a/api_docs/kbn_config.mdx b/api_docs/kbn_config.mdx index 9ce9e3bbda86d..9219a60185fdd 100644 --- a/api_docs/kbn_config.mdx +++ b/api_docs/kbn_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config title: "@kbn/config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config'] --- import kbnConfigObj from './kbn_config.devdocs.json'; diff --git a/api_docs/kbn_config_mocks.mdx b/api_docs/kbn_config_mocks.mdx index 1b89dabb8f3e5..ad83b8c1f15cd 100644 --- a/api_docs/kbn_config_mocks.mdx +++ b/api_docs/kbn_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-mocks title: "@kbn/config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-mocks'] --- import kbnConfigMocksObj from './kbn_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_config_schema.mdx b/api_docs/kbn_config_schema.mdx index 541a1472dce83..de1065bc6cc11 100644 --- a/api_docs/kbn_config_schema.mdx +++ b/api_docs/kbn_config_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-schema title: "@kbn/config-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-schema plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-schema'] --- import kbnConfigSchemaObj from './kbn_config_schema.devdocs.json'; diff --git a/api_docs/kbn_content_management_content_editor.mdx b/api_docs/kbn_content_management_content_editor.mdx index 6b8f4845611cf..02e34823bc8fe 100644 --- a/api_docs/kbn_content_management_content_editor.mdx +++ b/api_docs/kbn_content_management_content_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-content-editor title: "@kbn/content-management-content-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-content-editor plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-content-editor'] --- import kbnContentManagementContentEditorObj from './kbn_content_management_content_editor.devdocs.json'; diff --git a/api_docs/kbn_content_management_tabbed_table_list_view.mdx b/api_docs/kbn_content_management_tabbed_table_list_view.mdx index cc120deb3beeb..1887ef1cebcda 100644 --- a/api_docs/kbn_content_management_tabbed_table_list_view.mdx +++ b/api_docs/kbn_content_management_tabbed_table_list_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-tabbed-table-list-view title: "@kbn/content-management-tabbed-table-list-view" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-tabbed-table-list-view plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-tabbed-table-list-view'] --- import kbnContentManagementTabbedTableListViewObj from './kbn_content_management_tabbed_table_list_view.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list_view.mdx b/api_docs/kbn_content_management_table_list_view.mdx index 59a2c82d98c43..0f3f25d7eab66 100644 --- a/api_docs/kbn_content_management_table_list_view.mdx +++ b/api_docs/kbn_content_management_table_list_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list-view title: "@kbn/content-management-table-list-view" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list-view plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view'] --- import kbnContentManagementTableListViewObj from './kbn_content_management_table_list_view.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list_view_common.mdx b/api_docs/kbn_content_management_table_list_view_common.mdx index 9eb3eb60c0f8f..fd7a77f9b1d3a 100644 --- a/api_docs/kbn_content_management_table_list_view_common.mdx +++ b/api_docs/kbn_content_management_table_list_view_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list-view-common title: "@kbn/content-management-table-list-view-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list-view-common plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view-common'] --- import kbnContentManagementTableListViewCommonObj from './kbn_content_management_table_list_view_common.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list_view_table.mdx b/api_docs/kbn_content_management_table_list_view_table.mdx index 60f31a1f9cba9..26e88ab807af0 100644 --- a/api_docs/kbn_content_management_table_list_view_table.mdx +++ b/api_docs/kbn_content_management_table_list_view_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list-view-table title: "@kbn/content-management-table-list-view-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list-view-table plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view-table'] --- import kbnContentManagementTableListViewTableObj from './kbn_content_management_table_list_view_table.devdocs.json'; diff --git a/api_docs/kbn_content_management_user_profiles.mdx b/api_docs/kbn_content_management_user_profiles.mdx index 0d1fc5f12270b..0db8b33dd4552 100644 --- a/api_docs/kbn_content_management_user_profiles.mdx +++ b/api_docs/kbn_content_management_user_profiles.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-user-profiles title: "@kbn/content-management-user-profiles" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-user-profiles plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-user-profiles'] --- import kbnContentManagementUserProfilesObj from './kbn_content_management_user_profiles.devdocs.json'; diff --git a/api_docs/kbn_content_management_utils.mdx b/api_docs/kbn_content_management_utils.mdx index 34fa9dc1b9b9f..0fb737d1a3007 100644 --- a/api_docs/kbn_content_management_utils.mdx +++ b/api_docs/kbn_content_management_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-utils title: "@kbn/content-management-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-utils'] --- import kbnContentManagementUtilsObj from './kbn_content_management_utils.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser.devdocs.json b/api_docs/kbn_core_analytics_browser.devdocs.json index dfaa391fa2f9b..0937f6f89d0f3 100644 --- a/api_docs/kbn_core_analytics_browser.devdocs.json +++ b/api_docs/kbn_core_analytics_browser.devdocs.json @@ -691,14 +691,6 @@ "plugin": "@kbn/cloud", "path": "packages/cloud/connection_details/kibana/kibana_connection_details_provider.tsx" }, - { - "plugin": "dashboard", - "path": "src/plugins/dashboard/public/services/analytics/types.ts" - }, - { - "plugin": "dashboard", - "path": "src/plugins/dashboard/public/services/analytics/analytics_service.ts" - }, { "plugin": "observabilityAIAssistant", "path": "x-pack/plugins/observability_solution/observability_ai_assistant/server/utils/recall/recall_and_score.ts" @@ -707,6 +699,14 @@ "plugin": "observabilityAIAssistant", "path": "x-pack/plugins/observability_solution/observability_ai_assistant/public/analytics/index.ts" }, + { + "plugin": "dashboard", + "path": "src/plugins/dashboard/public/services/analytics/types.ts" + }, + { + "plugin": "dashboard", + "path": "src/plugins/dashboard/public/services/analytics/analytics_service.ts" + }, { "plugin": "integrationAssistant", "path": "x-pack/plugins/integration_assistant/public/services/telemetry/service.ts" @@ -947,6 +947,14 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/common/lib/telemetry/telemetry_client.ts" }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/lib/telemetry/telemetry_client.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/lib/telemetry/telemetry_client.ts" + }, { "plugin": "osquery", "path": "x-pack/plugins/osquery/server/lib/telemetry/sender.ts" diff --git a/api_docs/kbn_core_analytics_browser.mdx b/api_docs/kbn_core_analytics_browser.mdx index ceec4b4e33078..2d30c173a7c02 100644 --- a/api_docs/kbn_core_analytics_browser.mdx +++ b/api_docs/kbn_core_analytics_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser title: "@kbn/core-analytics-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser'] --- import kbnCoreAnalyticsBrowserObj from './kbn_core_analytics_browser.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser_internal.mdx b/api_docs/kbn_core_analytics_browser_internal.mdx index 3e3c07067ec5a..8c84c745b4d64 100644 --- a/api_docs/kbn_core_analytics_browser_internal.mdx +++ b/api_docs/kbn_core_analytics_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-internal title: "@kbn/core-analytics-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-internal'] --- import kbnCoreAnalyticsBrowserInternalObj from './kbn_core_analytics_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser_mocks.mdx b/api_docs/kbn_core_analytics_browser_mocks.mdx index e3c0a6d47e463..6c0cd3b026edc 100644 --- a/api_docs/kbn_core_analytics_browser_mocks.mdx +++ b/api_docs/kbn_core_analytics_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-mocks title: "@kbn/core-analytics-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-mocks'] --- import kbnCoreAnalyticsBrowserMocksObj from './kbn_core_analytics_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server.devdocs.json b/api_docs/kbn_core_analytics_server.devdocs.json index 6675d7501f672..24de9bb5afba1 100644 --- a/api_docs/kbn_core_analytics_server.devdocs.json +++ b/api_docs/kbn_core_analytics_server.devdocs.json @@ -691,14 +691,6 @@ "plugin": "@kbn/cloud", "path": "packages/cloud/connection_details/kibana/kibana_connection_details_provider.tsx" }, - { - "plugin": "dashboard", - "path": "src/plugins/dashboard/public/services/analytics/types.ts" - }, - { - "plugin": "dashboard", - "path": "src/plugins/dashboard/public/services/analytics/analytics_service.ts" - }, { "plugin": "observabilityAIAssistant", "path": "x-pack/plugins/observability_solution/observability_ai_assistant/server/utils/recall/recall_and_score.ts" @@ -707,6 +699,14 @@ "plugin": "observabilityAIAssistant", "path": "x-pack/plugins/observability_solution/observability_ai_assistant/public/analytics/index.ts" }, + { + "plugin": "dashboard", + "path": "src/plugins/dashboard/public/services/analytics/types.ts" + }, + { + "plugin": "dashboard", + "path": "src/plugins/dashboard/public/services/analytics/analytics_service.ts" + }, { "plugin": "integrationAssistant", "path": "x-pack/plugins/integration_assistant/public/services/telemetry/service.ts" @@ -947,6 +947,14 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/common/lib/telemetry/telemetry_client.ts" }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/lib/telemetry/telemetry_client.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/lib/telemetry/telemetry_client.ts" + }, { "plugin": "osquery", "path": "x-pack/plugins/osquery/server/lib/telemetry/sender.ts" diff --git a/api_docs/kbn_core_analytics_server.mdx b/api_docs/kbn_core_analytics_server.mdx index e797434f2d6b9..9f9639e3815a4 100644 --- a/api_docs/kbn_core_analytics_server.mdx +++ b/api_docs/kbn_core_analytics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server title: "@kbn/core-analytics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server'] --- import kbnCoreAnalyticsServerObj from './kbn_core_analytics_server.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server_internal.mdx b/api_docs/kbn_core_analytics_server_internal.mdx index 62572df3ad3c1..a8fdd71e65d41 100644 --- a/api_docs/kbn_core_analytics_server_internal.mdx +++ b/api_docs/kbn_core_analytics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-internal title: "@kbn/core-analytics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-internal'] --- import kbnCoreAnalyticsServerInternalObj from './kbn_core_analytics_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server_mocks.mdx b/api_docs/kbn_core_analytics_server_mocks.mdx index 594607e81b093..e7a6369bc43ee 100644 --- a/api_docs/kbn_core_analytics_server_mocks.mdx +++ b/api_docs/kbn_core_analytics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-mocks title: "@kbn/core-analytics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-mocks'] --- import kbnCoreAnalyticsServerMocksObj from './kbn_core_analytics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser.mdx b/api_docs/kbn_core_application_browser.mdx index 2610a7f0ff012..e41e1ec40267d 100644 --- a/api_docs/kbn_core_application_browser.mdx +++ b/api_docs/kbn_core_application_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser title: "@kbn/core-application-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser'] --- import kbnCoreApplicationBrowserObj from './kbn_core_application_browser.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser_internal.mdx b/api_docs/kbn_core_application_browser_internal.mdx index 0bda9757c8f9a..b134ad198246b 100644 --- a/api_docs/kbn_core_application_browser_internal.mdx +++ b/api_docs/kbn_core_application_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-internal title: "@kbn/core-application-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser-internal'] --- import kbnCoreApplicationBrowserInternalObj from './kbn_core_application_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser_mocks.mdx b/api_docs/kbn_core_application_browser_mocks.mdx index bf3bc99f34abe..16a15fe8f397d 100644 --- a/api_docs/kbn_core_application_browser_mocks.mdx +++ b/api_docs/kbn_core_application_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-mocks title: "@kbn/core-application-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser-mocks'] --- import kbnCoreApplicationBrowserMocksObj from './kbn_core_application_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_common.mdx b/api_docs/kbn_core_application_common.mdx index 44f45586f4fb8..e2131218d5d9a 100644 --- a/api_docs/kbn_core_application_common.mdx +++ b/api_docs/kbn_core_application_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-common title: "@kbn/core-application-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-common plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-common'] --- import kbnCoreApplicationCommonObj from './kbn_core_application_common.devdocs.json'; diff --git a/api_docs/kbn_core_apps_browser_internal.mdx b/api_docs/kbn_core_apps_browser_internal.mdx index b28ecc232fadd..a84e42d7d0cfe 100644 --- a/api_docs/kbn_core_apps_browser_internal.mdx +++ b/api_docs/kbn_core_apps_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-internal title: "@kbn/core-apps-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-browser-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-internal'] --- import kbnCoreAppsBrowserInternalObj from './kbn_core_apps_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_apps_browser_mocks.mdx b/api_docs/kbn_core_apps_browser_mocks.mdx index 73ab4db437c1d..2572e2ded2998 100644 --- a/api_docs/kbn_core_apps_browser_mocks.mdx +++ b/api_docs/kbn_core_apps_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-mocks title: "@kbn/core-apps-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-browser-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-mocks'] --- import kbnCoreAppsBrowserMocksObj from './kbn_core_apps_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_apps_server_internal.mdx b/api_docs/kbn_core_apps_server_internal.mdx index ad1a08dfee996..da3e364cd8ace 100644 --- a/api_docs/kbn_core_apps_server_internal.mdx +++ b/api_docs/kbn_core_apps_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-server-internal title: "@kbn/core-apps-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-server-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-server-internal'] --- import kbnCoreAppsServerInternalObj from './kbn_core_apps_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_base_browser_mocks.mdx b/api_docs/kbn_core_base_browser_mocks.mdx index 3ce0110995a3f..26293409b575c 100644 --- a/api_docs/kbn_core_base_browser_mocks.mdx +++ b/api_docs/kbn_core_base_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-browser-mocks title: "@kbn/core-base-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-browser-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-browser-mocks'] --- import kbnCoreBaseBrowserMocksObj from './kbn_core_base_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_base_common.mdx b/api_docs/kbn_core_base_common.mdx index 51fc7668a96c0..113da7132ecce 100644 --- a/api_docs/kbn_core_base_common.mdx +++ b/api_docs/kbn_core_base_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-common title: "@kbn/core-base-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-common plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-common'] --- import kbnCoreBaseCommonObj from './kbn_core_base_common.devdocs.json'; diff --git a/api_docs/kbn_core_base_server_internal.mdx b/api_docs/kbn_core_base_server_internal.mdx index 2bcf3cb79c7da..d3fdfea4c18b3 100644 --- a/api_docs/kbn_core_base_server_internal.mdx +++ b/api_docs/kbn_core_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-internal title: "@kbn/core-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-internal'] --- import kbnCoreBaseServerInternalObj from './kbn_core_base_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_base_server_mocks.mdx b/api_docs/kbn_core_base_server_mocks.mdx index ff53c8dccf352..f18a710fce344 100644 --- a/api_docs/kbn_core_base_server_mocks.mdx +++ b/api_docs/kbn_core_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-mocks title: "@kbn/core-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-mocks'] --- import kbnCoreBaseServerMocksObj from './kbn_core_base_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_browser_mocks.mdx b/api_docs/kbn_core_capabilities_browser_mocks.mdx index 2ad35b890c181..35173edb76a30 100644 --- a/api_docs/kbn_core_capabilities_browser_mocks.mdx +++ b/api_docs/kbn_core_capabilities_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-browser-mocks title: "@kbn/core-capabilities-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-browser-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-browser-mocks'] --- import kbnCoreCapabilitiesBrowserMocksObj from './kbn_core_capabilities_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_common.mdx b/api_docs/kbn_core_capabilities_common.mdx index 42b1524399769..6b5d9b66e642e 100644 --- a/api_docs/kbn_core_capabilities_common.mdx +++ b/api_docs/kbn_core_capabilities_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-common title: "@kbn/core-capabilities-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-common plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-common'] --- import kbnCoreCapabilitiesCommonObj from './kbn_core_capabilities_common.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_server.mdx b/api_docs/kbn_core_capabilities_server.mdx index fd511dbbf29b1..c92b73393be2b 100644 --- a/api_docs/kbn_core_capabilities_server.mdx +++ b/api_docs/kbn_core_capabilities_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server title: "@kbn/core-capabilities-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server'] --- import kbnCoreCapabilitiesServerObj from './kbn_core_capabilities_server.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_server_mocks.mdx b/api_docs/kbn_core_capabilities_server_mocks.mdx index 5652bc5f23d0a..19be047e48e56 100644 --- a/api_docs/kbn_core_capabilities_server_mocks.mdx +++ b/api_docs/kbn_core_capabilities_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server-mocks title: "@kbn/core-capabilities-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server-mocks'] --- import kbnCoreCapabilitiesServerMocksObj from './kbn_core_capabilities_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser.devdocs.json b/api_docs/kbn_core_chrome_browser.devdocs.json index 19595edba49ec..21ff311b60832 100644 --- a/api_docs/kbn_core_chrome_browser.devdocs.json +++ b/api_docs/kbn_core_chrome_browser.devdocs.json @@ -3716,7 +3716,7 @@ "label": "AppDeepLinkId", "description": [], "signature": [ - "\"fleet\" | \"graph\" | \"ml\" | \"monitoring\" | \"metrics\" | \"management\" | \"synthetics\" | \"ux\" | \"apm\" | \"logs\" | \"profiling\" | \"dashboards\" | \"observabilityAIAssistant\" | \"home\" | \"canvas\" | \"integrations\" | \"discover\" | \"observability-overview\" | \"appSearch\" | \"dev_tools\" | \"maps\" | \"visualize\" | \"dev_tools:console\" | \"dev_tools:searchprofiler\" | \"dev_tools:painless_lab\" | \"dev_tools:grokdebugger\" | \"ml:notifications\" | \"ml:nodes\" | \"ml:overview\" | \"ml:memoryUsage\" | \"ml:settings\" | \"ml:dataVisualizer\" | \"ml:anomalyDetection\" | \"ml:anomalyExplorer\" | \"ml:singleMetricViewer\" | \"ml:dataDrift\" | \"ml:dataFrameAnalytics\" | \"ml:resultExplorer\" | \"ml:analyticsMap\" | \"ml:aiOps\" | \"ml:logRateAnalysis\" | \"ml:logPatternAnalysis\" | \"ml:changePointDetections\" | \"ml:modelManagement\" | \"ml:nodesOverview\" | \"ml:esqlDataVisualizer\" | \"ml:fileUpload\" | \"ml:indexDataVisualizer\" | \"ml:calendarSettings\" | \"ml:filterListsSettings\" | \"osquery\" | \"management:transform\" | \"management:watcher\" | \"management:cases\" | \"management:tags\" | \"management:maintenanceWindows\" | \"management:settings\" | \"management:dataViews\" | \"management:spaces\" | \"management:users\" | \"management:migrate_data\" | \"management:search_sessions\" | \"management:data_quality\" | \"management:filesManagement\" | \"management:roles\" | \"management:reporting\" | \"management:aiAssistantManagementSelection\" | \"management:securityAiAssistantManagement\" | \"management:observabilityAiAssistantManagement\" | \"management:api_keys\" | \"management:cross_cluster_replication\" | \"management:license_management\" | \"management:index_lifecycle_management\" | \"management:index_management\" | \"management:ingest_pipelines\" | \"management:jobsListLink\" | \"management:objects\" | \"management:pipelines\" | \"management:remote_clusters\" | \"management:role_mappings\" | \"management:rollup_jobs\" | \"management:snapshot_restore\" | \"management:triggersActions\" | \"management:triggersActionsConnectors\" | \"management:upgrade_assistant\" | \"enterpriseSearch\" | \"enterpriseSearchContent\" | \"enterpriseSearchApplications\" | \"enterpriseSearchAnalytics\" | \"workplaceSearch\" | \"serverlessElasticsearch\" | \"serverlessConnectors\" | \"searchPlayground\" | \"searchInferenceEndpoints\" | \"searchHomepage\" | \"enterpriseSearchContent:connectors\" | \"enterpriseSearchContent:searchIndices\" | \"enterpriseSearchContent:webCrawlers\" | \"enterpriseSearchApplications:searchApplications\" | \"enterpriseSearchApplications:playground\" | \"appSearch:engines\" | \"observability-logs-explorer\" | \"observabilityOnboarding\" | \"slo\" | \"logs:settings\" | \"logs:stream\" | \"logs:log-categories\" | \"logs:anomalies\" | \"observability-overview:cases\" | \"observability-overview:alerts\" | \"observability-overview:rules\" | \"observability-overview:cases_create\" | \"observability-overview:cases_configure\" | \"metrics:settings\" | \"metrics:hosts\" | \"metrics:inventory\" | \"metrics:metrics-explorer\" | \"metrics:assetDetails\" | \"apm:traces\" | \"apm:dependencies\" | \"apm:service-map\" | \"apm:settings\" | \"apm:services\" | \"apm:service-groups-list\" | \"apm:storage-explorer\" | \"synthetics:overview\" | \"synthetics:certificates\" | \"profiling:stacktraces\" | \"profiling:flamegraphs\" | \"profiling:functions\" | \"securitySolutionUI\" | \"securitySolutionUI:\" | \"securitySolutionUI:cases\" | \"securitySolutionUI:alerts\" | \"securitySolutionUI:rules\" | \"securitySolutionUI:policy\" | \"securitySolutionUI:overview\" | \"securitySolutionUI:dashboards\" | \"securitySolutionUI:cases_create\" | \"securitySolutionUI:cases_configure\" | \"securitySolutionUI:hosts\" | \"securitySolutionUI:users\" | \"securitySolutionUI:cloud_defend-policies\" | \"securitySolutionUI:cloud_security_posture-dashboard\" | \"securitySolutionUI:cloud_security_posture-findings\" | \"securitySolutionUI:cloud_security_posture-benchmarks\" | \"securitySolutionUI:kubernetes\" | \"securitySolutionUI:network\" | \"securitySolutionUI:data_quality\" | \"securitySolutionUI:explore\" | \"securitySolutionUI:assets\" | \"securitySolutionUI:cloud_defend\" | \"securitySolutionUI:administration\" | \"securitySolutionUI:attack_discovery\" | \"securitySolutionUI:blocklist\" | \"securitySolutionUI:cloud_security_posture-rules\" | \"securitySolutionUI:detections\" | \"securitySolutionUI:detection_response\" | \"securitySolutionUI:endpoints\" | \"securitySolutionUI:event_filters\" | \"securitySolutionUI:exceptions\" | \"securitySolutionUI:host_isolation_exceptions\" | \"securitySolutionUI:hosts-all\" | \"securitySolutionUI:hosts-anomalies\" | \"securitySolutionUI:hosts-risk\" | \"securitySolutionUI:hosts-events\" | \"securitySolutionUI:hosts-sessions\" | \"securitySolutionUI:hosts-uncommon_processes\" | \"securitySolutionUI:investigations\" | \"securitySolutionUI:get_started\" | \"securitySolutionUI:machine_learning-landing\" | \"securitySolutionUI:network-anomalies\" | \"securitySolutionUI:network-dns\" | \"securitySolutionUI:network-events\" | \"securitySolutionUI:network-flows\" | \"securitySolutionUI:network-http\" | \"securitySolutionUI:network-tls\" | \"securitySolutionUI:response_actions_history\" | \"securitySolutionUI:rules-add\" | \"securitySolutionUI:rules-create\" | \"securitySolutionUI:rules-landing\" | \"securitySolutionUI:threat_intelligence\" | \"securitySolutionUI:timelines\" | \"securitySolutionUI:timelines-templates\" | \"securitySolutionUI:trusted_apps\" | \"securitySolutionUI:users-all\" | \"securitySolutionUI:users-anomalies\" | \"securitySolutionUI:users-authentications\" | \"securitySolutionUI:users-events\" | \"securitySolutionUI:users-risk\" | \"securitySolutionUI:entity_analytics\" | \"securitySolutionUI:entity_analytics-management\" | \"securitySolutionUI:entity_analytics-asset-classification\" | \"securitySolutionUI:coverage-overview\" | \"securitySolutionUI:notes-management\" | \"fleet:settings\" | \"fleet:policies\" | \"fleet:data_streams\" | \"fleet:enrollment_tokens\" | \"fleet:uninstall_tokens\" | \"fleet:agents\"" + "\"fleet\" | \"graph\" | \"ml\" | \"monitoring\" | \"metrics\" | \"management\" | \"synthetics\" | \"ux\" | \"apm\" | \"logs\" | \"profiling\" | \"dashboards\" | \"observabilityAIAssistant\" | \"home\" | \"canvas\" | \"integrations\" | \"discover\" | \"observability-overview\" | \"appSearch\" | \"dev_tools\" | \"maps\" | \"visualize\" | \"dev_tools:console\" | \"dev_tools:searchprofiler\" | \"dev_tools:painless_lab\" | \"dev_tools:grokdebugger\" | \"ml:notifications\" | \"ml:nodes\" | \"ml:overview\" | \"ml:memoryUsage\" | \"ml:settings\" | \"ml:dataVisualizer\" | \"ml:anomalyDetection\" | \"ml:anomalyExplorer\" | \"ml:singleMetricViewer\" | \"ml:dataDrift\" | \"ml:dataFrameAnalytics\" | \"ml:resultExplorer\" | \"ml:analyticsMap\" | \"ml:aiOps\" | \"ml:logRateAnalysis\" | \"ml:logPatternAnalysis\" | \"ml:changePointDetections\" | \"ml:modelManagement\" | \"ml:nodesOverview\" | \"ml:esqlDataVisualizer\" | \"ml:fileUpload\" | \"ml:indexDataVisualizer\" | \"ml:calendarSettings\" | \"ml:filterListsSettings\" | \"osquery\" | \"management:transform\" | \"management:watcher\" | \"management:cases\" | \"management:tags\" | \"management:maintenanceWindows\" | \"management:dataViews\" | \"management:spaces\" | \"management:settings\" | \"management:users\" | \"management:migrate_data\" | \"management:search_sessions\" | \"management:data_quality\" | \"management:filesManagement\" | \"management:roles\" | \"management:reporting\" | \"management:aiAssistantManagementSelection\" | \"management:securityAiAssistantManagement\" | \"management:observabilityAiAssistantManagement\" | \"management:api_keys\" | \"management:cross_cluster_replication\" | \"management:license_management\" | \"management:index_lifecycle_management\" | \"management:index_management\" | \"management:ingest_pipelines\" | \"management:jobsListLink\" | \"management:objects\" | \"management:pipelines\" | \"management:remote_clusters\" | \"management:role_mappings\" | \"management:rollup_jobs\" | \"management:snapshot_restore\" | \"management:triggersActions\" | \"management:triggersActionsConnectors\" | \"management:upgrade_assistant\" | \"enterpriseSearch\" | \"enterpriseSearchContent\" | \"enterpriseSearchApplications\" | \"enterpriseSearchAnalytics\" | \"workplaceSearch\" | \"serverlessElasticsearch\" | \"serverlessConnectors\" | \"searchPlayground\" | \"searchInferenceEndpoints\" | \"searchHomepage\" | \"enterpriseSearchContent:connectors\" | \"enterpriseSearchContent:searchIndices\" | \"enterpriseSearchContent:webCrawlers\" | \"enterpriseSearchApplications:searchApplications\" | \"enterpriseSearchApplications:playground\" | \"appSearch:engines\" | \"observability-logs-explorer\" | \"observabilityOnboarding\" | \"slo\" | \"logs:settings\" | \"logs:stream\" | \"logs:log-categories\" | \"logs:anomalies\" | \"observability-overview:cases\" | \"observability-overview:alerts\" | \"observability-overview:rules\" | \"observability-overview:cases_create\" | \"observability-overview:cases_configure\" | \"metrics:settings\" | \"metrics:hosts\" | \"metrics:inventory\" | \"metrics:metrics-explorer\" | \"metrics:assetDetails\" | \"apm:traces\" | \"apm:dependencies\" | \"apm:service-map\" | \"apm:settings\" | \"apm:services\" | \"apm:service-groups-list\" | \"apm:storage-explorer\" | \"synthetics:overview\" | \"synthetics:certificates\" | \"profiling:stacktraces\" | \"profiling:flamegraphs\" | \"profiling:functions\" | \"securitySolutionUI\" | \"securitySolutionUI:\" | \"securitySolutionUI:cases\" | \"securitySolutionUI:alerts\" | \"securitySolutionUI:rules\" | \"securitySolutionUI:policy\" | \"securitySolutionUI:overview\" | \"securitySolutionUI:dashboards\" | \"securitySolutionUI:cases_create\" | \"securitySolutionUI:cases_configure\" | \"securitySolutionUI:hosts\" | \"securitySolutionUI:users\" | \"securitySolutionUI:cloud_defend-policies\" | \"securitySolutionUI:cloud_security_posture-dashboard\" | \"securitySolutionUI:cloud_security_posture-findings\" | \"securitySolutionUI:cloud_security_posture-benchmarks\" | \"securitySolutionUI:kubernetes\" | \"securitySolutionUI:network\" | \"securitySolutionUI:data_quality\" | \"securitySolutionUI:explore\" | \"securitySolutionUI:assets\" | \"securitySolutionUI:cloud_defend\" | \"securitySolutionUI:administration\" | \"securitySolutionUI:attack_discovery\" | \"securitySolutionUI:blocklist\" | \"securitySolutionUI:cloud_security_posture-rules\" | \"securitySolutionUI:detections\" | \"securitySolutionUI:detection_response\" | \"securitySolutionUI:endpoints\" | \"securitySolutionUI:event_filters\" | \"securitySolutionUI:exceptions\" | \"securitySolutionUI:host_isolation_exceptions\" | \"securitySolutionUI:hosts-all\" | \"securitySolutionUI:hosts-anomalies\" | \"securitySolutionUI:hosts-risk\" | \"securitySolutionUI:hosts-events\" | \"securitySolutionUI:hosts-sessions\" | \"securitySolutionUI:hosts-uncommon_processes\" | \"securitySolutionUI:investigations\" | \"securitySolutionUI:get_started\" | \"securitySolutionUI:machine_learning-landing\" | \"securitySolutionUI:network-anomalies\" | \"securitySolutionUI:network-dns\" | \"securitySolutionUI:network-events\" | \"securitySolutionUI:network-flows\" | \"securitySolutionUI:network-http\" | \"securitySolutionUI:network-tls\" | \"securitySolutionUI:response_actions_history\" | \"securitySolutionUI:rules-add\" | \"securitySolutionUI:rules-create\" | \"securitySolutionUI:rules-landing\" | \"securitySolutionUI:threat_intelligence\" | \"securitySolutionUI:timelines\" | \"securitySolutionUI:timelines-templates\" | \"securitySolutionUI:trusted_apps\" | \"securitySolutionUI:users-all\" | \"securitySolutionUI:users-anomalies\" | \"securitySolutionUI:users-authentications\" | \"securitySolutionUI:users-events\" | \"securitySolutionUI:users-risk\" | \"securitySolutionUI:entity_analytics\" | \"securitySolutionUI:entity_analytics-management\" | \"securitySolutionUI:entity_analytics-asset-classification\" | \"securitySolutionUI:coverage-overview\" | \"securitySolutionUI:notes-management\" | \"fleet:settings\" | \"fleet:policies\" | \"fleet:data_streams\" | \"fleet:enrollment_tokens\" | \"fleet:uninstall_tokens\" | \"fleet:agents\"" ], "path": "packages/core/chrome/core-chrome-browser/src/project_navigation.ts", "deprecated": false, diff --git a/api_docs/kbn_core_chrome_browser.mdx b/api_docs/kbn_core_chrome_browser.mdx index c852726988a8d..cc491c019aba1 100644 --- a/api_docs/kbn_core_chrome_browser.mdx +++ b/api_docs/kbn_core_chrome_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser title: "@kbn/core-chrome-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-chrome-browser plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser'] --- import kbnCoreChromeBrowserObj from './kbn_core_chrome_browser.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser_mocks.mdx b/api_docs/kbn_core_chrome_browser_mocks.mdx index a9c10a2e94a52..36f861e8f290c 100644 --- a/api_docs/kbn_core_chrome_browser_mocks.mdx +++ b/api_docs/kbn_core_chrome_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser-mocks title: "@kbn/core-chrome-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-chrome-browser-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser-mocks'] --- import kbnCoreChromeBrowserMocksObj from './kbn_core_chrome_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_config_server_internal.mdx b/api_docs/kbn_core_config_server_internal.mdx index f60cf806bf76d..77f24bef6447c 100644 --- a/api_docs/kbn_core_config_server_internal.mdx +++ b/api_docs/kbn_core_config_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-config-server-internal title: "@kbn/core-config-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-config-server-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-config-server-internal'] --- import kbnCoreConfigServerInternalObj from './kbn_core_config_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser.mdx b/api_docs/kbn_core_custom_branding_browser.mdx index 548c59469ba1c..ca9d7622dea7c 100644 --- a/api_docs/kbn_core_custom_branding_browser.mdx +++ b/api_docs/kbn_core_custom_branding_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser title: "@kbn/core-custom-branding-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser'] --- import kbnCoreCustomBrandingBrowserObj from './kbn_core_custom_branding_browser.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser_internal.mdx b/api_docs/kbn_core_custom_branding_browser_internal.mdx index 8b8675596c4b5..93fa1fa1738bb 100644 --- a/api_docs/kbn_core_custom_branding_browser_internal.mdx +++ b/api_docs/kbn_core_custom_branding_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser-internal title: "@kbn/core-custom-branding-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser-internal'] --- import kbnCoreCustomBrandingBrowserInternalObj from './kbn_core_custom_branding_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser_mocks.mdx b/api_docs/kbn_core_custom_branding_browser_mocks.mdx index 692306ccbd0cc..86dd0afb1d1c1 100644 --- a/api_docs/kbn_core_custom_branding_browser_mocks.mdx +++ b/api_docs/kbn_core_custom_branding_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser-mocks title: "@kbn/core-custom-branding-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser-mocks'] --- import kbnCoreCustomBrandingBrowserMocksObj from './kbn_core_custom_branding_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_common.mdx b/api_docs/kbn_core_custom_branding_common.mdx index be26184d780b5..b918cd55c852c 100644 --- a/api_docs/kbn_core_custom_branding_common.mdx +++ b/api_docs/kbn_core_custom_branding_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-common title: "@kbn/core-custom-branding-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-common plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-common'] --- import kbnCoreCustomBrandingCommonObj from './kbn_core_custom_branding_common.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server.mdx b/api_docs/kbn_core_custom_branding_server.mdx index 459c71e178ee8..0b119caa988de 100644 --- a/api_docs/kbn_core_custom_branding_server.mdx +++ b/api_docs/kbn_core_custom_branding_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server title: "@kbn/core-custom-branding-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server'] --- import kbnCoreCustomBrandingServerObj from './kbn_core_custom_branding_server.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server_internal.mdx b/api_docs/kbn_core_custom_branding_server_internal.mdx index 90c2244b64c39..d9d9930d3e1c3 100644 --- a/api_docs/kbn_core_custom_branding_server_internal.mdx +++ b/api_docs/kbn_core_custom_branding_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server-internal title: "@kbn/core-custom-branding-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server-internal'] --- import kbnCoreCustomBrandingServerInternalObj from './kbn_core_custom_branding_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server_mocks.mdx b/api_docs/kbn_core_custom_branding_server_mocks.mdx index f8f6810666b14..682e7df92ac05 100644 --- a/api_docs/kbn_core_custom_branding_server_mocks.mdx +++ b/api_docs/kbn_core_custom_branding_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server-mocks title: "@kbn/core-custom-branding-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server-mocks'] --- import kbnCoreCustomBrandingServerMocksObj from './kbn_core_custom_branding_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser.mdx b/api_docs/kbn_core_deprecations_browser.mdx index 84aaef0fcca3a..87bfe845ed8a5 100644 --- a/api_docs/kbn_core_deprecations_browser.mdx +++ b/api_docs/kbn_core_deprecations_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser title: "@kbn/core-deprecations-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser'] --- import kbnCoreDeprecationsBrowserObj from './kbn_core_deprecations_browser.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser_internal.mdx b/api_docs/kbn_core_deprecations_browser_internal.mdx index f5c8f85e0c2be..692f26c824f9a 100644 --- a/api_docs/kbn_core_deprecations_browser_internal.mdx +++ b/api_docs/kbn_core_deprecations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-internal title: "@kbn/core-deprecations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-internal'] --- import kbnCoreDeprecationsBrowserInternalObj from './kbn_core_deprecations_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser_mocks.mdx b/api_docs/kbn_core_deprecations_browser_mocks.mdx index 6f5cb75b57720..3c8d6f71dae93 100644 --- a/api_docs/kbn_core_deprecations_browser_mocks.mdx +++ b/api_docs/kbn_core_deprecations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-mocks title: "@kbn/core-deprecations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-mocks'] --- import kbnCoreDeprecationsBrowserMocksObj from './kbn_core_deprecations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_common.mdx b/api_docs/kbn_core_deprecations_common.mdx index a7d7bcb3e2a50..7eab3b85e08a6 100644 --- a/api_docs/kbn_core_deprecations_common.mdx +++ b/api_docs/kbn_core_deprecations_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-common title: "@kbn/core-deprecations-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-common plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-common'] --- import kbnCoreDeprecationsCommonObj from './kbn_core_deprecations_common.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server.mdx b/api_docs/kbn_core_deprecations_server.mdx index 61bd4256f7e4c..393601988a4fb 100644 --- a/api_docs/kbn_core_deprecations_server.mdx +++ b/api_docs/kbn_core_deprecations_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server title: "@kbn/core-deprecations-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server'] --- import kbnCoreDeprecationsServerObj from './kbn_core_deprecations_server.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server_internal.mdx b/api_docs/kbn_core_deprecations_server_internal.mdx index 760998fc7997c..a1ec20f6dea34 100644 --- a/api_docs/kbn_core_deprecations_server_internal.mdx +++ b/api_docs/kbn_core_deprecations_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-internal title: "@kbn/core-deprecations-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server-internal'] --- import kbnCoreDeprecationsServerInternalObj from './kbn_core_deprecations_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server_mocks.mdx b/api_docs/kbn_core_deprecations_server_mocks.mdx index beadd29d8e7f9..4ea98940f62de 100644 --- a/api_docs/kbn_core_deprecations_server_mocks.mdx +++ b/api_docs/kbn_core_deprecations_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-mocks title: "@kbn/core-deprecations-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server-mocks'] --- import kbnCoreDeprecationsServerMocksObj from './kbn_core_deprecations_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_browser.mdx b/api_docs/kbn_core_doc_links_browser.mdx index 38998a00cd30a..8e9eebd373ca5 100644 --- a/api_docs/kbn_core_doc_links_browser.mdx +++ b/api_docs/kbn_core_doc_links_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser title: "@kbn/core-doc-links-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser'] --- import kbnCoreDocLinksBrowserObj from './kbn_core_doc_links_browser.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_browser_mocks.mdx b/api_docs/kbn_core_doc_links_browser_mocks.mdx index 9efd142ca976d..be3d8ff853592 100644 --- a/api_docs/kbn_core_doc_links_browser_mocks.mdx +++ b/api_docs/kbn_core_doc_links_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser-mocks title: "@kbn/core-doc-links-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser-mocks'] --- import kbnCoreDocLinksBrowserMocksObj from './kbn_core_doc_links_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_server.mdx b/api_docs/kbn_core_doc_links_server.mdx index e9ba29b927c52..8dd6a909deebf 100644 --- a/api_docs/kbn_core_doc_links_server.mdx +++ b/api_docs/kbn_core_doc_links_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server title: "@kbn/core-doc-links-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server'] --- import kbnCoreDocLinksServerObj from './kbn_core_doc_links_server.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_server_mocks.mdx b/api_docs/kbn_core_doc_links_server_mocks.mdx index d64a418894c1b..404d3af7c1bcf 100644 --- a/api_docs/kbn_core_doc_links_server_mocks.mdx +++ b/api_docs/kbn_core_doc_links_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server-mocks title: "@kbn/core-doc-links-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server-mocks'] --- import kbnCoreDocLinksServerMocksObj from './kbn_core_doc_links_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx index 2e24832d969b4..3c2a79385f024 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-internal title: "@kbn/core-elasticsearch-client-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-internal'] --- import kbnCoreElasticsearchClientServerInternalObj from './kbn_core_elasticsearch_client_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx index a407aa47dbd69..77db2b96231cd 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-mocks title: "@kbn/core-elasticsearch-client-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-mocks'] --- import kbnCoreElasticsearchClientServerMocksObj from './kbn_core_elasticsearch_client_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server.mdx b/api_docs/kbn_core_elasticsearch_server.mdx index d64ec1c6a8eef..8dc8cd2a5d992 100644 --- a/api_docs/kbn_core_elasticsearch_server.mdx +++ b/api_docs/kbn_core_elasticsearch_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server title: "@kbn/core-elasticsearch-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server'] --- import kbnCoreElasticsearchServerObj from './kbn_core_elasticsearch_server.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server_internal.mdx b/api_docs/kbn_core_elasticsearch_server_internal.mdx index 72f0d8605121d..e782734a07c44 100644 --- a/api_docs/kbn_core_elasticsearch_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-internal title: "@kbn/core-elasticsearch-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-internal'] --- import kbnCoreElasticsearchServerInternalObj from './kbn_core_elasticsearch_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_server_mocks.mdx index b251eee63ad6e..7b24de5b3175f 100644 --- a/api_docs/kbn_core_elasticsearch_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-mocks title: "@kbn/core-elasticsearch-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-mocks'] --- import kbnCoreElasticsearchServerMocksObj from './kbn_core_elasticsearch_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_environment_server_internal.mdx b/api_docs/kbn_core_environment_server_internal.mdx index 9460e4326a055..06d67e52a454d 100644 --- a/api_docs/kbn_core_environment_server_internal.mdx +++ b/api_docs/kbn_core_environment_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-internal title: "@kbn/core-environment-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-internal'] --- import kbnCoreEnvironmentServerInternalObj from './kbn_core_environment_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_environment_server_mocks.mdx b/api_docs/kbn_core_environment_server_mocks.mdx index 85c9a3a92c220..5e18b7448830c 100644 --- a/api_docs/kbn_core_environment_server_mocks.mdx +++ b/api_docs/kbn_core_environment_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-mocks title: "@kbn/core-environment-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-mocks'] --- import kbnCoreEnvironmentServerMocksObj from './kbn_core_environment_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser.mdx b/api_docs/kbn_core_execution_context_browser.mdx index 2200a3f8ad9aa..537121b63227f 100644 --- a/api_docs/kbn_core_execution_context_browser.mdx +++ b/api_docs/kbn_core_execution_context_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser title: "@kbn/core-execution-context-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser'] --- import kbnCoreExecutionContextBrowserObj from './kbn_core_execution_context_browser.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser_internal.mdx b/api_docs/kbn_core_execution_context_browser_internal.mdx index 14fe14dbdad8b..fe415ffcbab88 100644 --- a/api_docs/kbn_core_execution_context_browser_internal.mdx +++ b/api_docs/kbn_core_execution_context_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-internal title: "@kbn/core-execution-context-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-internal'] --- import kbnCoreExecutionContextBrowserInternalObj from './kbn_core_execution_context_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser_mocks.mdx b/api_docs/kbn_core_execution_context_browser_mocks.mdx index f278552ad568a..f4591facf28a7 100644 --- a/api_docs/kbn_core_execution_context_browser_mocks.mdx +++ b/api_docs/kbn_core_execution_context_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-mocks title: "@kbn/core-execution-context-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-mocks'] --- import kbnCoreExecutionContextBrowserMocksObj from './kbn_core_execution_context_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_common.mdx b/api_docs/kbn_core_execution_context_common.mdx index 4882c7bd76b45..93be08d999e7a 100644 --- a/api_docs/kbn_core_execution_context_common.mdx +++ b/api_docs/kbn_core_execution_context_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-common title: "@kbn/core-execution-context-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-common plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-common'] --- import kbnCoreExecutionContextCommonObj from './kbn_core_execution_context_common.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server.mdx b/api_docs/kbn_core_execution_context_server.mdx index bf70df92639f8..57ff81eb21e59 100644 --- a/api_docs/kbn_core_execution_context_server.mdx +++ b/api_docs/kbn_core_execution_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server title: "@kbn/core-execution-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server'] --- import kbnCoreExecutionContextServerObj from './kbn_core_execution_context_server.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server_internal.mdx b/api_docs/kbn_core_execution_context_server_internal.mdx index 44499d96d010f..37ab5fb5de569 100644 --- a/api_docs/kbn_core_execution_context_server_internal.mdx +++ b/api_docs/kbn_core_execution_context_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-internal title: "@kbn/core-execution-context-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-internal'] --- import kbnCoreExecutionContextServerInternalObj from './kbn_core_execution_context_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server_mocks.mdx b/api_docs/kbn_core_execution_context_server_mocks.mdx index c62dec50cdea2..b1f6519a784aa 100644 --- a/api_docs/kbn_core_execution_context_server_mocks.mdx +++ b/api_docs/kbn_core_execution_context_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-mocks title: "@kbn/core-execution-context-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-mocks'] --- import kbnCoreExecutionContextServerMocksObj from './kbn_core_execution_context_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_fatal_errors_browser.mdx b/api_docs/kbn_core_fatal_errors_browser.mdx index 6643a08ca65c7..72390e3ca7c26 100644 --- a/api_docs/kbn_core_fatal_errors_browser.mdx +++ b/api_docs/kbn_core_fatal_errors_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser title: "@kbn/core-fatal-errors-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser'] --- import kbnCoreFatalErrorsBrowserObj from './kbn_core_fatal_errors_browser.devdocs.json'; diff --git a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx index 8e0a49b2db953..b3b1a6bd42143 100644 --- a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx +++ b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser-mocks title: "@kbn/core-fatal-errors-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser-mocks'] --- import kbnCoreFatalErrorsBrowserMocksObj from './kbn_core_fatal_errors_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser.mdx b/api_docs/kbn_core_http_browser.mdx index 39acb51bc343d..6efe96284f238 100644 --- a/api_docs/kbn_core_http_browser.mdx +++ b/api_docs/kbn_core_http_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser title: "@kbn/core-http-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser'] --- import kbnCoreHttpBrowserObj from './kbn_core_http_browser.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser_internal.mdx b/api_docs/kbn_core_http_browser_internal.mdx index 277104e40ad87..5d7b9b063f6dd 100644 --- a/api_docs/kbn_core_http_browser_internal.mdx +++ b/api_docs/kbn_core_http_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-internal title: "@kbn/core-http-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-internal'] --- import kbnCoreHttpBrowserInternalObj from './kbn_core_http_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser_mocks.mdx b/api_docs/kbn_core_http_browser_mocks.mdx index a5b8f7aa1538f..94407d79f37c8 100644 --- a/api_docs/kbn_core_http_browser_mocks.mdx +++ b/api_docs/kbn_core_http_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-mocks title: "@kbn/core-http-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-mocks'] --- import kbnCoreHttpBrowserMocksObj from './kbn_core_http_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_common.mdx b/api_docs/kbn_core_http_common.mdx index 73bb3c9b78d5b..48d1c8d148c13 100644 --- a/api_docs/kbn_core_http_common.mdx +++ b/api_docs/kbn_core_http_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-common title: "@kbn/core-http-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-common plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-common'] --- import kbnCoreHttpCommonObj from './kbn_core_http_common.devdocs.json'; diff --git a/api_docs/kbn_core_http_context_server_mocks.mdx b/api_docs/kbn_core_http_context_server_mocks.mdx index aaa958a4a4bd1..8eff63b4f78b6 100644 --- a/api_docs/kbn_core_http_context_server_mocks.mdx +++ b/api_docs/kbn_core_http_context_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-context-server-mocks title: "@kbn/core-http-context-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-context-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-context-server-mocks'] --- import kbnCoreHttpContextServerMocksObj from './kbn_core_http_context_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_request_handler_context_server.mdx b/api_docs/kbn_core_http_request_handler_context_server.mdx index 4de22b339c6cf..7b7ffefb0d4fc 100644 --- a/api_docs/kbn_core_http_request_handler_context_server.mdx +++ b/api_docs/kbn_core_http_request_handler_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-request-handler-context-server title: "@kbn/core-http-request-handler-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-request-handler-context-server plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-request-handler-context-server'] --- import kbnCoreHttpRequestHandlerContextServerObj from './kbn_core_http_request_handler_context_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server.mdx b/api_docs/kbn_core_http_resources_server.mdx index 60ccd1c74b590..9d812e276c384 100644 --- a/api_docs/kbn_core_http_resources_server.mdx +++ b/api_docs/kbn_core_http_resources_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server title: "@kbn/core-http-resources-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server'] --- import kbnCoreHttpResourcesServerObj from './kbn_core_http_resources_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server_internal.mdx b/api_docs/kbn_core_http_resources_server_internal.mdx index 2d2c7df9e7a3b..cb161e3cb7441 100644 --- a/api_docs/kbn_core_http_resources_server_internal.mdx +++ b/api_docs/kbn_core_http_resources_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-internal title: "@kbn/core-http-resources-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server-internal'] --- import kbnCoreHttpResourcesServerInternalObj from './kbn_core_http_resources_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server_mocks.mdx b/api_docs/kbn_core_http_resources_server_mocks.mdx index 1cea9ff37db60..e684b2561f512 100644 --- a/api_docs/kbn_core_http_resources_server_mocks.mdx +++ b/api_docs/kbn_core_http_resources_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-mocks title: "@kbn/core-http-resources-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server-mocks'] --- import kbnCoreHttpResourcesServerMocksObj from './kbn_core_http_resources_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_router_server_internal.mdx b/api_docs/kbn_core_http_router_server_internal.mdx index 335ac7888b1be..8be49f2e2b76b 100644 --- a/api_docs/kbn_core_http_router_server_internal.mdx +++ b/api_docs/kbn_core_http_router_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-internal title: "@kbn/core-http-router-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-router-server-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-internal'] --- import kbnCoreHttpRouterServerInternalObj from './kbn_core_http_router_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_router_server_mocks.mdx b/api_docs/kbn_core_http_router_server_mocks.mdx index d3d46e9eec4b2..adee82951406c 100644 --- a/api_docs/kbn_core_http_router_server_mocks.mdx +++ b/api_docs/kbn_core_http_router_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-mocks title: "@kbn/core-http-router-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-router-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-mocks'] --- import kbnCoreHttpRouterServerMocksObj from './kbn_core_http_router_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_server.devdocs.json b/api_docs/kbn_core_http_server.devdocs.json index ec187c7f4458f..f0d1328317f97 100644 --- a/api_docs/kbn_core_http_server.devdocs.json +++ b/api_docs/kbn_core_http_server.devdocs.json @@ -6484,6 +6484,10 @@ "plugin": "alerting", "path": "x-pack/plugins/alerting/server/routes/backfill/apis/find/find_backfill_route.ts" }, + { + "plugin": "ruleRegistry", + "path": "x-pack/plugins/rule_registry/server/routes/get_alerts_group_aggregations.ts" + }, { "plugin": "ruleRegistry", "path": "x-pack/plugins/rule_registry/server/routes/update_alert_by_id.ts" @@ -14830,6 +14834,10 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/routes/privileges.ts" }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/entity_analytics/asset_criticality/routes/list.ts" + }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/server/lib/entity_analytics/risk_engine/routes/status.ts" diff --git a/api_docs/kbn_core_http_server.mdx b/api_docs/kbn_core_http_server.mdx index 26f6199a11262..144fb8b28b5f2 100644 --- a/api_docs/kbn_core_http_server.mdx +++ b/api_docs/kbn_core_http_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server title: "@kbn/core-http-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server'] --- import kbnCoreHttpServerObj from './kbn_core_http_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_server_internal.devdocs.json b/api_docs/kbn_core_http_server_internal.devdocs.json index e27b8b2b2a987..db84770e5f81f 100644 --- a/api_docs/kbn_core_http_server_internal.devdocs.json +++ b/api_docs/kbn_core_http_server_internal.devdocs.json @@ -1463,7 +1463,7 @@ "label": "HttpConfigType", "description": [], "signature": [ - "{ readonly uuid?: string | undefined; readonly basePath?: string | undefined; readonly publicBaseUrl?: string | undefined; readonly name: string; readonly ssl: Readonly<{ key?: string | undefined; certificateAuthorities?: string | string[] | undefined; certificate?: string | undefined; keyPassphrase?: string | undefined; redirectHttpFromPort?: number | undefined; } & { enabled: boolean; keystore: Readonly<{ password?: string | undefined; path?: string | undefined; } & {}>; truststore: Readonly<{ password?: string | undefined; path?: string | undefined; } & {}>; cipherSuites: string[]; supportedProtocols: string[]; clientAuthentication: \"none\" | \"optional\" | \"required\"; }>; readonly host: string; readonly http2: Readonly<{} & { allowUnsecure: boolean; }>; readonly protocol: \"http1\" | \"http2\"; readonly port: number; readonly compression: Readonly<{ referrerWhitelist?: string[] | undefined; } & { enabled: boolean; brotli: Readonly<{} & { enabled: boolean; quality: number; }>; }>; readonly cors: Readonly<{} & { enabled: boolean; allowCredentials: boolean; allowOrigin: string[] | \"*\"[]; }>; readonly versioned: Readonly<{} & { useVersionResolutionStrategyForInternalPaths: string[]; versionResolution: \"none\" | \"oldest\" | \"newest\"; strictClientVersionCheck: boolean; }>; readonly autoListen: boolean; readonly shutdownTimeout: moment.Duration; readonly cdn: Readonly<{ url?: string | null | undefined; } & {}>; readonly oas: Readonly<{} & { enabled: boolean; }>; readonly securityResponseHeaders: Readonly<{} & { referrerPolicy: \"origin\" | \"no-referrer\" | \"no-referrer-when-downgrade\" | \"origin-when-cross-origin\" | \"same-origin\" | \"strict-origin\" | \"strict-origin-when-cross-origin\" | \"unsafe-url\" | null; strictTransportSecurity: string | null; xContentTypeOptions: \"nosniff\" | null; permissionsPolicy: string | null; disableEmbedding: boolean; crossOriginOpenerPolicy: \"same-origin\" | \"unsafe-none\" | \"same-origin-allow-popups\" | null; }>; readonly customResponseHeaders: Record; readonly maxPayload: ", + "{ readonly uuid?: string | undefined; readonly basePath?: string | undefined; readonly publicBaseUrl?: string | undefined; readonly name: string; readonly ssl: Readonly<{ key?: string | undefined; certificateAuthorities?: string | string[] | undefined; certificate?: string | undefined; keyPassphrase?: string | undefined; redirectHttpFromPort?: number | undefined; } & { enabled: boolean; keystore: Readonly<{ password?: string | undefined; path?: string | undefined; } & {}>; truststore: Readonly<{ password?: string | undefined; path?: string | undefined; } & {}>; cipherSuites: string[]; supportedProtocols: string[]; clientAuthentication: \"none\" | \"optional\" | \"required\"; }>; readonly host: string; readonly http2: Readonly<{} & { allowUnsecure: boolean; }>; readonly protocol: \"http1\" | \"http2\"; readonly port: number; readonly compression: Readonly<{ referrerWhitelist?: string[] | undefined; } & { enabled: boolean; brotli: Readonly<{} & { enabled: boolean; quality: number; }>; }>; readonly cors: Readonly<{} & { enabled: boolean; allowCredentials: boolean; allowOrigin: string[] | \"*\"[]; }>; readonly versioned: Readonly<{} & { useVersionResolutionStrategyForInternalPaths: string[]; versionResolution: \"none\" | \"oldest\" | \"newest\"; strictClientVersionCheck: boolean; }>; readonly autoListen: boolean; readonly shutdownTimeout: moment.Duration; readonly cdn: Readonly<{ url?: string | null | undefined; } & {}>; readonly oas: Readonly<{} & { enabled: boolean; }>; readonly securityResponseHeaders: Readonly<{ permissionsPolicyReportOnly?: string | null | undefined; } & { referrerPolicy: \"origin\" | \"no-referrer\" | \"no-referrer-when-downgrade\" | \"origin-when-cross-origin\" | \"same-origin\" | \"strict-origin\" | \"strict-origin-when-cross-origin\" | \"unsafe-url\" | null; strictTransportSecurity: string | null; xContentTypeOptions: \"nosniff\" | null; permissionsPolicy: string | null; disableEmbedding: boolean; crossOriginOpenerPolicy: \"same-origin\" | \"unsafe-none\" | \"same-origin-allow-popups\" | null; }>; readonly customResponseHeaders: Record; readonly maxPayload: ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -1717,6 +1717,60 @@ } ], "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-common.permissionsPolicyConfig", + "type": "Object", + "tags": [], + "label": "permissionsPolicyConfig", + "description": [], + "path": "packages/core/http/core-http-server-internal/src/permissions_policy/config.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-common.permissionsPolicyConfig.path", + "type": "string", + "tags": [], + "label": "path", + "description": [], + "path": "packages/core/http/core-http-server-internal/src/permissions_policy/config.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-common.permissionsPolicyConfig.schema", + "type": "Object", + "tags": [], + "label": "schema", + "description": [], + "signature": [ + { + "pluginId": "@kbn/config-schema", + "scope": "common", + "docId": "kibKbnConfigSchemaPluginApi", + "section": "def-common.ObjectType", + "text": "ObjectType" + }, + "<{ report_to: ", + { + "pluginId": "@kbn/config-schema", + "scope": "common", + "docId": "kibKbnConfigSchemaPluginApi", + "section": "def-common.Type", + "text": "Type" + }, + "; }>" + ], + "path": "packages/core/http/core-http-server-internal/src/permissions_policy/config.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false } ] } diff --git a/api_docs/kbn_core_http_server_internal.mdx b/api_docs/kbn_core_http_server_internal.mdx index 263528b3d81b0..bed9073ad7656 100644 --- a/api_docs/kbn_core_http_server_internal.mdx +++ b/api_docs/kbn_core_http_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-internal title: "@kbn/core-http-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-internal'] --- import kbnCoreHttpServerInternalObj from './kbn_core_http_server_internal.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 92 | 0 | 79 | 10 | +| 95 | 0 | 82 | 10 | ## Common diff --git a/api_docs/kbn_core_http_server_mocks.devdocs.json b/api_docs/kbn_core_http_server_mocks.devdocs.json index 765ba95d4de08..142e3ae6eba5b 100644 --- a/api_docs/kbn_core_http_server_mocks.devdocs.json +++ b/api_docs/kbn_core_http_server_mocks.devdocs.json @@ -27,7 +27,7 @@ "label": "createConfigService", "description": [], "signature": [ - "({ server, externalUrl, csp, }?: Partial<{ server: Partial; truststore: Readonly<{ password?: string | undefined; path?: string | undefined; } & {}>; cipherSuites: string[]; supportedProtocols: string[]; clientAuthentication: \"none\" | \"optional\" | \"required\"; }>; host: string; http2: Readonly<{} & { allowUnsecure: boolean; }>; protocol: \"http1\" | \"http2\"; port: number; compression: Readonly<{ referrerWhitelist?: string[] | undefined; } & { enabled: boolean; brotli: Readonly<{} & { enabled: boolean; quality: number; }>; }>; cors: Readonly<{} & { enabled: boolean; allowCredentials: boolean; allowOrigin: string[] | \"*\"[]; }>; versioned: Readonly<{} & { useVersionResolutionStrategyForInternalPaths: string[]; versionResolution: \"none\" | \"oldest\" | \"newest\"; strictClientVersionCheck: boolean; }>; autoListen: boolean; shutdownTimeout: moment.Duration; cdn: Readonly<{ url?: string | null | undefined; } & {}>; oas: Readonly<{} & { enabled: boolean; }>; securityResponseHeaders: Readonly<{} & { referrerPolicy: \"origin\" | \"no-referrer\" | \"no-referrer-when-downgrade\" | \"origin-when-cross-origin\" | \"same-origin\" | \"strict-origin\" | \"strict-origin-when-cross-origin\" | \"unsafe-url\" | null; strictTransportSecurity: string | null; xContentTypeOptions: \"nosniff\" | null; permissionsPolicy: string | null; disableEmbedding: boolean; crossOriginOpenerPolicy: \"same-origin\" | \"unsafe-none\" | \"same-origin-allow-popups\" | null; }>; customResponseHeaders: Record; maxPayload: ", + "({ server, externalUrl, csp, }?: Partial<{ server: Partial; truststore: Readonly<{ password?: string | undefined; path?: string | undefined; } & {}>; cipherSuites: string[]; supportedProtocols: string[]; clientAuthentication: \"none\" | \"optional\" | \"required\"; }>; host: string; http2: Readonly<{} & { allowUnsecure: boolean; }>; protocol: \"http1\" | \"http2\"; port: number; compression: Readonly<{ referrerWhitelist?: string[] | undefined; } & { enabled: boolean; brotli: Readonly<{} & { enabled: boolean; quality: number; }>; }>; cors: Readonly<{} & { enabled: boolean; allowCredentials: boolean; allowOrigin: string[] | \"*\"[]; }>; versioned: Readonly<{} & { useVersionResolutionStrategyForInternalPaths: string[]; versionResolution: \"none\" | \"oldest\" | \"newest\"; strictClientVersionCheck: boolean; }>; autoListen: boolean; shutdownTimeout: moment.Duration; cdn: Readonly<{ url?: string | null | undefined; } & {}>; oas: Readonly<{} & { enabled: boolean; }>; securityResponseHeaders: Readonly<{ permissionsPolicyReportOnly?: string | null | undefined; } & { referrerPolicy: \"origin\" | \"no-referrer\" | \"no-referrer-when-downgrade\" | \"origin-when-cross-origin\" | \"same-origin\" | \"strict-origin\" | \"strict-origin-when-cross-origin\" | \"unsafe-url\" | null; strictTransportSecurity: string | null; xContentTypeOptions: \"nosniff\" | null; permissionsPolicy: string | null; disableEmbedding: boolean; crossOriginOpenerPolicy: \"same-origin\" | \"unsafe-none\" | \"same-origin-allow-popups\" | null; }>; customResponseHeaders: Record; maxPayload: ", { "pluginId": "@kbn/config-schema", "scope": "common", @@ -64,7 +64,7 @@ "label": "{\n server,\n externalUrl,\n csp,\n}", "description": [], "signature": [ - "Partial<{ server: Partial; truststore: Readonly<{ password?: string | undefined; path?: string | undefined; } & {}>; cipherSuites: string[]; supportedProtocols: string[]; clientAuthentication: \"none\" | \"optional\" | \"required\"; }>; host: string; http2: Readonly<{} & { allowUnsecure: boolean; }>; protocol: \"http1\" | \"http2\"; port: number; compression: Readonly<{ referrerWhitelist?: string[] | undefined; } & { enabled: boolean; brotli: Readonly<{} & { enabled: boolean; quality: number; }>; }>; cors: Readonly<{} & { enabled: boolean; allowCredentials: boolean; allowOrigin: string[] | \"*\"[]; }>; versioned: Readonly<{} & { useVersionResolutionStrategyForInternalPaths: string[]; versionResolution: \"none\" | \"oldest\" | \"newest\"; strictClientVersionCheck: boolean; }>; autoListen: boolean; shutdownTimeout: moment.Duration; cdn: Readonly<{ url?: string | null | undefined; } & {}>; oas: Readonly<{} & { enabled: boolean; }>; securityResponseHeaders: Readonly<{} & { referrerPolicy: \"origin\" | \"no-referrer\" | \"no-referrer-when-downgrade\" | \"origin-when-cross-origin\" | \"same-origin\" | \"strict-origin\" | \"strict-origin-when-cross-origin\" | \"unsafe-url\" | null; strictTransportSecurity: string | null; xContentTypeOptions: \"nosniff\" | null; permissionsPolicy: string | null; disableEmbedding: boolean; crossOriginOpenerPolicy: \"same-origin\" | \"unsafe-none\" | \"same-origin-allow-popups\" | null; }>; customResponseHeaders: Record; maxPayload: ", + "Partial<{ server: Partial; truststore: Readonly<{ password?: string | undefined; path?: string | undefined; } & {}>; cipherSuites: string[]; supportedProtocols: string[]; clientAuthentication: \"none\" | \"optional\" | \"required\"; }>; host: string; http2: Readonly<{} & { allowUnsecure: boolean; }>; protocol: \"http1\" | \"http2\"; port: number; compression: Readonly<{ referrerWhitelist?: string[] | undefined; } & { enabled: boolean; brotli: Readonly<{} & { enabled: boolean; quality: number; }>; }>; cors: Readonly<{} & { enabled: boolean; allowCredentials: boolean; allowOrigin: string[] | \"*\"[]; }>; versioned: Readonly<{} & { useVersionResolutionStrategyForInternalPaths: string[]; versionResolution: \"none\" | \"oldest\" | \"newest\"; strictClientVersionCheck: boolean; }>; autoListen: boolean; shutdownTimeout: moment.Duration; cdn: Readonly<{ url?: string | null | undefined; } & {}>; oas: Readonly<{} & { enabled: boolean; }>; securityResponseHeaders: Readonly<{ permissionsPolicyReportOnly?: string | null | undefined; } & { referrerPolicy: \"origin\" | \"no-referrer\" | \"no-referrer-when-downgrade\" | \"origin-when-cross-origin\" | \"same-origin\" | \"strict-origin\" | \"strict-origin-when-cross-origin\" | \"unsafe-url\" | null; strictTransportSecurity: string | null; xContentTypeOptions: \"nosniff\" | null; permissionsPolicy: string | null; disableEmbedding: boolean; crossOriginOpenerPolicy: \"same-origin\" | \"unsafe-none\" | \"same-origin-allow-popups\" | null; }>; customResponseHeaders: Record; maxPayload: ", { "pluginId": "@kbn/config-schema", "scope": "common", diff --git a/api_docs/kbn_core_http_server_mocks.mdx b/api_docs/kbn_core_http_server_mocks.mdx index 35225ec82b2a0..1f0fee16c07a2 100644 --- a/api_docs/kbn_core_http_server_mocks.mdx +++ b/api_docs/kbn_core_http_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-mocks title: "@kbn/core-http-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-mocks'] --- import kbnCoreHttpServerMocksObj from './kbn_core_http_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_browser.mdx b/api_docs/kbn_core_i18n_browser.mdx index 9bce687f3435a..22050eccd815f 100644 --- a/api_docs/kbn_core_i18n_browser.mdx +++ b/api_docs/kbn_core_i18n_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser title: "@kbn/core-i18n-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser'] --- import kbnCoreI18nBrowserObj from './kbn_core_i18n_browser.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_browser_mocks.mdx b/api_docs/kbn_core_i18n_browser_mocks.mdx index 411c7a970ba8b..babaa2949163c 100644 --- a/api_docs/kbn_core_i18n_browser_mocks.mdx +++ b/api_docs/kbn_core_i18n_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser-mocks title: "@kbn/core-i18n-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser-mocks'] --- import kbnCoreI18nBrowserMocksObj from './kbn_core_i18n_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server.mdx b/api_docs/kbn_core_i18n_server.mdx index 1a720c91a475b..3df4682c5aa64 100644 --- a/api_docs/kbn_core_i18n_server.mdx +++ b/api_docs/kbn_core_i18n_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server title: "@kbn/core-i18n-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server'] --- import kbnCoreI18nServerObj from './kbn_core_i18n_server.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server_internal.mdx b/api_docs/kbn_core_i18n_server_internal.mdx index 8add534188460..71f338d7bd9e8 100644 --- a/api_docs/kbn_core_i18n_server_internal.mdx +++ b/api_docs/kbn_core_i18n_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-internal title: "@kbn/core-i18n-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-internal'] --- import kbnCoreI18nServerInternalObj from './kbn_core_i18n_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server_mocks.mdx b/api_docs/kbn_core_i18n_server_mocks.mdx index 855eacd854b96..0d4699db122d1 100644 --- a/api_docs/kbn_core_i18n_server_mocks.mdx +++ b/api_docs/kbn_core_i18n_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-mocks title: "@kbn/core-i18n-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-mocks'] --- import kbnCoreI18nServerMocksObj from './kbn_core_i18n_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx index 0259f1ddc68a8..201ed8552b93d 100644 --- a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx +++ b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-injected-metadata-browser-mocks title: "@kbn/core-injected-metadata-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-injected-metadata-browser-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-injected-metadata-browser-mocks'] --- import kbnCoreInjectedMetadataBrowserMocksObj from './kbn_core_injected_metadata_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_integrations_browser_internal.mdx b/api_docs/kbn_core_integrations_browser_internal.mdx index 9cc8a78c739f7..8fb709b07ccf7 100644 --- a/api_docs/kbn_core_integrations_browser_internal.mdx +++ b/api_docs/kbn_core_integrations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-internal title: "@kbn/core-integrations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-internal'] --- import kbnCoreIntegrationsBrowserInternalObj from './kbn_core_integrations_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_integrations_browser_mocks.mdx b/api_docs/kbn_core_integrations_browser_mocks.mdx index f7cce01f08387..ed18b2a411acf 100644 --- a/api_docs/kbn_core_integrations_browser_mocks.mdx +++ b/api_docs/kbn_core_integrations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-mocks title: "@kbn/core-integrations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-mocks'] --- import kbnCoreIntegrationsBrowserMocksObj from './kbn_core_integrations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser.mdx b/api_docs/kbn_core_lifecycle_browser.mdx index 65e9ec3f08938..40750c632841f 100644 --- a/api_docs/kbn_core_lifecycle_browser.mdx +++ b/api_docs/kbn_core_lifecycle_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser title: "@kbn/core-lifecycle-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-browser plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser'] --- import kbnCoreLifecycleBrowserObj from './kbn_core_lifecycle_browser.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser_mocks.mdx b/api_docs/kbn_core_lifecycle_browser_mocks.mdx index c1151bcdd62c6..efc6b70d70814 100644 --- a/api_docs/kbn_core_lifecycle_browser_mocks.mdx +++ b/api_docs/kbn_core_lifecycle_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser-mocks title: "@kbn/core-lifecycle-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-browser-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser-mocks'] --- import kbnCoreLifecycleBrowserMocksObj from './kbn_core_lifecycle_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_server.mdx b/api_docs/kbn_core_lifecycle_server.mdx index 59333ab5b224b..3b2ef06474bd8 100644 --- a/api_docs/kbn_core_lifecycle_server.mdx +++ b/api_docs/kbn_core_lifecycle_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-server title: "@kbn/core-lifecycle-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-server plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server'] --- import kbnCoreLifecycleServerObj from './kbn_core_lifecycle_server.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_server_mocks.mdx b/api_docs/kbn_core_lifecycle_server_mocks.mdx index 670cccaa29936..8689850465117 100644 --- a/api_docs/kbn_core_lifecycle_server_mocks.mdx +++ b/api_docs/kbn_core_lifecycle_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-server-mocks title: "@kbn/core-lifecycle-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server-mocks'] --- import kbnCoreLifecycleServerMocksObj from './kbn_core_lifecycle_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_logging_browser_mocks.mdx b/api_docs/kbn_core_logging_browser_mocks.mdx index e8a5362583195..2582653f24103 100644 --- a/api_docs/kbn_core_logging_browser_mocks.mdx +++ b/api_docs/kbn_core_logging_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-browser-mocks title: "@kbn/core-logging-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-browser-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-browser-mocks'] --- import kbnCoreLoggingBrowserMocksObj from './kbn_core_logging_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_logging_common_internal.mdx b/api_docs/kbn_core_logging_common_internal.mdx index 784d7b2f430fd..7cbad8f56013d 100644 --- a/api_docs/kbn_core_logging_common_internal.mdx +++ b/api_docs/kbn_core_logging_common_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-common-internal title: "@kbn/core-logging-common-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-common-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-common-internal'] --- import kbnCoreLoggingCommonInternalObj from './kbn_core_logging_common_internal.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server.mdx b/api_docs/kbn_core_logging_server.mdx index 17511a7cbf3fd..25feea67bc447 100644 --- a/api_docs/kbn_core_logging_server.mdx +++ b/api_docs/kbn_core_logging_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server title: "@kbn/core-logging-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server'] --- import kbnCoreLoggingServerObj from './kbn_core_logging_server.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server_internal.mdx b/api_docs/kbn_core_logging_server_internal.mdx index d566d09a70499..7ea53c6ea8c8e 100644 --- a/api_docs/kbn_core_logging_server_internal.mdx +++ b/api_docs/kbn_core_logging_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-internal title: "@kbn/core-logging-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-internal'] --- import kbnCoreLoggingServerInternalObj from './kbn_core_logging_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server_mocks.mdx b/api_docs/kbn_core_logging_server_mocks.mdx index 1b4342792eea7..536872b58322b 100644 --- a/api_docs/kbn_core_logging_server_mocks.mdx +++ b/api_docs/kbn_core_logging_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-mocks title: "@kbn/core-logging-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-mocks'] --- import kbnCoreLoggingServerMocksObj from './kbn_core_logging_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_collectors_server_internal.mdx b/api_docs/kbn_core_metrics_collectors_server_internal.mdx index 6571b12bb1d3f..54a8d900c6221 100644 --- a/api_docs/kbn_core_metrics_collectors_server_internal.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-internal title: "@kbn/core-metrics-collectors-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-internal'] --- import kbnCoreMetricsCollectorsServerInternalObj from './kbn_core_metrics_collectors_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx index 9bd19c0770952..74d2640afc327 100644 --- a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-mocks title: "@kbn/core-metrics-collectors-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-mocks'] --- import kbnCoreMetricsCollectorsServerMocksObj from './kbn_core_metrics_collectors_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server.devdocs.json b/api_docs/kbn_core_metrics_server.devdocs.json index 94105c95f94cd..6dfa3e47827bf 100644 --- a/api_docs/kbn_core_metrics_server.devdocs.json +++ b/api_docs/kbn_core_metrics_server.devdocs.json @@ -908,7 +908,7 @@ "\nProtocol(s) used by the Elasticsearch Client" ], "signature": [ - "\"none\" | \"http\" | \"mixed\" | \"https\"" + "\"none\" | \"mixed\" | \"http\" | \"https\"" ], "path": "packages/core/metrics/core-metrics-server/src/metrics.ts", "deprecated": false, diff --git a/api_docs/kbn_core_metrics_server.mdx b/api_docs/kbn_core_metrics_server.mdx index 0ee98af4edc7b..49f78a482d07b 100644 --- a/api_docs/kbn_core_metrics_server.mdx +++ b/api_docs/kbn_core_metrics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server title: "@kbn/core-metrics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server'] --- import kbnCoreMetricsServerObj from './kbn_core_metrics_server.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server_internal.mdx b/api_docs/kbn_core_metrics_server_internal.mdx index 60e82404acb8e..e8bab0edc8e07 100644 --- a/api_docs/kbn_core_metrics_server_internal.mdx +++ b/api_docs/kbn_core_metrics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-internal title: "@kbn/core-metrics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-internal'] --- import kbnCoreMetricsServerInternalObj from './kbn_core_metrics_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server_mocks.mdx b/api_docs/kbn_core_metrics_server_mocks.mdx index a658eecd89764..ac6fbb593fc07 100644 --- a/api_docs/kbn_core_metrics_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-mocks title: "@kbn/core-metrics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-mocks'] --- import kbnCoreMetricsServerMocksObj from './kbn_core_metrics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_mount_utils_browser.mdx b/api_docs/kbn_core_mount_utils_browser.mdx index f7ff4fe8a1fc3..9dd13d058d1a0 100644 --- a/api_docs/kbn_core_mount_utils_browser.mdx +++ b/api_docs/kbn_core_mount_utils_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-mount-utils-browser title: "@kbn/core-mount-utils-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-mount-utils-browser plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-mount-utils-browser'] --- import kbnCoreMountUtilsBrowserObj from './kbn_core_mount_utils_browser.devdocs.json'; diff --git a/api_docs/kbn_core_node_server.mdx b/api_docs/kbn_core_node_server.mdx index 8c98a543f6ad8..7a571fa3f3dfe 100644 --- a/api_docs/kbn_core_node_server.mdx +++ b/api_docs/kbn_core_node_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server title: "@kbn/core-node-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server'] --- import kbnCoreNodeServerObj from './kbn_core_node_server.devdocs.json'; diff --git a/api_docs/kbn_core_node_server_internal.mdx b/api_docs/kbn_core_node_server_internal.mdx index 545a5efd82049..bd8a547c89b7a 100644 --- a/api_docs/kbn_core_node_server_internal.mdx +++ b/api_docs/kbn_core_node_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-internal title: "@kbn/core-node-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-internal'] --- import kbnCoreNodeServerInternalObj from './kbn_core_node_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_node_server_mocks.mdx b/api_docs/kbn_core_node_server_mocks.mdx index 9516a05a1a372..a6c1f34f36753 100644 --- a/api_docs/kbn_core_node_server_mocks.mdx +++ b/api_docs/kbn_core_node_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-mocks title: "@kbn/core-node-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-mocks'] --- import kbnCoreNodeServerMocksObj from './kbn_core_node_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser.mdx b/api_docs/kbn_core_notifications_browser.mdx index fa7b7bfdeaa76..280067cd41612 100644 --- a/api_docs/kbn_core_notifications_browser.mdx +++ b/api_docs/kbn_core_notifications_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser title: "@kbn/core-notifications-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser'] --- import kbnCoreNotificationsBrowserObj from './kbn_core_notifications_browser.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser_internal.mdx b/api_docs/kbn_core_notifications_browser_internal.mdx index 347e50c455817..97ffc0f28c26e 100644 --- a/api_docs/kbn_core_notifications_browser_internal.mdx +++ b/api_docs/kbn_core_notifications_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-internal title: "@kbn/core-notifications-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-internal'] --- import kbnCoreNotificationsBrowserInternalObj from './kbn_core_notifications_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser_mocks.mdx b/api_docs/kbn_core_notifications_browser_mocks.mdx index 4999be9a671e8..7e10082d6697d 100644 --- a/api_docs/kbn_core_notifications_browser_mocks.mdx +++ b/api_docs/kbn_core_notifications_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-mocks title: "@kbn/core-notifications-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-mocks'] --- import kbnCoreNotificationsBrowserMocksObj from './kbn_core_notifications_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser.mdx b/api_docs/kbn_core_overlays_browser.mdx index 405189ee88fe0..508a3c6176ba1 100644 --- a/api_docs/kbn_core_overlays_browser.mdx +++ b/api_docs/kbn_core_overlays_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser title: "@kbn/core-overlays-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser'] --- import kbnCoreOverlaysBrowserObj from './kbn_core_overlays_browser.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser_internal.mdx b/api_docs/kbn_core_overlays_browser_internal.mdx index ae238868b2392..9e2ab33b78e39 100644 --- a/api_docs/kbn_core_overlays_browser_internal.mdx +++ b/api_docs/kbn_core_overlays_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-internal title: "@kbn/core-overlays-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-internal'] --- import kbnCoreOverlaysBrowserInternalObj from './kbn_core_overlays_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser_mocks.mdx b/api_docs/kbn_core_overlays_browser_mocks.mdx index 76a3128fb8b59..01800efa69fb0 100644 --- a/api_docs/kbn_core_overlays_browser_mocks.mdx +++ b/api_docs/kbn_core_overlays_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-mocks title: "@kbn/core-overlays-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-mocks'] --- import kbnCoreOverlaysBrowserMocksObj from './kbn_core_overlays_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_browser.mdx b/api_docs/kbn_core_plugins_browser.mdx index 3c22a8dd2bb39..ae8bdcde30bb9 100644 --- a/api_docs/kbn_core_plugins_browser.mdx +++ b/api_docs/kbn_core_plugins_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser title: "@kbn/core-plugins-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-browser plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser'] --- import kbnCorePluginsBrowserObj from './kbn_core_plugins_browser.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_browser_mocks.mdx b/api_docs/kbn_core_plugins_browser_mocks.mdx index 8b8a6a9223ab6..6fd320d10d467 100644 --- a/api_docs/kbn_core_plugins_browser_mocks.mdx +++ b/api_docs/kbn_core_plugins_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser-mocks title: "@kbn/core-plugins-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-browser-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser-mocks'] --- import kbnCorePluginsBrowserMocksObj from './kbn_core_plugins_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_contracts_browser.mdx b/api_docs/kbn_core_plugins_contracts_browser.mdx index 3b66747f2d4ed..e76c5cc1ed2a0 100644 --- a/api_docs/kbn_core_plugins_contracts_browser.mdx +++ b/api_docs/kbn_core_plugins_contracts_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-contracts-browser title: "@kbn/core-plugins-contracts-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-contracts-browser plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-contracts-browser'] --- import kbnCorePluginsContractsBrowserObj from './kbn_core_plugins_contracts_browser.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_contracts_server.mdx b/api_docs/kbn_core_plugins_contracts_server.mdx index e41edea21a8c5..3299f1f21fe09 100644 --- a/api_docs/kbn_core_plugins_contracts_server.mdx +++ b/api_docs/kbn_core_plugins_contracts_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-contracts-server title: "@kbn/core-plugins-contracts-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-contracts-server plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-contracts-server'] --- import kbnCorePluginsContractsServerObj from './kbn_core_plugins_contracts_server.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_server.mdx b/api_docs/kbn_core_plugins_server.mdx index 354b9a4f990c4..197e87fc3739c 100644 --- a/api_docs/kbn_core_plugins_server.mdx +++ b/api_docs/kbn_core_plugins_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-server title: "@kbn/core-plugins-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-server plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-server'] --- import kbnCorePluginsServerObj from './kbn_core_plugins_server.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_server_mocks.mdx b/api_docs/kbn_core_plugins_server_mocks.mdx index d5eebf4af034c..0267bb5a1365b 100644 --- a/api_docs/kbn_core_plugins_server_mocks.mdx +++ b/api_docs/kbn_core_plugins_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-server-mocks title: "@kbn/core-plugins-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-server-mocks'] --- import kbnCorePluginsServerMocksObj from './kbn_core_plugins_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_preboot_server.mdx b/api_docs/kbn_core_preboot_server.mdx index ca57796f0f971..8403b1bd6dc58 100644 --- a/api_docs/kbn_core_preboot_server.mdx +++ b/api_docs/kbn_core_preboot_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server title: "@kbn/core-preboot-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server'] --- import kbnCorePrebootServerObj from './kbn_core_preboot_server.devdocs.json'; diff --git a/api_docs/kbn_core_preboot_server_mocks.mdx b/api_docs/kbn_core_preboot_server_mocks.mdx index 337642e6ea16b..76b9d48d184b7 100644 --- a/api_docs/kbn_core_preboot_server_mocks.mdx +++ b/api_docs/kbn_core_preboot_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server-mocks title: "@kbn/core-preboot-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server-mocks'] --- import kbnCorePrebootServerMocksObj from './kbn_core_preboot_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_browser_mocks.mdx b/api_docs/kbn_core_rendering_browser_mocks.mdx index ec133d646146b..8594cbb39cd74 100644 --- a/api_docs/kbn_core_rendering_browser_mocks.mdx +++ b/api_docs/kbn_core_rendering_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-browser-mocks title: "@kbn/core-rendering-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-browser-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-browser-mocks'] --- import kbnCoreRenderingBrowserMocksObj from './kbn_core_rendering_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_server_internal.mdx b/api_docs/kbn_core_rendering_server_internal.mdx index 57bda099ab792..cb10eef63faed 100644 --- a/api_docs/kbn_core_rendering_server_internal.mdx +++ b/api_docs/kbn_core_rendering_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-internal title: "@kbn/core-rendering-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-server-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-internal'] --- import kbnCoreRenderingServerInternalObj from './kbn_core_rendering_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_server_mocks.mdx b/api_docs/kbn_core_rendering_server_mocks.mdx index b731992c54bed..176c1a9eef0a8 100644 --- a/api_docs/kbn_core_rendering_server_mocks.mdx +++ b/api_docs/kbn_core_rendering_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-mocks title: "@kbn/core-rendering-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-mocks'] --- import kbnCoreRenderingServerMocksObj from './kbn_core_rendering_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_root_server_internal.mdx b/api_docs/kbn_core_root_server_internal.mdx index 29c66f66f9ec3..0d00f3f2b17f7 100644 --- a/api_docs/kbn_core_root_server_internal.mdx +++ b/api_docs/kbn_core_root_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-root-server-internal title: "@kbn/core-root-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-root-server-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-root-server-internal'] --- import kbnCoreRootServerInternalObj from './kbn_core_root_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_browser.mdx b/api_docs/kbn_core_saved_objects_api_browser.mdx index ccefd672d5fa4..cdc64a550dadc 100644 --- a/api_docs/kbn_core_saved_objects_api_browser.mdx +++ b/api_docs/kbn_core_saved_objects_api_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-browser title: "@kbn/core-saved-objects-api-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-browser plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-browser'] --- import kbnCoreSavedObjectsApiBrowserObj from './kbn_core_saved_objects_api_browser.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server.mdx b/api_docs/kbn_core_saved_objects_api_server.mdx index ea53a0fd3f792..1772c3cb34422 100644 --- a/api_docs/kbn_core_saved_objects_api_server.mdx +++ b/api_docs/kbn_core_saved_objects_api_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server title: "@kbn/core-saved-objects-api-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server'] --- import kbnCoreSavedObjectsApiServerObj from './kbn_core_saved_objects_api_server.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx index 886d65f570e37..62355457d6af8 100644 --- a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server-mocks title: "@kbn/core-saved-objects-api-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server-mocks'] --- import kbnCoreSavedObjectsApiServerMocksObj from './kbn_core_saved_objects_api_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_base_server_internal.mdx b/api_docs/kbn_core_saved_objects_base_server_internal.mdx index 67b431fa96b19..e531a7fbffcb4 100644 --- a/api_docs/kbn_core_saved_objects_base_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-internal title: "@kbn/core-saved-objects-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-internal'] --- import kbnCoreSavedObjectsBaseServerInternalObj from './kbn_core_saved_objects_base_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx index e7bcf82a9681a..f3c4e5221b6c9 100644 --- a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-mocks title: "@kbn/core-saved-objects-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-mocks'] --- import kbnCoreSavedObjectsBaseServerMocksObj from './kbn_core_saved_objects_base_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser.mdx b/api_docs/kbn_core_saved_objects_browser.mdx index c821f124291d4..20a77a1eb7aa9 100644 --- a/api_docs/kbn_core_saved_objects_browser.mdx +++ b/api_docs/kbn_core_saved_objects_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser title: "@kbn/core-saved-objects-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser'] --- import kbnCoreSavedObjectsBrowserObj from './kbn_core_saved_objects_browser.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser_internal.mdx b/api_docs/kbn_core_saved_objects_browser_internal.mdx index 6a36b98acb27c..f5881cda5d49e 100644 --- a/api_docs/kbn_core_saved_objects_browser_internal.mdx +++ b/api_docs/kbn_core_saved_objects_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-internal title: "@kbn/core-saved-objects-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-internal'] --- import kbnCoreSavedObjectsBrowserInternalObj from './kbn_core_saved_objects_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser_mocks.mdx b/api_docs/kbn_core_saved_objects_browser_mocks.mdx index fbae58d3403f6..e39a6e8dbee60 100644 --- a/api_docs/kbn_core_saved_objects_browser_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-mocks title: "@kbn/core-saved-objects-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-mocks'] --- import kbnCoreSavedObjectsBrowserMocksObj from './kbn_core_saved_objects_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_common.mdx b/api_docs/kbn_core_saved_objects_common.mdx index 4b13be23b6f28..0e9e37457155c 100644 --- a/api_docs/kbn_core_saved_objects_common.mdx +++ b/api_docs/kbn_core_saved_objects_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-common title: "@kbn/core-saved-objects-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-common plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-common'] --- import kbnCoreSavedObjectsCommonObj from './kbn_core_saved_objects_common.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx index 46d9030b50217..697ab80acca7c 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-internal title: "@kbn/core-saved-objects-import-export-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-internal'] --- import kbnCoreSavedObjectsImportExportServerInternalObj from './kbn_core_saved_objects_import_export_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx index 3e34d3c084aed..80a16ed880b1d 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-mocks title: "@kbn/core-saved-objects-import-export-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-mocks'] --- import kbnCoreSavedObjectsImportExportServerMocksObj from './kbn_core_saved_objects_import_export_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx index e4f046ea968fe..587fb79a7e805 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-internal title: "@kbn/core-saved-objects-migration-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-internal'] --- import kbnCoreSavedObjectsMigrationServerInternalObj from './kbn_core_saved_objects_migration_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx index e5bf1efb104a0..d258921931222 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-mocks title: "@kbn/core-saved-objects-migration-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-mocks'] --- import kbnCoreSavedObjectsMigrationServerMocksObj from './kbn_core_saved_objects_migration_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server.mdx b/api_docs/kbn_core_saved_objects_server.mdx index 87e0add15f522..d2eb96f1292ce 100644 --- a/api_docs/kbn_core_saved_objects_server.mdx +++ b/api_docs/kbn_core_saved_objects_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server title: "@kbn/core-saved-objects-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server'] --- import kbnCoreSavedObjectsServerObj from './kbn_core_saved_objects_server.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server_internal.mdx b/api_docs/kbn_core_saved_objects_server_internal.mdx index 7a57a6b24933b..872319d25d8ae 100644 --- a/api_docs/kbn_core_saved_objects_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-internal title: "@kbn/core-saved-objects-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server-internal'] --- import kbnCoreSavedObjectsServerInternalObj from './kbn_core_saved_objects_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server_mocks.mdx b/api_docs/kbn_core_saved_objects_server_mocks.mdx index 678267c4750e7..3301f9772e93f 100644 --- a/api_docs/kbn_core_saved_objects_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-mocks title: "@kbn/core-saved-objects-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server-mocks'] --- import kbnCoreSavedObjectsServerMocksObj from './kbn_core_saved_objects_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_utils_server.mdx b/api_docs/kbn_core_saved_objects_utils_server.mdx index 1f26d50974bf0..7e0e99e7a3885 100644 --- a/api_docs/kbn_core_saved_objects_utils_server.mdx +++ b/api_docs/kbn_core_saved_objects_utils_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-utils-server title: "@kbn/core-saved-objects-utils-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-utils-server plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-utils-server'] --- import kbnCoreSavedObjectsUtilsServerObj from './kbn_core_saved_objects_utils_server.devdocs.json'; diff --git a/api_docs/kbn_core_security_browser.mdx b/api_docs/kbn_core_security_browser.mdx index 566e8dc743432..37909357a3c63 100644 --- a/api_docs/kbn_core_security_browser.mdx +++ b/api_docs/kbn_core_security_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-browser title: "@kbn/core-security-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-browser plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser'] --- import kbnCoreSecurityBrowserObj from './kbn_core_security_browser.devdocs.json'; diff --git a/api_docs/kbn_core_security_browser_internal.mdx b/api_docs/kbn_core_security_browser_internal.mdx index ee1e88710e631..dcad01a979f98 100644 --- a/api_docs/kbn_core_security_browser_internal.mdx +++ b/api_docs/kbn_core_security_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-browser-internal title: "@kbn/core-security-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-browser-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser-internal'] --- import kbnCoreSecurityBrowserInternalObj from './kbn_core_security_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_security_browser_mocks.mdx b/api_docs/kbn_core_security_browser_mocks.mdx index 9e6fa6f294a91..7cf9810ca2737 100644 --- a/api_docs/kbn_core_security_browser_mocks.mdx +++ b/api_docs/kbn_core_security_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-browser-mocks title: "@kbn/core-security-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-browser-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser-mocks'] --- import kbnCoreSecurityBrowserMocksObj from './kbn_core_security_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_security_common.mdx b/api_docs/kbn_core_security_common.mdx index 769fc9e886e2c..af0eb30ba2b7b 100644 --- a/api_docs/kbn_core_security_common.mdx +++ b/api_docs/kbn_core_security_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-common title: "@kbn/core-security-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-common plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-common'] --- import kbnCoreSecurityCommonObj from './kbn_core_security_common.devdocs.json'; diff --git a/api_docs/kbn_core_security_server.mdx b/api_docs/kbn_core_security_server.mdx index a2933316b6a1a..e1e096d4133f5 100644 --- a/api_docs/kbn_core_security_server.mdx +++ b/api_docs/kbn_core_security_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-server title: "@kbn/core-security-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-server plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server'] --- import kbnCoreSecurityServerObj from './kbn_core_security_server.devdocs.json'; diff --git a/api_docs/kbn_core_security_server_internal.mdx b/api_docs/kbn_core_security_server_internal.mdx index 7a267ca323159..1420c0a2c6b4f 100644 --- a/api_docs/kbn_core_security_server_internal.mdx +++ b/api_docs/kbn_core_security_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-server-internal title: "@kbn/core-security-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-server-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server-internal'] --- import kbnCoreSecurityServerInternalObj from './kbn_core_security_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_security_server_mocks.mdx b/api_docs/kbn_core_security_server_mocks.mdx index 83337cae135db..a867bda9eab88 100644 --- a/api_docs/kbn_core_security_server_mocks.mdx +++ b/api_docs/kbn_core_security_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-server-mocks title: "@kbn/core-security-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server-mocks'] --- import kbnCoreSecurityServerMocksObj from './kbn_core_security_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_status_common.mdx b/api_docs/kbn_core_status_common.mdx index 685a33854b781..90e05864c1221 100644 --- a/api_docs/kbn_core_status_common.mdx +++ b/api_docs/kbn_core_status_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common title: "@kbn/core-status-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common'] --- import kbnCoreStatusCommonObj from './kbn_core_status_common.devdocs.json'; diff --git a/api_docs/kbn_core_status_common_internal.mdx b/api_docs/kbn_core_status_common_internal.mdx index 5a56b3e0f1a98..f8f75bf2fa268 100644 --- a/api_docs/kbn_core_status_common_internal.mdx +++ b/api_docs/kbn_core_status_common_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common-internal title: "@kbn/core-status-common-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common-internal plugin -date: 2024-07-03 +date: 2024-07-05 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 aecfa1fa13a97..20261c8fce6e5 100644 --- a/api_docs/kbn_core_status_server.mdx +++ b/api_docs/kbn_core_status_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server title: "@kbn/core-status-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server'] --- import kbnCoreStatusServerObj from './kbn_core_status_server.devdocs.json'; diff --git a/api_docs/kbn_core_status_server_internal.mdx b/api_docs/kbn_core_status_server_internal.mdx index 770f48d7af00b..7319c5ec54646 100644 --- a/api_docs/kbn_core_status_server_internal.mdx +++ b/api_docs/kbn_core_status_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-internal title: "@kbn/core-status-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server-internal'] --- import kbnCoreStatusServerInternalObj from './kbn_core_status_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_status_server_mocks.mdx b/api_docs/kbn_core_status_server_mocks.mdx index 393342f415a3b..590039e31e12f 100644 --- a/api_docs/kbn_core_status_server_mocks.mdx +++ b/api_docs/kbn_core_status_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-mocks title: "@kbn/core-status-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server-mocks'] --- import kbnCoreStatusServerMocksObj from './kbn_core_status_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx index 414a13ce96e8e..1e39bb387e998 100644 --- a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx +++ b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-deprecations-getters title: "@kbn/core-test-helpers-deprecations-getters" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-deprecations-getters plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-deprecations-getters'] --- import kbnCoreTestHelpersDeprecationsGettersObj from './kbn_core_test_helpers_deprecations_getters.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx index 9789f08a23bfe..3ce60236da6c5 100644 --- a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx +++ b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-http-setup-browser title: "@kbn/core-test-helpers-http-setup-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-http-setup-browser plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-http-setup-browser'] --- import kbnCoreTestHelpersHttpSetupBrowserObj from './kbn_core_test_helpers_http_setup_browser.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_kbn_server.mdx b/api_docs/kbn_core_test_helpers_kbn_server.mdx index 20a37bf89d604..4e6de94c8e2db 100644 --- a/api_docs/kbn_core_test_helpers_kbn_server.mdx +++ b/api_docs/kbn_core_test_helpers_kbn_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-kbn-server title: "@kbn/core-test-helpers-kbn-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-kbn-server plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-kbn-server'] --- import kbnCoreTestHelpersKbnServerObj from './kbn_core_test_helpers_kbn_server.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_model_versions.mdx b/api_docs/kbn_core_test_helpers_model_versions.mdx index c907092b8c664..faa65d8a37737 100644 --- a/api_docs/kbn_core_test_helpers_model_versions.mdx +++ b/api_docs/kbn_core_test_helpers_model_versions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-model-versions title: "@kbn/core-test-helpers-model-versions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-model-versions plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-model-versions'] --- import kbnCoreTestHelpersModelVersionsObj from './kbn_core_test_helpers_model_versions.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx index 46a6ff64cb6a9..68a372e3bb5f4 100644 --- a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx +++ b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-so-type-serializer title: "@kbn/core-test-helpers-so-type-serializer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-so-type-serializer plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-so-type-serializer'] --- import kbnCoreTestHelpersSoTypeSerializerObj from './kbn_core_test_helpers_so_type_serializer.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_test_utils.mdx b/api_docs/kbn_core_test_helpers_test_utils.mdx index d6453e81bedf6..29561291811ad 100644 --- a/api_docs/kbn_core_test_helpers_test_utils.mdx +++ b/api_docs/kbn_core_test_helpers_test_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-test-utils title: "@kbn/core-test-helpers-test-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-test-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-test-utils'] --- import kbnCoreTestHelpersTestUtilsObj from './kbn_core_test_helpers_test_utils.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser.mdx b/api_docs/kbn_core_theme_browser.mdx index f12620a80eb10..99c1c53432c5f 100644 --- a/api_docs/kbn_core_theme_browser.mdx +++ b/api_docs/kbn_core_theme_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser title: "@kbn/core-theme-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser'] --- import kbnCoreThemeBrowserObj from './kbn_core_theme_browser.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser_mocks.mdx b/api_docs/kbn_core_theme_browser_mocks.mdx index 1dac0e63f8b8e..5b55269522419 100644 --- a/api_docs/kbn_core_theme_browser_mocks.mdx +++ b/api_docs/kbn_core_theme_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-mocks title: "@kbn/core-theme-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser-mocks'] --- import kbnCoreThemeBrowserMocksObj from './kbn_core_theme_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser.mdx b/api_docs/kbn_core_ui_settings_browser.mdx index eac38de1168e0..27239b2635f5e 100644 --- a/api_docs/kbn_core_ui_settings_browser.mdx +++ b/api_docs/kbn_core_ui_settings_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser title: "@kbn/core-ui-settings-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser'] --- import kbnCoreUiSettingsBrowserObj from './kbn_core_ui_settings_browser.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser_internal.mdx b/api_docs/kbn_core_ui_settings_browser_internal.mdx index f7c5d79308e66..9b27862531227 100644 --- a/api_docs/kbn_core_ui_settings_browser_internal.mdx +++ b/api_docs/kbn_core_ui_settings_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-internal title: "@kbn/core-ui-settings-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-internal'] --- import kbnCoreUiSettingsBrowserInternalObj from './kbn_core_ui_settings_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser_mocks.mdx b/api_docs/kbn_core_ui_settings_browser_mocks.mdx index 4fc6d3591f84d..98a5853c3ea3e 100644 --- a/api_docs/kbn_core_ui_settings_browser_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-mocks title: "@kbn/core-ui-settings-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-mocks'] --- import kbnCoreUiSettingsBrowserMocksObj from './kbn_core_ui_settings_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_common.mdx b/api_docs/kbn_core_ui_settings_common.mdx index 16a7a61e9fa56..b4b2ed44b73ce 100644 --- a/api_docs/kbn_core_ui_settings_common.mdx +++ b/api_docs/kbn_core_ui_settings_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-common title: "@kbn/core-ui-settings-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-common plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-common'] --- import kbnCoreUiSettingsCommonObj from './kbn_core_ui_settings_common.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server.mdx b/api_docs/kbn_core_ui_settings_server.mdx index 21048023efc72..2804e99f41edb 100644 --- a/api_docs/kbn_core_ui_settings_server.mdx +++ b/api_docs/kbn_core_ui_settings_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server title: "@kbn/core-ui-settings-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server'] --- import kbnCoreUiSettingsServerObj from './kbn_core_ui_settings_server.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server_internal.mdx b/api_docs/kbn_core_ui_settings_server_internal.mdx index 20e494b7ffdd0..0cbf20807d28f 100644 --- a/api_docs/kbn_core_ui_settings_server_internal.mdx +++ b/api_docs/kbn_core_ui_settings_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server-internal title: "@kbn/core-ui-settings-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-internal'] --- import kbnCoreUiSettingsServerInternalObj from './kbn_core_ui_settings_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server_mocks.mdx b/api_docs/kbn_core_ui_settings_server_mocks.mdx index 1a118ee314917..842f06da3fa13 100644 --- a/api_docs/kbn_core_ui_settings_server_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server-mocks title: "@kbn/core-ui-settings-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-mocks'] --- import kbnCoreUiSettingsServerMocksObj from './kbn_core_ui_settings_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server.mdx b/api_docs/kbn_core_usage_data_server.mdx index 346c1ce91bc27..43d1dd6a2bd48 100644 --- a/api_docs/kbn_core_usage_data_server.mdx +++ b/api_docs/kbn_core_usage_data_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server title: "@kbn/core-usage-data-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server'] --- import kbnCoreUsageDataServerObj from './kbn_core_usage_data_server.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server_internal.mdx b/api_docs/kbn_core_usage_data_server_internal.mdx index 38fd27b89466f..0d4934d98ff82 100644 --- a/api_docs/kbn_core_usage_data_server_internal.mdx +++ b/api_docs/kbn_core_usage_data_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-internal title: "@kbn/core-usage-data-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-internal'] --- import kbnCoreUsageDataServerInternalObj from './kbn_core_usage_data_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server_mocks.mdx b/api_docs/kbn_core_usage_data_server_mocks.mdx index c657dfa0aa014..99b97aac30ccf 100644 --- a/api_docs/kbn_core_usage_data_server_mocks.mdx +++ b/api_docs/kbn_core_usage_data_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-mocks title: "@kbn/core-usage-data-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-mocks'] --- import kbnCoreUsageDataServerMocksObj from './kbn_core_usage_data_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_browser.mdx b/api_docs/kbn_core_user_profile_browser.mdx index 964393aad85a7..c9a20341a1abd 100644 --- a/api_docs/kbn_core_user_profile_browser.mdx +++ b/api_docs/kbn_core_user_profile_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-browser title: "@kbn/core-user-profile-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-browser plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-browser'] --- import kbnCoreUserProfileBrowserObj from './kbn_core_user_profile_browser.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_browser_internal.mdx b/api_docs/kbn_core_user_profile_browser_internal.mdx index 794cdc788884d..70ffaf2ff0023 100644 --- a/api_docs/kbn_core_user_profile_browser_internal.mdx +++ b/api_docs/kbn_core_user_profile_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-browser-internal title: "@kbn/core-user-profile-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-browser-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-browser-internal'] --- import kbnCoreUserProfileBrowserInternalObj from './kbn_core_user_profile_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_browser_mocks.mdx b/api_docs/kbn_core_user_profile_browser_mocks.mdx index 56c163157f136..2dc899dd9a53b 100644 --- a/api_docs/kbn_core_user_profile_browser_mocks.mdx +++ b/api_docs/kbn_core_user_profile_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-browser-mocks title: "@kbn/core-user-profile-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-browser-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-browser-mocks'] --- import kbnCoreUserProfileBrowserMocksObj from './kbn_core_user_profile_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_common.mdx b/api_docs/kbn_core_user_profile_common.mdx index 760eaa31586fa..28400c61c9af9 100644 --- a/api_docs/kbn_core_user_profile_common.mdx +++ b/api_docs/kbn_core_user_profile_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-common title: "@kbn/core-user-profile-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-common plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-common'] --- import kbnCoreUserProfileCommonObj from './kbn_core_user_profile_common.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_server.mdx b/api_docs/kbn_core_user_profile_server.mdx index eb36914f925b2..f027f899cad89 100644 --- a/api_docs/kbn_core_user_profile_server.mdx +++ b/api_docs/kbn_core_user_profile_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-server title: "@kbn/core-user-profile-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-server plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-server'] --- import kbnCoreUserProfileServerObj from './kbn_core_user_profile_server.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_server_internal.mdx b/api_docs/kbn_core_user_profile_server_internal.mdx index ad1370aa170e1..1e976962bec7a 100644 --- a/api_docs/kbn_core_user_profile_server_internal.mdx +++ b/api_docs/kbn_core_user_profile_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-server-internal title: "@kbn/core-user-profile-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-server-internal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-server-internal'] --- import kbnCoreUserProfileServerInternalObj from './kbn_core_user_profile_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_server_mocks.mdx b/api_docs/kbn_core_user_profile_server_mocks.mdx index 1ac4bac549f3b..71145da2c467d 100644 --- a/api_docs/kbn_core_user_profile_server_mocks.mdx +++ b/api_docs/kbn_core_user_profile_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-server-mocks title: "@kbn/core-user-profile-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-server-mocks'] --- import kbnCoreUserProfileServerMocksObj from './kbn_core_user_profile_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server.mdx b/api_docs/kbn_core_user_settings_server.mdx index 169a0647aabf6..7aa60ef817cc3 100644 --- a/api_docs/kbn_core_user_settings_server.mdx +++ b/api_docs/kbn_core_user_settings_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-settings-server title: "@kbn/core-user-settings-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-settings-server plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-settings-server'] --- import kbnCoreUserSettingsServerObj from './kbn_core_user_settings_server.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server_mocks.mdx b/api_docs/kbn_core_user_settings_server_mocks.mdx index 73cba1186e524..3774c796e4c38 100644 --- a/api_docs/kbn_core_user_settings_server_mocks.mdx +++ b/api_docs/kbn_core_user_settings_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-settings-server-mocks title: "@kbn/core-user-settings-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-settings-server-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-settings-server-mocks'] --- import kbnCoreUserSettingsServerMocksObj from './kbn_core_user_settings_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_crypto.mdx b/api_docs/kbn_crypto.mdx index 749ad97179a01..3cb422d6831a3 100644 --- a/api_docs/kbn_crypto.mdx +++ b/api_docs/kbn_crypto.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto title: "@kbn/crypto" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto'] --- import kbnCryptoObj from './kbn_crypto.devdocs.json'; diff --git a/api_docs/kbn_crypto_browser.mdx b/api_docs/kbn_crypto_browser.mdx index ae2560cc1aad5..cc46ec29b89d7 100644 --- a/api_docs/kbn_crypto_browser.mdx +++ b/api_docs/kbn_crypto_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto-browser title: "@kbn/crypto-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto-browser plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto-browser'] --- import kbnCryptoBrowserObj from './kbn_crypto_browser.devdocs.json'; diff --git a/api_docs/kbn_custom_icons.mdx b/api_docs/kbn_custom_icons.mdx index 50393973868c6..a354a59f2675b 100644 --- a/api_docs/kbn_custom_icons.mdx +++ b/api_docs/kbn_custom_icons.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-custom-icons title: "@kbn/custom-icons" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/custom-icons plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/custom-icons'] --- import kbnCustomIconsObj from './kbn_custom_icons.devdocs.json'; diff --git a/api_docs/kbn_custom_integrations.mdx b/api_docs/kbn_custom_integrations.mdx index a39f3936dbebf..9ea5864772bb0 100644 --- a/api_docs/kbn_custom_integrations.mdx +++ b/api_docs/kbn_custom_integrations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-custom-integrations title: "@kbn/custom-integrations" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/custom-integrations plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/custom-integrations'] --- import kbnCustomIntegrationsObj from './kbn_custom_integrations.devdocs.json'; diff --git a/api_docs/kbn_cypress_config.mdx b/api_docs/kbn_cypress_config.mdx index 8fb374a42b8bd..16e2f34956d45 100644 --- a/api_docs/kbn_cypress_config.mdx +++ b/api_docs/kbn_cypress_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cypress-config title: "@kbn/cypress-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cypress-config plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cypress-config'] --- import kbnCypressConfigObj from './kbn_cypress_config.devdocs.json'; diff --git a/api_docs/kbn_data_forge.mdx b/api_docs/kbn_data_forge.mdx index dc789949ff824..e42a8290bb2a8 100644 --- a/api_docs/kbn_data_forge.mdx +++ b/api_docs/kbn_data_forge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-forge title: "@kbn/data-forge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-forge plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-forge'] --- import kbnDataForgeObj from './kbn_data_forge.devdocs.json'; diff --git a/api_docs/kbn_data_service.mdx b/api_docs/kbn_data_service.mdx index 4afdbb036f94f..35e783baa56f3 100644 --- a/api_docs/kbn_data_service.mdx +++ b/api_docs/kbn_data_service.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-service title: "@kbn/data-service" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-service plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-service'] --- import kbnDataServiceObj from './kbn_data_service.devdocs.json'; diff --git a/api_docs/kbn_data_stream_adapter.mdx b/api_docs/kbn_data_stream_adapter.mdx index cab13249e5d06..22e6710a3a655 100644 --- a/api_docs/kbn_data_stream_adapter.mdx +++ b/api_docs/kbn_data_stream_adapter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-stream-adapter title: "@kbn/data-stream-adapter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-stream-adapter plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-stream-adapter'] --- import kbnDataStreamAdapterObj from './kbn_data_stream_adapter.devdocs.json'; diff --git a/api_docs/kbn_data_view_utils.mdx b/api_docs/kbn_data_view_utils.mdx index 5a570e7e22266..7de60712fdf5a 100644 --- a/api_docs/kbn_data_view_utils.mdx +++ b/api_docs/kbn_data_view_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-view-utils title: "@kbn/data-view-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-view-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-view-utils'] --- import kbnDataViewUtilsObj from './kbn_data_view_utils.devdocs.json'; diff --git a/api_docs/kbn_datemath.devdocs.json b/api_docs/kbn_datemath.devdocs.json index 71d5b783708c0..dd5303cfd095e 100644 --- a/api_docs/kbn_datemath.devdocs.json +++ b/api_docs/kbn_datemath.devdocs.json @@ -200,7 +200,7 @@ "label": "UnitsMap", "description": [], "signature": [ - "{ m: { weight: number; type: \"fixed\" | \"calendar\" | \"mixed\"; base: number; }; y: { weight: number; type: \"fixed\" | \"calendar\" | \"mixed\"; base: number; }; M: { weight: number; type: \"fixed\" | \"calendar\" | \"mixed\"; base: number; }; w: { weight: number; type: \"fixed\" | \"calendar\" | \"mixed\"; base: number; }; d: { weight: number; type: \"fixed\" | \"calendar\" | \"mixed\"; base: number; }; h: { weight: number; type: \"fixed\" | \"calendar\" | \"mixed\"; base: number; }; s: { weight: number; type: \"fixed\" | \"calendar\" | \"mixed\"; base: number; }; ms: { weight: number; type: \"fixed\" | \"calendar\" | \"mixed\"; base: number; }; }" + "{ m: { weight: number; type: \"fixed\" | \"mixed\" | \"calendar\"; base: number; }; y: { weight: number; type: \"fixed\" | \"mixed\" | \"calendar\"; base: number; }; M: { weight: number; type: \"fixed\" | \"mixed\" | \"calendar\"; base: number; }; w: { weight: number; type: \"fixed\" | \"mixed\" | \"calendar\"; base: number; }; d: { weight: number; type: \"fixed\" | \"mixed\" | \"calendar\"; base: number; }; h: { weight: number; type: \"fixed\" | \"mixed\" | \"calendar\"; base: number; }; s: { weight: number; type: \"fixed\" | \"mixed\" | \"calendar\"; base: number; }; ms: { weight: number; type: \"fixed\" | \"mixed\" | \"calendar\"; base: number; }; }" ], "path": "packages/kbn-datemath/index.ts", "deprecated": false, diff --git a/api_docs/kbn_datemath.mdx b/api_docs/kbn_datemath.mdx index f6b52d2c676d4..0892c1162e581 100644 --- a/api_docs/kbn_datemath.mdx +++ b/api_docs/kbn_datemath.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-datemath title: "@kbn/datemath" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/datemath plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/datemath'] --- import kbnDatemathObj from './kbn_datemath.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_analytics.mdx b/api_docs/kbn_deeplinks_analytics.mdx index fd5bbf1975035..3aa82e7ddfdfb 100644 --- a/api_docs/kbn_deeplinks_analytics.mdx +++ b/api_docs/kbn_deeplinks_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-analytics title: "@kbn/deeplinks-analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-analytics plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-analytics'] --- import kbnDeeplinksAnalyticsObj from './kbn_deeplinks_analytics.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_devtools.mdx b/api_docs/kbn_deeplinks_devtools.mdx index 520eca67c3143..7b6ba640ddea4 100644 --- a/api_docs/kbn_deeplinks_devtools.mdx +++ b/api_docs/kbn_deeplinks_devtools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-devtools title: "@kbn/deeplinks-devtools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-devtools plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-devtools'] --- import kbnDeeplinksDevtoolsObj from './kbn_deeplinks_devtools.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_fleet.mdx b/api_docs/kbn_deeplinks_fleet.mdx index 35e68d2beaf6d..2aa3c7d51d03c 100644 --- a/api_docs/kbn_deeplinks_fleet.mdx +++ b/api_docs/kbn_deeplinks_fleet.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-fleet title: "@kbn/deeplinks-fleet" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-fleet plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-fleet'] --- import kbnDeeplinksFleetObj from './kbn_deeplinks_fleet.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_management.devdocs.json b/api_docs/kbn_deeplinks_management.devdocs.json index c4b7d9dd33259..4a7d7e3992fd5 100644 --- a/api_docs/kbn_deeplinks_management.devdocs.json +++ b/api_docs/kbn_deeplinks_management.devdocs.json @@ -45,7 +45,7 @@ "label": "DeepLinkId", "description": [], "signature": [ - "\"fleet\" | \"monitoring\" | \"management\" | \"integrations\" | \"osquery\" | \"management:transform\" | \"management:watcher\" | \"management:cases\" | \"management:tags\" | \"management:maintenanceWindows\" | \"management:settings\" | \"management:dataViews\" | \"management:spaces\" | \"management:users\" | \"management:migrate_data\" | \"management:search_sessions\" | \"management:data_quality\" | \"management:filesManagement\" | \"management:roles\" | \"management:reporting\" | \"management:aiAssistantManagementSelection\" | \"management:securityAiAssistantManagement\" | \"management:observabilityAiAssistantManagement\" | \"management:api_keys\" | \"management:cross_cluster_replication\" | \"management:license_management\" | \"management:index_lifecycle_management\" | \"management:index_management\" | \"management:ingest_pipelines\" | \"management:jobsListLink\" | \"management:objects\" | \"management:pipelines\" | \"management:remote_clusters\" | \"management:role_mappings\" | \"management:rollup_jobs\" | \"management:snapshot_restore\" | \"management:triggersActions\" | \"management:triggersActionsConnectors\" | \"management:upgrade_assistant\"" + "\"fleet\" | \"monitoring\" | \"management\" | \"integrations\" | \"osquery\" | \"management:transform\" | \"management:watcher\" | \"management:cases\" | \"management:tags\" | \"management:maintenanceWindows\" | \"management:dataViews\" | \"management:spaces\" | \"management:settings\" | \"management:users\" | \"management:migrate_data\" | \"management:search_sessions\" | \"management:data_quality\" | \"management:filesManagement\" | \"management:roles\" | \"management:reporting\" | \"management:aiAssistantManagementSelection\" | \"management:securityAiAssistantManagement\" | \"management:observabilityAiAssistantManagement\" | \"management:api_keys\" | \"management:cross_cluster_replication\" | \"management:license_management\" | \"management:index_lifecycle_management\" | \"management:index_management\" | \"management:ingest_pipelines\" | \"management:jobsListLink\" | \"management:objects\" | \"management:pipelines\" | \"management:remote_clusters\" | \"management:role_mappings\" | \"management:rollup_jobs\" | \"management:snapshot_restore\" | \"management:triggersActions\" | \"management:triggersActionsConnectors\" | \"management:upgrade_assistant\"" ], "path": "packages/deeplinks/management/deep_links.ts", "deprecated": false, @@ -60,7 +60,7 @@ "label": "LinkId", "description": [], "signature": [ - "\"transform\" | \"watcher\" | \"cases\" | \"tags\" | \"maintenanceWindows\" | \"settings\" | \"dataViews\" | \"spaces\" | \"users\" | \"migrate_data\" | \"search_sessions\" | \"data_quality\" | \"filesManagement\" | \"roles\" | \"reporting\" | \"aiAssistantManagementSelection\" | \"securityAiAssistantManagement\" | \"observabilityAiAssistantManagement\" | \"api_keys\" | \"cross_cluster_replication\" | \"license_management\" | \"index_lifecycle_management\" | \"index_management\" | \"ingest_pipelines\" | \"jobsListLink\" | \"objects\" | \"pipelines\" | \"remote_clusters\" | \"role_mappings\" | \"rollup_jobs\" | \"snapshot_restore\" | \"triggersActions\" | \"triggersActionsConnectors\" | \"upgrade_assistant\"" + "\"transform\" | \"watcher\" | \"cases\" | \"tags\" | \"maintenanceWindows\" | \"dataViews\" | \"spaces\" | \"settings\" | \"users\" | \"migrate_data\" | \"search_sessions\" | \"data_quality\" | \"filesManagement\" | \"roles\" | \"reporting\" | \"aiAssistantManagementSelection\" | \"securityAiAssistantManagement\" | \"observabilityAiAssistantManagement\" | \"api_keys\" | \"cross_cluster_replication\" | \"license_management\" | \"index_lifecycle_management\" | \"index_management\" | \"ingest_pipelines\" | \"jobsListLink\" | \"objects\" | \"pipelines\" | \"remote_clusters\" | \"role_mappings\" | \"rollup_jobs\" | \"snapshot_restore\" | \"triggersActions\" | \"triggersActionsConnectors\" | \"upgrade_assistant\"" ], "path": "packages/deeplinks/management/deep_links.ts", "deprecated": false, diff --git a/api_docs/kbn_deeplinks_management.mdx b/api_docs/kbn_deeplinks_management.mdx index 2cde0cf4ec525..006e3422e67ae 100644 --- a/api_docs/kbn_deeplinks_management.mdx +++ b/api_docs/kbn_deeplinks_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-management title: "@kbn/deeplinks-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-management plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-management'] --- import kbnDeeplinksManagementObj from './kbn_deeplinks_management.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_ml.mdx b/api_docs/kbn_deeplinks_ml.mdx index 04b0505c72361..dec908862b8eb 100644 --- a/api_docs/kbn_deeplinks_ml.mdx +++ b/api_docs/kbn_deeplinks_ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-ml title: "@kbn/deeplinks-ml" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-ml plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-ml'] --- import kbnDeeplinksMlObj from './kbn_deeplinks_ml.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_observability.devdocs.json b/api_docs/kbn_deeplinks_observability.devdocs.json index b69b1bdad957c..2a2d36cdb7282 100644 --- a/api_docs/kbn_deeplinks_observability.devdocs.json +++ b/api_docs/kbn_deeplinks_observability.devdocs.json @@ -514,6 +514,166 @@ } ], "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/deeplinks-observability", + "id": "def-common.UptimeOverviewLocatorInfraParams", + "type": "Interface", + "tags": [], + "label": "UptimeOverviewLocatorInfraParams", + "description": [], + "signature": [ + { + "pluginId": "@kbn/deeplinks-observability", + "scope": "common", + "docId": "kibKbnDeeplinksObservabilityPluginApi", + "section": "def-common.UptimeOverviewLocatorInfraParams", + "text": "UptimeOverviewLocatorInfraParams" + }, + " extends ", + { + "pluginId": "@kbn/utility-types", + "scope": "common", + "docId": "kibKbnUtilityTypesPluginApi", + "section": "def-common.SerializableRecord", + "text": "SerializableRecord" + } + ], + "path": "packages/deeplinks/observability/locators/uptime.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/deeplinks-observability", + "id": "def-common.UptimeOverviewLocatorInfraParams.ip", + "type": "string", + "tags": [], + "label": "ip", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/deeplinks/observability/locators/uptime.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/deeplinks-observability", + "id": "def-common.UptimeOverviewLocatorInfraParams.host", + "type": "string", + "tags": [], + "label": "host", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/deeplinks/observability/locators/uptime.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/deeplinks-observability", + "id": "def-common.UptimeOverviewLocatorInfraParams.container", + "type": "string", + "tags": [], + "label": "container", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/deeplinks/observability/locators/uptime.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/deeplinks-observability", + "id": "def-common.UptimeOverviewLocatorInfraParams.pod", + "type": "string", + "tags": [], + "label": "pod", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/deeplinks/observability/locators/uptime.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/deeplinks-observability", + "id": "def-common.UptimeOverviewLocatorParams", + "type": "Interface", + "tags": [], + "label": "UptimeOverviewLocatorParams", + "description": [], + "signature": [ + { + "pluginId": "@kbn/deeplinks-observability", + "scope": "common", + "docId": "kibKbnDeeplinksObservabilityPluginApi", + "section": "def-common.UptimeOverviewLocatorParams", + "text": "UptimeOverviewLocatorParams" + }, + " extends ", + { + "pluginId": "@kbn/utility-types", + "scope": "common", + "docId": "kibKbnUtilityTypesPluginApi", + "section": "def-common.SerializableRecord", + "text": "SerializableRecord" + } + ], + "path": "packages/deeplinks/observability/locators/uptime.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/deeplinks-observability", + "id": "def-common.UptimeOverviewLocatorParams.dateRangeStart", + "type": "string", + "tags": [], + "label": "dateRangeStart", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/deeplinks/observability/locators/uptime.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/deeplinks-observability", + "id": "def-common.UptimeOverviewLocatorParams.dateRangeEnd", + "type": "string", + "tags": [], + "label": "dateRangeEnd", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/deeplinks/observability/locators/uptime.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/deeplinks-observability", + "id": "def-common.UptimeOverviewLocatorParams.search", + "type": "string", + "tags": [], + "label": "search", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/deeplinks/observability/locators/uptime.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false } ], "enums": [], @@ -919,6 +1079,21 @@ "deprecated": false, "trackAdoption": false, "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/deeplinks-observability", + "id": "def-common.uptimeOverviewLocatorID", + "type": "string", + "tags": [], + "label": "uptimeOverviewLocatorID", + "description": [], + "signature": [ + "\"UPTIME_OVERVIEW_LOCATOR\"" + ], + "path": "packages/deeplinks/observability/locators/uptime.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false } ], "objects": [] diff --git a/api_docs/kbn_deeplinks_observability.mdx b/api_docs/kbn_deeplinks_observability.mdx index e029241ae3871..3e7e318070a08 100644 --- a/api_docs/kbn_deeplinks_observability.mdx +++ b/api_docs/kbn_deeplinks_observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-observability title: "@kbn/deeplinks-observability" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-observability plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-observability'] --- import kbnDeeplinksObservabilityObj from './kbn_deeplinks_observability.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 45 | 0 | 33 | 0 | +| 55 | 0 | 43 | 0 | ## Common diff --git a/api_docs/kbn_deeplinks_search.mdx b/api_docs/kbn_deeplinks_search.mdx index 19b0ea9a92fa9..44d8e70bb2cc3 100644 --- a/api_docs/kbn_deeplinks_search.mdx +++ b/api_docs/kbn_deeplinks_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-search title: "@kbn/deeplinks-search" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-search plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-search'] --- import kbnDeeplinksSearchObj from './kbn_deeplinks_search.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_security.mdx b/api_docs/kbn_deeplinks_security.mdx index 23988382e35e8..85a90be4e0d81 100644 --- a/api_docs/kbn_deeplinks_security.mdx +++ b/api_docs/kbn_deeplinks_security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-security title: "@kbn/deeplinks-security" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-security plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-security'] --- import kbnDeeplinksSecurityObj from './kbn_deeplinks_security.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_shared.mdx b/api_docs/kbn_deeplinks_shared.mdx index d95beaa445827..2bed2816b4939 100644 --- a/api_docs/kbn_deeplinks_shared.mdx +++ b/api_docs/kbn_deeplinks_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-shared title: "@kbn/deeplinks-shared" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-shared plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-shared'] --- import kbnDeeplinksSharedObj from './kbn_deeplinks_shared.devdocs.json'; diff --git a/api_docs/kbn_default_nav_analytics.mdx b/api_docs/kbn_default_nav_analytics.mdx index 63584422338de..c266dfeff7663 100644 --- a/api_docs/kbn_default_nav_analytics.mdx +++ b/api_docs/kbn_default_nav_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-analytics title: "@kbn/default-nav-analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-analytics plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-analytics'] --- import kbnDefaultNavAnalyticsObj from './kbn_default_nav_analytics.devdocs.json'; diff --git a/api_docs/kbn_default_nav_devtools.mdx b/api_docs/kbn_default_nav_devtools.mdx index 513e240f8c922..ee48c6bd1f478 100644 --- a/api_docs/kbn_default_nav_devtools.mdx +++ b/api_docs/kbn_default_nav_devtools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-devtools title: "@kbn/default-nav-devtools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-devtools plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-devtools'] --- import kbnDefaultNavDevtoolsObj from './kbn_default_nav_devtools.devdocs.json'; diff --git a/api_docs/kbn_default_nav_management.mdx b/api_docs/kbn_default_nav_management.mdx index 504871fe7679a..8546e53c36167 100644 --- a/api_docs/kbn_default_nav_management.mdx +++ b/api_docs/kbn_default_nav_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-management title: "@kbn/default-nav-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-management plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-management'] --- import kbnDefaultNavManagementObj from './kbn_default_nav_management.devdocs.json'; diff --git a/api_docs/kbn_default_nav_ml.mdx b/api_docs/kbn_default_nav_ml.mdx index d5c56e4e01df2..36ac97c94b3d5 100644 --- a/api_docs/kbn_default_nav_ml.mdx +++ b/api_docs/kbn_default_nav_ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-ml title: "@kbn/default-nav-ml" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-ml plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-ml'] --- import kbnDefaultNavMlObj from './kbn_default_nav_ml.devdocs.json'; diff --git a/api_docs/kbn_dev_cli_errors.mdx b/api_docs/kbn_dev_cli_errors.mdx index b20c88d68c120..5cd041c62654b 100644 --- a/api_docs/kbn_dev_cli_errors.mdx +++ b/api_docs/kbn_dev_cli_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-errors title: "@kbn/dev-cli-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-errors plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-errors'] --- import kbnDevCliErrorsObj from './kbn_dev_cli_errors.devdocs.json'; diff --git a/api_docs/kbn_dev_cli_runner.mdx b/api_docs/kbn_dev_cli_runner.mdx index 0464df03f6760..1610bd47d5b02 100644 --- a/api_docs/kbn_dev_cli_runner.mdx +++ b/api_docs/kbn_dev_cli_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-runner title: "@kbn/dev-cli-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-runner plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-runner'] --- import kbnDevCliRunnerObj from './kbn_dev_cli_runner.devdocs.json'; diff --git a/api_docs/kbn_dev_proc_runner.mdx b/api_docs/kbn_dev_proc_runner.mdx index 07eab992ee2d4..a39be46527b37 100644 --- a/api_docs/kbn_dev_proc_runner.mdx +++ b/api_docs/kbn_dev_proc_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-proc-runner title: "@kbn/dev-proc-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-proc-runner plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-proc-runner'] --- import kbnDevProcRunnerObj from './kbn_dev_proc_runner.devdocs.json'; diff --git a/api_docs/kbn_dev_utils.mdx b/api_docs/kbn_dev_utils.mdx index 80755157e6039..98a91431973b7 100644 --- a/api_docs/kbn_dev_utils.mdx +++ b/api_docs/kbn_dev_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-utils title: "@kbn/dev-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-utils plugin -date: 2024-07-03 +date: 2024-07-05 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 45ca8030b216f..ee6ca40899699 100644 --- a/api_docs/kbn_discover_utils.mdx +++ b/api_docs/kbn_discover_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-discover-utils title: "@kbn/discover-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/discover-utils plugin -date: 2024-07-03 +date: 2024-07-05 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 9ae5873cc323d..acefd124a122b 100644 --- a/api_docs/kbn_doc_links.mdx +++ b/api_docs/kbn_doc_links.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-doc-links title: "@kbn/doc-links" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/doc-links plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/doc-links'] --- import kbnDocLinksObj from './kbn_doc_links.devdocs.json'; diff --git a/api_docs/kbn_docs_utils.mdx b/api_docs/kbn_docs_utils.mdx index f7dc1d187d423..1378620d916eb 100644 --- a/api_docs/kbn_docs_utils.mdx +++ b/api_docs/kbn_docs_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-docs-utils title: "@kbn/docs-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/docs-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/docs-utils'] --- import kbnDocsUtilsObj from './kbn_docs_utils.devdocs.json'; diff --git a/api_docs/kbn_dom_drag_drop.mdx b/api_docs/kbn_dom_drag_drop.mdx index bbccdb23667eb..d4c68c3606f74 100644 --- a/api_docs/kbn_dom_drag_drop.mdx +++ b/api_docs/kbn_dom_drag_drop.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dom-drag-drop title: "@kbn/dom-drag-drop" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dom-drag-drop plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dom-drag-drop'] --- import kbnDomDragDropObj from './kbn_dom_drag_drop.devdocs.json'; diff --git a/api_docs/kbn_ebt.devdocs.json b/api_docs/kbn_ebt.devdocs.json index 050372089dddb..1c5899d553ac4 100644 --- a/api_docs/kbn_ebt.devdocs.json +++ b/api_docs/kbn_ebt.devdocs.json @@ -1826,14 +1826,6 @@ "plugin": "@kbn/cloud", "path": "packages/cloud/connection_details/kibana/kibana_connection_details_provider.tsx" }, - { - "plugin": "dashboard", - "path": "src/plugins/dashboard/public/services/analytics/types.ts" - }, - { - "plugin": "dashboard", - "path": "src/plugins/dashboard/public/services/analytics/analytics_service.ts" - }, { "plugin": "observabilityAIAssistant", "path": "x-pack/plugins/observability_solution/observability_ai_assistant/server/utils/recall/recall_and_score.ts" @@ -1842,6 +1834,14 @@ "plugin": "observabilityAIAssistant", "path": "x-pack/plugins/observability_solution/observability_ai_assistant/public/analytics/index.ts" }, + { + "plugin": "dashboard", + "path": "src/plugins/dashboard/public/services/analytics/types.ts" + }, + { + "plugin": "dashboard", + "path": "src/plugins/dashboard/public/services/analytics/analytics_service.ts" + }, { "plugin": "integrationAssistant", "path": "x-pack/plugins/integration_assistant/public/services/telemetry/service.ts" @@ -2082,6 +2082,14 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/common/lib/telemetry/telemetry_client.ts" }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/lib/telemetry/telemetry_client.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/lib/telemetry/telemetry_client.ts" + }, { "plugin": "osquery", "path": "x-pack/plugins/osquery/server/lib/telemetry/sender.ts" diff --git a/api_docs/kbn_ebt.mdx b/api_docs/kbn_ebt.mdx index 65ee6792ef5c3..0532fe18d658b 100644 --- a/api_docs/kbn_ebt.mdx +++ b/api_docs/kbn_ebt.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ebt title: "@kbn/ebt" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ebt plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ebt'] --- import kbnEbtObj from './kbn_ebt.devdocs.json'; diff --git a/api_docs/kbn_ebt_tools.mdx b/api_docs/kbn_ebt_tools.mdx index b5ceb04934cbd..ebafb089aaf1a 100644 --- a/api_docs/kbn_ebt_tools.mdx +++ b/api_docs/kbn_ebt_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ebt-tools title: "@kbn/ebt-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ebt-tools plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ebt-tools'] --- import kbnEbtToolsObj from './kbn_ebt_tools.devdocs.json'; diff --git a/api_docs/kbn_ecs_data_quality_dashboard.mdx b/api_docs/kbn_ecs_data_quality_dashboard.mdx index 0d1739142ab58..b5f0dd16b707d 100644 --- a/api_docs/kbn_ecs_data_quality_dashboard.mdx +++ b/api_docs/kbn_ecs_data_quality_dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ecs-data-quality-dashboard title: "@kbn/ecs-data-quality-dashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ecs-data-quality-dashboard plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ecs-data-quality-dashboard'] --- import kbnEcsDataQualityDashboardObj from './kbn_ecs_data_quality_dashboard.devdocs.json'; diff --git a/api_docs/kbn_elastic_agent_utils.mdx b/api_docs/kbn_elastic_agent_utils.mdx index c2a4481fef5bc..c616bcb283a2e 100644 --- a/api_docs/kbn_elastic_agent_utils.mdx +++ b/api_docs/kbn_elastic_agent_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-elastic-agent-utils title: "@kbn/elastic-agent-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/elastic-agent-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-agent-utils'] --- import kbnElasticAgentUtilsObj from './kbn_elastic_agent_utils.devdocs.json'; diff --git a/api_docs/kbn_elastic_assistant.devdocs.json b/api_docs/kbn_elastic_assistant.devdocs.json index c85859f2fe60a..b0a4d52207862 100644 --- a/api_docs/kbn_elastic_assistant.devdocs.json +++ b/api_docs/kbn_elastic_assistant.devdocs.json @@ -159,7 +159,7 @@ "label": "AssistantProvider", "description": [], "signature": [ - "({ actionTypeRegistry, alertsIndexPattern, assistantAvailability, assistantTelemetry, augmentMessageCodeBlocks, docLinks, basePath, basePromptContexts, baseQuickPrompts, baseSystemPrompts, children, getComments, http, baseConversations, navigateToApp, nameSpace, title, toasts, }: React.PropsWithChildren<", + "({ actionTypeRegistry, alertsIndexPattern, assistantAvailability, assistantTelemetry, augmentMessageCodeBlocks, docLinks, basePath, basePromptContexts, children, getComments, http, baseConversations, navigateToApp, nameSpace, title, toasts, currentAppId, }: React.PropsWithChildren<", "AssistantProviderProps", ">) => JSX.Element" ], @@ -172,7 +172,7 @@ "id": "def-public.AssistantProvider.$1", "type": "CompoundType", "tags": [], - "label": "{\n actionTypeRegistry,\n alertsIndexPattern,\n assistantAvailability,\n assistantTelemetry,\n augmentMessageCodeBlocks,\n docLinks,\n basePath,\n basePromptContexts = [],\n baseQuickPrompts = [],\n baseSystemPrompts = BASE_SYSTEM_PROMPTS,\n children,\n getComments,\n http,\n baseConversations,\n navigateToApp,\n nameSpace = DEFAULT_ASSISTANT_NAMESPACE,\n title = DEFAULT_ASSISTANT_TITLE,\n toasts,\n}", + "label": "{\n actionTypeRegistry,\n alertsIndexPattern,\n assistantAvailability,\n assistantTelemetry,\n augmentMessageCodeBlocks,\n docLinks,\n basePath,\n basePromptContexts = [],\n children,\n getComments,\n http,\n baseConversations,\n navigateToApp,\n nameSpace = DEFAULT_ASSISTANT_NAMESPACE,\n title = DEFAULT_ASSISTANT_TITLE,\n toasts,\n currentAppId,\n}", "description": [], "signature": [ "React.PropsWithChildren<", @@ -302,6 +302,98 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.bulkUpdatePrompts", + "type": "Function", + "tags": [], + "label": "bulkUpdatePrompts", + "description": [], + "signature": [ + "(http: ", + { + "pluginId": "@kbn/core-http-browser", + "scope": "common", + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-common.HttpSetup", + "text": "HttpSetup" + }, + ", prompts: { delete?: { query?: string | undefined; ids?: string[] | undefined; } | undefined; create?: { name: string; content: string; promptType: \"system\" | \"quick\"; color?: string | undefined; categories?: string[] | undefined; isNewConversationDefault?: boolean | undefined; isDefault?: boolean | undefined; consumer?: string | undefined; }[] | undefined; update?: { id: string; content?: string | undefined; color?: string | undefined; categories?: string[] | undefined; isNewConversationDefault?: boolean | undefined; isDefault?: boolean | undefined; consumer?: string | undefined; }[] | undefined; }, toasts?: ", + { + "pluginId": "@kbn/core-notifications-browser", + "scope": "common", + "docId": "kibKbnCoreNotificationsBrowserPluginApi", + "section": "def-common.IToasts", + "text": "IToasts" + }, + " | undefined) => Promise<{ attributes: { results: { created: { id: string; name: string; content: string; promptType: \"system\" | \"quick\"; timestamp?: string | undefined; categories?: string[] | undefined; color?: string | undefined; isNewConversationDefault?: boolean | undefined; isDefault?: boolean | undefined; consumer?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; createdAt?: string | undefined; createdBy?: string | undefined; users?: { id?: string | undefined; name?: string | undefined; }[] | undefined; namespace?: string | undefined; }[]; updated: { id: string; name: string; content: string; promptType: \"system\" | \"quick\"; timestamp?: string | undefined; categories?: string[] | undefined; color?: string | undefined; isNewConversationDefault?: boolean | undefined; isDefault?: boolean | undefined; consumer?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; createdAt?: string | undefined; createdBy?: string | undefined; users?: { id?: string | undefined; name?: string | undefined; }[] | undefined; namespace?: string | undefined; }[]; skipped: { id: string; skip_reason: \"PROMPT_FIELD_NOT_MODIFIED\"; name?: string | undefined; }[]; deleted: string[]; }; summary: { total: number; succeeded: number; failed: number; skipped: number; }; errors?: { message: string; status_code: number; prompts: { id: string; name?: string | undefined; }[]; err_code?: string | undefined; }[] | undefined; }; success?: boolean | undefined; status_code?: number | undefined; message?: string | undefined; prompts_count?: number | undefined; } | undefined>" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/prompts/bulk_update_prompts.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.bulkUpdatePrompts.$1", + "type": "Object", + "tags": [], + "label": "http", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-http-browser", + "scope": "common", + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-common.HttpSetup", + "text": "HttpSetup" + } + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/prompts/bulk_update_prompts.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.bulkUpdatePrompts.$2", + "type": "Object", + "tags": [], + "label": "prompts", + "description": [], + "signature": [ + "{ delete?: { query?: string | undefined; ids?: string[] | undefined; } | undefined; create?: { name: string; content: string; promptType: \"system\" | \"quick\"; color?: string | undefined; categories?: string[] | undefined; isNewConversationDefault?: boolean | undefined; isDefault?: boolean | undefined; consumer?: string | undefined; }[] | undefined; update?: { id: string; content?: string | undefined; color?: string | undefined; categories?: string[] | undefined; isNewConversationDefault?: boolean | undefined; isDefault?: boolean | undefined; consumer?: string | undefined; }[] | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/prompts/bulk_update_prompts.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.bulkUpdatePrompts.$3", + "type": "Object", + "tags": [], + "label": "toasts", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-notifications-browser", + "scope": "common", + "docId": "kibKbnCoreNotificationsBrowserPluginApi", + "section": "def-common.IToasts", + "text": "IToasts" + }, + " | undefined" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/prompts/bulk_update_prompts.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/elastic-assistant", "id": "def-public.ConnectorSelectorInline", @@ -395,6 +487,107 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.getPrompts", + "type": "Function", + "tags": [], + "label": "getPrompts", + "description": [], + "signature": [ + "({ http, signal, toasts, }: { http: ", + { + "pluginId": "@kbn/core-http-browser", + "scope": "common", + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-common.HttpSetup", + "text": "HttpSetup" + }, + "; toasts: ", + { + "pluginId": "@kbn/core-notifications-browser", + "scope": "common", + "docId": "kibKbnCoreNotificationsBrowserPluginApi", + "section": "def-common.IToasts", + "text": "IToasts" + }, + "; signal?: AbortSignal | undefined; }) => Promise<{ page: number; perPage: number; total: number; data: { id: string; name: string; content: string; promptType: \"system\" | \"quick\"; timestamp?: string | undefined; categories?: string[] | undefined; color?: string | undefined; isNewConversationDefault?: boolean | undefined; isDefault?: boolean | undefined; consumer?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; createdAt?: string | undefined; createdBy?: string | undefined; users?: { id?: string | undefined; name?: string | undefined; }[] | undefined; namespace?: string | undefined; }[]; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/prompts/use_fetch_prompts.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.getPrompts.$1", + "type": "Object", + "tags": [], + "label": "{\n http,\n signal,\n toasts,\n}", + "description": [], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/prompts/use_fetch_prompts.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.getPrompts.$1.http", + "type": "Object", + "tags": [], + "label": "http", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-http-browser", + "scope": "common", + "docId": "kibKbnCoreHttpBrowserPluginApi", + "section": "def-common.HttpSetup", + "text": "HttpSetup" + } + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/prompts/use_fetch_prompts.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.getPrompts.$1.toasts", + "type": "Object", + "tags": [], + "label": "toasts", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-notifications-browser", + "scope": "common", + "docId": "kibKbnCoreNotificationsBrowserPluginApi", + "section": "def-common.IToasts", + "text": "IToasts" + } + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/prompts/use_fetch_prompts.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.getPrompts.$1.signal", + "type": "Object", + "tags": [], + "label": "signal", + "description": [], + "signature": [ + "AbortSignal | undefined" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/api/prompts/use_fetch_prompts.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/elastic-assistant", "id": "def-public.getUserConversations", @@ -2192,123 +2385,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.Prompt", - "type": "Interface", - "tags": [], - "label": "Prompt", - "description": [], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.Prompt.id", - "type": "string", - "tags": [], - "label": "id", - "description": [], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.Prompt.content", - "type": "string", - "tags": [], - "label": "content", - "description": [], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.Prompt.name", - "type": "string", - "tags": [], - "label": "name", - "description": [], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.Prompt.promptType", - "type": "CompoundType", - "tags": [], - "label": "promptType", - "description": [], - "signature": [ - "\"user\" | \"system\"" - ], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.Prompt.isDefault", - "type": "CompoundType", - "tags": [], - "label": "isDefault", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.Prompt.isNewConversationDefault", - "type": "CompoundType", - "tags": [], - "label": "isNewConversationDefault", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.Prompt.isFlyoutMode", - "type": "CompoundType", - "tags": [], - "label": "isFlyoutMode", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.Prompt.label", - "type": "string", - "tags": [], - "label": "label", - "description": [], - "signature": [ - "string | undefined" - ], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/types.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "@kbn/elastic-assistant", "id": "def-public.PromptContext", @@ -2429,83 +2505,6 @@ } ], "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.QuickPrompt", - "type": "Interface", - "tags": [], - "label": "QuickPrompt", - "description": [ - "\nA QuickPrompt is a badge that is displayed below the Assistant's input field. They provide\na quick way for users to insert prompts as templates into the Assistant's input field. If no\ncategories are provided they will always display with the assistant, however categories can be\nsupplied to only display the QuickPrompt when the Assistant is registered with corresponding\nPromptContext's containing the same category.\n\nisDefault: If true, this QuickPrompt cannot be deleted by the user" - ], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/types.tsx", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.QuickPrompt.title", - "type": "string", - "tags": [], - "label": "title", - "description": [], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/types.tsx", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.QuickPrompt.prompt", - "type": "string", - "tags": [], - "label": "prompt", - "description": [], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/types.tsx", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.QuickPrompt.color", - "type": "string", - "tags": [], - "label": "color", - "description": [], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/types.tsx", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.QuickPrompt.categories", - "type": "Array", - "tags": [], - "label": "categories", - "description": [], - "signature": [ - "string[] | undefined" - ], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/types.tsx", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.QuickPrompt.isDefault", - "type": "CompoundType", - "tags": [], - "label": "isDefault", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/types.tsx", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false } ], "enums": [], diff --git a/api_docs/kbn_elastic_assistant.mdx b/api_docs/kbn_elastic_assistant.mdx index db7825770e15f..edcdedcfda86e 100644 --- a/api_docs/kbn_elastic_assistant.mdx +++ b/api_docs/kbn_elastic_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-elastic-assistant title: "@kbn/elastic-assistant" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/elastic-assistant plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-assistant'] --- import kbnElasticAssistantObj from './kbn_elastic_assistant.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/ | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 166 | 0 | 139 | 9 | +| 160 | 0 | 134 | 9 | ## Client diff --git a/api_docs/kbn_elastic_assistant_common.devdocs.json b/api_docs/kbn_elastic_assistant_common.devdocs.json index 1355cdaaf05af..8de92399115d6 100644 --- a/api_docs/kbn_elastic_assistant_common.devdocs.json +++ b/api_docs/kbn_elastic_assistant_common.devdocs.json @@ -2291,6 +2291,81 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.FindPromptsRequestQuery", + "type": "Type", + "tags": [], + "label": "FindPromptsRequestQuery", + "description": [], + "signature": [ + "{ per_page: number; page: number; fields?: string[] | undefined; filter?: string | undefined; sort_field?: \"name\" | \"updated_at\" | \"created_at\" | \"is_default\" | undefined; sort_order?: \"asc\" | \"desc\" | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/find_prompts_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.FindPromptsRequestQueryInput", + "type": "Type", + "tags": [], + "label": "FindPromptsRequestQueryInput", + "description": [], + "signature": [ + "{ fields?: unknown; filter?: string | undefined; sort_field?: \"name\" | \"updated_at\" | \"created_at\" | \"is_default\" | undefined; sort_order?: \"asc\" | \"desc\" | undefined; page?: number | undefined; per_page?: number | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/find_prompts_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.FindPromptsResponse", + "type": "Type", + "tags": [], + "label": "FindPromptsResponse", + "description": [], + "signature": [ + "{ page: number; perPage: number; total: number; data: { id: string; name: string; content: string; promptType: \"system\" | \"quick\"; timestamp?: string | undefined; categories?: string[] | undefined; color?: string | undefined; isNewConversationDefault?: boolean | undefined; isDefault?: boolean | undefined; consumer?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; createdAt?: string | undefined; createdBy?: string | undefined; users?: { id?: string | undefined; name?: string | undefined; }[] | undefined; namespace?: string | undefined; }[]; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/find_prompts_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.FindPromptsSortField", + "type": "Type", + "tags": [], + "label": "FindPromptsSortField", + "description": [], + "signature": [ + "\"name\" | \"updated_at\" | \"created_at\" | \"is_default\"" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/find_prompts_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.FindPromptsSortFieldEnum", + "type": "Type", + "tags": [], + "label": "FindPromptsSortFieldEnum", + "description": [], + "signature": [ + "{ name: \"name\"; updated_at: \"updated_at\"; created_at: \"created_at\"; is_default: \"is_default\"; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/find_prompts_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/elastic-assistant-common", "id": "def-common.GenerationInterval", @@ -2858,6 +2933,36 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.PromptResponse", + "type": "Type", + "tags": [], + "label": "PromptResponse", + "description": [], + "signature": [ + "{ id: string; name: string; content: string; promptType: \"system\" | \"quick\"; timestamp?: string | undefined; categories?: string[] | undefined; color?: string | undefined; isNewConversationDefault?: boolean | undefined; isDefault?: boolean | undefined; consumer?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; createdAt?: string | undefined; createdBy?: string | undefined; users?: { id?: string | undefined; name?: string | undefined; }[] | undefined; namespace?: string | undefined; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.PromptTypeEnum", + "type": "Type", + "tags": [], + "label": "PromptTypeEnum", + "description": [], + "signature": [ + "{ system: \"system\"; quick: \"quick\"; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/elastic-assistant-common", "id": "def-common.Provider", @@ -4436,6 +4541,66 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.FindPromptsRequestQuery", + "type": "Object", + "tags": [], + "label": "FindPromptsRequestQuery", + "description": [], + "signature": [ + "Zod.ZodObject<{ fields: Zod.ZodOptional, string[], unknown>>; filter: Zod.ZodOptional; sort_field: Zod.ZodOptional>; sort_order: Zod.ZodOptional>; page: Zod.ZodDefault>; per_page: Zod.ZodDefault>; }, \"strip\", Zod.ZodTypeAny, { per_page: number; page: number; fields?: string[] | undefined; filter?: string | undefined; sort_field?: \"name\" | \"updated_at\" | \"created_at\" | \"is_default\" | undefined; sort_order?: \"asc\" | \"desc\" | undefined; }, { fields?: unknown; filter?: string | undefined; sort_field?: \"name\" | \"updated_at\" | \"created_at\" | \"is_default\" | undefined; sort_order?: \"asc\" | \"desc\" | undefined; page?: number | undefined; per_page?: number | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/find_prompts_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.FindPromptsResponse", + "type": "Object", + "tags": [], + "label": "FindPromptsResponse", + "description": [], + "signature": [ + "Zod.ZodObject<{ page: Zod.ZodNumber; perPage: Zod.ZodNumber; total: Zod.ZodNumber; data: Zod.ZodArray; name: Zod.ZodString; promptType: Zod.ZodEnum<[\"system\", \"quick\"]>; content: Zod.ZodString; categories: Zod.ZodOptional>; color: Zod.ZodOptional; isNewConversationDefault: Zod.ZodOptional; isDefault: Zod.ZodOptional; consumer: Zod.ZodOptional; updatedAt: Zod.ZodOptional; updatedBy: Zod.ZodOptional; createdAt: Zod.ZodOptional; createdBy: Zod.ZodOptional; users: Zod.ZodOptional; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">>; namespace: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id: string; name: string; content: string; promptType: \"system\" | \"quick\"; timestamp?: string | undefined; categories?: string[] | undefined; color?: string | undefined; isNewConversationDefault?: boolean | undefined; isDefault?: boolean | undefined; consumer?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; createdAt?: string | undefined; createdBy?: string | undefined; users?: { id?: string | undefined; name?: string | undefined; }[] | undefined; namespace?: string | undefined; }, { id: string; name: string; content: string; promptType: \"system\" | \"quick\"; timestamp?: string | undefined; categories?: string[] | undefined; color?: string | undefined; isNewConversationDefault?: boolean | undefined; isDefault?: boolean | undefined; consumer?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; createdAt?: string | undefined; createdBy?: string | undefined; users?: { id?: string | undefined; name?: string | undefined; }[] | undefined; namespace?: string | undefined; }>, \"many\">; }, \"strip\", Zod.ZodTypeAny, { page: number; perPage: number; total: number; data: { id: string; name: string; content: string; promptType: \"system\" | \"quick\"; timestamp?: string | undefined; categories?: string[] | undefined; color?: string | undefined; isNewConversationDefault?: boolean | undefined; isDefault?: boolean | undefined; consumer?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; createdAt?: string | undefined; createdBy?: string | undefined; users?: { id?: string | undefined; name?: string | undefined; }[] | undefined; namespace?: string | undefined; }[]; }, { page: number; perPage: number; total: number; data: { id: string; name: string; content: string; promptType: \"system\" | \"quick\"; timestamp?: string | undefined; categories?: string[] | undefined; color?: string | undefined; isNewConversationDefault?: boolean | undefined; isDefault?: boolean | undefined; consumer?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; createdAt?: string | undefined; createdBy?: string | undefined; users?: { id?: string | undefined; name?: string | undefined; }[] | undefined; namespace?: string | undefined; }[]; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/find_prompts_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.FindPromptsSortField", + "type": "Object", + "tags": [], + "label": "FindPromptsSortField", + "description": [], + "signature": [ + "Zod.ZodEnum<[\"created_at\", \"is_default\", \"name\", \"updated_at\"]>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/find_prompts_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.FindPromptsSortFieldEnum", + "type": "Object", + "tags": [], + "label": "FindPromptsSortFieldEnum", + "description": [], + "signature": [ + "{ name: \"name\"; updated_at: \"updated_at\"; created_at: \"created_at\"; is_default: \"is_default\"; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/find_prompts_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/elastic-assistant-common", "id": "def-common.GenerationInterval", @@ -4916,6 +5081,36 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.PromptResponse", + "type": "Object", + "tags": [], + "label": "PromptResponse", + "description": [], + "signature": [ + "Zod.ZodObject<{ id: Zod.ZodString; timestamp: Zod.ZodOptional; name: Zod.ZodString; promptType: Zod.ZodEnum<[\"system\", \"quick\"]>; content: Zod.ZodString; categories: Zod.ZodOptional>; color: Zod.ZodOptional; isNewConversationDefault: Zod.ZodOptional; isDefault: Zod.ZodOptional; consumer: Zod.ZodOptional; updatedAt: Zod.ZodOptional; updatedBy: Zod.ZodOptional; createdAt: Zod.ZodOptional; createdBy: Zod.ZodOptional; users: Zod.ZodOptional; name: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id?: string | undefined; name?: string | undefined; }, { id?: string | undefined; name?: string | undefined; }>, \"many\">>; namespace: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { id: string; name: string; content: string; promptType: \"system\" | \"quick\"; timestamp?: string | undefined; categories?: string[] | undefined; color?: string | undefined; isNewConversationDefault?: boolean | undefined; isDefault?: boolean | undefined; consumer?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; createdAt?: string | undefined; createdBy?: string | undefined; users?: { id?: string | undefined; name?: string | undefined; }[] | undefined; namespace?: string | undefined; }, { id: string; name: string; content: string; promptType: \"system\" | \"quick\"; timestamp?: string | undefined; categories?: string[] | undefined; color?: string | undefined; isNewConversationDefault?: boolean | undefined; isDefault?: boolean | undefined; consumer?: string | undefined; updatedAt?: string | undefined; updatedBy?: string | undefined; createdAt?: string | undefined; createdBy?: string | undefined; users?: { id?: string | undefined; name?: string | undefined; }[] | undefined; namespace?: string | undefined; }>" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/elastic-assistant-common", + "id": "def-common.PromptTypeEnum", + "type": "Object", + "tags": [], + "label": "PromptTypeEnum", + "description": [], + "signature": [ + "{ system: \"system\"; quick: \"quick\"; }" + ], + "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/elastic-assistant-common", "id": "def-common.Provider", diff --git a/api_docs/kbn_elastic_assistant_common.mdx b/api_docs/kbn_elastic_assistant_common.mdx index d83bd3ed62b83..c446a44832c97 100644 --- a/api_docs/kbn_elastic_assistant_common.mdx +++ b/api_docs/kbn_elastic_assistant_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-elastic-assistant-common title: "@kbn/elastic-assistant-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/elastic-assistant-common plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-assistant-common'] --- import kbnElasticAssistantCommonObj from './kbn_elastic_assistant_common.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/ | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 349 | 0 | 323 | 0 | +| 362 | 0 | 336 | 0 | ## Common diff --git a/api_docs/kbn_entities_schema.devdocs.json b/api_docs/kbn_entities_schema.devdocs.json index b021defec9a79..cf8d585a18f80 100644 --- a/api_docs/kbn_entities_schema.devdocs.json +++ b/api_docs/kbn_entities_schema.devdocs.json @@ -32,18 +32,6 @@ "deprecated": false, "trackAdoption": false, "initialIsOpen": false - }, - { - "parentPluginId": "@kbn/entities-schema", - "id": "def-common.EntityType", - "type": "Enum", - "tags": [], - "label": "EntityType", - "description": [], - "path": "x-pack/packages/kbn-entities-schema/src/schema/common.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false } ], "misc": [ @@ -55,15 +43,7 @@ "label": "EntityDefinition", "description": [], "signature": [ - "{ id: string; type: ", - { - "pluginId": "@kbn/entities-schema", - "scope": "common", - "docId": "kibKbnEntitiesSchemaPluginApi", - "section": "def-common.EntityType", - "text": "EntityType" - }, - "; name: string; history: { interval: moment.Duration; timestampField: string; lookbackPeriod?: moment.Duration | undefined; settings?: { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; } | undefined; }; managed: boolean; indexPatterns: string[]; identityFields: ({ field: string; optional: boolean; } | { field: string; optional: boolean; })[]; displayNameTemplate: string; description?: string | undefined; filter?: string | undefined; metadata?: ({ source: string; destination?: string | undefined; limit?: number | undefined; } | { source: string; destination: string; limit: number; })[] | undefined; metrics?: { name: string; metrics: ({ name: string; field: string; aggregation: ", + "{ id: string; type: string; name: string; history: { interval: moment.Duration; timestampField: string; lookbackPeriod?: moment.Duration | undefined; settings?: { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; } | undefined; }; managed: boolean; indexPatterns: string[]; identityFields: ({ field: string; optional: boolean; } | { field: string; optional: boolean; })[]; displayNameTemplate: string; description?: string | undefined; filter?: string | undefined; metadata?: ({ source: string; destination?: string | undefined; limit?: number | undefined; } | { source: string; destination: string; limit: number; })[] | undefined; metrics?: { name: string; metrics: ({ name: string; field: string; aggregation: ", { "pluginId": "@kbn/entities-schema", "scope": "common", @@ -241,15 +221,7 @@ "label": "entityDefinitionSchema", "description": [], "signature": [ - "Zod.ZodObject<{ id: Zod.ZodString; name: Zod.ZodString; description: Zod.ZodOptional; type: Zod.ZodNativeEnum; filter: Zod.ZodOptional; indexPatterns: Zod.ZodArray; identityFields: Zod.ZodArray, Zod.ZodEffects]>, \"many\">; displayNameTemplate: Zod.ZodString; metadata: Zod.ZodOptional; limit: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { source: string; destination?: string | undefined; limit?: number | undefined; }, { source: string; destination?: string | undefined; limit?: number | undefined; }>, Zod.ZodEffects]>, \"many\">>; metrics: Zod.ZodOptional; type: Zod.ZodString; filter: Zod.ZodOptional; indexPatterns: Zod.ZodArray; identityFields: Zod.ZodArray, Zod.ZodEffects]>, \"many\">; displayNameTemplate: Zod.ZodString; metadata: Zod.ZodOptional; limit: Zod.ZodOptional>; }, \"strip\", Zod.ZodTypeAny, { source: string; destination?: string | undefined; limit?: number | undefined; }, { source: string; destination?: string | undefined; limit?: number | undefined; }>, Zod.ZodEffects]>, \"many\">>; metrics: Zod.ZodOptional, \"many\">>; staticFields: Zod.ZodOptional>; managed: Zod.ZodDefault>; history: Zod.ZodObject<{ timestampField: Zod.ZodString; interval: Zod.ZodEffects, moment.Duration, string>; lookbackPeriod: Zod.ZodOptional>; settings: Zod.ZodOptional; syncDelay: Zod.ZodOptional; frequency: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; }, { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { interval: moment.Duration; timestampField: string; lookbackPeriod?: moment.Duration | undefined; settings?: { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; } | undefined; }, { interval: string; timestampField: string; lookbackPeriod?: string | undefined; settings?: { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; } | undefined; }>; latest: Zod.ZodOptional; syncDelay: Zod.ZodOptional; frequency: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; }, { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { settings?: { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; } | undefined; }, { settings?: { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; } | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { id: string; type: ", - { - "pluginId": "@kbn/entities-schema", - "scope": "common", - "docId": "kibKbnEntitiesSchemaPluginApi", - "section": "def-common.EntityType", - "text": "EntityType" - }, - "; name: string; history: { interval: moment.Duration; timestampField: string; lookbackPeriod?: moment.Duration | undefined; settings?: { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; } | undefined; }; managed: boolean; indexPatterns: string[]; identityFields: ({ field: string; optional: boolean; } | { field: string; optional: boolean; })[]; displayNameTemplate: string; description?: string | undefined; filter?: string | undefined; metadata?: ({ source: string; destination?: string | undefined; limit?: number | undefined; } | { source: string; destination: string; limit: number; })[] | undefined; metrics?: { name: string; metrics: ({ name: string; field: string; aggregation: ", + "; filter?: string | undefined; } | { name: string; aggregation: \"doc_count\"; filter?: string | undefined; } | { name: string; field: string; percentile: number; aggregation: \"percentile\"; filter?: string | undefined; })[]; equation: string; }>, \"many\">>; staticFields: Zod.ZodOptional>; managed: Zod.ZodDefault>; history: Zod.ZodObject<{ timestampField: Zod.ZodString; interval: Zod.ZodEffects, moment.Duration, string>; lookbackPeriod: Zod.ZodOptional>; settings: Zod.ZodOptional; syncDelay: Zod.ZodOptional; frequency: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; }, { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { interval: moment.Duration; timestampField: string; lookbackPeriod?: moment.Duration | undefined; settings?: { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; } | undefined; }, { interval: string; timestampField: string; lookbackPeriod?: string | undefined; settings?: { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; } | undefined; }>; latest: Zod.ZodOptional; syncDelay: Zod.ZodOptional; frequency: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; }, { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { settings?: { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; } | undefined; }, { settings?: { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; } | undefined; }>>; }, \"strip\", Zod.ZodTypeAny, { id: string; type: string; name: string; history: { interval: moment.Duration; timestampField: string; lookbackPeriod?: moment.Duration | undefined; settings?: { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; } | undefined; }; managed: boolean; indexPatterns: string[]; identityFields: ({ field: string; optional: boolean; } | { field: string; optional: boolean; })[]; displayNameTemplate: string; description?: string | undefined; filter?: string | undefined; metadata?: ({ source: string; destination?: string | undefined; limit?: number | undefined; } | { source: string; destination: string; limit: number; })[] | undefined; metrics?: { name: string; metrics: ({ name: string; field: string; aggregation: ", { "pluginId": "@kbn/entities-schema", "scope": "common", @@ -305,15 +269,7 @@ "section": "def-common.BasicAggregations", "text": "BasicAggregations" }, - "; filter?: string | undefined; } | { name: string; aggregation: \"doc_count\"; filter?: string | undefined; } | { name: string; field: string; percentile: number; aggregation: \"percentile\"; filter?: string | undefined; })[]; equation: string; }[] | undefined; staticFields?: Record | undefined; latest?: { settings?: { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; } | undefined; } | undefined; }, { id: string; type: ", - { - "pluginId": "@kbn/entities-schema", - "scope": "common", - "docId": "kibKbnEntitiesSchemaPluginApi", - "section": "def-common.EntityType", - "text": "EntityType" - }, - "; name: string; history: { interval: string; timestampField: string; lookbackPeriod?: string | undefined; settings?: { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; } | undefined; }; indexPatterns: string[]; identityFields: (string | { field: string; optional: boolean; })[]; displayNameTemplate: string; description?: string | undefined; filter?: string | undefined; metadata?: (string | { source: string; destination?: string | undefined; limit?: number | undefined; })[] | undefined; metrics?: { name: string; metrics: ({ name: string; field: string; aggregation: ", + "; filter?: string | undefined; } | { name: string; aggregation: \"doc_count\"; filter?: string | undefined; } | { name: string; field: string; percentile: number; aggregation: \"percentile\"; filter?: string | undefined; })[]; equation: string; }[] | undefined; staticFields?: Record | undefined; latest?: { settings?: { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; } | undefined; } | undefined; }, { id: string; type: string; name: string; history: { interval: string; timestampField: string; lookbackPeriod?: string | undefined; settings?: { syncField?: string | undefined; syncDelay?: string | undefined; frequency?: string | undefined; } | undefined; }; indexPatterns: string[]; identityFields: (string | { field: string; optional: boolean; })[]; displayNameTemplate: string; description?: string | undefined; filter?: string | undefined; metadata?: (string | { source: string; destination?: string | undefined; limit?: number | undefined; })[] | undefined; metrics?: { name: string; metrics: ({ name: string; field: string; aggregation: ", { "pluginId": "@kbn/entities-schema", "scope": "common", @@ -336,7 +292,7 @@ "label": "entityHistorySchema", "description": [], "signature": [ - "Zod.ZodIntersection; displayName: Zod.ZodString; spaceId: Zod.ZodString; metrics: Zod.ZodRecord; }, \"strip\", Zod.ZodTypeAny, { id: string; spaceId: string; metrics: Record; displayName: string; identityFields: string[]; }, { id: string; spaceId: string; metrics: Record; displayName: string; identityFields: string[]; }>; \"@timestamp\": Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { \"@timestamp\": string; entity: { id: string; spaceId: string; metrics: Record; displayName: string; identityFields: string[]; }; }, { \"@timestamp\": string; entity: { id: string; spaceId: string; metrics: Record; displayName: string; identityFields: string[]; }; }>, Zod.ZodRecord>>" + "Zod.ZodIntersection; displayName: Zod.ZodString; metrics: Zod.ZodRecord; }, \"strip\", Zod.ZodTypeAny, { id: string; metrics: Record; displayName: string; identityFields: string[]; }, { id: string; metrics: Record; displayName: string; identityFields: string[]; }>; \"@timestamp\": Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { \"@timestamp\": string; entity: { id: string; metrics: Record; displayName: string; identityFields: string[]; }; }, { \"@timestamp\": string; entity: { id: string; metrics: Record; displayName: string; identityFields: string[]; }; }>, Zod.ZodRecord>>" ], "path": "x-pack/packages/kbn-entities-schema/src/schema/entity.ts", "deprecated": false, @@ -351,36 +307,13 @@ "label": "entitySummarySchema", "description": [], "signature": [ - "Zod.ZodIntersection; displayName: Zod.ZodString; spaceId: Zod.ZodString; metrics: Zod.ZodRecord; }, \"strip\", Zod.ZodTypeAny, { id: string; spaceId: string; metrics: Record; displayName: string; identityFields: string[]; }, { id: string; spaceId: string; metrics: Record; displayName: string; identityFields: string[]; }>; lastSeenTimestamp: Zod.ZodString; firstSeenTimestamp: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { entity: { id: string; spaceId: string; metrics: Record; displayName: string; identityFields: string[]; }; lastSeenTimestamp: string; firstSeenTimestamp: string; }, { entity: { id: string; spaceId: string; metrics: Record; displayName: string; identityFields: string[]; }; lastSeenTimestamp: string; firstSeenTimestamp: string; }>, Zod.ZodRecord>>" + "Zod.ZodIntersection; displayName: Zod.ZodString; metrics: Zod.ZodRecord; }, \"strip\", Zod.ZodTypeAny, { id: string; metrics: Record; displayName: string; identityFields: string[]; }, { id: string; metrics: Record; displayName: string; identityFields: string[]; }>; lastSeenTimestamp: Zod.ZodString; firstSeenTimestamp: Zod.ZodString; }, \"strip\", Zod.ZodTypeAny, { entity: { id: string; metrics: Record; displayName: string; identityFields: string[]; }; lastSeenTimestamp: string; firstSeenTimestamp: string; }, { entity: { id: string; metrics: Record; displayName: string; identityFields: string[]; }; lastSeenTimestamp: string; firstSeenTimestamp: string; }>, Zod.ZodRecord>>" ], "path": "x-pack/packages/kbn-entities-schema/src/schema/entity.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false }, - { - "parentPluginId": "@kbn/entities-schema", - "id": "def-common.entityTypeSchema", - "type": "Object", - "tags": [], - "label": "entityTypeSchema", - "description": [], - "signature": [ - "Zod.ZodNativeEnum" - ], - "path": "x-pack/packages/kbn-entities-schema/src/schema/common.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "@kbn/entities-schema", "id": "def-common.filterSchema", diff --git a/api_docs/kbn_entities_schema.mdx b/api_docs/kbn_entities_schema.mdx index 0ca71f98a16ad..e51f01aeff41f 100644 --- a/api_docs/kbn_entities_schema.mdx +++ b/api_docs/kbn_entities_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-entities-schema title: "@kbn/entities-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/entities-schema plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/entities-schema'] --- import kbnEntitiesSchemaObj from './kbn_entities_schema.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs- | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 20 | 0 | 20 | 0 | +| 18 | 0 | 18 | 0 | ## Common diff --git a/api_docs/kbn_es.mdx b/api_docs/kbn_es.mdx index 438c47828220c..284740bd3b66f 100644 --- a/api_docs/kbn_es.mdx +++ b/api_docs/kbn_es.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es title: "@kbn/es" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es'] --- import kbnEsObj from './kbn_es.devdocs.json'; diff --git a/api_docs/kbn_es_archiver.mdx b/api_docs/kbn_es_archiver.mdx index 72cb9c99d0a29..ebebc9d690c7f 100644 --- a/api_docs/kbn_es_archiver.mdx +++ b/api_docs/kbn_es_archiver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-archiver title: "@kbn/es-archiver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-archiver plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-archiver'] --- import kbnEsArchiverObj from './kbn_es_archiver.devdocs.json'; diff --git a/api_docs/kbn_es_errors.mdx b/api_docs/kbn_es_errors.mdx index df08983167765..a01ac081cce44 100644 --- a/api_docs/kbn_es_errors.mdx +++ b/api_docs/kbn_es_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-errors title: "@kbn/es-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-errors plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-errors'] --- import kbnEsErrorsObj from './kbn_es_errors.devdocs.json'; diff --git a/api_docs/kbn_es_query.mdx b/api_docs/kbn_es_query.mdx index 153c2c3858508..67eec9f8a7c9a 100644 --- a/api_docs/kbn_es_query.mdx +++ b/api_docs/kbn_es_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-query title: "@kbn/es-query" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-query plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-query'] --- import kbnEsQueryObj from './kbn_es_query.devdocs.json'; diff --git a/api_docs/kbn_es_types.mdx b/api_docs/kbn_es_types.mdx index aee6c4615b633..2fc7932787843 100644 --- a/api_docs/kbn_es_types.mdx +++ b/api_docs/kbn_es_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-types title: "@kbn/es-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-types plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-types'] --- import kbnEsTypesObj from './kbn_es_types.devdocs.json'; diff --git a/api_docs/kbn_eslint_plugin_imports.mdx b/api_docs/kbn_eslint_plugin_imports.mdx index 6f1e3299d5b36..92385d5dc6ca2 100644 --- a/api_docs/kbn_eslint_plugin_imports.mdx +++ b/api_docs/kbn_eslint_plugin_imports.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-eslint-plugin-imports title: "@kbn/eslint-plugin-imports" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/eslint-plugin-imports plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/eslint-plugin-imports'] --- import kbnEslintPluginImportsObj from './kbn_eslint_plugin_imports.devdocs.json'; diff --git a/api_docs/kbn_esql_ast.mdx b/api_docs/kbn_esql_ast.mdx index 57fea63d403a8..35ca8dcb35580 100644 --- a/api_docs/kbn_esql_ast.mdx +++ b/api_docs/kbn_esql_ast.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-esql-ast title: "@kbn/esql-ast" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/esql-ast plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-ast'] --- import kbnEsqlAstObj from './kbn_esql_ast.devdocs.json'; diff --git a/api_docs/kbn_esql_utils.mdx b/api_docs/kbn_esql_utils.mdx index 5e316273dbeb0..2e55d7b020e51 100644 --- a/api_docs/kbn_esql_utils.mdx +++ b/api_docs/kbn_esql_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-esql-utils title: "@kbn/esql-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/esql-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-utils'] --- import kbnEsqlUtilsObj from './kbn_esql_utils.devdocs.json'; diff --git a/api_docs/kbn_esql_validation_autocomplete.mdx b/api_docs/kbn_esql_validation_autocomplete.mdx index b77450ebf4258..14910b931a74f 100644 --- a/api_docs/kbn_esql_validation_autocomplete.mdx +++ b/api_docs/kbn_esql_validation_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-esql-validation-autocomplete title: "@kbn/esql-validation-autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/esql-validation-autocomplete plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-validation-autocomplete'] --- import kbnEsqlValidationAutocompleteObj from './kbn_esql_validation_autocomplete.devdocs.json'; diff --git a/api_docs/kbn_event_annotation_common.mdx b/api_docs/kbn_event_annotation_common.mdx index ffc7518189371..f70fcac11816e 100644 --- a/api_docs/kbn_event_annotation_common.mdx +++ b/api_docs/kbn_event_annotation_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-event-annotation-common title: "@kbn/event-annotation-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/event-annotation-common plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/event-annotation-common'] --- import kbnEventAnnotationCommonObj from './kbn_event_annotation_common.devdocs.json'; diff --git a/api_docs/kbn_event_annotation_components.mdx b/api_docs/kbn_event_annotation_components.mdx index 528c024c8aa0a..51c97d4f17fdc 100644 --- a/api_docs/kbn_event_annotation_components.mdx +++ b/api_docs/kbn_event_annotation_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-event-annotation-components title: "@kbn/event-annotation-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/event-annotation-components plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/event-annotation-components'] --- import kbnEventAnnotationComponentsObj from './kbn_event_annotation_components.devdocs.json'; diff --git a/api_docs/kbn_expandable_flyout.mdx b/api_docs/kbn_expandable_flyout.mdx index 5f117b1966c3e..fa90f5cb353d6 100644 --- a/api_docs/kbn_expandable_flyout.mdx +++ b/api_docs/kbn_expandable_flyout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-expandable-flyout title: "@kbn/expandable-flyout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/expandable-flyout plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/expandable-flyout'] --- import kbnExpandableFlyoutObj from './kbn_expandable_flyout.devdocs.json'; diff --git a/api_docs/kbn_field_types.mdx b/api_docs/kbn_field_types.mdx index f953df0a44a90..124b0d2f7764f 100644 --- a/api_docs/kbn_field_types.mdx +++ b/api_docs/kbn_field_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-field-types title: "@kbn/field-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/field-types plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-types'] --- import kbnFieldTypesObj from './kbn_field_types.devdocs.json'; diff --git a/api_docs/kbn_field_utils.mdx b/api_docs/kbn_field_utils.mdx index d81686dbc0573..31c4b9bd16f56 100644 --- a/api_docs/kbn_field_utils.mdx +++ b/api_docs/kbn_field_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-field-utils title: "@kbn/field-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/field-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-utils'] --- import kbnFieldUtilsObj from './kbn_field_utils.devdocs.json'; diff --git a/api_docs/kbn_find_used_node_modules.mdx b/api_docs/kbn_find_used_node_modules.mdx index 59fbf7b567355..1629328543d33 100644 --- a/api_docs/kbn_find_used_node_modules.mdx +++ b/api_docs/kbn_find_used_node_modules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-find-used-node-modules title: "@kbn/find-used-node-modules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/find-used-node-modules plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/find-used-node-modules'] --- import kbnFindUsedNodeModulesObj from './kbn_find_used_node_modules.devdocs.json'; diff --git a/api_docs/kbn_formatters.mdx b/api_docs/kbn_formatters.mdx index 7d95880cb8654..64221116dc381 100644 --- a/api_docs/kbn_formatters.mdx +++ b/api_docs/kbn_formatters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-formatters title: "@kbn/formatters" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/formatters plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/formatters'] --- import kbnFormattersObj from './kbn_formatters.devdocs.json'; diff --git a/api_docs/kbn_ftr_common_functional_services.mdx b/api_docs/kbn_ftr_common_functional_services.mdx index b4d422e907b6e..2f37cbd90989c 100644 --- a/api_docs/kbn_ftr_common_functional_services.mdx +++ b/api_docs/kbn_ftr_common_functional_services.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ftr-common-functional-services title: "@kbn/ftr-common-functional-services" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ftr-common-functional-services plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ftr-common-functional-services'] --- import kbnFtrCommonFunctionalServicesObj from './kbn_ftr_common_functional_services.devdocs.json'; diff --git a/api_docs/kbn_ftr_common_functional_ui_services.mdx b/api_docs/kbn_ftr_common_functional_ui_services.mdx index 5b18b97c23366..661c2b9335c10 100644 --- a/api_docs/kbn_ftr_common_functional_ui_services.mdx +++ b/api_docs/kbn_ftr_common_functional_ui_services.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ftr-common-functional-ui-services title: "@kbn/ftr-common-functional-ui-services" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ftr-common-functional-ui-services plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ftr-common-functional-ui-services'] --- import kbnFtrCommonFunctionalUiServicesObj from './kbn_ftr_common_functional_ui_services.devdocs.json'; diff --git a/api_docs/kbn_generate.mdx b/api_docs/kbn_generate.mdx index 0892007482be3..10fbc19e4c54c 100644 --- a/api_docs/kbn_generate.mdx +++ b/api_docs/kbn_generate.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate title: "@kbn/generate" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate'] --- import kbnGenerateObj from './kbn_generate.devdocs.json'; diff --git a/api_docs/kbn_generate_console_definitions.mdx b/api_docs/kbn_generate_console_definitions.mdx index 6500ff0465b73..2f227698834f4 100644 --- a/api_docs/kbn_generate_console_definitions.mdx +++ b/api_docs/kbn_generate_console_definitions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate-console-definitions title: "@kbn/generate-console-definitions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate-console-definitions plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate-console-definitions'] --- import kbnGenerateConsoleDefinitionsObj from './kbn_generate_console_definitions.devdocs.json'; diff --git a/api_docs/kbn_generate_csv.mdx b/api_docs/kbn_generate_csv.mdx index 3d50747543f64..26b973d07f871 100644 --- a/api_docs/kbn_generate_csv.mdx +++ b/api_docs/kbn_generate_csv.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate-csv title: "@kbn/generate-csv" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate-csv plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate-csv'] --- import kbnGenerateCsvObj from './kbn_generate_csv.devdocs.json'; diff --git a/api_docs/kbn_grouping.devdocs.json b/api_docs/kbn_grouping.devdocs.json index f699ea6ae6857..f80cff790fbd9 100644 --- a/api_docs/kbn_grouping.devdocs.json +++ b/api_docs/kbn_grouping.devdocs.json @@ -244,7 +244,7 @@ "signature": [ "{ isLoading: boolean; data?: ", "ParsedGroupingAggregation", - " | undefined; activePage: number; groupingLevel?: number | undefined; inspectButton?: JSX.Element | undefined; itemsPerPage: number; onChangeGroupsItemsPerPage?: ((size: number) => void) | undefined; onChangeGroupsPage?: ((index: number) => void) | undefined; renderChildComponent: (groupFilter: ", + " | undefined; activePage: number; selectedGroup: string; groupingLevel?: number | undefined; inspectButton?: JSX.Element | undefined; itemsPerPage: number; onChangeGroupsItemsPerPage?: ((size: number) => void) | undefined; onChangeGroupsPage?: ((index: number) => void) | undefined; renderChildComponent: (groupFilter: ", { "pluginId": "@kbn/es-query", "scope": "common", @@ -252,7 +252,7 @@ "section": "def-common.Filter", "text": "Filter" }, - "[]) => React.ReactElement>; onGroupClose: () => void; selectedGroup: string; takeActionItems: (groupFilters: ", + "[]) => React.ReactElement>; onGroupClose: () => void; takeActionItems: (groupFilters: ", { "pluginId": "@kbn/es-query", "scope": "common", diff --git a/api_docs/kbn_grouping.mdx b/api_docs/kbn_grouping.mdx index e8d2386f5d2fd..99bdef042a870 100644 --- a/api_docs/kbn_grouping.mdx +++ b/api_docs/kbn_grouping.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-grouping title: "@kbn/grouping" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/grouping plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/grouping'] --- import kbnGroupingObj from './kbn_grouping.devdocs.json'; diff --git a/api_docs/kbn_guided_onboarding.mdx b/api_docs/kbn_guided_onboarding.mdx index 649beee0a2889..3a2737b8baf53 100644 --- a/api_docs/kbn_guided_onboarding.mdx +++ b/api_docs/kbn_guided_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-guided-onboarding title: "@kbn/guided-onboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/guided-onboarding plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/guided-onboarding'] --- import kbnGuidedOnboardingObj from './kbn_guided_onboarding.devdocs.json'; diff --git a/api_docs/kbn_handlebars.mdx b/api_docs/kbn_handlebars.mdx index b519e2e4281cc..54a963988e166 100644 --- a/api_docs/kbn_handlebars.mdx +++ b/api_docs/kbn_handlebars.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-handlebars title: "@kbn/handlebars" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/handlebars plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/handlebars'] --- import kbnHandlebarsObj from './kbn_handlebars.devdocs.json'; diff --git a/api_docs/kbn_hapi_mocks.mdx b/api_docs/kbn_hapi_mocks.mdx index 8c374d967a095..74d0938bf1df8 100644 --- a/api_docs/kbn_hapi_mocks.mdx +++ b/api_docs/kbn_hapi_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-hapi-mocks title: "@kbn/hapi-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/hapi-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/hapi-mocks'] --- import kbnHapiMocksObj from './kbn_hapi_mocks.devdocs.json'; diff --git a/api_docs/kbn_health_gateway_server.mdx b/api_docs/kbn_health_gateway_server.mdx index 04e1d56022171..527c9b4afb380 100644 --- a/api_docs/kbn_health_gateway_server.mdx +++ b/api_docs/kbn_health_gateway_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-health-gateway-server title: "@kbn/health-gateway-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/health-gateway-server plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/health-gateway-server'] --- import kbnHealthGatewayServerObj from './kbn_health_gateway_server.devdocs.json'; diff --git a/api_docs/kbn_home_sample_data_card.mdx b/api_docs/kbn_home_sample_data_card.mdx index 784601444350f..bce22ac9c05ed 100644 --- a/api_docs/kbn_home_sample_data_card.mdx +++ b/api_docs/kbn_home_sample_data_card.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-card title: "@kbn/home-sample-data-card" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-card plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-card'] --- import kbnHomeSampleDataCardObj from './kbn_home_sample_data_card.devdocs.json'; diff --git a/api_docs/kbn_home_sample_data_tab.mdx b/api_docs/kbn_home_sample_data_tab.mdx index 48d73fbf5af89..ce9d2ee58f0ad 100644 --- a/api_docs/kbn_home_sample_data_tab.mdx +++ b/api_docs/kbn_home_sample_data_tab.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-tab title: "@kbn/home-sample-data-tab" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-tab plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-tab'] --- import kbnHomeSampleDataTabObj from './kbn_home_sample_data_tab.devdocs.json'; diff --git a/api_docs/kbn_i18n.mdx b/api_docs/kbn_i18n.mdx index a07796bf712df..d7bf91aecf0a1 100644 --- a/api_docs/kbn_i18n.mdx +++ b/api_docs/kbn_i18n.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n title: "@kbn/i18n" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/i18n plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n'] --- import kbnI18nObj from './kbn_i18n.devdocs.json'; diff --git a/api_docs/kbn_i18n_react.mdx b/api_docs/kbn_i18n_react.mdx index efd3c4842c2b1..30a1851e51ee5 100644 --- a/api_docs/kbn_i18n_react.mdx +++ b/api_docs/kbn_i18n_react.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n-react title: "@kbn/i18n-react" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/i18n-react plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n-react'] --- import kbnI18nReactObj from './kbn_i18n_react.devdocs.json'; diff --git a/api_docs/kbn_import_resolver.mdx b/api_docs/kbn_import_resolver.mdx index d5eb541a7c2fc..8b0f2fbf6d4ed 100644 --- a/api_docs/kbn_import_resolver.mdx +++ b/api_docs/kbn_import_resolver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-import-resolver title: "@kbn/import-resolver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/import-resolver plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/import-resolver'] --- import kbnImportResolverObj from './kbn_import_resolver.devdocs.json'; diff --git a/api_docs/kbn_index_management.mdx b/api_docs/kbn_index_management.mdx index 27b035d27d53f..6631ebeb66afd 100644 --- a/api_docs/kbn_index_management.mdx +++ b/api_docs/kbn_index_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-index-management title: "@kbn/index-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/index-management plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/index-management'] --- import kbnIndexManagementObj from './kbn_index_management.devdocs.json'; diff --git a/api_docs/kbn_inference_integration_flyout.mdx b/api_docs/kbn_inference_integration_flyout.mdx index 77cf7cf089829..15903cbd0bd9b 100644 --- a/api_docs/kbn_inference_integration_flyout.mdx +++ b/api_docs/kbn_inference_integration_flyout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-inference_integration_flyout title: "@kbn/inference_integration_flyout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/inference_integration_flyout plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/inference_integration_flyout'] --- import kbnInferenceIntegrationFlyoutObj from './kbn_inference_integration_flyout.devdocs.json'; diff --git a/api_docs/kbn_infra_forge.mdx b/api_docs/kbn_infra_forge.mdx index 313d068505054..d4ab33e40e7c0 100644 --- a/api_docs/kbn_infra_forge.mdx +++ b/api_docs/kbn_infra_forge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-infra-forge title: "@kbn/infra-forge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/infra-forge plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/infra-forge'] --- import kbnInfraForgeObj from './kbn_infra_forge.devdocs.json'; diff --git a/api_docs/kbn_interpreter.mdx b/api_docs/kbn_interpreter.mdx index 27f972cb59819..4d18986f24dde 100644 --- a/api_docs/kbn_interpreter.mdx +++ b/api_docs/kbn_interpreter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-interpreter title: "@kbn/interpreter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/interpreter plugin -date: 2024-07-03 +date: 2024-07-05 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 52f0d5c38e62a..e5459f28afd25 100644 --- a/api_docs/kbn_io_ts_utils.mdx +++ b/api_docs/kbn_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-io-ts-utils title: "@kbn/io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/io-ts-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/io-ts-utils'] --- import kbnIoTsUtilsObj from './kbn_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_ipynb.mdx b/api_docs/kbn_ipynb.mdx index c5085927e80b7..05eb95add673e 100644 --- a/api_docs/kbn_ipynb.mdx +++ b/api_docs/kbn_ipynb.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ipynb title: "@kbn/ipynb" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ipynb plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ipynb'] --- import kbnIpynbObj from './kbn_ipynb.devdocs.json'; diff --git a/api_docs/kbn_jest_serializers.mdx b/api_docs/kbn_jest_serializers.mdx index 65eb66347e9ee..e79a5841a440b 100644 --- a/api_docs/kbn_jest_serializers.mdx +++ b/api_docs/kbn_jest_serializers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-jest-serializers title: "@kbn/jest-serializers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/jest-serializers plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/jest-serializers'] --- import kbnJestSerializersObj from './kbn_jest_serializers.devdocs.json'; diff --git a/api_docs/kbn_journeys.mdx b/api_docs/kbn_journeys.mdx index bb99cf93676f1..2ba1ef6f76592 100644 --- a/api_docs/kbn_journeys.mdx +++ b/api_docs/kbn_journeys.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-journeys title: "@kbn/journeys" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/journeys plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/journeys'] --- import kbnJourneysObj from './kbn_journeys.devdocs.json'; diff --git a/api_docs/kbn_json_ast.mdx b/api_docs/kbn_json_ast.mdx index 9324462fd20b0..4e7cb95409f5a 100644 --- a/api_docs/kbn_json_ast.mdx +++ b/api_docs/kbn_json_ast.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-json-ast title: "@kbn/json-ast" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/json-ast plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/json-ast'] --- import kbnJsonAstObj from './kbn_json_ast.devdocs.json'; diff --git a/api_docs/kbn_json_schemas.mdx b/api_docs/kbn_json_schemas.mdx index 6d81142f53579..153de8396c154 100644 --- a/api_docs/kbn_json_schemas.mdx +++ b/api_docs/kbn_json_schemas.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-json-schemas title: "@kbn/json-schemas" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/json-schemas plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/json-schemas'] --- import kbnJsonSchemasObj from './kbn_json_schemas.devdocs.json'; diff --git a/api_docs/kbn_kibana_manifest_schema.mdx b/api_docs/kbn_kibana_manifest_schema.mdx index 1f2f3f8ef4236..de75e727cfe82 100644 --- a/api_docs/kbn_kibana_manifest_schema.mdx +++ b/api_docs/kbn_kibana_manifest_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-kibana-manifest-schema title: "@kbn/kibana-manifest-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/kibana-manifest-schema plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/kibana-manifest-schema'] --- import kbnKibanaManifestSchemaObj from './kbn_kibana_manifest_schema.devdocs.json'; diff --git a/api_docs/kbn_language_documentation_popover.mdx b/api_docs/kbn_language_documentation_popover.mdx index 35d29c0a2801a..b73875195d081 100644 --- a/api_docs/kbn_language_documentation_popover.mdx +++ b/api_docs/kbn_language_documentation_popover.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-language-documentation-popover title: "@kbn/language-documentation-popover" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/language-documentation-popover plugin -date: 2024-07-03 +date: 2024-07-05 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 4a9bdd0801189..3380ff7fd6d04 100644 --- a/api_docs/kbn_lens_embeddable_utils.mdx +++ b/api_docs/kbn_lens_embeddable_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-lens-embeddable-utils title: "@kbn/lens-embeddable-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/lens-embeddable-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/lens-embeddable-utils'] --- import kbnLensEmbeddableUtilsObj from './kbn_lens_embeddable_utils.devdocs.json'; diff --git a/api_docs/kbn_lens_formula_docs.mdx b/api_docs/kbn_lens_formula_docs.mdx index a3e0f9ec87e4c..80e14895570d5 100644 --- a/api_docs/kbn_lens_formula_docs.mdx +++ b/api_docs/kbn_lens_formula_docs.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-lens-formula-docs title: "@kbn/lens-formula-docs" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/lens-formula-docs plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/lens-formula-docs'] --- import kbnLensFormulaDocsObj from './kbn_lens_formula_docs.devdocs.json'; diff --git a/api_docs/kbn_logging.mdx b/api_docs/kbn_logging.mdx index c0b5032a1edf4..01065c0e72164 100644 --- a/api_docs/kbn_logging.mdx +++ b/api_docs/kbn_logging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging title: "@kbn/logging" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging'] --- import kbnLoggingObj from './kbn_logging.devdocs.json'; diff --git a/api_docs/kbn_logging_mocks.mdx b/api_docs/kbn_logging_mocks.mdx index a7fe373bd023f..d2e6cf58b4a8b 100644 --- a/api_docs/kbn_logging_mocks.mdx +++ b/api_docs/kbn_logging_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging-mocks title: "@kbn/logging-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging-mocks'] --- import kbnLoggingMocksObj from './kbn_logging_mocks.devdocs.json'; diff --git a/api_docs/kbn_managed_content_badge.mdx b/api_docs/kbn_managed_content_badge.mdx index 96cac73b5a0d5..b364f969d7cec 100644 --- a/api_docs/kbn_managed_content_badge.mdx +++ b/api_docs/kbn_managed_content_badge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-managed-content-badge title: "@kbn/managed-content-badge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/managed-content-badge plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/managed-content-badge'] --- import kbnManagedContentBadgeObj from './kbn_managed_content_badge.devdocs.json'; diff --git a/api_docs/kbn_managed_vscode_config.mdx b/api_docs/kbn_managed_vscode_config.mdx index f6d9d3c18e716..db0a89f4a7f2c 100644 --- a/api_docs/kbn_managed_vscode_config.mdx +++ b/api_docs/kbn_managed_vscode_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-managed-vscode-config title: "@kbn/managed-vscode-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/managed-vscode-config plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/managed-vscode-config'] --- import kbnManagedVscodeConfigObj from './kbn_managed_vscode_config.devdocs.json'; diff --git a/api_docs/kbn_management_cards_navigation.devdocs.json b/api_docs/kbn_management_cards_navigation.devdocs.json index 7d589a0a00560..328c9ff782cc3 100644 --- a/api_docs/kbn_management_cards_navigation.devdocs.json +++ b/api_docs/kbn_management_cards_navigation.devdocs.json @@ -145,7 +145,7 @@ "label": "hideLinksTo", "description": [], "signature": [ - "(\"transform\" | \"tags\" | \"maintenanceWindows\" | \"settings\" | \"dataViews\" | \"data_quality\" | \"filesManagement\" | \"roles\" | \"reporting\" | \"api_keys\" | \"index_management\" | \"ingest_pipelines\" | \"jobsListLink\" | \"objects\" | \"pipelines\" | \"triggersActions\" | \"triggersActionsConnectors\")[] | undefined" + "(\"transform\" | \"tags\" | \"maintenanceWindows\" | \"dataViews\" | \"settings\" | \"data_quality\" | \"filesManagement\" | \"roles\" | \"reporting\" | \"api_keys\" | \"index_management\" | \"ingest_pipelines\" | \"jobsListLink\" | \"objects\" | \"pipelines\" | \"triggersActions\" | \"triggersActionsConnectors\")[] | undefined" ], "path": "packages/kbn-management/cards_navigation/src/types.ts", "deprecated": false, @@ -202,7 +202,7 @@ "label": "AppId", "description": [], "signature": [ - "\"transform\" | \"tags\" | \"maintenanceWindows\" | \"settings\" | \"dataViews\" | \"data_quality\" | \"filesManagement\" | \"roles\" | \"reporting\" | \"api_keys\" | \"index_management\" | \"ingest_pipelines\" | \"jobsListLink\" | \"objects\" | \"pipelines\" | \"triggersActions\" | \"triggersActionsConnectors\"" + "\"transform\" | \"tags\" | \"maintenanceWindows\" | \"dataViews\" | \"settings\" | \"data_quality\" | \"filesManagement\" | \"roles\" | \"reporting\" | \"api_keys\" | \"index_management\" | \"ingest_pipelines\" | \"jobsListLink\" | \"objects\" | \"pipelines\" | \"triggersActions\" | \"triggersActionsConnectors\"" ], "path": "packages/kbn-management/cards_navigation/src/types.ts", "deprecated": false, diff --git a/api_docs/kbn_management_cards_navigation.mdx b/api_docs/kbn_management_cards_navigation.mdx index d47f102babfa4..7fcb064086d88 100644 --- a/api_docs/kbn_management_cards_navigation.mdx +++ b/api_docs/kbn_management_cards_navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-cards-navigation title: "@kbn/management-cards-navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-cards-navigation plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-cards-navigation'] --- import kbnManagementCardsNavigationObj from './kbn_management_cards_navigation.devdocs.json'; diff --git a/api_docs/kbn_management_settings_application.mdx b/api_docs/kbn_management_settings_application.mdx index 47065fbbed7ef..6999278870234 100644 --- a/api_docs/kbn_management_settings_application.mdx +++ b/api_docs/kbn_management_settings_application.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-application title: "@kbn/management-settings-application" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-application plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-application'] --- import kbnManagementSettingsApplicationObj from './kbn_management_settings_application.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_field_category.mdx b/api_docs/kbn_management_settings_components_field_category.mdx index 033dfccb67973..12b84f6dcda08 100644 --- a/api_docs/kbn_management_settings_components_field_category.mdx +++ b/api_docs/kbn_management_settings_components_field_category.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-field-category title: "@kbn/management-settings-components-field-category" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-field-category plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-category'] --- import kbnManagementSettingsComponentsFieldCategoryObj from './kbn_management_settings_components_field_category.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_field_input.mdx b/api_docs/kbn_management_settings_components_field_input.mdx index d71ab4b82d177..21cc0a68c4795 100644 --- a/api_docs/kbn_management_settings_components_field_input.mdx +++ b/api_docs/kbn_management_settings_components_field_input.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-field-input title: "@kbn/management-settings-components-field-input" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-field-input plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-input'] --- import kbnManagementSettingsComponentsFieldInputObj from './kbn_management_settings_components_field_input.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_field_row.mdx b/api_docs/kbn_management_settings_components_field_row.mdx index ac6446ae4ff96..33f4b5b0eeea1 100644 --- a/api_docs/kbn_management_settings_components_field_row.mdx +++ b/api_docs/kbn_management_settings_components_field_row.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-field-row title: "@kbn/management-settings-components-field-row" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-field-row plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-row'] --- import kbnManagementSettingsComponentsFieldRowObj from './kbn_management_settings_components_field_row.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_form.mdx b/api_docs/kbn_management_settings_components_form.mdx index 58641d8b46c05..73a51aae50251 100644 --- a/api_docs/kbn_management_settings_components_form.mdx +++ b/api_docs/kbn_management_settings_components_form.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-form title: "@kbn/management-settings-components-form" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-form plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-form'] --- import kbnManagementSettingsComponentsFormObj from './kbn_management_settings_components_form.devdocs.json'; diff --git a/api_docs/kbn_management_settings_field_definition.mdx b/api_docs/kbn_management_settings_field_definition.mdx index 0db8ea19abbc7..3a4028b933f29 100644 --- a/api_docs/kbn_management_settings_field_definition.mdx +++ b/api_docs/kbn_management_settings_field_definition.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-field-definition title: "@kbn/management-settings-field-definition" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-field-definition plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-field-definition'] --- import kbnManagementSettingsFieldDefinitionObj from './kbn_management_settings_field_definition.devdocs.json'; diff --git a/api_docs/kbn_management_settings_ids.mdx b/api_docs/kbn_management_settings_ids.mdx index f3f355d81bb37..5db8a6b2b05ba 100644 --- a/api_docs/kbn_management_settings_ids.mdx +++ b/api_docs/kbn_management_settings_ids.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-ids title: "@kbn/management-settings-ids" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-ids plugin -date: 2024-07-03 +date: 2024-07-05 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 a29ae78a8cf5a..08be027476a14 100644 --- a/api_docs/kbn_management_settings_section_registry.mdx +++ b/api_docs/kbn_management_settings_section_registry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-section-registry title: "@kbn/management-settings-section-registry" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-section-registry plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-section-registry'] --- import kbnManagementSettingsSectionRegistryObj from './kbn_management_settings_section_registry.devdocs.json'; diff --git a/api_docs/kbn_management_settings_types.mdx b/api_docs/kbn_management_settings_types.mdx index bd964c3ea7246..1b9cf7784f972 100644 --- a/api_docs/kbn_management_settings_types.mdx +++ b/api_docs/kbn_management_settings_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-types title: "@kbn/management-settings-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-types plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-types'] --- import kbnManagementSettingsTypesObj from './kbn_management_settings_types.devdocs.json'; diff --git a/api_docs/kbn_management_settings_utilities.mdx b/api_docs/kbn_management_settings_utilities.mdx index 4c11d0a905e5d..7fe03cd8b5a7e 100644 --- a/api_docs/kbn_management_settings_utilities.mdx +++ b/api_docs/kbn_management_settings_utilities.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-utilities title: "@kbn/management-settings-utilities" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-utilities plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-utilities'] --- import kbnManagementSettingsUtilitiesObj from './kbn_management_settings_utilities.devdocs.json'; diff --git a/api_docs/kbn_management_storybook_config.mdx b/api_docs/kbn_management_storybook_config.mdx index d953811d76cf4..f38b0be0a82c2 100644 --- a/api_docs/kbn_management_storybook_config.mdx +++ b/api_docs/kbn_management_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-storybook-config title: "@kbn/management-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-storybook-config plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-storybook-config'] --- import kbnManagementStorybookConfigObj from './kbn_management_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_mapbox_gl.mdx b/api_docs/kbn_mapbox_gl.mdx index 3e5300df5bcd6..c6c332c4dff84 100644 --- a/api_docs/kbn_mapbox_gl.mdx +++ b/api_docs/kbn_mapbox_gl.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-mapbox-gl title: "@kbn/mapbox-gl" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/mapbox-gl plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/mapbox-gl'] --- import kbnMapboxGlObj from './kbn_mapbox_gl.devdocs.json'; diff --git a/api_docs/kbn_maps_vector_tile_utils.mdx b/api_docs/kbn_maps_vector_tile_utils.mdx index 9e870d518a722..173a47b81671e 100644 --- a/api_docs/kbn_maps_vector_tile_utils.mdx +++ b/api_docs/kbn_maps_vector_tile_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-maps-vector-tile-utils title: "@kbn/maps-vector-tile-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/maps-vector-tile-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/maps-vector-tile-utils'] --- import kbnMapsVectorTileUtilsObj from './kbn_maps_vector_tile_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_agg_utils.mdx b/api_docs/kbn_ml_agg_utils.mdx index 8bfc053d82e7e..8d2d3cc9b90ff 100644 --- a/api_docs/kbn_ml_agg_utils.mdx +++ b/api_docs/kbn_ml_agg_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-agg-utils title: "@kbn/ml-agg-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-agg-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-agg-utils'] --- import kbnMlAggUtilsObj from './kbn_ml_agg_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_anomaly_utils.mdx b/api_docs/kbn_ml_anomaly_utils.mdx index 1bb6c5328ca30..47f734f0c6399 100644 --- a/api_docs/kbn_ml_anomaly_utils.mdx +++ b/api_docs/kbn_ml_anomaly_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-anomaly-utils title: "@kbn/ml-anomaly-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-anomaly-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-anomaly-utils'] --- import kbnMlAnomalyUtilsObj from './kbn_ml_anomaly_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_cancellable_search.mdx b/api_docs/kbn_ml_cancellable_search.mdx index 6f31af0bd08d4..c475e68599c30 100644 --- a/api_docs/kbn_ml_cancellable_search.mdx +++ b/api_docs/kbn_ml_cancellable_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-cancellable-search title: "@kbn/ml-cancellable-search" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-cancellable-search plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-cancellable-search'] --- import kbnMlCancellableSearchObj from './kbn_ml_cancellable_search.devdocs.json'; diff --git a/api_docs/kbn_ml_category_validator.mdx b/api_docs/kbn_ml_category_validator.mdx index e8c6a57456fbc..0fd19fd223b80 100644 --- a/api_docs/kbn_ml_category_validator.mdx +++ b/api_docs/kbn_ml_category_validator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-category-validator title: "@kbn/ml-category-validator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-category-validator plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-category-validator'] --- import kbnMlCategoryValidatorObj from './kbn_ml_category_validator.devdocs.json'; diff --git a/api_docs/kbn_ml_chi2test.mdx b/api_docs/kbn_ml_chi2test.mdx index 5c5586f99e6ce..1b7e713dd1af9 100644 --- a/api_docs/kbn_ml_chi2test.mdx +++ b/api_docs/kbn_ml_chi2test.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-chi2test title: "@kbn/ml-chi2test" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-chi2test plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-chi2test'] --- import kbnMlChi2testObj from './kbn_ml_chi2test.devdocs.json'; diff --git a/api_docs/kbn_ml_data_frame_analytics_utils.mdx b/api_docs/kbn_ml_data_frame_analytics_utils.mdx index 8a736e6d7a5c9..3afa8a792dac8 100644 --- a/api_docs/kbn_ml_data_frame_analytics_utils.mdx +++ b/api_docs/kbn_ml_data_frame_analytics_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-data-frame-analytics-utils title: "@kbn/ml-data-frame-analytics-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-data-frame-analytics-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-data-frame-analytics-utils'] --- import kbnMlDataFrameAnalyticsUtilsObj from './kbn_ml_data_frame_analytics_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_data_grid.mdx b/api_docs/kbn_ml_data_grid.mdx index 05960891aa447..7dc5df21b9f53 100644 --- a/api_docs/kbn_ml_data_grid.mdx +++ b/api_docs/kbn_ml_data_grid.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-data-grid title: "@kbn/ml-data-grid" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-data-grid plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-data-grid'] --- import kbnMlDataGridObj from './kbn_ml_data_grid.devdocs.json'; diff --git a/api_docs/kbn_ml_date_picker.mdx b/api_docs/kbn_ml_date_picker.mdx index a216f6911c1a2..2993ba7e55f37 100644 --- a/api_docs/kbn_ml_date_picker.mdx +++ b/api_docs/kbn_ml_date_picker.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-date-picker title: "@kbn/ml-date-picker" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-date-picker plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-date-picker'] --- import kbnMlDatePickerObj from './kbn_ml_date_picker.devdocs.json'; diff --git a/api_docs/kbn_ml_date_utils.mdx b/api_docs/kbn_ml_date_utils.mdx index 63a383b47542f..ad118022c3046 100644 --- a/api_docs/kbn_ml_date_utils.mdx +++ b/api_docs/kbn_ml_date_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-date-utils title: "@kbn/ml-date-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-date-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-date-utils'] --- import kbnMlDateUtilsObj from './kbn_ml_date_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_error_utils.mdx b/api_docs/kbn_ml_error_utils.mdx index b608650920b0d..8d5d23639957b 100644 --- a/api_docs/kbn_ml_error_utils.mdx +++ b/api_docs/kbn_ml_error_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-error-utils title: "@kbn/ml-error-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-error-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-error-utils'] --- import kbnMlErrorUtilsObj from './kbn_ml_error_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_in_memory_table.mdx b/api_docs/kbn_ml_in_memory_table.mdx index 05b79835f6bdb..87f94cab80d4f 100644 --- a/api_docs/kbn_ml_in_memory_table.mdx +++ b/api_docs/kbn_ml_in_memory_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-in-memory-table title: "@kbn/ml-in-memory-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-in-memory-table plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-in-memory-table'] --- import kbnMlInMemoryTableObj from './kbn_ml_in_memory_table.devdocs.json'; diff --git a/api_docs/kbn_ml_is_defined.mdx b/api_docs/kbn_ml_is_defined.mdx index b2a927da81261..11d47ab1e6c54 100644 --- a/api_docs/kbn_ml_is_defined.mdx +++ b/api_docs/kbn_ml_is_defined.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-defined title: "@kbn/ml-is-defined" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-is-defined plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-defined'] --- import kbnMlIsDefinedObj from './kbn_ml_is_defined.devdocs.json'; diff --git a/api_docs/kbn_ml_is_populated_object.mdx b/api_docs/kbn_ml_is_populated_object.mdx index 65dbafb582207..f2a99acd9b4fa 100644 --- a/api_docs/kbn_ml_is_populated_object.mdx +++ b/api_docs/kbn_ml_is_populated_object.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-populated-object title: "@kbn/ml-is-populated-object" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-is-populated-object plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-populated-object'] --- import kbnMlIsPopulatedObjectObj from './kbn_ml_is_populated_object.devdocs.json'; diff --git a/api_docs/kbn_ml_kibana_theme.mdx b/api_docs/kbn_ml_kibana_theme.mdx index 9984c1e1034e0..98b20ac961f24 100644 --- a/api_docs/kbn_ml_kibana_theme.mdx +++ b/api_docs/kbn_ml_kibana_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-kibana-theme title: "@kbn/ml-kibana-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-kibana-theme plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-kibana-theme'] --- import kbnMlKibanaThemeObj from './kbn_ml_kibana_theme.devdocs.json'; diff --git a/api_docs/kbn_ml_local_storage.mdx b/api_docs/kbn_ml_local_storage.mdx index c8d146c813972..149eef6127dd7 100644 --- a/api_docs/kbn_ml_local_storage.mdx +++ b/api_docs/kbn_ml_local_storage.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-local-storage title: "@kbn/ml-local-storage" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-local-storage plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-local-storage'] --- import kbnMlLocalStorageObj from './kbn_ml_local_storage.devdocs.json'; diff --git a/api_docs/kbn_ml_nested_property.mdx b/api_docs/kbn_ml_nested_property.mdx index 2630d91e18be8..e1f71806dd4b0 100644 --- a/api_docs/kbn_ml_nested_property.mdx +++ b/api_docs/kbn_ml_nested_property.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-nested-property title: "@kbn/ml-nested-property" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-nested-property plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-nested-property'] --- import kbnMlNestedPropertyObj from './kbn_ml_nested_property.devdocs.json'; diff --git a/api_docs/kbn_ml_number_utils.mdx b/api_docs/kbn_ml_number_utils.mdx index 2c1d004856525..5e5939fdfa67c 100644 --- a/api_docs/kbn_ml_number_utils.mdx +++ b/api_docs/kbn_ml_number_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-number-utils title: "@kbn/ml-number-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-number-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-number-utils'] --- import kbnMlNumberUtilsObj from './kbn_ml_number_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_query_utils.mdx b/api_docs/kbn_ml_query_utils.mdx index 461eeef73bd1a..1fd6de5b85999 100644 --- a/api_docs/kbn_ml_query_utils.mdx +++ b/api_docs/kbn_ml_query_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-query-utils title: "@kbn/ml-query-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-query-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-query-utils'] --- import kbnMlQueryUtilsObj from './kbn_ml_query_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_random_sampler_utils.mdx b/api_docs/kbn_ml_random_sampler_utils.mdx index a5ea521372eb1..dc774cec094ff 100644 --- a/api_docs/kbn_ml_random_sampler_utils.mdx +++ b/api_docs/kbn_ml_random_sampler_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-random-sampler-utils title: "@kbn/ml-random-sampler-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-random-sampler-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-random-sampler-utils'] --- import kbnMlRandomSamplerUtilsObj from './kbn_ml_random_sampler_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_route_utils.mdx b/api_docs/kbn_ml_route_utils.mdx index d01af58a86197..a0c0091987e7b 100644 --- a/api_docs/kbn_ml_route_utils.mdx +++ b/api_docs/kbn_ml_route_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-route-utils title: "@kbn/ml-route-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-route-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-route-utils'] --- import kbnMlRouteUtilsObj from './kbn_ml_route_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_runtime_field_utils.mdx b/api_docs/kbn_ml_runtime_field_utils.mdx index 45a06e7ce9cab..baa0b1209c50d 100644 --- a/api_docs/kbn_ml_runtime_field_utils.mdx +++ b/api_docs/kbn_ml_runtime_field_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-runtime-field-utils title: "@kbn/ml-runtime-field-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-runtime-field-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-runtime-field-utils'] --- import kbnMlRuntimeFieldUtilsObj from './kbn_ml_runtime_field_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_string_hash.mdx b/api_docs/kbn_ml_string_hash.mdx index a8f440d8902eb..f8e1faf6459ee 100644 --- a/api_docs/kbn_ml_string_hash.mdx +++ b/api_docs/kbn_ml_string_hash.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-string-hash title: "@kbn/ml-string-hash" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-string-hash plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-string-hash'] --- import kbnMlStringHashObj from './kbn_ml_string_hash.devdocs.json'; diff --git a/api_docs/kbn_ml_time_buckets.mdx b/api_docs/kbn_ml_time_buckets.mdx index fc2b823da6133..cff9bb2639ec5 100644 --- a/api_docs/kbn_ml_time_buckets.mdx +++ b/api_docs/kbn_ml_time_buckets.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-time-buckets title: "@kbn/ml-time-buckets" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-time-buckets plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-time-buckets'] --- import kbnMlTimeBucketsObj from './kbn_ml_time_buckets.devdocs.json'; diff --git a/api_docs/kbn_ml_trained_models_utils.mdx b/api_docs/kbn_ml_trained_models_utils.mdx index 6baec8dcf83f6..5888e7e4499fc 100644 --- a/api_docs/kbn_ml_trained_models_utils.mdx +++ b/api_docs/kbn_ml_trained_models_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-trained-models-utils title: "@kbn/ml-trained-models-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-trained-models-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-trained-models-utils'] --- import kbnMlTrainedModelsUtilsObj from './kbn_ml_trained_models_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_ui_actions.mdx b/api_docs/kbn_ml_ui_actions.mdx index 3db8b45f6b537..be998b9aa57fa 100644 --- a/api_docs/kbn_ml_ui_actions.mdx +++ b/api_docs/kbn_ml_ui_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-ui-actions title: "@kbn/ml-ui-actions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-ui-actions plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-ui-actions'] --- import kbnMlUiActionsObj from './kbn_ml_ui_actions.devdocs.json'; diff --git a/api_docs/kbn_ml_url_state.mdx b/api_docs/kbn_ml_url_state.mdx index e009dbce2ce36..8025345b97781 100644 --- a/api_docs/kbn_ml_url_state.mdx +++ b/api_docs/kbn_ml_url_state.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-url-state title: "@kbn/ml-url-state" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-url-state plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-url-state'] --- import kbnMlUrlStateObj from './kbn_ml_url_state.devdocs.json'; diff --git a/api_docs/kbn_mock_idp_utils.mdx b/api_docs/kbn_mock_idp_utils.mdx index 478dbfb9f44ca..038acb25194c6 100644 --- a/api_docs/kbn_mock_idp_utils.mdx +++ b/api_docs/kbn_mock_idp_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-mock-idp-utils title: "@kbn/mock-idp-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/mock-idp-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/mock-idp-utils'] --- import kbnMockIdpUtilsObj from './kbn_mock_idp_utils.devdocs.json'; diff --git a/api_docs/kbn_monaco.mdx b/api_docs/kbn_monaco.mdx index aef8e252735ff..b4874eeed1978 100644 --- a/api_docs/kbn_monaco.mdx +++ b/api_docs/kbn_monaco.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-monaco title: "@kbn/monaco" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/monaco plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/monaco'] --- import kbnMonacoObj from './kbn_monaco.devdocs.json'; diff --git a/api_docs/kbn_object_versioning.mdx b/api_docs/kbn_object_versioning.mdx index ecd3d60efb993..ec81b74fb7bd6 100644 --- a/api_docs/kbn_object_versioning.mdx +++ b/api_docs/kbn_object_versioning.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-object-versioning title: "@kbn/object-versioning" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/object-versioning plugin -date: 2024-07-03 +date: 2024-07-05 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 851cf812d37e8..7e3355ed83100 100644 --- a/api_docs/kbn_observability_alert_details.mdx +++ b/api_docs/kbn_observability_alert_details.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-alert-details title: "@kbn/observability-alert-details" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-alert-details plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-alert-details'] --- import kbnObservabilityAlertDetailsObj from './kbn_observability_alert_details.devdocs.json'; diff --git a/api_docs/kbn_observability_alerting_test_data.mdx b/api_docs/kbn_observability_alerting_test_data.mdx index 45ba3f9c1c443..bd6c8f18d8cc3 100644 --- a/api_docs/kbn_observability_alerting_test_data.mdx +++ b/api_docs/kbn_observability_alerting_test_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-alerting-test-data title: "@kbn/observability-alerting-test-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-alerting-test-data plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-alerting-test-data'] --- import kbnObservabilityAlertingTestDataObj from './kbn_observability_alerting_test_data.devdocs.json'; diff --git a/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx b/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx index 66e300f10e800..a29224e271262 100644 --- a/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx +++ b/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-get-padded-alert-time-range-util title: "@kbn/observability-get-padded-alert-time-range-util" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-get-padded-alert-time-range-util plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-get-padded-alert-time-range-util'] --- import kbnObservabilityGetPaddedAlertTimeRangeUtilObj from './kbn_observability_get_padded_alert_time_range_util.devdocs.json'; diff --git a/api_docs/kbn_openapi_bundler.mdx b/api_docs/kbn_openapi_bundler.mdx index e408421b986f9..45f8228401bbe 100644 --- a/api_docs/kbn_openapi_bundler.mdx +++ b/api_docs/kbn_openapi_bundler.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-openapi-bundler title: "@kbn/openapi-bundler" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/openapi-bundler plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/openapi-bundler'] --- import kbnOpenapiBundlerObj from './kbn_openapi_bundler.devdocs.json'; diff --git a/api_docs/kbn_openapi_generator.mdx b/api_docs/kbn_openapi_generator.mdx index 884730ee4a3cb..b843029268d53 100644 --- a/api_docs/kbn_openapi_generator.mdx +++ b/api_docs/kbn_openapi_generator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-openapi-generator title: "@kbn/openapi-generator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/openapi-generator plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/openapi-generator'] --- import kbnOpenapiGeneratorObj from './kbn_openapi_generator.devdocs.json'; diff --git a/api_docs/kbn_optimizer.mdx b/api_docs/kbn_optimizer.mdx index 56b7e4dc7cc91..1fd56edae0945 100644 --- a/api_docs/kbn_optimizer.mdx +++ b/api_docs/kbn_optimizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer title: "@kbn/optimizer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer'] --- import kbnOptimizerObj from './kbn_optimizer.devdocs.json'; diff --git a/api_docs/kbn_optimizer_webpack_helpers.mdx b/api_docs/kbn_optimizer_webpack_helpers.mdx index 4b1b55cd9f186..2aa778339e09a 100644 --- a/api_docs/kbn_optimizer_webpack_helpers.mdx +++ b/api_docs/kbn_optimizer_webpack_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer-webpack-helpers title: "@kbn/optimizer-webpack-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer-webpack-helpers plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer-webpack-helpers'] --- import kbnOptimizerWebpackHelpersObj from './kbn_optimizer_webpack_helpers.devdocs.json'; diff --git a/api_docs/kbn_osquery_io_ts_types.mdx b/api_docs/kbn_osquery_io_ts_types.mdx index 0e36bbcd167c8..04dbef208b620 100644 --- a/api_docs/kbn_osquery_io_ts_types.mdx +++ b/api_docs/kbn_osquery_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-osquery-io-ts-types title: "@kbn/osquery-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/osquery-io-ts-types plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/osquery-io-ts-types'] --- import kbnOsqueryIoTsTypesObj from './kbn_osquery_io_ts_types.devdocs.json'; diff --git a/api_docs/kbn_panel_loader.mdx b/api_docs/kbn_panel_loader.mdx index 03087980bd358..eade49ae3d4ed 100644 --- a/api_docs/kbn_panel_loader.mdx +++ b/api_docs/kbn_panel_loader.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-panel-loader title: "@kbn/panel-loader" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/panel-loader plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/panel-loader'] --- import kbnPanelLoaderObj from './kbn_panel_loader.devdocs.json'; diff --git a/api_docs/kbn_performance_testing_dataset_extractor.mdx b/api_docs/kbn_performance_testing_dataset_extractor.mdx index c3074f7eaa102..7cadbd2eb3060 100644 --- a/api_docs/kbn_performance_testing_dataset_extractor.mdx +++ b/api_docs/kbn_performance_testing_dataset_extractor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-performance-testing-dataset-extractor title: "@kbn/performance-testing-dataset-extractor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/performance-testing-dataset-extractor plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/performance-testing-dataset-extractor'] --- import kbnPerformanceTestingDatasetExtractorObj from './kbn_performance_testing_dataset_extractor.devdocs.json'; diff --git a/api_docs/kbn_plugin_check.mdx b/api_docs/kbn_plugin_check.mdx index 43789ae15f214..d8ace57fb26f8 100644 --- a/api_docs/kbn_plugin_check.mdx +++ b/api_docs/kbn_plugin_check.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-check title: "@kbn/plugin-check" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-check plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-check'] --- import kbnPluginCheckObj from './kbn_plugin_check.devdocs.json'; diff --git a/api_docs/kbn_plugin_generator.mdx b/api_docs/kbn_plugin_generator.mdx index edb75d1e1e82a..f7b54c29c6590 100644 --- a/api_docs/kbn_plugin_generator.mdx +++ b/api_docs/kbn_plugin_generator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-generator title: "@kbn/plugin-generator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-generator plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-generator'] --- import kbnPluginGeneratorObj from './kbn_plugin_generator.devdocs.json'; diff --git a/api_docs/kbn_plugin_helpers.mdx b/api_docs/kbn_plugin_helpers.mdx index 6f31064b762f1..622f5a6e96d2d 100644 --- a/api_docs/kbn_plugin_helpers.mdx +++ b/api_docs/kbn_plugin_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-helpers title: "@kbn/plugin-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-helpers plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-helpers'] --- import kbnPluginHelpersObj from './kbn_plugin_helpers.devdocs.json'; diff --git a/api_docs/kbn_presentation_containers.mdx b/api_docs/kbn_presentation_containers.mdx index 8b10dc525f5a8..f5a1119a02d82 100644 --- a/api_docs/kbn_presentation_containers.mdx +++ b/api_docs/kbn_presentation_containers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-presentation-containers title: "@kbn/presentation-containers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/presentation-containers plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/presentation-containers'] --- import kbnPresentationContainersObj from './kbn_presentation_containers.devdocs.json'; diff --git a/api_docs/kbn_presentation_publishing.mdx b/api_docs/kbn_presentation_publishing.mdx index ad12beab78883..e7303e00c83f7 100644 --- a/api_docs/kbn_presentation_publishing.mdx +++ b/api_docs/kbn_presentation_publishing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-presentation-publishing title: "@kbn/presentation-publishing" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/presentation-publishing plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/presentation-publishing'] --- import kbnPresentationPublishingObj from './kbn_presentation_publishing.devdocs.json'; diff --git a/api_docs/kbn_profiling_utils.mdx b/api_docs/kbn_profiling_utils.mdx index 2ed405a06d33c..05707a1bdc03c 100644 --- a/api_docs/kbn_profiling_utils.mdx +++ b/api_docs/kbn_profiling_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-profiling-utils title: "@kbn/profiling-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/profiling-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/profiling-utils'] --- import kbnProfilingUtilsObj from './kbn_profiling_utils.devdocs.json'; diff --git a/api_docs/kbn_random_sampling.mdx b/api_docs/kbn_random_sampling.mdx index 5192cdabb4071..ec1a67b4c642f 100644 --- a/api_docs/kbn_random_sampling.mdx +++ b/api_docs/kbn_random_sampling.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-random-sampling title: "@kbn/random-sampling" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/random-sampling plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/random-sampling'] --- import kbnRandomSamplingObj from './kbn_random_sampling.devdocs.json'; diff --git a/api_docs/kbn_react_field.mdx b/api_docs/kbn_react_field.mdx index bd228eda5c725..6fd7939017d12 100644 --- a/api_docs/kbn_react_field.mdx +++ b/api_docs/kbn_react_field.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-field title: "@kbn/react-field" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-field plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-field'] --- import kbnReactFieldObj from './kbn_react_field.devdocs.json'; diff --git a/api_docs/kbn_react_hooks.mdx b/api_docs/kbn_react_hooks.mdx index 26ff523da5260..aaf3db72859dd 100644 --- a/api_docs/kbn_react_hooks.mdx +++ b/api_docs/kbn_react_hooks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-hooks title: "@kbn/react-hooks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-hooks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-hooks'] --- import kbnReactHooksObj from './kbn_react_hooks.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_common.mdx b/api_docs/kbn_react_kibana_context_common.mdx index 567b280bd6126..1709a4c778fdb 100644 --- a/api_docs/kbn_react_kibana_context_common.mdx +++ b/api_docs/kbn_react_kibana_context_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-common title: "@kbn/react-kibana-context-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-common plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-common'] --- import kbnReactKibanaContextCommonObj from './kbn_react_kibana_context_common.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_render.mdx b/api_docs/kbn_react_kibana_context_render.mdx index 4de620ca7126b..aeee043f33c7a 100644 --- a/api_docs/kbn_react_kibana_context_render.mdx +++ b/api_docs/kbn_react_kibana_context_render.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-render title: "@kbn/react-kibana-context-render" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-render plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-render'] --- import kbnReactKibanaContextRenderObj from './kbn_react_kibana_context_render.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_root.mdx b/api_docs/kbn_react_kibana_context_root.mdx index 4bbb9a7d767e7..7baa9f087ce99 100644 --- a/api_docs/kbn_react_kibana_context_root.mdx +++ b/api_docs/kbn_react_kibana_context_root.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-root title: "@kbn/react-kibana-context-root" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-root plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-root'] --- import kbnReactKibanaContextRootObj from './kbn_react_kibana_context_root.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_styled.mdx b/api_docs/kbn_react_kibana_context_styled.mdx index 3c19e998928b1..c2071efc61277 100644 --- a/api_docs/kbn_react_kibana_context_styled.mdx +++ b/api_docs/kbn_react_kibana_context_styled.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-styled title: "@kbn/react-kibana-context-styled" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-styled plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-styled'] --- import kbnReactKibanaContextStyledObj from './kbn_react_kibana_context_styled.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_theme.mdx b/api_docs/kbn_react_kibana_context_theme.mdx index be9cb70479267..f968c97bae739 100644 --- a/api_docs/kbn_react_kibana_context_theme.mdx +++ b/api_docs/kbn_react_kibana_context_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-theme title: "@kbn/react-kibana-context-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-theme plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-theme'] --- import kbnReactKibanaContextThemeObj from './kbn_react_kibana_context_theme.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_mount.mdx b/api_docs/kbn_react_kibana_mount.mdx index 729542daa919a..6054c9cefb40d 100644 --- a/api_docs/kbn_react_kibana_mount.mdx +++ b/api_docs/kbn_react_kibana_mount.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-mount title: "@kbn/react-kibana-mount" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-mount plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-mount'] --- import kbnReactKibanaMountObj from './kbn_react_kibana_mount.devdocs.json'; diff --git a/api_docs/kbn_repo_file_maps.mdx b/api_docs/kbn_repo_file_maps.mdx index 0c20156994099..bf6236095b0df 100644 --- a/api_docs/kbn_repo_file_maps.mdx +++ b/api_docs/kbn_repo_file_maps.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-file-maps title: "@kbn/repo-file-maps" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-file-maps plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-file-maps'] --- import kbnRepoFileMapsObj from './kbn_repo_file_maps.devdocs.json'; diff --git a/api_docs/kbn_repo_linter.mdx b/api_docs/kbn_repo_linter.mdx index 36a26cda8981b..3576b33c15d30 100644 --- a/api_docs/kbn_repo_linter.mdx +++ b/api_docs/kbn_repo_linter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-linter title: "@kbn/repo-linter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-linter plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-linter'] --- import kbnRepoLinterObj from './kbn_repo_linter.devdocs.json'; diff --git a/api_docs/kbn_repo_path.mdx b/api_docs/kbn_repo_path.mdx index 0987bf58a3840..d7a7563665d74 100644 --- a/api_docs/kbn_repo_path.mdx +++ b/api_docs/kbn_repo_path.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-path title: "@kbn/repo-path" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-path plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-path'] --- import kbnRepoPathObj from './kbn_repo_path.devdocs.json'; diff --git a/api_docs/kbn_repo_source_classifier.mdx b/api_docs/kbn_repo_source_classifier.mdx index b75e41ed1da64..3956a10d6af0b 100644 --- a/api_docs/kbn_repo_source_classifier.mdx +++ b/api_docs/kbn_repo_source_classifier.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-source-classifier title: "@kbn/repo-source-classifier" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-source-classifier plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-source-classifier'] --- import kbnRepoSourceClassifierObj from './kbn_repo_source_classifier.devdocs.json'; diff --git a/api_docs/kbn_reporting_common.mdx b/api_docs/kbn_reporting_common.mdx index 0493a0654047f..6b8463c0f7c27 100644 --- a/api_docs/kbn_reporting_common.mdx +++ b/api_docs/kbn_reporting_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-common title: "@kbn/reporting-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-common plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-common'] --- import kbnReportingCommonObj from './kbn_reporting_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_csv_share_panel.mdx b/api_docs/kbn_reporting_csv_share_panel.mdx index 33ec3ad3b5041..01ffaf15a49ff 100644 --- a/api_docs/kbn_reporting_csv_share_panel.mdx +++ b/api_docs/kbn_reporting_csv_share_panel.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-csv-share-panel title: "@kbn/reporting-csv-share-panel" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-csv-share-panel plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-csv-share-panel'] --- import kbnReportingCsvSharePanelObj from './kbn_reporting_csv_share_panel.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_csv.mdx b/api_docs/kbn_reporting_export_types_csv.mdx index f682fc7b3c594..a783424d9e07a 100644 --- a/api_docs/kbn_reporting_export_types_csv.mdx +++ b/api_docs/kbn_reporting_export_types_csv.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-csv title: "@kbn/reporting-export-types-csv" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-csv plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-csv'] --- import kbnReportingExportTypesCsvObj from './kbn_reporting_export_types_csv.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_csv_common.mdx b/api_docs/kbn_reporting_export_types_csv_common.mdx index 1bef19942311d..aa70b2649c829 100644 --- a/api_docs/kbn_reporting_export_types_csv_common.mdx +++ b/api_docs/kbn_reporting_export_types_csv_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-csv-common title: "@kbn/reporting-export-types-csv-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-csv-common plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-csv-common'] --- import kbnReportingExportTypesCsvCommonObj from './kbn_reporting_export_types_csv_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_pdf.mdx b/api_docs/kbn_reporting_export_types_pdf.mdx index 502518454da6f..72f53cab56132 100644 --- a/api_docs/kbn_reporting_export_types_pdf.mdx +++ b/api_docs/kbn_reporting_export_types_pdf.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-pdf title: "@kbn/reporting-export-types-pdf" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-pdf plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-pdf'] --- import kbnReportingExportTypesPdfObj from './kbn_reporting_export_types_pdf.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_pdf_common.mdx b/api_docs/kbn_reporting_export_types_pdf_common.mdx index 80be734322907..7de3e3b78a2b0 100644 --- a/api_docs/kbn_reporting_export_types_pdf_common.mdx +++ b/api_docs/kbn_reporting_export_types_pdf_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-pdf-common title: "@kbn/reporting-export-types-pdf-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-pdf-common plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-pdf-common'] --- import kbnReportingExportTypesPdfCommonObj from './kbn_reporting_export_types_pdf_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_png.mdx b/api_docs/kbn_reporting_export_types_png.mdx index c4dcd47eaa823..3b81219ae5112 100644 --- a/api_docs/kbn_reporting_export_types_png.mdx +++ b/api_docs/kbn_reporting_export_types_png.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-png title: "@kbn/reporting-export-types-png" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-png plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-png'] --- import kbnReportingExportTypesPngObj from './kbn_reporting_export_types_png.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_png_common.mdx b/api_docs/kbn_reporting_export_types_png_common.mdx index 2f39a6818e8db..12e00092beef2 100644 --- a/api_docs/kbn_reporting_export_types_png_common.mdx +++ b/api_docs/kbn_reporting_export_types_png_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-png-common title: "@kbn/reporting-export-types-png-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-png-common plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-png-common'] --- import kbnReportingExportTypesPngCommonObj from './kbn_reporting_export_types_png_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_mocks_server.mdx b/api_docs/kbn_reporting_mocks_server.mdx index f2509878b9978..c5a05ea097469 100644 --- a/api_docs/kbn_reporting_mocks_server.mdx +++ b/api_docs/kbn_reporting_mocks_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-mocks-server title: "@kbn/reporting-mocks-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-mocks-server plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-mocks-server'] --- import kbnReportingMocksServerObj from './kbn_reporting_mocks_server.devdocs.json'; diff --git a/api_docs/kbn_reporting_public.mdx b/api_docs/kbn_reporting_public.mdx index 83e9bad0064d7..c19c0ee5c2c70 100644 --- a/api_docs/kbn_reporting_public.mdx +++ b/api_docs/kbn_reporting_public.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-public title: "@kbn/reporting-public" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-public plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-public'] --- import kbnReportingPublicObj from './kbn_reporting_public.devdocs.json'; diff --git a/api_docs/kbn_reporting_server.mdx b/api_docs/kbn_reporting_server.mdx index 99b14dca48327..b1b2a16d321eb 100644 --- a/api_docs/kbn_reporting_server.mdx +++ b/api_docs/kbn_reporting_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-server title: "@kbn/reporting-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-server plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-server'] --- import kbnReportingServerObj from './kbn_reporting_server.devdocs.json'; diff --git a/api_docs/kbn_resizable_layout.mdx b/api_docs/kbn_resizable_layout.mdx index ff1c04bc11037..4cf528eb3aa21 100644 --- a/api_docs/kbn_resizable_layout.mdx +++ b/api_docs/kbn_resizable_layout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-resizable-layout title: "@kbn/resizable-layout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/resizable-layout plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/resizable-layout'] --- import kbnResizableLayoutObj from './kbn_resizable_layout.devdocs.json'; diff --git a/api_docs/kbn_response_ops_feature_flag_service.mdx b/api_docs/kbn_response_ops_feature_flag_service.mdx index 459809dd7a9f8..a03003106b0ed 100644 --- a/api_docs/kbn_response_ops_feature_flag_service.mdx +++ b/api_docs/kbn_response_ops_feature_flag_service.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-response-ops-feature-flag-service title: "@kbn/response-ops-feature-flag-service" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/response-ops-feature-flag-service plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/response-ops-feature-flag-service'] --- import kbnResponseOpsFeatureFlagServiceObj from './kbn_response_ops_feature_flag_service.devdocs.json'; diff --git a/api_docs/kbn_rison.mdx b/api_docs/kbn_rison.mdx index d34c783b0bc9b..ccac89d9d9eeb 100644 --- a/api_docs/kbn_rison.mdx +++ b/api_docs/kbn_rison.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rison title: "@kbn/rison" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rison plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rison'] --- import kbnRisonObj from './kbn_rison.devdocs.json'; diff --git a/api_docs/kbn_rollup.mdx b/api_docs/kbn_rollup.mdx index b8a97d4d8ab80..84399bbc8f56c 100644 --- a/api_docs/kbn_rollup.mdx +++ b/api_docs/kbn_rollup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rollup title: "@kbn/rollup" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rollup plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rollup'] --- import kbnRollupObj from './kbn_rollup.devdocs.json'; diff --git a/api_docs/kbn_router_to_openapispec.mdx b/api_docs/kbn_router_to_openapispec.mdx index 8d51b904496ff..740f6adb93080 100644 --- a/api_docs/kbn_router_to_openapispec.mdx +++ b/api_docs/kbn_router_to_openapispec.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-router-to-openapispec title: "@kbn/router-to-openapispec" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/router-to-openapispec plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/router-to-openapispec'] --- import kbnRouterToOpenapispecObj from './kbn_router_to_openapispec.devdocs.json'; diff --git a/api_docs/kbn_router_utils.mdx b/api_docs/kbn_router_utils.mdx index 5d05471d8ae00..524835bc0aa8a 100644 --- a/api_docs/kbn_router_utils.mdx +++ b/api_docs/kbn_router_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-router-utils title: "@kbn/router-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/router-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/router-utils'] --- import kbnRouterUtilsObj from './kbn_router_utils.devdocs.json'; diff --git a/api_docs/kbn_rrule.mdx b/api_docs/kbn_rrule.mdx index 031fae15c6e94..0499e737f92db 100644 --- a/api_docs/kbn_rrule.mdx +++ b/api_docs/kbn_rrule.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rrule title: "@kbn/rrule" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rrule plugin -date: 2024-07-03 +date: 2024-07-05 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 8842a1cd368eb..ef7bfe8cdf1ab 100644 --- a/api_docs/kbn_rule_data_utils.mdx +++ b/api_docs/kbn_rule_data_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rule-data-utils title: "@kbn/rule-data-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rule-data-utils plugin -date: 2024-07-03 +date: 2024-07-05 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 e4c2ec48edeb5..8c89d4ab3aa85 100644 --- a/api_docs/kbn_saved_objects_settings.mdx +++ b/api_docs/kbn_saved_objects_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-saved-objects-settings title: "@kbn/saved-objects-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/saved-objects-settings plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/saved-objects-settings'] --- import kbnSavedObjectsSettingsObj from './kbn_saved_objects_settings.devdocs.json'; diff --git a/api_docs/kbn_search_api_panels.mdx b/api_docs/kbn_search_api_panels.mdx index 5062a76e103ba..83de14f14f1fe 100644 --- a/api_docs/kbn_search_api_panels.mdx +++ b/api_docs/kbn_search_api_panels.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-api-panels title: "@kbn/search-api-panels" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-api-panels plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-api-panels'] --- import kbnSearchApiPanelsObj from './kbn_search_api_panels.devdocs.json'; diff --git a/api_docs/kbn_search_connectors.devdocs.json b/api_docs/kbn_search_connectors.devdocs.json index 5ef0ca703940d..d99fdba6e9359 100644 --- a/api_docs/kbn_search_connectors.devdocs.json +++ b/api_docs/kbn_search_connectors.devdocs.json @@ -5250,7 +5250,7 @@ "label": "rule", "description": [], "signature": [ - "\"<\" | \">\" | \"contains\" | \"equals\" | \"regex\" | \"ends_with\" | \"starts_with\"" + "\"contains\" | \"<\" | \">\" | \"equals\" | \"regex\" | \"ends_with\" | \"starts_with\"" ], "path": "packages/kbn-search-connectors/types/connectors.ts", "deprecated": false, @@ -6850,7 +6850,7 @@ "label": "FilteringRuleRule", "description": [], "signature": [ - "\"<\" | \">\" | \"contains\" | \"equals\" | \"regex\" | \"ends_with\" | \"starts_with\"" + "\"contains\" | \"<\" | \">\" | \"equals\" | \"regex\" | \"ends_with\" | \"starts_with\"" ], "path": "packages/kbn-search-connectors/types/connectors.ts", "deprecated": false, diff --git a/api_docs/kbn_search_connectors.mdx b/api_docs/kbn_search_connectors.mdx index 91299fe5ae53c..14bd4eab6ede3 100644 --- a/api_docs/kbn_search_connectors.mdx +++ b/api_docs/kbn_search_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-connectors title: "@kbn/search-connectors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-connectors plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-connectors'] --- import kbnSearchConnectorsObj from './kbn_search_connectors.devdocs.json'; diff --git a/api_docs/kbn_search_errors.mdx b/api_docs/kbn_search_errors.mdx index 0461c1520e843..8e20234cd00fc 100644 --- a/api_docs/kbn_search_errors.mdx +++ b/api_docs/kbn_search_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-errors title: "@kbn/search-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-errors plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-errors'] --- import kbnSearchErrorsObj from './kbn_search_errors.devdocs.json'; diff --git a/api_docs/kbn_search_index_documents.mdx b/api_docs/kbn_search_index_documents.mdx index a5a0b1f9b4ef7..d90ad404b3ed1 100644 --- a/api_docs/kbn_search_index_documents.mdx +++ b/api_docs/kbn_search_index_documents.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-index-documents title: "@kbn/search-index-documents" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-index-documents plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-index-documents'] --- import kbnSearchIndexDocumentsObj from './kbn_search_index_documents.devdocs.json'; diff --git a/api_docs/kbn_search_response_warnings.mdx b/api_docs/kbn_search_response_warnings.mdx index 900835b0f36ad..f22dbc5c4984b 100644 --- a/api_docs/kbn_search_response_warnings.mdx +++ b/api_docs/kbn_search_response_warnings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-response-warnings title: "@kbn/search-response-warnings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-response-warnings plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-response-warnings'] --- import kbnSearchResponseWarningsObj from './kbn_search_response_warnings.devdocs.json'; diff --git a/api_docs/kbn_search_types.mdx b/api_docs/kbn_search_types.mdx index 1f9a6c71a1d2a..8182f912eddbb 100644 --- a/api_docs/kbn_search_types.mdx +++ b/api_docs/kbn_search_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-types title: "@kbn/search-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-types plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-types'] --- import kbnSearchTypesObj from './kbn_search_types.devdocs.json'; diff --git a/api_docs/kbn_security_api_key_management.mdx b/api_docs/kbn_security_api_key_management.mdx index 1b224c3371e68..a32faa07cdbc4 100644 --- a/api_docs/kbn_security_api_key_management.mdx +++ b/api_docs/kbn_security_api_key_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-api-key-management title: "@kbn/security-api-key-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-api-key-management plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-api-key-management'] --- import kbnSecurityApiKeyManagementObj from './kbn_security_api_key_management.devdocs.json'; diff --git a/api_docs/kbn_security_form_components.mdx b/api_docs/kbn_security_form_components.mdx index 298ac8a70b040..c097fa2539792 100644 --- a/api_docs/kbn_security_form_components.mdx +++ b/api_docs/kbn_security_form_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-form-components title: "@kbn/security-form-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-form-components plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-form-components'] --- import kbnSecurityFormComponentsObj from './kbn_security_form_components.devdocs.json'; diff --git a/api_docs/kbn_security_hardening.mdx b/api_docs/kbn_security_hardening.mdx index dc9fe920f2087..8604c4bcc4a82 100644 --- a/api_docs/kbn_security_hardening.mdx +++ b/api_docs/kbn_security_hardening.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-hardening title: "@kbn/security-hardening" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-hardening plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-hardening'] --- import kbnSecurityHardeningObj from './kbn_security_hardening.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_common.mdx b/api_docs/kbn_security_plugin_types_common.mdx index 546a2f59a373b..0c5149abd45e2 100644 --- a/api_docs/kbn_security_plugin_types_common.mdx +++ b/api_docs/kbn_security_plugin_types_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-plugin-types-common title: "@kbn/security-plugin-types-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-plugin-types-common plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-plugin-types-common'] --- import kbnSecurityPluginTypesCommonObj from './kbn_security_plugin_types_common.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_public.devdocs.json b/api_docs/kbn_security_plugin_types_public.devdocs.json index 17c1ecb22d341..257698aef3bd3 100644 --- a/api_docs/kbn_security_plugin_types_public.devdocs.json +++ b/api_docs/kbn_security_plugin_types_public.devdocs.json @@ -635,10 +635,6 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/management/links.ts" }, - { - "plugin": "serverlessSearch", - "path": "x-pack/plugins/serverless_search/public/plugin.ts" - }, { "plugin": "cloudLinks", "path": "x-pack/plugins/cloud_integrations/cloud_links/public/maybe_add_cloud_links/maybe_add_cloud_links.ts" @@ -654,14 +650,6 @@ { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/common/lib/kibana/hooks.ts" - }, - { - "plugin": "apm", - "path": "x-pack/plugins/observability_solution/apm/public/hooks/use_current_user.ts" - }, - { - "plugin": "apm", - "path": "x-pack/plugins/observability_solution/apm/public/hooks/use_current_user.ts" } ] }, diff --git a/api_docs/kbn_security_plugin_types_public.mdx b/api_docs/kbn_security_plugin_types_public.mdx index da6569217c17e..1537bbffdb657 100644 --- a/api_docs/kbn_security_plugin_types_public.mdx +++ b/api_docs/kbn_security_plugin_types_public.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-plugin-types-public title: "@kbn/security-plugin-types-public" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-plugin-types-public plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-plugin-types-public'] --- import kbnSecurityPluginTypesPublicObj from './kbn_security_plugin_types_public.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_server.devdocs.json b/api_docs/kbn_security_plugin_types_server.devdocs.json index 6f72da16b03a8..dbd001d28def1 100644 --- a/api_docs/kbn_security_plugin_types_server.devdocs.json +++ b/api_docs/kbn_security_plugin_types_server.devdocs.json @@ -3128,14 +3128,6 @@ "plugin": "alerting", "path": "x-pack/plugins/alerting/server/rules_client_factory.ts" }, - { - "plugin": "files", - "path": "src/plugins/files/server/file_service/file_service_factory.ts" - }, - { - "plugin": "files", - "path": "src/plugins/files/server/file_service/file_service_factory.ts" - }, { "plugin": "ruleRegistry", "path": "x-pack/plugins/rule_registry/server/alert_data_client/alerts_client_factory.ts" @@ -3144,6 +3136,14 @@ "plugin": "ruleRegistry", "path": "x-pack/plugins/rule_registry/server/search_strategy/search_strategy.ts" }, + { + "plugin": "files", + "path": "src/plugins/files/server/file_service/file_service_factory.ts" + }, + { + "plugin": "files", + "path": "src/plugins/files/server/file_service/file_service_factory.ts" + }, { "plugin": "cases", "path": "x-pack/plugins/cases/server/client/factory.ts" diff --git a/api_docs/kbn_security_plugin_types_server.mdx b/api_docs/kbn_security_plugin_types_server.mdx index a185786c79fed..838d2d1e7eda4 100644 --- a/api_docs/kbn_security_plugin_types_server.mdx +++ b/api_docs/kbn_security_plugin_types_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-plugin-types-server title: "@kbn/security-plugin-types-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-plugin-types-server plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-plugin-types-server'] --- import kbnSecurityPluginTypesServerObj from './kbn_security_plugin_types_server.devdocs.json'; diff --git a/api_docs/kbn_security_solution_features.mdx b/api_docs/kbn_security_solution_features.mdx index c7f563d0cca76..4eeff7fe6be60 100644 --- a/api_docs/kbn_security_solution_features.mdx +++ b/api_docs/kbn_security_solution_features.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-features title: "@kbn/security-solution-features" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-features plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-features'] --- import kbnSecuritySolutionFeaturesObj from './kbn_security_solution_features.devdocs.json'; diff --git a/api_docs/kbn_security_solution_navigation.mdx b/api_docs/kbn_security_solution_navigation.mdx index 023086a20654d..6fed9d7aac47d 100644 --- a/api_docs/kbn_security_solution_navigation.mdx +++ b/api_docs/kbn_security_solution_navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-navigation title: "@kbn/security-solution-navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-navigation plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-navigation'] --- import kbnSecuritySolutionNavigationObj from './kbn_security_solution_navigation.devdocs.json'; diff --git a/api_docs/kbn_security_solution_side_nav.mdx b/api_docs/kbn_security_solution_side_nav.mdx index 187bae5484852..afada04aeff06 100644 --- a/api_docs/kbn_security_solution_side_nav.mdx +++ b/api_docs/kbn_security_solution_side_nav.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-side-nav title: "@kbn/security-solution-side-nav" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-side-nav plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-side-nav'] --- import kbnSecuritySolutionSideNavObj from './kbn_security_solution_side_nav.devdocs.json'; diff --git a/api_docs/kbn_security_solution_storybook_config.mdx b/api_docs/kbn_security_solution_storybook_config.mdx index ce84e647f99a2..1516911039501 100644 --- a/api_docs/kbn_security_solution_storybook_config.mdx +++ b/api_docs/kbn_security_solution_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-storybook-config title: "@kbn/security-solution-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-storybook-config plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-storybook-config'] --- import kbnSecuritySolutionStorybookConfigObj from './kbn_security_solution_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_autocomplete.mdx b/api_docs/kbn_securitysolution_autocomplete.mdx index 9eaafc81de915..6f48d33f4d239 100644 --- a/api_docs/kbn_securitysolution_autocomplete.mdx +++ b/api_docs/kbn_securitysolution_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-autocomplete title: "@kbn/securitysolution-autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-autocomplete plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-autocomplete'] --- import kbnSecuritysolutionAutocompleteObj from './kbn_securitysolution_autocomplete.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_data_table.mdx b/api_docs/kbn_securitysolution_data_table.mdx index 5d4411ca65892..f07beb096890f 100644 --- a/api_docs/kbn_securitysolution_data_table.mdx +++ b/api_docs/kbn_securitysolution_data_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-data-table title: "@kbn/securitysolution-data-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-data-table plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-data-table'] --- import kbnSecuritysolutionDataTableObj from './kbn_securitysolution_data_table.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_ecs.mdx b/api_docs/kbn_securitysolution_ecs.mdx index e183dc0842109..f8ac1bcabcb22 100644 --- a/api_docs/kbn_securitysolution_ecs.mdx +++ b/api_docs/kbn_securitysolution_ecs.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-ecs title: "@kbn/securitysolution-ecs" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-ecs plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-ecs'] --- import kbnSecuritysolutionEcsObj from './kbn_securitysolution_ecs.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_es_utils.mdx b/api_docs/kbn_securitysolution_es_utils.mdx index d1b1ccfffb010..cafbf01700b2e 100644 --- a/api_docs/kbn_securitysolution_es_utils.mdx +++ b/api_docs/kbn_securitysolution_es_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-es-utils title: "@kbn/securitysolution-es-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-es-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-es-utils'] --- import kbnSecuritysolutionEsUtilsObj from './kbn_securitysolution_es_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_exception_list_components.devdocs.json b/api_docs/kbn_securitysolution_exception_list_components.devdocs.json index 40dc8909e03ed..7d1c51ca40ea9 100644 --- a/api_docs/kbn_securitysolution_exception_list_components.devdocs.json +++ b/api_docs/kbn_securitysolution_exception_list_components.devdocs.json @@ -851,7 +851,7 @@ "label": "formattedDateComponent", "description": [], "signature": [ - "\"symbol\" | \"object\" | \"source\" | \"meta\" | \"desc\" | \"filter\" | \"big\" | \"link\" | \"small\" | \"sub\" | \"sup\" | \"text\" | \"map\" | \"head\" | \"slot\" | \"style\" | \"title\" | \"data\" | \"pattern\" | \"summary\" | \"template\" | \"span\" | \"main\" | \"path\" | \"form\" | \"body\" | \"q\" | \"label\" | \"progress\" | \"article\" | \"image\" | \"menu\" | \"stop\" | \"base\" | React.ComponentType | \"s\" | \"legend\" | \"canvas\" | \"svg\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"p\" | \"select\" | \"output\" | \"script\" | \"time\" | \"mask\" | \"input\" | \"table\" | \"a\" | \"abbr\" | \"address\" | \"area\" | \"aside\" | \"audio\" | \"b\" | \"bdi\" | \"bdo\" | \"blockquote\" | \"br\" | \"button\" | \"caption\" | \"cite\" | \"code\" | \"col\" | \"colgroup\" | \"datalist\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"dialog\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"embed\" | \"fieldset\" | \"figcaption\" | \"figure\" | \"footer\" | \"header\" | \"hgroup\" | \"hr\" | \"html\" | \"i\" | \"iframe\" | \"img\" | \"ins\" | \"kbd\" | \"keygen\" | \"li\" | \"mark\" | \"menuitem\" | \"meter\" | \"nav\" | \"noindex\" | \"noscript\" | \"ol\" | \"optgroup\" | \"option\" | \"param\" | \"picture\" | \"pre\" | \"rp\" | \"rt\" | \"ruby\" | \"samp\" | \"section\" | \"strong\" | \"tbody\" | \"td\" | \"textarea\" | \"tfoot\" | \"th\" | \"thead\" | \"tr\" | \"track\" | \"u\" | \"ul\" | \"var\" | \"video\" | \"wbr\" | \"webview\" | \"animate\" | \"animateMotion\" | \"animateTransform\" | \"circle\" | \"clipPath\" | \"defs\" | \"ellipse\" | \"feBlend\" | \"feColorMatrix\" | \"feComponentTransfer\" | \"feComposite\" | \"feConvolveMatrix\" | \"feDiffuseLighting\" | \"feDisplacementMap\" | \"feDistantLight\" | \"feDropShadow\" | \"feFlood\" | \"feFuncA\" | \"feFuncB\" | \"feFuncG\" | \"feFuncR\" | \"feGaussianBlur\" | \"feImage\" | \"feMerge\" | \"feMergeNode\" | \"feMorphology\" | \"feOffset\" | \"fePointLight\" | \"feSpecularLighting\" | \"feSpotLight\" | \"feTile\" | \"feTurbulence\" | \"foreignObject\" | \"g\" | \"line\" | \"linearGradient\" | \"marker\" | \"metadata\" | \"mpath\" | \"polygon\" | \"polyline\" | \"radialGradient\" | \"rect\" | \"switch\" | \"textPath\" | \"tspan\" | \"use\" | \"view\"" + "\"symbol\" | \"object\" | \"source\" | \"meta\" | \"desc\" | \"filter\" | \"big\" | \"link\" | \"small\" | \"sub\" | \"sup\" | \"text\" | \"map\" | \"head\" | \"slot\" | \"style\" | \"title\" | \"data\" | \"pattern\" | \"summary\" | \"template\" | \"span\" | \"main\" | \"path\" | \"form\" | \"body\" | \"html\" | \"stop\" | \"q\" | \"label\" | \"progress\" | \"article\" | \"image\" | \"menu\" | \"base\" | React.ComponentType | \"s\" | \"legend\" | \"canvas\" | \"svg\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"p\" | \"select\" | \"output\" | \"script\" | \"time\" | \"mask\" | \"input\" | \"table\" | \"a\" | \"abbr\" | \"address\" | \"area\" | \"aside\" | \"audio\" | \"b\" | \"bdi\" | \"bdo\" | \"blockquote\" | \"br\" | \"button\" | \"caption\" | \"cite\" | \"code\" | \"col\" | \"colgroup\" | \"datalist\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"dialog\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"embed\" | \"fieldset\" | \"figcaption\" | \"figure\" | \"footer\" | \"header\" | \"hgroup\" | \"hr\" | \"i\" | \"iframe\" | \"img\" | \"ins\" | \"kbd\" | \"keygen\" | \"li\" | \"mark\" | \"menuitem\" | \"meter\" | \"nav\" | \"noindex\" | \"noscript\" | \"ol\" | \"optgroup\" | \"option\" | \"param\" | \"picture\" | \"pre\" | \"rp\" | \"rt\" | \"ruby\" | \"samp\" | \"section\" | \"strong\" | \"tbody\" | \"td\" | \"textarea\" | \"tfoot\" | \"th\" | \"thead\" | \"tr\" | \"track\" | \"u\" | \"ul\" | \"var\" | \"video\" | \"wbr\" | \"webview\" | \"animate\" | \"animateMotion\" | \"animateTransform\" | \"circle\" | \"clipPath\" | \"defs\" | \"ellipse\" | \"feBlend\" | \"feColorMatrix\" | \"feComponentTransfer\" | \"feComposite\" | \"feConvolveMatrix\" | \"feDiffuseLighting\" | \"feDisplacementMap\" | \"feDistantLight\" | \"feDropShadow\" | \"feFlood\" | \"feFuncA\" | \"feFuncB\" | \"feFuncG\" | \"feFuncR\" | \"feGaussianBlur\" | \"feImage\" | \"feMerge\" | \"feMergeNode\" | \"feMorphology\" | \"feOffset\" | \"fePointLight\" | \"feSpecularLighting\" | \"feSpotLight\" | \"feTile\" | \"feTurbulence\" | \"foreignObject\" | \"g\" | \"line\" | \"linearGradient\" | \"marker\" | \"metadata\" | \"mpath\" | \"polygon\" | \"polyline\" | \"radialGradient\" | \"rect\" | \"switch\" | \"textPath\" | \"tspan\" | \"use\" | \"view\"" ], "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/index.tsx", "deprecated": false, @@ -865,7 +865,7 @@ "label": "securityLinkAnchorComponent", "description": [], "signature": [ - "\"symbol\" | \"object\" | \"source\" | \"meta\" | \"desc\" | \"filter\" | \"big\" | \"link\" | \"small\" | \"sub\" | \"sup\" | \"text\" | \"map\" | \"head\" | \"slot\" | \"style\" | \"title\" | \"data\" | \"pattern\" | \"summary\" | \"template\" | \"span\" | \"main\" | \"path\" | \"form\" | \"body\" | \"q\" | \"label\" | \"progress\" | \"article\" | \"image\" | \"menu\" | \"stop\" | \"base\" | React.ComponentType | \"s\" | \"legend\" | \"canvas\" | \"svg\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"p\" | \"select\" | \"output\" | \"script\" | \"time\" | \"mask\" | \"input\" | \"table\" | \"a\" | \"abbr\" | \"address\" | \"area\" | \"aside\" | \"audio\" | \"b\" | \"bdi\" | \"bdo\" | \"blockquote\" | \"br\" | \"button\" | \"caption\" | \"cite\" | \"code\" | \"col\" | \"colgroup\" | \"datalist\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"dialog\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"embed\" | \"fieldset\" | \"figcaption\" | \"figure\" | \"footer\" | \"header\" | \"hgroup\" | \"hr\" | \"html\" | \"i\" | \"iframe\" | \"img\" | \"ins\" | \"kbd\" | \"keygen\" | \"li\" | \"mark\" | \"menuitem\" | \"meter\" | \"nav\" | \"noindex\" | \"noscript\" | \"ol\" | \"optgroup\" | \"option\" | \"param\" | \"picture\" | \"pre\" | \"rp\" | \"rt\" | \"ruby\" | \"samp\" | \"section\" | \"strong\" | \"tbody\" | \"td\" | \"textarea\" | \"tfoot\" | \"th\" | \"thead\" | \"tr\" | \"track\" | \"u\" | \"ul\" | \"var\" | \"video\" | \"wbr\" | \"webview\" | \"animate\" | \"animateMotion\" | \"animateTransform\" | \"circle\" | \"clipPath\" | \"defs\" | \"ellipse\" | \"feBlend\" | \"feColorMatrix\" | \"feComponentTransfer\" | \"feComposite\" | \"feConvolveMatrix\" | \"feDiffuseLighting\" | \"feDisplacementMap\" | \"feDistantLight\" | \"feDropShadow\" | \"feFlood\" | \"feFuncA\" | \"feFuncB\" | \"feFuncG\" | \"feFuncR\" | \"feGaussianBlur\" | \"feImage\" | \"feMerge\" | \"feMergeNode\" | \"feMorphology\" | \"feOffset\" | \"fePointLight\" | \"feSpecularLighting\" | \"feSpotLight\" | \"feTile\" | \"feTurbulence\" | \"foreignObject\" | \"g\" | \"line\" | \"linearGradient\" | \"marker\" | \"metadata\" | \"mpath\" | \"polygon\" | \"polyline\" | \"radialGradient\" | \"rect\" | \"switch\" | \"textPath\" | \"tspan\" | \"use\" | \"view\"" + "\"symbol\" | \"object\" | \"source\" | \"meta\" | \"desc\" | \"filter\" | \"big\" | \"link\" | \"small\" | \"sub\" | \"sup\" | \"text\" | \"map\" | \"head\" | \"slot\" | \"style\" | \"title\" | \"data\" | \"pattern\" | \"summary\" | \"template\" | \"span\" | \"main\" | \"path\" | \"form\" | \"body\" | \"html\" | \"stop\" | \"q\" | \"label\" | \"progress\" | \"article\" | \"image\" | \"menu\" | \"base\" | React.ComponentType | \"s\" | \"legend\" | \"canvas\" | \"svg\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"p\" | \"select\" | \"output\" | \"script\" | \"time\" | \"mask\" | \"input\" | \"table\" | \"a\" | \"abbr\" | \"address\" | \"area\" | \"aside\" | \"audio\" | \"b\" | \"bdi\" | \"bdo\" | \"blockquote\" | \"br\" | \"button\" | \"caption\" | \"cite\" | \"code\" | \"col\" | \"colgroup\" | \"datalist\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"dialog\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"embed\" | \"fieldset\" | \"figcaption\" | \"figure\" | \"footer\" | \"header\" | \"hgroup\" | \"hr\" | \"i\" | \"iframe\" | \"img\" | \"ins\" | \"kbd\" | \"keygen\" | \"li\" | \"mark\" | \"menuitem\" | \"meter\" | \"nav\" | \"noindex\" | \"noscript\" | \"ol\" | \"optgroup\" | \"option\" | \"param\" | \"picture\" | \"pre\" | \"rp\" | \"rt\" | \"ruby\" | \"samp\" | \"section\" | \"strong\" | \"tbody\" | \"td\" | \"textarea\" | \"tfoot\" | \"th\" | \"thead\" | \"tr\" | \"track\" | \"u\" | \"ul\" | \"var\" | \"video\" | \"wbr\" | \"webview\" | \"animate\" | \"animateMotion\" | \"animateTransform\" | \"circle\" | \"clipPath\" | \"defs\" | \"ellipse\" | \"feBlend\" | \"feColorMatrix\" | \"feComponentTransfer\" | \"feComposite\" | \"feConvolveMatrix\" | \"feDiffuseLighting\" | \"feDisplacementMap\" | \"feDistantLight\" | \"feDropShadow\" | \"feFlood\" | \"feFuncA\" | \"feFuncB\" | \"feFuncG\" | \"feFuncR\" | \"feGaussianBlur\" | \"feImage\" | \"feMerge\" | \"feMergeNode\" | \"feMorphology\" | \"feOffset\" | \"fePointLight\" | \"feSpecularLighting\" | \"feSpotLight\" | \"feTile\" | \"feTurbulence\" | \"foreignObject\" | \"g\" | \"line\" | \"linearGradient\" | \"marker\" | \"metadata\" | \"mpath\" | \"polygon\" | \"polyline\" | \"radialGradient\" | \"rect\" | \"switch\" | \"textPath\" | \"tspan\" | \"use\" | \"view\"" ], "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/meta/index.tsx", "deprecated": false, @@ -1004,7 +1004,7 @@ "label": "securityLinkAnchorComponent", "description": [], "signature": [ - "\"symbol\" | \"object\" | \"source\" | \"meta\" | \"desc\" | \"filter\" | \"big\" | \"link\" | \"small\" | \"sub\" | \"sup\" | \"text\" | \"map\" | \"head\" | \"slot\" | \"style\" | \"title\" | \"data\" | \"pattern\" | \"summary\" | \"template\" | \"span\" | \"main\" | \"path\" | \"form\" | \"body\" | \"q\" | \"label\" | \"progress\" | \"article\" | \"image\" | \"menu\" | \"stop\" | \"base\" | React.ComponentType | \"s\" | \"legend\" | \"canvas\" | \"svg\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"p\" | \"select\" | \"output\" | \"script\" | \"time\" | \"mask\" | \"input\" | \"table\" | \"a\" | \"abbr\" | \"address\" | \"area\" | \"aside\" | \"audio\" | \"b\" | \"bdi\" | \"bdo\" | \"blockquote\" | \"br\" | \"button\" | \"caption\" | \"cite\" | \"code\" | \"col\" | \"colgroup\" | \"datalist\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"dialog\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"embed\" | \"fieldset\" | \"figcaption\" | \"figure\" | \"footer\" | \"header\" | \"hgroup\" | \"hr\" | \"html\" | \"i\" | \"iframe\" | \"img\" | \"ins\" | \"kbd\" | \"keygen\" | \"li\" | \"mark\" | \"menuitem\" | \"meter\" | \"nav\" | \"noindex\" | \"noscript\" | \"ol\" | \"optgroup\" | \"option\" | \"param\" | \"picture\" | \"pre\" | \"rp\" | \"rt\" | \"ruby\" | \"samp\" | \"section\" | \"strong\" | \"tbody\" | \"td\" | \"textarea\" | \"tfoot\" | \"th\" | \"thead\" | \"tr\" | \"track\" | \"u\" | \"ul\" | \"var\" | \"video\" | \"wbr\" | \"webview\" | \"animate\" | \"animateMotion\" | \"animateTransform\" | \"circle\" | \"clipPath\" | \"defs\" | \"ellipse\" | \"feBlend\" | \"feColorMatrix\" | \"feComponentTransfer\" | \"feComposite\" | \"feConvolveMatrix\" | \"feDiffuseLighting\" | \"feDisplacementMap\" | \"feDistantLight\" | \"feDropShadow\" | \"feFlood\" | \"feFuncA\" | \"feFuncB\" | \"feFuncG\" | \"feFuncR\" | \"feGaussianBlur\" | \"feImage\" | \"feMerge\" | \"feMergeNode\" | \"feMorphology\" | \"feOffset\" | \"fePointLight\" | \"feSpecularLighting\" | \"feSpotLight\" | \"feTile\" | \"feTurbulence\" | \"foreignObject\" | \"g\" | \"line\" | \"linearGradient\" | \"marker\" | \"metadata\" | \"mpath\" | \"polygon\" | \"polyline\" | \"radialGradient\" | \"rect\" | \"switch\" | \"textPath\" | \"tspan\" | \"use\" | \"view\"" + "\"symbol\" | \"object\" | \"source\" | \"meta\" | \"desc\" | \"filter\" | \"big\" | \"link\" | \"small\" | \"sub\" | \"sup\" | \"text\" | \"map\" | \"head\" | \"slot\" | \"style\" | \"title\" | \"data\" | \"pattern\" | \"summary\" | \"template\" | \"span\" | \"main\" | \"path\" | \"form\" | \"body\" | \"html\" | \"stop\" | \"q\" | \"label\" | \"progress\" | \"article\" | \"image\" | \"menu\" | \"base\" | React.ComponentType | \"s\" | \"legend\" | \"canvas\" | \"svg\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"p\" | \"select\" | \"output\" | \"script\" | \"time\" | \"mask\" | \"input\" | \"table\" | \"a\" | \"abbr\" | \"address\" | \"area\" | \"aside\" | \"audio\" | \"b\" | \"bdi\" | \"bdo\" | \"blockquote\" | \"br\" | \"button\" | \"caption\" | \"cite\" | \"code\" | \"col\" | \"colgroup\" | \"datalist\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"dialog\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"embed\" | \"fieldset\" | \"figcaption\" | \"figure\" | \"footer\" | \"header\" | \"hgroup\" | \"hr\" | \"i\" | \"iframe\" | \"img\" | \"ins\" | \"kbd\" | \"keygen\" | \"li\" | \"mark\" | \"menuitem\" | \"meter\" | \"nav\" | \"noindex\" | \"noscript\" | \"ol\" | \"optgroup\" | \"option\" | \"param\" | \"picture\" | \"pre\" | \"rp\" | \"rt\" | \"ruby\" | \"samp\" | \"section\" | \"strong\" | \"tbody\" | \"td\" | \"textarea\" | \"tfoot\" | \"th\" | \"thead\" | \"tr\" | \"track\" | \"u\" | \"ul\" | \"var\" | \"video\" | \"wbr\" | \"webview\" | \"animate\" | \"animateMotion\" | \"animateTransform\" | \"circle\" | \"clipPath\" | \"defs\" | \"ellipse\" | \"feBlend\" | \"feColorMatrix\" | \"feComponentTransfer\" | \"feComposite\" | \"feConvolveMatrix\" | \"feDiffuseLighting\" | \"feDisplacementMap\" | \"feDistantLight\" | \"feDropShadow\" | \"feFlood\" | \"feFuncA\" | \"feFuncB\" | \"feFuncG\" | \"feFuncR\" | \"feGaussianBlur\" | \"feImage\" | \"feMerge\" | \"feMergeNode\" | \"feMorphology\" | \"feOffset\" | \"fePointLight\" | \"feSpecularLighting\" | \"feSpotLight\" | \"feTile\" | \"feTurbulence\" | \"foreignObject\" | \"g\" | \"line\" | \"linearGradient\" | \"marker\" | \"metadata\" | \"mpath\" | \"polygon\" | \"polyline\" | \"radialGradient\" | \"rect\" | \"switch\" | \"textPath\" | \"tspan\" | \"use\" | \"view\"" ], "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx", "deprecated": false, @@ -1018,7 +1018,7 @@ "label": "formattedDateComponent", "description": [], "signature": [ - "\"symbol\" | \"object\" | \"source\" | \"meta\" | \"desc\" | \"filter\" | \"big\" | \"link\" | \"small\" | \"sub\" | \"sup\" | \"text\" | \"map\" | \"head\" | \"slot\" | \"style\" | \"title\" | \"data\" | \"pattern\" | \"summary\" | \"template\" | \"span\" | \"main\" | \"path\" | \"form\" | \"body\" | \"q\" | \"label\" | \"progress\" | \"article\" | \"image\" | \"menu\" | \"stop\" | \"base\" | React.ComponentType | \"s\" | \"legend\" | \"canvas\" | \"svg\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"p\" | \"select\" | \"output\" | \"script\" | \"time\" | \"mask\" | \"input\" | \"table\" | \"a\" | \"abbr\" | \"address\" | \"area\" | \"aside\" | \"audio\" | \"b\" | \"bdi\" | \"bdo\" | \"blockquote\" | \"br\" | \"button\" | \"caption\" | \"cite\" | \"code\" | \"col\" | \"colgroup\" | \"datalist\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"dialog\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"embed\" | \"fieldset\" | \"figcaption\" | \"figure\" | \"footer\" | \"header\" | \"hgroup\" | \"hr\" | \"html\" | \"i\" | \"iframe\" | \"img\" | \"ins\" | \"kbd\" | \"keygen\" | \"li\" | \"mark\" | \"menuitem\" | \"meter\" | \"nav\" | \"noindex\" | \"noscript\" | \"ol\" | \"optgroup\" | \"option\" | \"param\" | \"picture\" | \"pre\" | \"rp\" | \"rt\" | \"ruby\" | \"samp\" | \"section\" | \"strong\" | \"tbody\" | \"td\" | \"textarea\" | \"tfoot\" | \"th\" | \"thead\" | \"tr\" | \"track\" | \"u\" | \"ul\" | \"var\" | \"video\" | \"wbr\" | \"webview\" | \"animate\" | \"animateMotion\" | \"animateTransform\" | \"circle\" | \"clipPath\" | \"defs\" | \"ellipse\" | \"feBlend\" | \"feColorMatrix\" | \"feComponentTransfer\" | \"feComposite\" | \"feConvolveMatrix\" | \"feDiffuseLighting\" | \"feDisplacementMap\" | \"feDistantLight\" | \"feDropShadow\" | \"feFlood\" | \"feFuncA\" | \"feFuncB\" | \"feFuncG\" | \"feFuncR\" | \"feGaussianBlur\" | \"feImage\" | \"feMerge\" | \"feMergeNode\" | \"feMorphology\" | \"feOffset\" | \"fePointLight\" | \"feSpecularLighting\" | \"feSpotLight\" | \"feTile\" | \"feTurbulence\" | \"foreignObject\" | \"g\" | \"line\" | \"linearGradient\" | \"marker\" | \"metadata\" | \"mpath\" | \"polygon\" | \"polyline\" | \"radialGradient\" | \"rect\" | \"switch\" | \"textPath\" | \"tspan\" | \"use\" | \"view\"" + "\"symbol\" | \"object\" | \"source\" | \"meta\" | \"desc\" | \"filter\" | \"big\" | \"link\" | \"small\" | \"sub\" | \"sup\" | \"text\" | \"map\" | \"head\" | \"slot\" | \"style\" | \"title\" | \"data\" | \"pattern\" | \"summary\" | \"template\" | \"span\" | \"main\" | \"path\" | \"form\" | \"body\" | \"html\" | \"stop\" | \"q\" | \"label\" | \"progress\" | \"article\" | \"image\" | \"menu\" | \"base\" | React.ComponentType | \"s\" | \"legend\" | \"canvas\" | \"svg\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"p\" | \"select\" | \"output\" | \"script\" | \"time\" | \"mask\" | \"input\" | \"table\" | \"a\" | \"abbr\" | \"address\" | \"area\" | \"aside\" | \"audio\" | \"b\" | \"bdi\" | \"bdo\" | \"blockquote\" | \"br\" | \"button\" | \"caption\" | \"cite\" | \"code\" | \"col\" | \"colgroup\" | \"datalist\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"dialog\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"embed\" | \"fieldset\" | \"figcaption\" | \"figure\" | \"footer\" | \"header\" | \"hgroup\" | \"hr\" | \"i\" | \"iframe\" | \"img\" | \"ins\" | \"kbd\" | \"keygen\" | \"li\" | \"mark\" | \"menuitem\" | \"meter\" | \"nav\" | \"noindex\" | \"noscript\" | \"ol\" | \"optgroup\" | \"option\" | \"param\" | \"picture\" | \"pre\" | \"rp\" | \"rt\" | \"ruby\" | \"samp\" | \"section\" | \"strong\" | \"tbody\" | \"td\" | \"textarea\" | \"tfoot\" | \"th\" | \"thead\" | \"tr\" | \"track\" | \"u\" | \"ul\" | \"var\" | \"video\" | \"wbr\" | \"webview\" | \"animate\" | \"animateMotion\" | \"animateTransform\" | \"circle\" | \"clipPath\" | \"defs\" | \"ellipse\" | \"feBlend\" | \"feColorMatrix\" | \"feComponentTransfer\" | \"feComposite\" | \"feConvolveMatrix\" | \"feDiffuseLighting\" | \"feDisplacementMap\" | \"feDistantLight\" | \"feDropShadow\" | \"feFlood\" | \"feFuncA\" | \"feFuncB\" | \"feFuncG\" | \"feFuncR\" | \"feGaussianBlur\" | \"feImage\" | \"feMerge\" | \"feMergeNode\" | \"feMorphology\" | \"feOffset\" | \"fePointLight\" | \"feSpecularLighting\" | \"feSpotLight\" | \"feTile\" | \"feTurbulence\" | \"foreignObject\" | \"g\" | \"line\" | \"linearGradient\" | \"marker\" | \"metadata\" | \"mpath\" | \"polygon\" | \"polyline\" | \"radialGradient\" | \"rect\" | \"switch\" | \"textPath\" | \"tspan\" | \"use\" | \"view\"" ], "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx", "deprecated": false, @@ -1144,7 +1144,7 @@ "label": "showValueListModal", "description": [], "signature": [ - "\"symbol\" | \"object\" | \"source\" | \"meta\" | \"desc\" | \"filter\" | \"big\" | \"link\" | \"small\" | \"sub\" | \"sup\" | \"text\" | \"map\" | \"head\" | \"slot\" | \"style\" | \"title\" | \"data\" | \"pattern\" | \"summary\" | \"template\" | \"span\" | \"main\" | \"path\" | \"form\" | \"body\" | \"q\" | \"label\" | \"progress\" | \"article\" | \"image\" | \"menu\" | \"stop\" | \"base\" | React.ComponentType | \"s\" | \"legend\" | \"canvas\" | \"svg\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"p\" | \"select\" | \"output\" | \"script\" | \"time\" | \"mask\" | \"input\" | \"table\" | \"a\" | \"abbr\" | \"address\" | \"area\" | \"aside\" | \"audio\" | \"b\" | \"bdi\" | \"bdo\" | \"blockquote\" | \"br\" | \"button\" | \"caption\" | \"cite\" | \"code\" | \"col\" | \"colgroup\" | \"datalist\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"dialog\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"embed\" | \"fieldset\" | \"figcaption\" | \"figure\" | \"footer\" | \"header\" | \"hgroup\" | \"hr\" | \"html\" | \"i\" | \"iframe\" | \"img\" | \"ins\" | \"kbd\" | \"keygen\" | \"li\" | \"mark\" | \"menuitem\" | \"meter\" | \"nav\" | \"noindex\" | \"noscript\" | \"ol\" | \"optgroup\" | \"option\" | \"param\" | \"picture\" | \"pre\" | \"rp\" | \"rt\" | \"ruby\" | \"samp\" | \"section\" | \"strong\" | \"tbody\" | \"td\" | \"textarea\" | \"tfoot\" | \"th\" | \"thead\" | \"tr\" | \"track\" | \"u\" | \"ul\" | \"var\" | \"video\" | \"wbr\" | \"webview\" | \"animate\" | \"animateMotion\" | \"animateTransform\" | \"circle\" | \"clipPath\" | \"defs\" | \"ellipse\" | \"feBlend\" | \"feColorMatrix\" | \"feComponentTransfer\" | \"feComposite\" | \"feConvolveMatrix\" | \"feDiffuseLighting\" | \"feDisplacementMap\" | \"feDistantLight\" | \"feDropShadow\" | \"feFlood\" | \"feFuncA\" | \"feFuncB\" | \"feFuncG\" | \"feFuncR\" | \"feGaussianBlur\" | \"feImage\" | \"feMerge\" | \"feMergeNode\" | \"feMorphology\" | \"feOffset\" | \"fePointLight\" | \"feSpecularLighting\" | \"feSpotLight\" | \"feTile\" | \"feTurbulence\" | \"foreignObject\" | \"g\" | \"line\" | \"linearGradient\" | \"marker\" | \"metadata\" | \"mpath\" | \"polygon\" | \"polyline\" | \"radialGradient\" | \"rect\" | \"switch\" | \"textPath\" | \"tspan\" | \"use\" | \"view\"" + "\"symbol\" | \"object\" | \"source\" | \"meta\" | \"desc\" | \"filter\" | \"big\" | \"link\" | \"small\" | \"sub\" | \"sup\" | \"text\" | \"map\" | \"head\" | \"slot\" | \"style\" | \"title\" | \"data\" | \"pattern\" | \"summary\" | \"template\" | \"span\" | \"main\" | \"path\" | \"form\" | \"body\" | \"html\" | \"stop\" | \"q\" | \"label\" | \"progress\" | \"article\" | \"image\" | \"menu\" | \"base\" | React.ComponentType | \"s\" | \"legend\" | \"canvas\" | \"svg\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"p\" | \"select\" | \"output\" | \"script\" | \"time\" | \"mask\" | \"input\" | \"table\" | \"a\" | \"abbr\" | \"address\" | \"area\" | \"aside\" | \"audio\" | \"b\" | \"bdi\" | \"bdo\" | \"blockquote\" | \"br\" | \"button\" | \"caption\" | \"cite\" | \"code\" | \"col\" | \"colgroup\" | \"datalist\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"dialog\" | \"div\" | \"dl\" | \"dt\" | \"em\" | \"embed\" | \"fieldset\" | \"figcaption\" | \"figure\" | \"footer\" | \"header\" | \"hgroup\" | \"hr\" | \"i\" | \"iframe\" | \"img\" | \"ins\" | \"kbd\" | \"keygen\" | \"li\" | \"mark\" | \"menuitem\" | \"meter\" | \"nav\" | \"noindex\" | \"noscript\" | \"ol\" | \"optgroup\" | \"option\" | \"param\" | \"picture\" | \"pre\" | \"rp\" | \"rt\" | \"ruby\" | \"samp\" | \"section\" | \"strong\" | \"tbody\" | \"td\" | \"textarea\" | \"tfoot\" | \"th\" | \"thead\" | \"tr\" | \"track\" | \"u\" | \"ul\" | \"var\" | \"video\" | \"wbr\" | \"webview\" | \"animate\" | \"animateMotion\" | \"animateTransform\" | \"circle\" | \"clipPath\" | \"defs\" | \"ellipse\" | \"feBlend\" | \"feColorMatrix\" | \"feComponentTransfer\" | \"feComposite\" | \"feConvolveMatrix\" | \"feDiffuseLighting\" | \"feDisplacementMap\" | \"feDistantLight\" | \"feDropShadow\" | \"feFlood\" | \"feFuncA\" | \"feFuncB\" | \"feFuncG\" | \"feFuncR\" | \"feGaussianBlur\" | \"feImage\" | \"feMerge\" | \"feMergeNode\" | \"feMorphology\" | \"feOffset\" | \"fePointLight\" | \"feSpecularLighting\" | \"feSpotLight\" | \"feTile\" | \"feTurbulence\" | \"foreignObject\" | \"g\" | \"line\" | \"linearGradient\" | \"marker\" | \"metadata\" | \"mpath\" | \"polygon\" | \"polyline\" | \"radialGradient\" | \"rect\" | \"switch\" | \"textPath\" | \"tspan\" | \"use\" | \"view\"" ], "path": "packages/kbn-securitysolution-exception-list-components/src/exception_item_card/exception_item_card.tsx", "deprecated": false, diff --git a/api_docs/kbn_securitysolution_exception_list_components.mdx b/api_docs/kbn_securitysolution_exception_list_components.mdx index e5e0aa4dd0940..f5cde1d3a4d5d 100644 --- a/api_docs/kbn_securitysolution_exception_list_components.mdx +++ b/api_docs/kbn_securitysolution_exception_list_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-exception-list-components title: "@kbn/securitysolution-exception-list-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-exception-list-components plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-exception-list-components'] --- import kbnSecuritysolutionExceptionListComponentsObj from './kbn_securitysolution_exception_list_components.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_hook_utils.mdx b/api_docs/kbn_securitysolution_hook_utils.mdx index b9d501c2caed5..b5c55942d33c7 100644 --- a/api_docs/kbn_securitysolution_hook_utils.mdx +++ b/api_docs/kbn_securitysolution_hook_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-hook-utils title: "@kbn/securitysolution-hook-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-hook-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-hook-utils'] --- import kbnSecuritysolutionHookUtilsObj from './kbn_securitysolution_hook_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx index decddf42c6bf9..f0c2d44561d1d 100644 --- a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-alerting-types title: "@kbn/securitysolution-io-ts-alerting-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-alerting-types plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-alerting-types'] --- import kbnSecuritysolutionIoTsAlertingTypesObj from './kbn_securitysolution_io_ts_alerting_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_list_types.mdx b/api_docs/kbn_securitysolution_io_ts_list_types.mdx index e0c62d30a62ce..e103e69bf5cd7 100644 --- a/api_docs/kbn_securitysolution_io_ts_list_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_list_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-list-types title: "@kbn/securitysolution-io-ts-list-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-list-types plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-list-types'] --- import kbnSecuritysolutionIoTsListTypesObj from './kbn_securitysolution_io_ts_list_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_types.mdx b/api_docs/kbn_securitysolution_io_ts_types.mdx index 9763ddde3f712..a21ad68d9043f 100644 --- a/api_docs/kbn_securitysolution_io_ts_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-types title: "@kbn/securitysolution-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-types plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-types'] --- import kbnSecuritysolutionIoTsTypesObj from './kbn_securitysolution_io_ts_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_utils.mdx b/api_docs/kbn_securitysolution_io_ts_utils.mdx index 20fd2d45a4742..81d94551f812b 100644 --- a/api_docs/kbn_securitysolution_io_ts_utils.mdx +++ b/api_docs/kbn_securitysolution_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-utils title: "@kbn/securitysolution-io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-utils'] --- import kbnSecuritysolutionIoTsUtilsObj from './kbn_securitysolution_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_api.mdx b/api_docs/kbn_securitysolution_list_api.mdx index c8a273313ad9c..318de0bc883b8 100644 --- a/api_docs/kbn_securitysolution_list_api.mdx +++ b/api_docs/kbn_securitysolution_list_api.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-api title: "@kbn/securitysolution-list-api" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-api plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-api'] --- import kbnSecuritysolutionListApiObj from './kbn_securitysolution_list_api.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_constants.mdx b/api_docs/kbn_securitysolution_list_constants.mdx index 68255d78ad849..f8a9b40faf62c 100644 --- a/api_docs/kbn_securitysolution_list_constants.mdx +++ b/api_docs/kbn_securitysolution_list_constants.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-constants title: "@kbn/securitysolution-list-constants" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-constants plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-constants'] --- import kbnSecuritysolutionListConstantsObj from './kbn_securitysolution_list_constants.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_hooks.mdx b/api_docs/kbn_securitysolution_list_hooks.mdx index fb26309cd0bce..01f93479b2d20 100644 --- a/api_docs/kbn_securitysolution_list_hooks.mdx +++ b/api_docs/kbn_securitysolution_list_hooks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-hooks title: "@kbn/securitysolution-list-hooks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-hooks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-hooks'] --- import kbnSecuritysolutionListHooksObj from './kbn_securitysolution_list_hooks.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_utils.mdx b/api_docs/kbn_securitysolution_list_utils.mdx index ae6721015cd00..82077f8d7f36d 100644 --- a/api_docs/kbn_securitysolution_list_utils.mdx +++ b/api_docs/kbn_securitysolution_list_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-utils title: "@kbn/securitysolution-list-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-utils'] --- import kbnSecuritysolutionListUtilsObj from './kbn_securitysolution_list_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_rules.mdx b/api_docs/kbn_securitysolution_rules.mdx index 0f2a1d7b1718f..09299d2c9a689 100644 --- a/api_docs/kbn_securitysolution_rules.mdx +++ b/api_docs/kbn_securitysolution_rules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-rules title: "@kbn/securitysolution-rules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-rules plugin -date: 2024-07-03 +date: 2024-07-05 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 6ff2a8cca68a0..fcea2c948d551 100644 --- a/api_docs/kbn_securitysolution_t_grid.mdx +++ b/api_docs/kbn_securitysolution_t_grid.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-t-grid title: "@kbn/securitysolution-t-grid" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-t-grid plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-t-grid'] --- import kbnSecuritysolutionTGridObj from './kbn_securitysolution_t_grid.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_utils.mdx b/api_docs/kbn_securitysolution_utils.mdx index 4d6cbec4736ec..f257061699617 100644 --- a/api_docs/kbn_securitysolution_utils.mdx +++ b/api_docs/kbn_securitysolution_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-utils title: "@kbn/securitysolution-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-utils'] --- import kbnSecuritysolutionUtilsObj from './kbn_securitysolution_utils.devdocs.json'; diff --git a/api_docs/kbn_server_http_tools.mdx b/api_docs/kbn_server_http_tools.mdx index f8a78bc9995a3..19b42f14dfce9 100644 --- a/api_docs/kbn_server_http_tools.mdx +++ b/api_docs/kbn_server_http_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-http-tools title: "@kbn/server-http-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-http-tools plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-http-tools'] --- import kbnServerHttpToolsObj from './kbn_server_http_tools.devdocs.json'; diff --git a/api_docs/kbn_server_route_repository.mdx b/api_docs/kbn_server_route_repository.mdx index 4735d2cfb3644..167a2d8470380 100644 --- a/api_docs/kbn_server_route_repository.mdx +++ b/api_docs/kbn_server_route_repository.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-route-repository title: "@kbn/server-route-repository" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-route-repository plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository'] --- import kbnServerRouteRepositoryObj from './kbn_server_route_repository.devdocs.json'; diff --git a/api_docs/kbn_serverless_common_settings.mdx b/api_docs/kbn_serverless_common_settings.mdx index d71630c8b1aee..92c7bdd2bd55d 100644 --- a/api_docs/kbn_serverless_common_settings.mdx +++ b/api_docs/kbn_serverless_common_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-common-settings title: "@kbn/serverless-common-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-common-settings plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-common-settings'] --- import kbnServerlessCommonSettingsObj from './kbn_serverless_common_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_observability_settings.mdx b/api_docs/kbn_serverless_observability_settings.mdx index 024160d40bd2a..469979da1ba37 100644 --- a/api_docs/kbn_serverless_observability_settings.mdx +++ b/api_docs/kbn_serverless_observability_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-observability-settings title: "@kbn/serverless-observability-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-observability-settings plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-observability-settings'] --- import kbnServerlessObservabilitySettingsObj from './kbn_serverless_observability_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_project_switcher.mdx b/api_docs/kbn_serverless_project_switcher.mdx index 46ac7d9eaff33..74a46ced815d0 100644 --- a/api_docs/kbn_serverless_project_switcher.mdx +++ b/api_docs/kbn_serverless_project_switcher.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-project-switcher title: "@kbn/serverless-project-switcher" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-project-switcher plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-project-switcher'] --- import kbnServerlessProjectSwitcherObj from './kbn_serverless_project_switcher.devdocs.json'; diff --git a/api_docs/kbn_serverless_search_settings.mdx b/api_docs/kbn_serverless_search_settings.mdx index a592e4dd4c115..5b186c84ee5b5 100644 --- a/api_docs/kbn_serverless_search_settings.mdx +++ b/api_docs/kbn_serverless_search_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-search-settings title: "@kbn/serverless-search-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-search-settings plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-search-settings'] --- import kbnServerlessSearchSettingsObj from './kbn_serverless_search_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_security_settings.mdx b/api_docs/kbn_serverless_security_settings.mdx index 41cfd4295cff4..c57877b0207c9 100644 --- a/api_docs/kbn_serverless_security_settings.mdx +++ b/api_docs/kbn_serverless_security_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-security-settings title: "@kbn/serverless-security-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-security-settings plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-security-settings'] --- import kbnServerlessSecuritySettingsObj from './kbn_serverless_security_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_storybook_config.mdx b/api_docs/kbn_serverless_storybook_config.mdx index 97c457192ece9..8a77b8967c2f2 100644 --- a/api_docs/kbn_serverless_storybook_config.mdx +++ b/api_docs/kbn_serverless_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-storybook-config title: "@kbn/serverless-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-storybook-config plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-storybook-config'] --- import kbnServerlessStorybookConfigObj from './kbn_serverless_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_shared_svg.devdocs.json b/api_docs/kbn_shared_svg.devdocs.json index 588b106773268..cf0d7002279b3 100644 --- a/api_docs/kbn_shared_svg.devdocs.json +++ b/api_docs/kbn_shared_svg.devdocs.json @@ -58,6 +58,18 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/shared-svg", + "id": "def-common.content", + "type": "string", + "tags": [], + "label": "content", + "description": [], + "path": "packages/kbn-ambient-ui-types/index.d.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/shared-svg", "id": "def-common.content", diff --git a/api_docs/kbn_shared_svg.mdx b/api_docs/kbn_shared_svg.mdx index 04dd5b1cc4505..7ffab85fa1586 100644 --- a/api_docs/kbn_shared_svg.mdx +++ b/api_docs/kbn_shared_svg.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-svg title: "@kbn/shared-svg" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-svg plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-svg'] --- import kbnSharedSvgObj from './kbn_shared_svg.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/te | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 4 | 0 | 4 | 0 | +| 5 | 0 | 5 | 0 | ## Common diff --git a/api_docs/kbn_shared_ux_avatar_solution.mdx b/api_docs/kbn_shared_ux_avatar_solution.mdx index d98839c0d9c58..fd31ce2c840fb 100644 --- a/api_docs/kbn_shared_ux_avatar_solution.mdx +++ b/api_docs/kbn_shared_ux_avatar_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-avatar-solution title: "@kbn/shared-ux-avatar-solution" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-avatar-solution plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-avatar-solution'] --- import kbnSharedUxAvatarSolutionObj from './kbn_shared_ux_avatar_solution.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_exit_full_screen.mdx b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx index 39e5c8490b918..abc6e659ee2ef 100644 --- a/api_docs/kbn_shared_ux_button_exit_full_screen.mdx +++ b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-exit-full-screen title: "@kbn/shared-ux-button-exit-full-screen" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-exit-full-screen plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-exit-full-screen'] --- import kbnSharedUxButtonExitFullScreenObj from './kbn_shared_ux_button_exit_full_screen.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_toolbar.mdx b/api_docs/kbn_shared_ux_button_toolbar.mdx index 909f32b4c9166..2f5ad5611c977 100644 --- a/api_docs/kbn_shared_ux_button_toolbar.mdx +++ b/api_docs/kbn_shared_ux_button_toolbar.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-toolbar title: "@kbn/shared-ux-button-toolbar" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-toolbar plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-toolbar'] --- import kbnSharedUxButtonToolbarObj from './kbn_shared_ux_button_toolbar.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_card_no_data.mdx b/api_docs/kbn_shared_ux_card_no_data.mdx index 5b066bf34ce13..044f5c2b9e69f 100644 --- a/api_docs/kbn_shared_ux_card_no_data.mdx +++ b/api_docs/kbn_shared_ux_card_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data title: "@kbn/shared-ux-card-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data'] --- import kbnSharedUxCardNoDataObj from './kbn_shared_ux_card_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx index 9992ca5d5fc24..7c905bb6f0f90 100644 --- a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data-mocks title: "@kbn/shared-ux-card-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data-mocks'] --- import kbnSharedUxCardNoDataMocksObj from './kbn_shared_ux_card_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_chrome_navigation.mdx b/api_docs/kbn_shared_ux_chrome_navigation.mdx index 5ddbbb5b6eb7e..f9062f3f6f63a 100644 --- a/api_docs/kbn_shared_ux_chrome_navigation.mdx +++ b/api_docs/kbn_shared_ux_chrome_navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-chrome-navigation title: "@kbn/shared-ux-chrome-navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-chrome-navigation plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-chrome-navigation'] --- import kbnSharedUxChromeNavigationObj from './kbn_shared_ux_chrome_navigation.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_error_boundary.mdx b/api_docs/kbn_shared_ux_error_boundary.mdx index b7f25c9d9c4a9..0277433321b8d 100644 --- a/api_docs/kbn_shared_ux_error_boundary.mdx +++ b/api_docs/kbn_shared_ux_error_boundary.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-error-boundary title: "@kbn/shared-ux-error-boundary" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-error-boundary plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-error-boundary'] --- import kbnSharedUxErrorBoundaryObj from './kbn_shared_ux_error_boundary.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_context.mdx b/api_docs/kbn_shared_ux_file_context.mdx index 3b01fb8778555..46aa14ba7e609 100644 --- a/api_docs/kbn_shared_ux_file_context.mdx +++ b/api_docs/kbn_shared_ux_file_context.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-context title: "@kbn/shared-ux-file-context" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-context plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-context'] --- import kbnSharedUxFileContextObj from './kbn_shared_ux_file_context.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_image.mdx b/api_docs/kbn_shared_ux_file_image.mdx index a46ca1c0e34ff..5bbea06058483 100644 --- a/api_docs/kbn_shared_ux_file_image.mdx +++ b/api_docs/kbn_shared_ux_file_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-image title: "@kbn/shared-ux-file-image" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-image plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-image'] --- import kbnSharedUxFileImageObj from './kbn_shared_ux_file_image.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_image_mocks.mdx b/api_docs/kbn_shared_ux_file_image_mocks.mdx index 5d681df763439..174abc9e87b05 100644 --- a/api_docs/kbn_shared_ux_file_image_mocks.mdx +++ b/api_docs/kbn_shared_ux_file_image_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-image-mocks title: "@kbn/shared-ux-file-image-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-image-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-image-mocks'] --- import kbnSharedUxFileImageMocksObj from './kbn_shared_ux_file_image_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_mocks.mdx b/api_docs/kbn_shared_ux_file_mocks.mdx index 0fdaac33bf821..9098b2ee5c608 100644 --- a/api_docs/kbn_shared_ux_file_mocks.mdx +++ b/api_docs/kbn_shared_ux_file_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-mocks title: "@kbn/shared-ux-file-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-mocks'] --- import kbnSharedUxFileMocksObj from './kbn_shared_ux_file_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_picker.mdx b/api_docs/kbn_shared_ux_file_picker.mdx index 90a2aace4b3ed..1acdeb4b36cd2 100644 --- a/api_docs/kbn_shared_ux_file_picker.mdx +++ b/api_docs/kbn_shared_ux_file_picker.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-picker title: "@kbn/shared-ux-file-picker" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-picker plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-picker'] --- import kbnSharedUxFilePickerObj from './kbn_shared_ux_file_picker.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_types.mdx b/api_docs/kbn_shared_ux_file_types.mdx index a04948b6d36bc..1ebd0942c45cb 100644 --- a/api_docs/kbn_shared_ux_file_types.mdx +++ b/api_docs/kbn_shared_ux_file_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-types title: "@kbn/shared-ux-file-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-types plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-types'] --- import kbnSharedUxFileTypesObj from './kbn_shared_ux_file_types.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_upload.mdx b/api_docs/kbn_shared_ux_file_upload.mdx index a0a3f296d09dc..10fbf047133c6 100644 --- a/api_docs/kbn_shared_ux_file_upload.mdx +++ b/api_docs/kbn_shared_ux_file_upload.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-upload title: "@kbn/shared-ux-file-upload" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-upload plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-upload'] --- import kbnSharedUxFileUploadObj from './kbn_shared_ux_file_upload.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_util.mdx b/api_docs/kbn_shared_ux_file_util.mdx index 15d28db30b8c0..1ebaa562f7945 100644 --- a/api_docs/kbn_shared_ux_file_util.mdx +++ b/api_docs/kbn_shared_ux_file_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-util title: "@kbn/shared-ux-file-util" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-util plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-util'] --- import kbnSharedUxFileUtilObj from './kbn_shared_ux_file_util.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_link_redirect_app.mdx b/api_docs/kbn_shared_ux_link_redirect_app.mdx index ab16dc362c178..56fe3c322b25a 100644 --- a/api_docs/kbn_shared_ux_link_redirect_app.mdx +++ b/api_docs/kbn_shared_ux_link_redirect_app.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app title: "@kbn/shared-ux-link-redirect-app" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-link-redirect-app plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app'] --- import kbnSharedUxLinkRedirectAppObj from './kbn_shared_ux_link_redirect_app.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx index 72ee477f9b943..be14049b84d34 100644 --- a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx +++ b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app-mocks title: "@kbn/shared-ux-link-redirect-app-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-link-redirect-app-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app-mocks'] --- import kbnSharedUxLinkRedirectAppMocksObj from './kbn_shared_ux_link_redirect_app_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_markdown.mdx b/api_docs/kbn_shared_ux_markdown.mdx index 86e20431dce6c..dbfdf0ed55170 100644 --- a/api_docs/kbn_shared_ux_markdown.mdx +++ b/api_docs/kbn_shared_ux_markdown.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-markdown title: "@kbn/shared-ux-markdown" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-markdown plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-markdown'] --- import kbnSharedUxMarkdownObj from './kbn_shared_ux_markdown.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_markdown_mocks.mdx b/api_docs/kbn_shared_ux_markdown_mocks.mdx index 863e0ed64dc70..8a07773327499 100644 --- a/api_docs/kbn_shared_ux_markdown_mocks.mdx +++ b/api_docs/kbn_shared_ux_markdown_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-markdown-mocks title: "@kbn/shared-ux-markdown-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-markdown-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-markdown-mocks'] --- import kbnSharedUxMarkdownMocksObj from './kbn_shared_ux_markdown_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx index 7981948e69486..6417e53af4426 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data title: "@kbn/shared-ux-page-analytics-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data'] --- import kbnSharedUxPageAnalyticsNoDataObj from './kbn_shared_ux_page_analytics_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx index 337087dbd0bf4..c92bf6fe11c12 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data-mocks title: "@kbn/shared-ux-page-analytics-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data-mocks'] --- import kbnSharedUxPageAnalyticsNoDataMocksObj from './kbn_shared_ux_page_analytics_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx index 8c9cf98b3577a..ba87d2d1a0e5e 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data title: "@kbn/shared-ux-page-kibana-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data'] --- import kbnSharedUxPageKibanaNoDataObj from './kbn_shared_ux_page_kibana_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx index c8b9269a8d8ac..e803c5e35e42f 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data-mocks title: "@kbn/shared-ux-page-kibana-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data-mocks'] --- import kbnSharedUxPageKibanaNoDataMocksObj from './kbn_shared_ux_page_kibana_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_template.mdx b/api_docs/kbn_shared_ux_page_kibana_template.mdx index 6f98c45a1963e..31e9740bbccfd 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template title: "@kbn/shared-ux-page-kibana-template" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-template'] --- import kbnSharedUxPageKibanaTemplateObj from './kbn_shared_ux_page_kibana_template.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx index 6e19744fc39be..0e89668be6566 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template-mocks title: "@kbn/shared-ux-page-kibana-template-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-template-mocks'] --- import kbnSharedUxPageKibanaTemplateMocksObj from './kbn_shared_ux_page_kibana_template_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data.mdx b/api_docs/kbn_shared_ux_page_no_data.mdx index a58f8e50bbe55..968aaa81f9515 100644 --- a/api_docs/kbn_shared_ux_page_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data title: "@kbn/shared-ux-page-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data'] --- import kbnSharedUxPageNoDataObj from './kbn_shared_ux_page_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_config.mdx b/api_docs/kbn_shared_ux_page_no_data_config.mdx index 3d7c0792ff209..e555c8823cc5e 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config title: "@kbn/shared-ux-page-no-data-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-config'] --- import kbnSharedUxPageNoDataConfigObj from './kbn_shared_ux_page_no_data_config.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx index 4957346ff16da..3960e20116479 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config-mocks title: "@kbn/shared-ux-page-no-data-config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-config-mocks'] --- import kbnSharedUxPageNoDataConfigMocksObj from './kbn_shared_ux_page_no_data_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx index 2867f28d2066d..c073894e254c6 100644 --- a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-mocks title: "@kbn/shared-ux-page-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-mocks'] --- import kbnSharedUxPageNoDataMocksObj from './kbn_shared_ux_page_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_solution_nav.mdx b/api_docs/kbn_shared_ux_page_solution_nav.mdx index 84acbee872cc4..2f59e2ce56114 100644 --- a/api_docs/kbn_shared_ux_page_solution_nav.mdx +++ b/api_docs/kbn_shared_ux_page_solution_nav.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-solution-nav title: "@kbn/shared-ux-page-solution-nav" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-solution-nav plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-solution-nav'] --- import kbnSharedUxPageSolutionNavObj from './kbn_shared_ux_page_solution_nav.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views.devdocs.json b/api_docs/kbn_shared_ux_prompt_no_data_views.devdocs.json index 3a87ab5b316a9..335a8ce3c4eff 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views.devdocs.json +++ b/api_docs/kbn_shared_ux_prompt_no_data_views.devdocs.json @@ -259,7 +259,7 @@ "The background color of the prompt; defaults to `plain`." ], "signature": [ - "\"warning\" | \"success\" | \"subdued\" | \"primary\" | \"accent\" | \"danger\" | \"plain\" | \"transparent\" | undefined" + "\"warning\" | \"success\" | \"plain\" | \"subdued\" | \"primary\" | \"accent\" | \"danger\" | \"transparent\" | undefined" ], "path": "packages/shared-ux/prompt/no_data_views/types/index.d.ts", "deprecated": false, 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 109ac87d18192..ee3e12d03552b 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views title: "@kbn/shared-ux-prompt-no-data-views" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views'] --- import kbnSharedUxPromptNoDataViewsObj from './kbn_shared_ux_prompt_no_data_views.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx index 3541aed49122c..42a82e3ea6d78 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views-mocks title: "@kbn/shared-ux-prompt-no-data-views-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views-mocks'] --- import kbnSharedUxPromptNoDataViewsMocksObj from './kbn_shared_ux_prompt_no_data_views_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_not_found.mdx b/api_docs/kbn_shared_ux_prompt_not_found.mdx index aac6b7af887de..ed2c691d8b364 100644 --- a/api_docs/kbn_shared_ux_prompt_not_found.mdx +++ b/api_docs/kbn_shared_ux_prompt_not_found.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-not-found title: "@kbn/shared-ux-prompt-not-found" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-not-found plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-not-found'] --- import kbnSharedUxPromptNotFoundObj from './kbn_shared_ux_prompt_not_found.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_router.mdx b/api_docs/kbn_shared_ux_router.mdx index 9f54866eba5f2..2c254d133d68e 100644 --- a/api_docs/kbn_shared_ux_router.mdx +++ b/api_docs/kbn_shared_ux_router.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router title: "@kbn/shared-ux-router" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-router plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-router'] --- import kbnSharedUxRouterObj from './kbn_shared_ux_router.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_router_mocks.mdx b/api_docs/kbn_shared_ux_router_mocks.mdx index a9a2fd9ccbdb2..5f76a542c0405 100644 --- a/api_docs/kbn_shared_ux_router_mocks.mdx +++ b/api_docs/kbn_shared_ux_router_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router-mocks title: "@kbn/shared-ux-router-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-router-mocks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-router-mocks'] --- import kbnSharedUxRouterMocksObj from './kbn_shared_ux_router_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_storybook_config.mdx b/api_docs/kbn_shared_ux_storybook_config.mdx index 08223441cc785..5bd5273e81c8a 100644 --- a/api_docs/kbn_shared_ux_storybook_config.mdx +++ b/api_docs/kbn_shared_ux_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-config title: "@kbn/shared-ux-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-config plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-config'] --- import kbnSharedUxStorybookConfigObj from './kbn_shared_ux_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_storybook_mock.mdx b/api_docs/kbn_shared_ux_storybook_mock.mdx index d6433972243ef..52af59c14f39b 100644 --- a/api_docs/kbn_shared_ux_storybook_mock.mdx +++ b/api_docs/kbn_shared_ux_storybook_mock.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-mock title: "@kbn/shared-ux-storybook-mock" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-mock plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-mock'] --- import kbnSharedUxStorybookMockObj from './kbn_shared_ux_storybook_mock.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_tabbed_modal.mdx b/api_docs/kbn_shared_ux_tabbed_modal.mdx index b7a1634399ad8..e558d6cd0c552 100644 --- a/api_docs/kbn_shared_ux_tabbed_modal.mdx +++ b/api_docs/kbn_shared_ux_tabbed_modal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-tabbed-modal title: "@kbn/shared-ux-tabbed-modal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-tabbed-modal plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-tabbed-modal'] --- import kbnSharedUxTabbedModalObj from './kbn_shared_ux_tabbed_modal.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_utility.mdx b/api_docs/kbn_shared_ux_utility.mdx index c69ce88f1507a..aaa30a23f07fb 100644 --- a/api_docs/kbn_shared_ux_utility.mdx +++ b/api_docs/kbn_shared_ux_utility.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-utility title: "@kbn/shared-ux-utility" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-utility plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-utility'] --- import kbnSharedUxUtilityObj from './kbn_shared_ux_utility.devdocs.json'; diff --git a/api_docs/kbn_slo_schema.mdx b/api_docs/kbn_slo_schema.mdx index 6aff179f85079..fdd3efb470c87 100644 --- a/api_docs/kbn_slo_schema.mdx +++ b/api_docs/kbn_slo_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-slo-schema title: "@kbn/slo-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/slo-schema plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/slo-schema'] --- import kbnSloSchemaObj from './kbn_slo_schema.devdocs.json'; diff --git a/api_docs/kbn_some_dev_log.mdx b/api_docs/kbn_some_dev_log.mdx index adf48918a6b6c..205cd057fa84d 100644 --- a/api_docs/kbn_some_dev_log.mdx +++ b/api_docs/kbn_some_dev_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-some-dev-log title: "@kbn/some-dev-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/some-dev-log plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/some-dev-log'] --- import kbnSomeDevLogObj from './kbn_some_dev_log.devdocs.json'; diff --git a/api_docs/kbn_sort_predicates.mdx b/api_docs/kbn_sort_predicates.mdx index b8e206d06ca10..667d59a0ce60b 100644 --- a/api_docs/kbn_sort_predicates.mdx +++ b/api_docs/kbn_sort_predicates.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-sort-predicates title: "@kbn/sort-predicates" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/sort-predicates plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/sort-predicates'] --- import kbnSortPredicatesObj from './kbn_sort_predicates.devdocs.json'; diff --git a/api_docs/kbn_std.mdx b/api_docs/kbn_std.mdx index ffe366ca06795..386f86085354c 100644 --- a/api_docs/kbn_std.mdx +++ b/api_docs/kbn_std.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-std title: "@kbn/std" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/std plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/std'] --- import kbnStdObj from './kbn_std.devdocs.json'; diff --git a/api_docs/kbn_stdio_dev_helpers.mdx b/api_docs/kbn_stdio_dev_helpers.mdx index 32ad4f3240e4b..daa6ebd769e70 100644 --- a/api_docs/kbn_stdio_dev_helpers.mdx +++ b/api_docs/kbn_stdio_dev_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-stdio-dev-helpers title: "@kbn/stdio-dev-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/stdio-dev-helpers plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/stdio-dev-helpers'] --- import kbnStdioDevHelpersObj from './kbn_stdio_dev_helpers.devdocs.json'; diff --git a/api_docs/kbn_storybook.mdx b/api_docs/kbn_storybook.mdx index 6000da3fe1742..8a27dac0bae11 100644 --- a/api_docs/kbn_storybook.mdx +++ b/api_docs/kbn_storybook.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-storybook title: "@kbn/storybook" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/storybook plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/storybook'] --- import kbnStorybookObj from './kbn_storybook.devdocs.json'; diff --git a/api_docs/kbn_telemetry_tools.mdx b/api_docs/kbn_telemetry_tools.mdx index 2c444b3aa60cf..762f36c46980e 100644 --- a/api_docs/kbn_telemetry_tools.mdx +++ b/api_docs/kbn_telemetry_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-telemetry-tools title: "@kbn/telemetry-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/telemetry-tools plugin -date: 2024-07-03 +date: 2024-07-05 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 e18118625085b..80fa0508a6a42 100644 --- a/api_docs/kbn_test.mdx +++ b/api_docs/kbn_test.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test title: "@kbn/test" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test'] --- import kbnTestObj from './kbn_test.devdocs.json'; diff --git a/api_docs/kbn_test_eui_helpers.mdx b/api_docs/kbn_test_eui_helpers.mdx index 43922e8e1e1a9..7d80aa0bc486f 100644 --- a/api_docs/kbn_test_eui_helpers.mdx +++ b/api_docs/kbn_test_eui_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-eui-helpers title: "@kbn/test-eui-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-eui-helpers plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-eui-helpers'] --- import kbnTestEuiHelpersObj from './kbn_test_eui_helpers.devdocs.json'; diff --git a/api_docs/kbn_test_jest_helpers.mdx b/api_docs/kbn_test_jest_helpers.mdx index 435de325bb5b9..c79418208c11b 100644 --- a/api_docs/kbn_test_jest_helpers.mdx +++ b/api_docs/kbn_test_jest_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-jest-helpers title: "@kbn/test-jest-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-jest-helpers plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-jest-helpers'] --- import kbnTestJestHelpersObj from './kbn_test_jest_helpers.devdocs.json'; diff --git a/api_docs/kbn_test_subj_selector.mdx b/api_docs/kbn_test_subj_selector.mdx index edc3b52274b36..e9fd00c524d9a 100644 --- a/api_docs/kbn_test_subj_selector.mdx +++ b/api_docs/kbn_test_subj_selector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-subj-selector title: "@kbn/test-subj-selector" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-subj-selector plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-subj-selector'] --- import kbnTestSubjSelectorObj from './kbn_test_subj_selector.devdocs.json'; diff --git a/api_docs/kbn_text_based_editor.mdx b/api_docs/kbn_text_based_editor.mdx index c07cdf9251b1a..880c154e9a517 100644 --- a/api_docs/kbn_text_based_editor.mdx +++ b/api_docs/kbn_text_based_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-text-based-editor title: "@kbn/text-based-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/text-based-editor plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/text-based-editor'] --- import kbnTextBasedEditorObj from './kbn_text_based_editor.devdocs.json'; diff --git a/api_docs/kbn_timerange.mdx b/api_docs/kbn_timerange.mdx index 5be45f62001f6..fc5f2ce30ab7d 100644 --- a/api_docs/kbn_timerange.mdx +++ b/api_docs/kbn_timerange.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-timerange title: "@kbn/timerange" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/timerange plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/timerange'] --- import kbnTimerangeObj from './kbn_timerange.devdocs.json'; diff --git a/api_docs/kbn_tooling_log.mdx b/api_docs/kbn_tooling_log.mdx index 51426167fe362..5cfb35ebafded 100644 --- a/api_docs/kbn_tooling_log.mdx +++ b/api_docs/kbn_tooling_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-tooling-log title: "@kbn/tooling-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/tooling-log plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/tooling-log'] --- import kbnToolingLogObj from './kbn_tooling_log.devdocs.json'; diff --git a/api_docs/kbn_triggers_actions_ui_types.mdx b/api_docs/kbn_triggers_actions_ui_types.mdx index cbe235180133f..a66f935d24ff7 100644 --- a/api_docs/kbn_triggers_actions_ui_types.mdx +++ b/api_docs/kbn_triggers_actions_ui_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-triggers-actions-ui-types title: "@kbn/triggers-actions-ui-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/triggers-actions-ui-types plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/triggers-actions-ui-types'] --- import kbnTriggersActionsUiTypesObj from './kbn_triggers_actions_ui_types.devdocs.json'; diff --git a/api_docs/kbn_try_in_console.mdx b/api_docs/kbn_try_in_console.mdx index 100d851052e52..5aadc2d475e22 100644 --- a/api_docs/kbn_try_in_console.mdx +++ b/api_docs/kbn_try_in_console.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-try-in-console title: "@kbn/try-in-console" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/try-in-console plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/try-in-console'] --- import kbnTryInConsoleObj from './kbn_try_in_console.devdocs.json'; diff --git a/api_docs/kbn_ts_projects.mdx b/api_docs/kbn_ts_projects.mdx index a4b2847019c3a..884040b678699 100644 --- a/api_docs/kbn_ts_projects.mdx +++ b/api_docs/kbn_ts_projects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ts-projects title: "@kbn/ts-projects" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ts-projects plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ts-projects'] --- import kbnTsProjectsObj from './kbn_ts_projects.devdocs.json'; diff --git a/api_docs/kbn_typed_react_router_config.mdx b/api_docs/kbn_typed_react_router_config.mdx index cdd22ede8c0b6..a5a0bf6bcbe59 100644 --- a/api_docs/kbn_typed_react_router_config.mdx +++ b/api_docs/kbn_typed_react_router_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-typed-react-router-config title: "@kbn/typed-react-router-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/typed-react-router-config plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/typed-react-router-config'] --- import kbnTypedReactRouterConfigObj from './kbn_typed_react_router_config.devdocs.json'; diff --git a/api_docs/kbn_ui_actions_browser.mdx b/api_docs/kbn_ui_actions_browser.mdx index 6160d108f290b..8ea42294706a9 100644 --- a/api_docs/kbn_ui_actions_browser.mdx +++ b/api_docs/kbn_ui_actions_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-actions-browser title: "@kbn/ui-actions-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-actions-browser plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-actions-browser'] --- import kbnUiActionsBrowserObj from './kbn_ui_actions_browser.devdocs.json'; diff --git a/api_docs/kbn_ui_shared_deps_src.mdx b/api_docs/kbn_ui_shared_deps_src.mdx index e5eaf40c7b1a8..0296ea2636d04 100644 --- a/api_docs/kbn_ui_shared_deps_src.mdx +++ b/api_docs/kbn_ui_shared_deps_src.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-shared-deps-src title: "@kbn/ui-shared-deps-src" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-shared-deps-src plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-shared-deps-src'] --- import kbnUiSharedDepsSrcObj from './kbn_ui_shared_deps_src.devdocs.json'; diff --git a/api_docs/kbn_ui_theme.mdx b/api_docs/kbn_ui_theme.mdx index 37b19c43ea4e3..e7a286a210453 100644 --- a/api_docs/kbn_ui_theme.mdx +++ b/api_docs/kbn_ui_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-theme title: "@kbn/ui-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-theme plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-theme'] --- import kbnUiThemeObj from './kbn_ui_theme.devdocs.json'; diff --git a/api_docs/kbn_unified_data_table.mdx b/api_docs/kbn_unified_data_table.mdx index 443ae0572dcbb..5330eb00cb09e 100644 --- a/api_docs/kbn_unified_data_table.mdx +++ b/api_docs/kbn_unified_data_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-data-table title: "@kbn/unified-data-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unified-data-table plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-data-table'] --- import kbnUnifiedDataTableObj from './kbn_unified_data_table.devdocs.json'; diff --git a/api_docs/kbn_unified_doc_viewer.mdx b/api_docs/kbn_unified_doc_viewer.mdx index 424b5b3425c1a..a330f045f5b59 100644 --- a/api_docs/kbn_unified_doc_viewer.mdx +++ b/api_docs/kbn_unified_doc_viewer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-doc-viewer title: "@kbn/unified-doc-viewer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unified-doc-viewer plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-doc-viewer'] --- import kbnUnifiedDocViewerObj from './kbn_unified_doc_viewer.devdocs.json'; diff --git a/api_docs/kbn_unified_field_list.devdocs.json b/api_docs/kbn_unified_field_list.devdocs.json index c9bc5510c86c2..66ee3fbfb7d49 100644 --- a/api_docs/kbn_unified_field_list.devdocs.json +++ b/api_docs/kbn_unified_field_list.devdocs.json @@ -2211,7 +2211,7 @@ "section": "def-common.CoreStart", "text": "CoreStart" }, - ", \"analytics\" | \"uiSettings\">; data: ", + ", \"uiSettings\" | \"analytics\">; data: ", { "pluginId": "data", "scope": "public", @@ -4585,7 +4585,7 @@ "label": "type", "description": [], "signature": [ - "\"other\" | \"normal\" | undefined" + "\"normal\" | \"other\" | undefined" ], "path": "packages/kbn-unified-field-list/src/components/field_stats/field_top_values_bucket.tsx", "deprecated": false, diff --git a/api_docs/kbn_unified_field_list.mdx b/api_docs/kbn_unified_field_list.mdx index 57a3d5ee70e90..1ae0ab3cf285f 100644 --- a/api_docs/kbn_unified_field_list.mdx +++ b/api_docs/kbn_unified_field_list.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-field-list title: "@kbn/unified-field-list" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unified-field-list plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-field-list'] --- import kbnUnifiedFieldListObj from './kbn_unified_field_list.devdocs.json'; diff --git a/api_docs/kbn_unsaved_changes_badge.mdx b/api_docs/kbn_unsaved_changes_badge.mdx index e7c12014ab15f..e60429a3d92f6 100644 --- a/api_docs/kbn_unsaved_changes_badge.mdx +++ b/api_docs/kbn_unsaved_changes_badge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unsaved-changes-badge title: "@kbn/unsaved-changes-badge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unsaved-changes-badge plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unsaved-changes-badge'] --- import kbnUnsavedChangesBadgeObj from './kbn_unsaved_changes_badge.devdocs.json'; diff --git a/api_docs/kbn_unsaved_changes_prompt.mdx b/api_docs/kbn_unsaved_changes_prompt.mdx index 46f2147e0c7f0..c487e4dd50b39 100644 --- a/api_docs/kbn_unsaved_changes_prompt.mdx +++ b/api_docs/kbn_unsaved_changes_prompt.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unsaved-changes-prompt title: "@kbn/unsaved-changes-prompt" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unsaved-changes-prompt plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unsaved-changes-prompt'] --- import kbnUnsavedChangesPromptObj from './kbn_unsaved_changes_prompt.devdocs.json'; diff --git a/api_docs/kbn_use_tracked_promise.mdx b/api_docs/kbn_use_tracked_promise.mdx index a27ecf5cb2112..a14600a0b5fd9 100644 --- a/api_docs/kbn_use_tracked_promise.mdx +++ b/api_docs/kbn_use_tracked_promise.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-use-tracked-promise title: "@kbn/use-tracked-promise" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/use-tracked-promise plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/use-tracked-promise'] --- import kbnUseTrackedPromiseObj from './kbn_use_tracked_promise.devdocs.json'; diff --git a/api_docs/kbn_user_profile_components.mdx b/api_docs/kbn_user_profile_components.mdx index b601326f715bb..37dbf40189eb6 100644 --- a/api_docs/kbn_user_profile_components.mdx +++ b/api_docs/kbn_user_profile_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-user-profile-components title: "@kbn/user-profile-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/user-profile-components plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/user-profile-components'] --- import kbnUserProfileComponentsObj from './kbn_user_profile_components.devdocs.json'; diff --git a/api_docs/kbn_utility_types.mdx b/api_docs/kbn_utility_types.mdx index f9846bb3f0a6f..8eb8be84ab759 100644 --- a/api_docs/kbn_utility_types.mdx +++ b/api_docs/kbn_utility_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types title: "@kbn/utility-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types'] --- import kbnUtilityTypesObj from './kbn_utility_types.devdocs.json'; diff --git a/api_docs/kbn_utility_types_jest.mdx b/api_docs/kbn_utility_types_jest.mdx index de672491acfb6..f810025a1e36f 100644 --- a/api_docs/kbn_utility_types_jest.mdx +++ b/api_docs/kbn_utility_types_jest.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types-jest title: "@kbn/utility-types-jest" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types-jest plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types-jest'] --- import kbnUtilityTypesJestObj from './kbn_utility_types_jest.devdocs.json'; diff --git a/api_docs/kbn_utils.mdx b/api_docs/kbn_utils.mdx index 0774b41071c95..fbaa3a08ff953 100644 --- a/api_docs/kbn_utils.mdx +++ b/api_docs/kbn_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utils title: "@kbn/utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utils'] --- import kbnUtilsObj from './kbn_utils.devdocs.json'; diff --git a/api_docs/kbn_visualization_ui_components.devdocs.json b/api_docs/kbn_visualization_ui_components.devdocs.json index 80f0cff7f6a2d..70f55ad969b77 100644 --- a/api_docs/kbn_visualization_ui_components.devdocs.json +++ b/api_docs/kbn_visualization_ui_components.devdocs.json @@ -441,7 +441,7 @@ "label": "DragDropBuckets", "description": [], "signature": [ - "({\n items,\n onDragStart,\n onDragEnd,\n droppableId,\n children,\n bgColor,\n}: { items: T[]; droppableId: string; children: React.ReactElement>[]; onDragStart?: (() => void) | undefined; onDragEnd?: ((items: T[]) => void) | undefined; bgColor?: \"warning\" | \"success\" | \"subdued\" | \"primary\" | \"accent\" | \"danger\" | \"plain\" | \"transparent\" | undefined; }) => JSX.Element" + "({\n items,\n onDragStart,\n onDragEnd,\n droppableId,\n children,\n bgColor,\n}: { items: T[]; droppableId: string; children: React.ReactElement>[]; onDragStart?: (() => void) | undefined; onDragEnd?: ((items: T[]) => void) | undefined; bgColor?: \"warning\" | \"success\" | \"plain\" | \"subdued\" | \"primary\" | \"accent\" | \"danger\" | \"transparent\" | undefined; }) => JSX.Element" ], "path": "packages/kbn-visualization-ui-components/components/drag_drop_bucket/buckets.tsx", "deprecated": false, @@ -553,7 +553,7 @@ "label": "bgColor", "description": [], "signature": [ - "\"warning\" | \"success\" | \"subdued\" | \"primary\" | \"accent\" | \"danger\" | \"plain\" | \"transparent\" | undefined" + "\"warning\" | \"success\" | \"plain\" | \"subdued\" | \"primary\" | \"accent\" | \"danger\" | \"transparent\" | undefined" ], "path": "packages/kbn-visualization-ui-components/components/drag_drop_bucket/buckets.tsx", "deprecated": false, diff --git a/api_docs/kbn_visualization_ui_components.mdx b/api_docs/kbn_visualization_ui_components.mdx index 5d471f7a0e639..4f5cdc0190e6f 100644 --- a/api_docs/kbn_visualization_ui_components.mdx +++ b/api_docs/kbn_visualization_ui_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-visualization-ui-components title: "@kbn/visualization-ui-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/visualization-ui-components plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/visualization-ui-components'] --- import kbnVisualizationUiComponentsObj from './kbn_visualization_ui_components.devdocs.json'; diff --git a/api_docs/kbn_visualization_utils.mdx b/api_docs/kbn_visualization_utils.mdx index fd903e0ff2219..5b20edfd30c63 100644 --- a/api_docs/kbn_visualization_utils.mdx +++ b/api_docs/kbn_visualization_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-visualization-utils title: "@kbn/visualization-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/visualization-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/visualization-utils'] --- import kbnVisualizationUtilsObj from './kbn_visualization_utils.devdocs.json'; diff --git a/api_docs/kbn_xstate_utils.mdx b/api_docs/kbn_xstate_utils.mdx index 9ac905bb8fa35..cf47874ff761f 100644 --- a/api_docs/kbn_xstate_utils.mdx +++ b/api_docs/kbn_xstate_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-xstate-utils title: "@kbn/xstate-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/xstate-utils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/xstate-utils'] --- import kbnXstateUtilsObj from './kbn_xstate_utils.devdocs.json'; diff --git a/api_docs/kbn_yarn_lock_validator.mdx b/api_docs/kbn_yarn_lock_validator.mdx index f7ffe97c177a2..207cddc672656 100644 --- a/api_docs/kbn_yarn_lock_validator.mdx +++ b/api_docs/kbn_yarn_lock_validator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-yarn-lock-validator title: "@kbn/yarn-lock-validator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/yarn-lock-validator plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/yarn-lock-validator'] --- import kbnYarnLockValidatorObj from './kbn_yarn_lock_validator.devdocs.json'; diff --git a/api_docs/kbn_zod_helpers.mdx b/api_docs/kbn_zod_helpers.mdx index 0b239f678ae90..11f9cb7a434f7 100644 --- a/api_docs/kbn_zod_helpers.mdx +++ b/api_docs/kbn_zod_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-zod-helpers title: "@kbn/zod-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/zod-helpers plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/zod-helpers'] --- import kbnZodHelpersObj from './kbn_zod_helpers.devdocs.json'; diff --git a/api_docs/kibana_overview.mdx b/api_docs/kibana_overview.mdx index 97ec2b6b04a68..63bb95e84380b 100644 --- a/api_docs/kibana_overview.mdx +++ b/api_docs/kibana_overview.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaOverview title: "kibanaOverview" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaOverview plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaOverview'] --- import kibanaOverviewObj from './kibana_overview.devdocs.json'; diff --git a/api_docs/kibana_react.mdx b/api_docs/kibana_react.mdx index e16240712bdf8..41dbbdc9142f5 100644 --- a/api_docs/kibana_react.mdx +++ b/api_docs/kibana_react.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaReact title: "kibanaReact" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaReact plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaReact'] --- import kibanaReactObj from './kibana_react.devdocs.json'; diff --git a/api_docs/kibana_utils.mdx b/api_docs/kibana_utils.mdx index 2478fea13d956..6eb8d24060651 100644 --- a/api_docs/kibana_utils.mdx +++ b/api_docs/kibana_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaUtils title: "kibanaUtils" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaUtils plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaUtils'] --- import kibanaUtilsObj from './kibana_utils.devdocs.json'; diff --git a/api_docs/kubernetes_security.mdx b/api_docs/kubernetes_security.mdx index d209f94184f32..3a706004ee5b0 100644 --- a/api_docs/kubernetes_security.mdx +++ b/api_docs/kubernetes_security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kubernetesSecurity title: "kubernetesSecurity" image: https://source.unsplash.com/400x175/?github description: API docs for the kubernetesSecurity plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kubernetesSecurity'] --- import kubernetesSecurityObj from './kubernetes_security.devdocs.json'; diff --git a/api_docs/lens.devdocs.json b/api_docs/lens.devdocs.json index efd0ff8b1c20c..d47d721a70681 100644 --- a/api_docs/lens.devdocs.json +++ b/api_docs/lens.devdocs.json @@ -1297,7 +1297,7 @@ "label": "mode", "description": [], "signature": [ - "\"full\" | \"custom\" | \"dataBounds\"" + "\"custom\" | \"full\" | \"dataBounds\"" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", "deprecated": false, @@ -5545,7 +5545,7 @@ "label": "changeType", "description": [], "signature": [ - "\"layers\" | \"initial\" | \"unchanged\" | \"reduced\" | \"extended\" | \"reorder\"" + "\"extended\" | \"layers\" | \"initial\" | \"unchanged\" | \"reduced\" | \"reorder\"" ], "path": "x-pack/plugins/lens/public/types.ts", "deprecated": false, @@ -5836,7 +5836,7 @@ "\nThe change type indicates what was changed in this table compared to the currently active table of this layer." ], "signature": [ - "\"layers\" | \"initial\" | \"unchanged\" | \"reduced\" | \"extended\" | \"reorder\"" + "\"extended\" | \"layers\" | \"initial\" | \"unchanged\" | \"reduced\" | \"reorder\"" ], "path": "x-pack/plugins/lens/public/types.ts", "deprecated": false, @@ -10687,7 +10687,7 @@ "label": "AxisExtentMode", "description": [], "signature": [ - "\"full\" | \"custom\" | \"dataBounds\"" + "\"custom\" | \"full\" | \"dataBounds\"" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", "deprecated": false, @@ -12000,7 +12000,7 @@ "label": "YScaleType", "description": [], "signature": [ - "\"log\" | \"time\" | \"linear\" | \"sqrt\"" + "\"log\" | \"sqrt\" | \"time\" | \"linear\"" ], "path": "src/plugins/chart_expressions/expression_xy/common/types/expression_functions.ts", "deprecated": false, diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx index ab261a2828fd8..9beab29d4c90d 100644 --- a/api_docs/lens.mdx +++ b/api_docs/lens.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lens title: "lens" image: https://source.unsplash.com/400x175/?github description: API docs for the lens plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lens'] --- import lensObj from './lens.devdocs.json'; diff --git a/api_docs/license_api_guard.mdx b/api_docs/license_api_guard.mdx index 2d9cea7503c00..ebda1f03566b3 100644 --- a/api_docs/license_api_guard.mdx +++ b/api_docs/license_api_guard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseApiGuard title: "licenseApiGuard" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseApiGuard plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseApiGuard'] --- import licenseApiGuardObj from './license_api_guard.devdocs.json'; diff --git a/api_docs/license_management.mdx b/api_docs/license_management.mdx index d13d9a54b3696..69b896b442de7 100644 --- a/api_docs/license_management.mdx +++ b/api_docs/license_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseManagement title: "licenseManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseManagement plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseManagement'] --- import licenseManagementObj from './license_management.devdocs.json'; diff --git a/api_docs/licensing.mdx b/api_docs/licensing.mdx index 9407518bd57d0..c0c78f6a2007c 100644 --- a/api_docs/licensing.mdx +++ b/api_docs/licensing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licensing title: "licensing" image: https://source.unsplash.com/400x175/?github description: API docs for the licensing plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licensing'] --- import licensingObj from './licensing.devdocs.json'; diff --git a/api_docs/links.mdx b/api_docs/links.mdx index 0dd6288eb7c07..1d7fa5d86fdb9 100644 --- a/api_docs/links.mdx +++ b/api_docs/links.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/links title: "links" image: https://source.unsplash.com/400x175/?github description: API docs for the links plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'links'] --- import linksObj from './links.devdocs.json'; diff --git a/api_docs/lists.mdx b/api_docs/lists.mdx index d320418a931d2..68f2771c81e5e 100644 --- a/api_docs/lists.mdx +++ b/api_docs/lists.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lists title: "lists" image: https://source.unsplash.com/400x175/?github description: API docs for the lists plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lists'] --- import listsObj from './lists.devdocs.json'; diff --git a/api_docs/logs_data_access.devdocs.json b/api_docs/logs_data_access.devdocs.json index c4f3b466d53a4..31566796c9ade 100644 --- a/api_docs/logs_data_access.devdocs.json +++ b/api_docs/logs_data_access.devdocs.json @@ -124,6 +124,14 @@ "section": "def-server.LogsRatesServiceReturnType", "text": "LogsRatesServiceReturnType" }, + ">; getLogsRateTimeseries: ({ esClient, identifyingMetadata, serviceNames, timeFrom, timeTo, kuery, serviceEnvironmentQuery, }: ", + "LogsRateTimeseries", + ") => Promise<", + "LogsRateTimeseriesReturnType", + ">; getLogsErrorRateTimeseries: ({ esClient, identifyingMetadata, serviceNames, timeFrom, timeTo, kuery, serviceEnvironmentQuery, }: ", + "LogsErrorRateTimeseries", + ") => Promise<", + "LogsErrorRateTimeseriesReturnType", ">; getLogSourcesService: (request: ", { "pluginId": "@kbn/core-http-server", diff --git a/api_docs/logs_data_access.mdx b/api_docs/logs_data_access.mdx index 0cedb6e589b5f..84e7a9a64a75f 100644 --- a/api_docs/logs_data_access.mdx +++ b/api_docs/logs_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/logsDataAccess title: "logsDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the logsDataAccess plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsDataAccess'] --- import logsDataAccessObj from './logs_data_access.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 7 | 0 | 7 | 2 | +| 7 | 0 | 7 | 6 | ## Server diff --git a/api_docs/logs_explorer.mdx b/api_docs/logs_explorer.mdx index e588a541605c1..3e9ac22ceb47f 100644 --- a/api_docs/logs_explorer.mdx +++ b/api_docs/logs_explorer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/logsExplorer title: "logsExplorer" image: https://source.unsplash.com/400x175/?github description: API docs for the logsExplorer plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsExplorer'] --- import logsExplorerObj from './logs_explorer.devdocs.json'; diff --git a/api_docs/logs_shared.devdocs.json b/api_docs/logs_shared.devdocs.json index c5092240bfaea..37a481c7d4075 100644 --- a/api_docs/logs_shared.devdocs.json +++ b/api_docs/logs_shared.devdocs.json @@ -2926,6 +2926,46 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "logsShared", + "id": "def-public.LogsSharedClientStartDeps.share", + "type": "CompoundType", + "tags": [], + "label": "share", + "description": [], + "signature": [ + "{ toggleShareContextMenu: (options: ", + { + "pluginId": "share", + "scope": "public", + "docId": "kibSharePluginApi", + "section": "def-public.ShowShareMenuOptions", + "text": "ShowShareMenuOptions" + }, + ") => void; } & { url: ", + { + "pluginId": "share", + "scope": "public", + "docId": "kibSharePluginApi", + "section": "def-public.BrowserUrlService", + "text": "BrowserUrlService" + }, + "; navigate(options: ", + "RedirectOptions", + "<", + { + "pluginId": "@kbn/utility-types", + "scope": "common", + "docId": "kibKbnUtilityTypesPluginApi", + "section": "def-common.SerializableRecord", + "text": "SerializableRecord" + }, + ">): void; }" + ], + "path": "x-pack/plugins/observability_solution/logs_shared/public/types.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "logsShared", "id": "def-public.LogsSharedClientStartDeps.uiActions", @@ -5902,7 +5942,7 @@ "label": "LogEntryAfterCursor", "description": [], "signature": [ - "{ after: { time: string; tiebreaker: number; } | \"first\"; }" + "{ after: \"first\" | { time: string; tiebreaker: number; }; }" ], "path": "x-pack/plugins/observability_solution/logs_shared/common/log_entry/log_entry_cursor.ts", "deprecated": false, diff --git a/api_docs/logs_shared.mdx b/api_docs/logs_shared.mdx index ac239a4c43146..512e322d30187 100644 --- a/api_docs/logs_shared.mdx +++ b/api_docs/logs_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/logsShared title: "logsShared" image: https://source.unsplash.com/400x175/?github description: API docs for the logsShared plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsShared'] --- import logsSharedObj from './logs_shared.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 296 | 0 | 268 | 32 | +| 297 | 0 | 269 | 32 | ## Client diff --git a/api_docs/management.mdx b/api_docs/management.mdx index b34dd50652217..bf0216550282a 100644 --- a/api_docs/management.mdx +++ b/api_docs/management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/management title: "management" image: https://source.unsplash.com/400x175/?github description: API docs for the management plugin -date: 2024-07-03 +date: 2024-07-05 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 65349362fb8e8..1f0dbd52e8391 100644 --- a/api_docs/maps.mdx +++ b/api_docs/maps.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/maps title: "maps" image: https://source.unsplash.com/400x175/?github description: API docs for the maps plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'maps'] --- import mapsObj from './maps.devdocs.json'; diff --git a/api_docs/maps_ems.mdx b/api_docs/maps_ems.mdx index bd42728ddc2ce..83ce13c3c90e7 100644 --- a/api_docs/maps_ems.mdx +++ b/api_docs/maps_ems.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/mapsEms title: "mapsEms" image: https://source.unsplash.com/400x175/?github description: API docs for the mapsEms plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mapsEms'] --- import mapsEmsObj from './maps_ems.devdocs.json'; diff --git a/api_docs/metrics_data_access.devdocs.json b/api_docs/metrics_data_access.devdocs.json index 13625c031de7f..f23875b86c871 100644 --- a/api_docs/metrics_data_access.devdocs.json +++ b/api_docs/metrics_data_access.devdocs.json @@ -1507,7 +1507,7 @@ "label": "SnapshotMetricType", "description": [], "signature": [ - "\"count\" | \"custom\" | \"memory\" | \"rx\" | \"normalizedLoad1m\" | \"memoryFree\" | \"tx\" | \"logRate\" | \"cpu\" | \"s3BucketSize\" | \"s3NumberOfObjects\" | \"s3TotalRequests\" | \"s3UploadBytes\" | \"s3DownloadBytes\" | \"diskLatency\" | \"diskSpaceUsage\" | \"load\" | \"memoryTotal\" | \"diskIOReadBytes\" | \"diskIOWriteBytes\" | \"rdsLatency\" | \"rdsConnections\" | \"rdsQueriesExecuted\" | \"rdsActiveTransactions\" | \"sqsMessagesVisible\" | \"sqsMessagesDelayed\" | \"sqsMessagesEmpty\" | \"sqsMessagesSent\" | \"sqsOldestMessage\"" + "\"count\" | \"memory\" | \"custom\" | \"rx\" | \"normalizedLoad1m\" | \"memoryFree\" | \"tx\" | \"logRate\" | \"cpu\" | \"s3BucketSize\" | \"s3NumberOfObjects\" | \"s3TotalRequests\" | \"s3UploadBytes\" | \"s3DownloadBytes\" | \"diskLatency\" | \"diskSpaceUsage\" | \"load\" | \"memoryTotal\" | \"diskIOReadBytes\" | \"diskIOWriteBytes\" | \"rdsLatency\" | \"rdsConnections\" | \"rdsQueriesExecuted\" | \"rdsActiveTransactions\" | \"sqsMessagesVisible\" | \"sqsMessagesDelayed\" | \"sqsMessagesEmpty\" | \"sqsMessagesSent\" | \"sqsOldestMessage\"" ], "path": "x-pack/plugins/observability_solution/metrics_data_access/common/inventory_models/types.ts", "deprecated": false, diff --git a/api_docs/metrics_data_access.mdx b/api_docs/metrics_data_access.mdx index 36508eb572d0d..2e47a642d0b32 100644 --- a/api_docs/metrics_data_access.mdx +++ b/api_docs/metrics_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/metricsDataAccess title: "metricsDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the metricsDataAccess plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'metricsDataAccess'] --- import metricsDataAccessObj from './metrics_data_access.devdocs.json'; diff --git a/api_docs/ml.mdx b/api_docs/ml.mdx index 9f10b0f0a2458..f6f9fba767985 100644 --- a/api_docs/ml.mdx +++ b/api_docs/ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ml title: "ml" image: https://source.unsplash.com/400x175/?github description: API docs for the ml plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ml'] --- import mlObj from './ml.devdocs.json'; diff --git a/api_docs/mock_idp_plugin.mdx b/api_docs/mock_idp_plugin.mdx index 70b72928527a7..1fe69b65c6dcf 100644 --- a/api_docs/mock_idp_plugin.mdx +++ b/api_docs/mock_idp_plugin.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/mockIdpPlugin title: "mockIdpPlugin" image: https://source.unsplash.com/400x175/?github description: API docs for the mockIdpPlugin plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mockIdpPlugin'] --- import mockIdpPluginObj from './mock_idp_plugin.devdocs.json'; diff --git a/api_docs/monitoring.mdx b/api_docs/monitoring.mdx index a622803d33476..d2c05c4feb434 100644 --- a/api_docs/monitoring.mdx +++ b/api_docs/monitoring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoring title: "monitoring" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoring plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoring'] --- import monitoringObj from './monitoring.devdocs.json'; diff --git a/api_docs/monitoring_collection.mdx b/api_docs/monitoring_collection.mdx index 1c8aa617945d5..020f341814fc6 100644 --- a/api_docs/monitoring_collection.mdx +++ b/api_docs/monitoring_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoringCollection title: "monitoringCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoringCollection plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoringCollection'] --- import monitoringCollectionObj from './monitoring_collection.devdocs.json'; diff --git a/api_docs/navigation.mdx b/api_docs/navigation.mdx index 7a064f7d41c00..92a48d96ac771 100644 --- a/api_docs/navigation.mdx +++ b/api_docs/navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/navigation title: "navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the navigation plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'navigation'] --- import navigationObj from './navigation.devdocs.json'; diff --git a/api_docs/newsfeed.mdx b/api_docs/newsfeed.mdx index 6f07a1515cdcc..6842f46a442d5 100644 --- a/api_docs/newsfeed.mdx +++ b/api_docs/newsfeed.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/newsfeed title: "newsfeed" image: https://source.unsplash.com/400x175/?github description: API docs for the newsfeed plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'newsfeed'] --- import newsfeedObj from './newsfeed.devdocs.json'; diff --git a/api_docs/no_data_page.mdx b/api_docs/no_data_page.mdx index 339962a194411..0dec59a2277bc 100644 --- a/api_docs/no_data_page.mdx +++ b/api_docs/no_data_page.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/noDataPage title: "noDataPage" image: https://source.unsplash.com/400x175/?github description: API docs for the noDataPage plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'noDataPage'] --- import noDataPageObj from './no_data_page.devdocs.json'; diff --git a/api_docs/notifications.mdx b/api_docs/notifications.mdx index 28ef4474329ad..4f083d8e4bd5c 100644 --- a/api_docs/notifications.mdx +++ b/api_docs/notifications.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/notifications title: "notifications" image: https://source.unsplash.com/400x175/?github description: API docs for the notifications plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'notifications'] --- import notificationsObj from './notifications.devdocs.json'; diff --git a/api_docs/observability.devdocs.json b/api_docs/observability.devdocs.json index b3ed45a5dc0af..4b00709103738 100644 --- a/api_docs/observability.devdocs.json +++ b/api_docs/observability.devdocs.json @@ -4881,7 +4881,7 @@ "signature": [ "\"UPTIME_OVERVIEW_LOCATOR\"" ], - "path": "x-pack/plugins/observability_solution/observability/common/index.ts", + "path": "packages/deeplinks/observability/locators/uptime.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false @@ -14633,7 +14633,7 @@ "signature": [ "\"UPTIME_OVERVIEW_LOCATOR\"" ], - "path": "x-pack/plugins/observability_solution/observability/common/index.ts", + "path": "packages/deeplinks/observability/locators/uptime.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index b6be9ec30008d..ad743948b3c7a 100644 --- a/api_docs/observability.mdx +++ b/api_docs/observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observability title: "observability" image: https://source.unsplash.com/400x175/?github description: API docs for the observability plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observability'] --- import observabilityObj from './observability.devdocs.json'; diff --git a/api_docs/observability_a_i_assistant.mdx b/api_docs/observability_a_i_assistant.mdx index df7de17e9105f..5bd9b258698ec 100644 --- a/api_docs/observability_a_i_assistant.mdx +++ b/api_docs/observability_a_i_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityAIAssistant title: "observabilityAIAssistant" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityAIAssistant plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAIAssistant'] --- import observabilityAIAssistantObj from './observability_a_i_assistant.devdocs.json'; diff --git a/api_docs/observability_a_i_assistant_app.mdx b/api_docs/observability_a_i_assistant_app.mdx index 9e6cf395951c0..10475ee69963d 100644 --- a/api_docs/observability_a_i_assistant_app.mdx +++ b/api_docs/observability_a_i_assistant_app.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityAIAssistantApp title: "observabilityAIAssistantApp" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityAIAssistantApp plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAIAssistantApp'] --- import observabilityAIAssistantAppObj from './observability_a_i_assistant_app.devdocs.json'; diff --git a/api_docs/observability_ai_assistant_management.mdx b/api_docs/observability_ai_assistant_management.mdx index 5bdddc0826b93..b818b6f974f3c 100644 --- a/api_docs/observability_ai_assistant_management.mdx +++ b/api_docs/observability_ai_assistant_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityAiAssistantManagement title: "observabilityAiAssistantManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityAiAssistantManagement plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAiAssistantManagement'] --- import observabilityAiAssistantManagementObj from './observability_ai_assistant_management.devdocs.json'; diff --git a/api_docs/observability_logs_explorer.mdx b/api_docs/observability_logs_explorer.mdx index eddf5ffca2f7a..5c26c9471096f 100644 --- a/api_docs/observability_logs_explorer.mdx +++ b/api_docs/observability_logs_explorer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityLogsExplorer title: "observabilityLogsExplorer" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityLogsExplorer plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityLogsExplorer'] --- import observabilityLogsExplorerObj from './observability_logs_explorer.devdocs.json'; diff --git a/api_docs/observability_onboarding.mdx b/api_docs/observability_onboarding.mdx index e5ea3e7669e7c..b7677834ffb31 100644 --- a/api_docs/observability_onboarding.mdx +++ b/api_docs/observability_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityOnboarding title: "observabilityOnboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityOnboarding plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityOnboarding'] --- import observabilityOnboardingObj from './observability_onboarding.devdocs.json'; diff --git a/api_docs/observability_shared.mdx b/api_docs/observability_shared.mdx index a4f8eeb9945f8..17b114df57e5a 100644 --- a/api_docs/observability_shared.mdx +++ b/api_docs/observability_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityShared title: "observabilityShared" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityShared plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityShared'] --- import observabilitySharedObj from './observability_shared.devdocs.json'; diff --git a/api_docs/osquery.mdx b/api_docs/osquery.mdx index 1009f21ce1d5a..b59c7e88af8fa 100644 --- a/api_docs/osquery.mdx +++ b/api_docs/osquery.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/osquery title: "osquery" image: https://source.unsplash.com/400x175/?github description: API docs for the osquery plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'osquery'] --- import osqueryObj from './osquery.devdocs.json'; diff --git a/api_docs/painless_lab.mdx b/api_docs/painless_lab.mdx index 26006036e38ae..c0863acf5c930 100644 --- a/api_docs/painless_lab.mdx +++ b/api_docs/painless_lab.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/painlessLab title: "painlessLab" image: https://source.unsplash.com/400x175/?github description: API docs for the painlessLab plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'painlessLab'] --- import painlessLabObj from './painless_lab.devdocs.json'; diff --git a/api_docs/plugin_directory.mdx b/api_docs/plugin_directory.mdx index 322c1bc81373d..3aab9d20016e1 100644 --- a/api_docs/plugin_directory.mdx +++ b/api_docs/plugin_directory.mdx @@ -7,7 +7,7 @@ id: kibDevDocsPluginDirectory slug: /kibana-dev-docs/api-meta/plugin-api-directory title: Directory description: Directory of public APIs available through plugins or packages. -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -21,7 +21,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 49646 | 238 | 37872 | 1889 | +| 49677 | 238 | 37894 | 1894 | ## Plugin Directory @@ -30,8 +30,8 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 307 | 0 | 301 | 32 | | | [@elastic/appex-sharedux @elastic/kibana-management](https://github.com/orgs/elastic/teams/appex-sharedux ) | - | 2 | 0 | 2 | 0 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 4 | 0 | 4 | 1 | -| | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | AIOps plugin maintained by ML team. | 72 | 0 | 9 | 2 | -| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 870 | 1 | 838 | 52 | +| | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | AIOps plugin maintained by ML team. | 74 | 0 | 9 | 2 | +| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 871 | 1 | 839 | 52 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | The user interface for Elastic APM | 29 | 0 | 29 | 123 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 9 | 0 | 9 | 0 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 2 | 0 | 2 | 0 | @@ -131,9 +131,9 @@ 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. | 58 | 0 | 58 | 6 | | | [@elastic/security-detection-engine](https://github.com/orgs/elastic/teams/security-detection-engine) | - | 226 | 0 | 97 | 52 | -| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 7 | 0 | 7 | 2 | +| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 7 | 0 | 7 | 6 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | This plugin provides a LogsExplorer component using the Discover customization framework, offering several affordances specifically designed for log consumption. | 117 | 4 | 117 | 22 | -| | [@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. | 296 | 0 | 268 | 32 | +| | [@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. | 297 | 0 | 269 | 32 | | logstash | [@elastic/logstash](https://github.com/orgs/elastic/teams/logstash) | - | 0 | 0 | 0 | 0 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 44 | 0 | 44 | 7 | | | [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | - | 209 | 0 | 205 | 28 | @@ -163,7 +163,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 23 | 0 | 23 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Reporting Services enables applications to feature reports that the user can automate with Watcher and download later. | 9 | 0 | 2 | 0 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 21 | 0 | 21 | 0 | -| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 276 | 0 | 247 | 14 | +| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 286 | 0 | 249 | 14 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 24 | 0 | 19 | 2 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 132 | 2 | 121 | 5 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 25 | 0 | 25 | 0 | @@ -201,7 +201,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 6 | 0 | 0 | 0 | | | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 29 | 0 | 10 | 0 | | | [@elastic/security-threat-hunting-investigations](https://github.com/orgs/elastic/teams/security-threat-hunting-investigations) | Elastic threat intelligence helps you see if you are open to or have been subject to current or historical known threats | 30 | 0 | 14 | 4 | -| | [@elastic/security-threat-hunting-investigations](https://github.com/orgs/elastic/teams/security-threat-hunting-investigations) | - | 239 | 1 | 195 | 17 | +| | [@elastic/security-threat-hunting-investigations](https://github.com/orgs/elastic/teams/security-threat-hunting-investigations) | - | 228 | 1 | 184 | 18 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | This plugin provides access to the transforms features provided by Elastic. Transforms enable you to convert existing Elasticsearch indices into summarized indices, which provide opportunities for new insights and analytics. | 4 | 0 | 4 | 1 | | translations | [@elastic/kibana-localization](https://github.com/orgs/elastic/teams/kibana-localization) | - | 0 | 0 | 0 | 0 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 588 | 1 | 562 | 52 | @@ -244,9 +244,9 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 27 | 3 | 27 | 0 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 5 | 0 | 5 | 0 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 23 | 0 | 22 | 0 | -| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 193 | 0 | 190 | 0 | +| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 194 | 0 | 191 | 0 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 33 | 0 | 33 | 0 | -| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 237 | 0 | 223 | 2 | +| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 245 | 0 | 231 | 2 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 73 | 0 | 73 | 2 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 1 | 0 | 0 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 18 | 0 | 18 | 0 | @@ -350,7 +350,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 54 | 7 | 54 | 6 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 13 | 0 | 13 | 1 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 495 | 2 | 193 | 0 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 92 | 0 | 79 | 10 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 95 | 0 | 82 | 10 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 44 | 0 | 43 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 4 | 0 | 2 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 3 | 0 | 3 | 0 | @@ -467,7 +467,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) | - | 3 | 0 | 3 | 0 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 4 | 0 | 4 | 0 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | - | 3 | 0 | 3 | 0 | -| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 45 | 0 | 33 | 0 | +| | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 55 | 0 | 43 | 0 | | | [@elastic/search-kibana](https://github.com/orgs/elastic/teams/search-kibana) | - | 17 | 0 | 17 | 0 | | | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | - | 5 | 0 | 5 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 2 | 0 | 2 | 0 | @@ -487,9 +487,9 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 33 | 0 | 24 | 1 | | | [@elastic/security-threat-hunting-explore](https://github.com/orgs/elastic/teams/security-threat-hunting-explore) | - | 13 | 0 | 5 | 0 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 35 | 0 | 34 | 0 | -| | [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/security-generative-ai) | - | 166 | 0 | 139 | 9 | -| | [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/security-generative-ai) | - | 349 | 0 | 323 | 0 | -| | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 20 | 0 | 20 | 0 | +| | [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/security-generative-ai) | - | 160 | 0 | 134 | 9 | +| | [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/security-generative-ai) | - | 362 | 0 | 336 | 0 | +| | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 18 | 0 | 18 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 52 | 0 | 37 | 7 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 32 | 0 | 19 | 1 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 11 | 0 | 6 | 0 | @@ -672,7 +672,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/search-kibana @elastic/kibana-management](https://github.com/orgs/elastic/teams/search-kibana ) | - | 1 | 0 | 1 | 0 | | | [@elastic/security-solution @elastic/kibana-management](https://github.com/orgs/elastic/teams/security-solution ) | - | 1 | 0 | 1 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 2 | 0 | 0 | 0 | -| | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 4 | 0 | 4 | 0 | +| | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 5 | 0 | 5 | 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) | - | 30 | 0 | 8 | 0 | diff --git a/api_docs/presentation_panel.mdx b/api_docs/presentation_panel.mdx index 11c2be4c851f4..af92646cd2583 100644 --- a/api_docs/presentation_panel.mdx +++ b/api_docs/presentation_panel.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/presentationPanel title: "presentationPanel" image: https://source.unsplash.com/400x175/?github description: API docs for the presentationPanel plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationPanel'] --- import presentationPanelObj from './presentation_panel.devdocs.json'; diff --git a/api_docs/presentation_util.mdx b/api_docs/presentation_util.mdx index b54536890a11f..e81c5fa8846b3 100644 --- a/api_docs/presentation_util.mdx +++ b/api_docs/presentation_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/presentationUtil title: "presentationUtil" image: https://source.unsplash.com/400x175/?github description: API docs for the presentationUtil plugin -date: 2024-07-03 +date: 2024-07-05 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 bc56022876734..c1c3052b8c954 100644 --- a/api_docs/profiling.mdx +++ b/api_docs/profiling.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/profiling title: "profiling" image: https://source.unsplash.com/400x175/?github description: API docs for the profiling plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profiling'] --- import profilingObj from './profiling.devdocs.json'; diff --git a/api_docs/profiling_data_access.mdx b/api_docs/profiling_data_access.mdx index 620b39508dffe..d7abfe37dd0ad 100644 --- a/api_docs/profiling_data_access.mdx +++ b/api_docs/profiling_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/profilingDataAccess title: "profilingDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the profilingDataAccess plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profilingDataAccess'] --- import profilingDataAccessObj from './profiling_data_access.devdocs.json'; diff --git a/api_docs/remote_clusters.mdx b/api_docs/remote_clusters.mdx index 772d180cec59a..625514ac8bae9 100644 --- a/api_docs/remote_clusters.mdx +++ b/api_docs/remote_clusters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/remoteClusters title: "remoteClusters" image: https://source.unsplash.com/400x175/?github description: API docs for the remoteClusters plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'remoteClusters'] --- import remoteClustersObj from './remote_clusters.devdocs.json'; diff --git a/api_docs/reporting.mdx b/api_docs/reporting.mdx index d3c1a06dff1fb..00f3b916d1060 100644 --- a/api_docs/reporting.mdx +++ b/api_docs/reporting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/reporting title: "reporting" image: https://source.unsplash.com/400x175/?github description: API docs for the reporting plugin -date: 2024-07-03 +date: 2024-07-05 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 ee495407fff49..253b81b3d5e30 100644 --- a/api_docs/rollup.mdx +++ b/api_docs/rollup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/rollup title: "rollup" image: https://source.unsplash.com/400x175/?github description: API docs for the rollup plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'rollup'] --- import rollupObj from './rollup.devdocs.json'; diff --git a/api_docs/rule_registry.devdocs.json b/api_docs/rule_registry.devdocs.json index fd79ee3f09e9a..a08293333c27a 100644 --- a/api_docs/rule_registry.devdocs.json +++ b/api_docs/rule_registry.devdocs.json @@ -399,9 +399,11 @@ "section": "def-common.RuleTypeParams", "text": "RuleTypeParams" }, - " = never>({ aggs, featureIds, index, query, search_after: searchAfter, size, sort, track_total_hits: trackTotalHits, _source, }: { aggs?: object | undefined; featureIds?: string[] | undefined; index?: string | undefined; query?: object | undefined; search_after?: (string | number)[] | undefined; size?: number | undefined; sort?: ", + " = never>({ aggs, featureIds, index, query, search_after: searchAfter, size, sort, track_total_hits: trackTotalHits, _source, runtimeMappings, }: { aggs?: object | undefined; featureIds?: string[] | undefined; index?: string | undefined; query?: object | undefined; search_after?: (string | number)[] | undefined; size?: number | undefined; sort?: ", "SortOptions", - "[] | undefined; track_total_hits?: number | boolean | undefined; _source?: string[] | undefined; }) => Promise<", + "[] | undefined; track_total_hits?: number | boolean | undefined; _source?: false | string[] | undefined; runtimeMappings?: ", + "MappingRuntimeFields", + " | undefined; }) => Promise<", "SearchResponse", " Promise<", + "SearchResponse", + ">, Record>>" + ], + "path": "x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "ruleRegistry", + "id": "def-server.AlertsClient.getGroupAggregations.$1", + "type": "Object", + "tags": [], + "label": "{\n featureIds,\n groupByField,\n aggregations,\n filters,\n pageIndex,\n pageSize,\n sort = [{ unitsCount: { order: 'desc' } }],\n }", + "description": [], + "path": "x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "ruleRegistry", + "id": "def-server.AlertsClient.getGroupAggregations.$1.featureIds", + "type": "Array", + "tags": [], + "label": "featureIds", + "description": [ + "\nThe feature ids the alerts belong to, used for authorization" + ], + "signature": [ + "string[]" + ], + "path": "x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "ruleRegistry", + "id": "def-server.AlertsClient.getGroupAggregations.$1.groupByField", + "type": "string", + "tags": [], + "label": "groupByField", + "description": [ + "\nThe field to group by" + ], + "path": "x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "ruleRegistry", + "id": "def-server.AlertsClient.getGroupAggregations.$1.aggregations", + "type": "Object", + "tags": [], + "label": "aggregations", + "description": [ + "\nThe aggregations to perform on the groupByField buckets" + ], + "signature": [ + "{ [x: string]: { avg?: { field?: string | undefined; missing?: string | number | boolean | undefined; } | undefined; cardinality?: { field?: string | undefined; precision_threshold?: number | undefined; rehash?: boolean | undefined; missing?: string | number | boolean | undefined; } | undefined; min?: { field?: string | undefined; missing?: string | number | boolean | undefined; format?: string | undefined; } | undefined; max?: { field?: string | undefined; missing?: string | number | boolean | undefined; format?: string | undefined; } | undefined; sum?: { field?: string | undefined; missing?: string | number | boolean | undefined; } | undefined; top_hits?: { explain?: boolean | undefined; docvalue_fields?: string | string[] | undefined; stored_fields?: string | string[] | undefined; from?: number | undefined; size?: number | undefined; sort?: string | { [x: string]: \"asc\" | \"desc\" | \"_doc\" | { missing?: string | number | boolean | undefined; mode?: \"min\" | \"max\" | \"sum\" | \"avg\" | \"median\" | undefined; order?: \"asc\" | \"desc\" | \"_doc\" | undefined; }; } | (string | { [x: string]: \"asc\" | \"desc\" | \"_doc\" | { missing?: string | number | boolean | undefined; mode?: \"min\" | \"max\" | \"sum\" | \"avg\" | \"median\" | undefined; order?: \"asc\" | \"desc\" | \"_doc\" | undefined; }; })[] | undefined; seq_no_primary_term?: boolean | undefined; version?: boolean | undefined; track_scores?: boolean | undefined; highlight?: any; _source?: string | boolean | string[] | undefined; } | undefined; weighted_avg?: { format?: string | undefined; value_type?: string | undefined; value?: { field?: string | undefined; missing?: number | undefined; } | undefined; weight?: { field?: string | undefined; missing?: number | undefined; } | undefined; } | undefined; } & BucketAggsSchemas & { aggs?: { [x: string]: BucketAggsSchemas & { avg?: { field?: string | undefined; missing?: string | number | boolean | undefined; } | undefined; cardinality?: { field?: string | undefined; precision_threshold?: number | undefined; rehash?: boolean | undefined; missing?: string | number | boolean | undefined; } | undefined; min?: { field?: string | undefined; missing?: string | number | boolean | undefined; format?: string | undefined; } | undefined; max?: { field?: string | undefined; missing?: string | number | boolean | undefined; format?: string | undefined; } | undefined; sum?: { field?: string | undefined; missing?: string | number | boolean | undefined; } | undefined; top_hits?: { explain?: boolean | undefined; docvalue_fields?: string | string[] | undefined; stored_fields?: string | string[] | undefined; from?: number | undefined; size?: number | undefined; sort?: string | { [x: string]: \"asc\" | \"desc\" | \"_doc\" | { missing?: string | number | boolean | undefined; mode?: \"min\" | \"max\" | \"sum\" | \"avg\" | \"median\" | undefined; order?: \"asc\" | \"desc\" | \"_doc\" | undefined; }; } | (string | { [x: string]: \"asc\" | \"desc\" | \"_doc\" | { missing?: string | number | boolean | undefined; mode?: \"min\" | \"max\" | \"sum\" | \"avg\" | \"median\" | undefined; order?: \"asc\" | \"desc\" | \"_doc\" | undefined; }; })[] | undefined; seq_no_primary_term?: boolean | undefined; version?: boolean | undefined; track_scores?: boolean | undefined; highlight?: any; _source?: string | boolean | string[] | undefined; } | undefined; weighted_avg?: { format?: string | undefined; value_type?: string | undefined; value?: { field?: string | undefined; missing?: number | undefined; } | undefined; weight?: { field?: string | undefined; missing?: number | undefined; } | undefined; } | undefined; }; } | undefined; aggregations?: { [x: string]: BucketAggsSchemas & { avg?: { field?: string | undefined; missing?: string | number | boolean | undefined; } | undefined; cardinality?: { field?: string | undefined; precision_threshold?: number | undefined; rehash?: boolean | undefined; missing?: string | number | boolean | undefined; } | undefined; min?: { field?: string | undefined; missing?: string | number | boolean | undefined; format?: string | undefined; } | undefined; max?: { field?: string | undefined; missing?: string | number | boolean | undefined; format?: string | undefined; } | undefined; sum?: { field?: string | undefined; missing?: string | number | boolean | undefined; } | undefined; top_hits?: { explain?: boolean | undefined; docvalue_fields?: string | string[] | undefined; stored_fields?: string | string[] | undefined; from?: number | undefined; size?: number | undefined; sort?: string | { [x: string]: \"asc\" | \"desc\" | \"_doc\" | { missing?: string | number | boolean | undefined; mode?: \"min\" | \"max\" | \"sum\" | \"avg\" | \"median\" | undefined; order?: \"asc\" | \"desc\" | \"_doc\" | undefined; }; } | (string | { [x: string]: \"asc\" | \"desc\" | \"_doc\" | { missing?: string | number | boolean | undefined; mode?: \"min\" | \"max\" | \"sum\" | \"avg\" | \"median\" | undefined; order?: \"asc\" | \"desc\" | \"_doc\" | undefined; }; })[] | undefined; seq_no_primary_term?: boolean | undefined; version?: boolean | undefined; track_scores?: boolean | undefined; highlight?: any; _source?: string | boolean | string[] | undefined; } | undefined; weighted_avg?: { format?: string | undefined; value_type?: string | undefined; value?: { field?: string | undefined; missing?: number | undefined; } | undefined; weight?: { field?: string | undefined; missing?: number | undefined; } | undefined; } | undefined; }; } | undefined; }; } | undefined" + ], + "path": "x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "ruleRegistry", + "id": "def-server.AlertsClient.getGroupAggregations.$1.filters", + "type": "Array", + "tags": [], + "label": "filters", + "description": [ + "\nThe filters to apply to the query" + ], + "signature": [ + "QueryDslQueryContainer", + "[] | undefined" + ], + "path": "x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "ruleRegistry", + "id": "def-server.AlertsClient.getGroupAggregations.$1.sort", + "type": "Array", + "tags": [], + "label": "sort", + "description": [ + "\nAny sort options to apply to the groupByField aggregations" + ], + "signature": [ + "SortCombinations", + "[] | undefined" + ], + "path": "x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "ruleRegistry", + "id": "def-server.AlertsClient.getGroupAggregations.$1.pageIndex", + "type": "number", + "tags": [], + "label": "pageIndex", + "description": [ + "\nThe page index to start from" + ], + "path": "x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "ruleRegistry", + "id": "def-server.AlertsClient.getGroupAggregations.$1.pageSize", + "type": "number", + "tags": [], + "label": "pageSize", + "description": [ + "\nThe page size" ], "path": "x-pack/plugins/rule_registry/server/alert_data_client/alerts_client.ts", "deprecated": false, diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index 20e1f6a0fa83d..8ef159d5bcdeb 100644 --- a/api_docs/rule_registry.mdx +++ b/api_docs/rule_registry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ruleRegistry title: "ruleRegistry" image: https://source.unsplash.com/400x175/?github description: API docs for the ruleRegistry plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ruleRegistry'] --- import ruleRegistryObj from './rule_registry.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-o | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 276 | 0 | 247 | 14 | +| 286 | 0 | 249 | 14 | ## Server diff --git a/api_docs/runtime_fields.mdx b/api_docs/runtime_fields.mdx index 9168c08ea6334..feb1598e0b4fe 100644 --- a/api_docs/runtime_fields.mdx +++ b/api_docs/runtime_fields.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/runtimeFields title: "runtimeFields" image: https://source.unsplash.com/400x175/?github description: API docs for the runtimeFields plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'runtimeFields'] --- import runtimeFieldsObj from './runtime_fields.devdocs.json'; diff --git a/api_docs/saved_objects.mdx b/api_docs/saved_objects.mdx index 687ea14fdf622..8066983b1f3f3 100644 --- a/api_docs/saved_objects.mdx +++ b/api_docs/saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjects title: "savedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjects plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjects'] --- import savedObjectsObj from './saved_objects.devdocs.json'; diff --git a/api_docs/saved_objects_finder.mdx b/api_docs/saved_objects_finder.mdx index 8f1971f381224..58b2d17a35a8b 100644 --- a/api_docs/saved_objects_finder.mdx +++ b/api_docs/saved_objects_finder.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsFinder title: "savedObjectsFinder" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsFinder plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsFinder'] --- import savedObjectsFinderObj from './saved_objects_finder.devdocs.json'; diff --git a/api_docs/saved_objects_management.mdx b/api_docs/saved_objects_management.mdx index 0593b5fb971db..8ed628b1d8771 100644 --- a/api_docs/saved_objects_management.mdx +++ b/api_docs/saved_objects_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsManagement title: "savedObjectsManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsManagement plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsManagement'] --- import savedObjectsManagementObj from './saved_objects_management.devdocs.json'; diff --git a/api_docs/saved_objects_tagging.mdx b/api_docs/saved_objects_tagging.mdx index 547e2acf35343..d632a3c0352be 100644 --- a/api_docs/saved_objects_tagging.mdx +++ b/api_docs/saved_objects_tagging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTagging title: "savedObjectsTagging" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTagging plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTagging'] --- import savedObjectsTaggingObj from './saved_objects_tagging.devdocs.json'; diff --git a/api_docs/saved_objects_tagging_oss.mdx b/api_docs/saved_objects_tagging_oss.mdx index 8752a5816a939..cb41f2dd7245f 100644 --- a/api_docs/saved_objects_tagging_oss.mdx +++ b/api_docs/saved_objects_tagging_oss.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTaggingOss title: "savedObjectsTaggingOss" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTaggingOss plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTaggingOss'] --- import savedObjectsTaggingOssObj from './saved_objects_tagging_oss.devdocs.json'; diff --git a/api_docs/saved_search.mdx b/api_docs/saved_search.mdx index b568d4d5f3358..c80a10d1890cf 100644 --- a/api_docs/saved_search.mdx +++ b/api_docs/saved_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedSearch title: "savedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the savedSearch plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedSearch'] --- import savedSearchObj from './saved_search.devdocs.json'; diff --git a/api_docs/screenshot_mode.mdx b/api_docs/screenshot_mode.mdx index 7f35e63dabd04..21a497b780fc7 100644 --- a/api_docs/screenshot_mode.mdx +++ b/api_docs/screenshot_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotMode title: "screenshotMode" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotMode plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotMode'] --- import screenshotModeObj from './screenshot_mode.devdocs.json'; diff --git a/api_docs/screenshotting.mdx b/api_docs/screenshotting.mdx index 4ce1c48689f9f..302750919bba0 100644 --- a/api_docs/screenshotting.mdx +++ b/api_docs/screenshotting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotting title: "screenshotting" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotting plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotting'] --- import screenshottingObj from './screenshotting.devdocs.json'; diff --git a/api_docs/search_connectors.mdx b/api_docs/search_connectors.mdx index 59a0e44141e8d..cb43509d4f1e2 100644 --- a/api_docs/search_connectors.mdx +++ b/api_docs/search_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchConnectors title: "searchConnectors" image: https://source.unsplash.com/400x175/?github description: API docs for the searchConnectors plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchConnectors'] --- import searchConnectorsObj from './search_connectors.devdocs.json'; diff --git a/api_docs/search_homepage.mdx b/api_docs/search_homepage.mdx index 66e09b012255f..2b3fe1042cb6a 100644 --- a/api_docs/search_homepage.mdx +++ b/api_docs/search_homepage.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchHomepage title: "searchHomepage" image: https://source.unsplash.com/400x175/?github description: API docs for the searchHomepage plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchHomepage'] --- import searchHomepageObj from './search_homepage.devdocs.json'; diff --git a/api_docs/search_inference_endpoints.mdx b/api_docs/search_inference_endpoints.mdx index 706d4462d7e37..83847af5798e5 100644 --- a/api_docs/search_inference_endpoints.mdx +++ b/api_docs/search_inference_endpoints.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchInferenceEndpoints title: "searchInferenceEndpoints" image: https://source.unsplash.com/400x175/?github description: API docs for the searchInferenceEndpoints plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchInferenceEndpoints'] --- import searchInferenceEndpointsObj from './search_inference_endpoints.devdocs.json'; diff --git a/api_docs/search_notebooks.mdx b/api_docs/search_notebooks.mdx index 9ab9dc47bb750..ee5e2f4b0e48f 100644 --- a/api_docs/search_notebooks.mdx +++ b/api_docs/search_notebooks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchNotebooks title: "searchNotebooks" image: https://source.unsplash.com/400x175/?github description: API docs for the searchNotebooks plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchNotebooks'] --- import searchNotebooksObj from './search_notebooks.devdocs.json'; diff --git a/api_docs/search_playground.mdx b/api_docs/search_playground.mdx index d4747ce2312cd..1d1c9729f2493 100644 --- a/api_docs/search_playground.mdx +++ b/api_docs/search_playground.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchPlayground title: "searchPlayground" image: https://source.unsplash.com/400x175/?github description: API docs for the searchPlayground plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchPlayground'] --- import searchPlaygroundObj from './search_playground.devdocs.json'; diff --git a/api_docs/security.devdocs.json b/api_docs/security.devdocs.json index 6778f16c4683e..65b7d3c7c4827 100644 --- a/api_docs/security.devdocs.json +++ b/api_docs/security.devdocs.json @@ -5324,10 +5324,6 @@ "plugin": "ml", "path": "x-pack/plugins/ml/server/routes/annotations.ts" }, - { - "plugin": "logstash", - "path": "x-pack/plugins/logstash/server/routes/pipeline/save.ts" - }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/server/request_context_factory.ts" @@ -5348,10 +5344,6 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/finalize_signals_migration_route.ts" }, - { - "plugin": "cloudChat", - "path": "x-pack/plugins/cloud_integrations/cloud_chat/server/routes/chat.ts" - }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/server/lib/timeline/utils/common.ts" diff --git a/api_docs/security.mdx b/api_docs/security.mdx index 66359047091dc..849a3f2b1bb22 100644 --- a/api_docs/security.mdx +++ b/api_docs/security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/security title: "security" image: https://source.unsplash.com/400x175/?github description: API docs for the security plugin -date: 2024-07-03 +date: 2024-07-05 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 c5b7688b40dda..ce44e5d3f7dcd 100644 --- a/api_docs/security_solution.mdx +++ b/api_docs/security_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolution title: "securitySolution" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolution plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolution'] --- import securitySolutionObj from './security_solution.devdocs.json'; diff --git a/api_docs/security_solution_ess.mdx b/api_docs/security_solution_ess.mdx index bde426c96f48d..66e49cac8a767 100644 --- a/api_docs/security_solution_ess.mdx +++ b/api_docs/security_solution_ess.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolutionEss title: "securitySolutionEss" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolutionEss plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolutionEss'] --- import securitySolutionEssObj from './security_solution_ess.devdocs.json'; diff --git a/api_docs/security_solution_serverless.mdx b/api_docs/security_solution_serverless.mdx index d43ad2088a426..7066f60307081 100644 --- a/api_docs/security_solution_serverless.mdx +++ b/api_docs/security_solution_serverless.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolutionServerless title: "securitySolutionServerless" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolutionServerless plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolutionServerless'] --- import securitySolutionServerlessObj from './security_solution_serverless.devdocs.json'; diff --git a/api_docs/serverless.mdx b/api_docs/serverless.mdx index b18d9e13f0e29..1961cf20840b7 100644 --- a/api_docs/serverless.mdx +++ b/api_docs/serverless.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverless title: "serverless" image: https://source.unsplash.com/400x175/?github description: API docs for the serverless plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverless'] --- import serverlessObj from './serverless.devdocs.json'; diff --git a/api_docs/serverless_observability.mdx b/api_docs/serverless_observability.mdx index c89a73156780f..07ebe297717a9 100644 --- a/api_docs/serverless_observability.mdx +++ b/api_docs/serverless_observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverlessObservability title: "serverlessObservability" image: https://source.unsplash.com/400x175/?github description: API docs for the serverlessObservability plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverlessObservability'] --- import serverlessObservabilityObj from './serverless_observability.devdocs.json'; diff --git a/api_docs/serverless_search.mdx b/api_docs/serverless_search.mdx index 7fe245b5eef17..7f3d204f0f650 100644 --- a/api_docs/serverless_search.mdx +++ b/api_docs/serverless_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverlessSearch title: "serverlessSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the serverlessSearch plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverlessSearch'] --- import serverlessSearchObj from './serverless_search.devdocs.json'; diff --git a/api_docs/session_view.mdx b/api_docs/session_view.mdx index b872ddfcbd7ef..01b316079d02b 100644 --- a/api_docs/session_view.mdx +++ b/api_docs/session_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/sessionView title: "sessionView" image: https://source.unsplash.com/400x175/?github description: API docs for the sessionView plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'sessionView'] --- import sessionViewObj from './session_view.devdocs.json'; diff --git a/api_docs/share.mdx b/api_docs/share.mdx index 5efb83eda2eed..5522a0951fc40 100644 --- a/api_docs/share.mdx +++ b/api_docs/share.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/share title: "share" image: https://source.unsplash.com/400x175/?github description: API docs for the share plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'share'] --- import shareObj from './share.devdocs.json'; diff --git a/api_docs/slo.mdx b/api_docs/slo.mdx index f88595de917a8..598e7d508493a 100644 --- a/api_docs/slo.mdx +++ b/api_docs/slo.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/slo title: "slo" image: https://source.unsplash.com/400x175/?github description: API docs for the slo plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'slo'] --- import sloObj from './slo.devdocs.json'; diff --git a/api_docs/snapshot_restore.mdx b/api_docs/snapshot_restore.mdx index a4dd6d967e103..8acb0d4a62568 100644 --- a/api_docs/snapshot_restore.mdx +++ b/api_docs/snapshot_restore.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/snapshotRestore title: "snapshotRestore" image: https://source.unsplash.com/400x175/?github description: API docs for the snapshotRestore plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'snapshotRestore'] --- import snapshotRestoreObj from './snapshot_restore.devdocs.json'; diff --git a/api_docs/spaces.mdx b/api_docs/spaces.mdx index b11b515d81b4c..fcb7354698141 100644 --- a/api_docs/spaces.mdx +++ b/api_docs/spaces.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/spaces title: "spaces" image: https://source.unsplash.com/400x175/?github description: API docs for the spaces plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'spaces'] --- import spacesObj from './spaces.devdocs.json'; diff --git a/api_docs/stack_alerts.mdx b/api_docs/stack_alerts.mdx index 22cadf5e3bd93..9938eff55cf82 100644 --- a/api_docs/stack_alerts.mdx +++ b/api_docs/stack_alerts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackAlerts title: "stackAlerts" image: https://source.unsplash.com/400x175/?github description: API docs for the stackAlerts plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackAlerts'] --- import stackAlertsObj from './stack_alerts.devdocs.json'; diff --git a/api_docs/stack_connectors.mdx b/api_docs/stack_connectors.mdx index 30d867e6537bc..4cc52c6194e0d 100644 --- a/api_docs/stack_connectors.mdx +++ b/api_docs/stack_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackConnectors title: "stackConnectors" image: https://source.unsplash.com/400x175/?github description: API docs for the stackConnectors plugin -date: 2024-07-03 +date: 2024-07-05 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 71e2a6c4aa363..f15ac1a6c9ece 100644 --- a/api_docs/task_manager.mdx +++ b/api_docs/task_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/taskManager title: "taskManager" image: https://source.unsplash.com/400x175/?github description: API docs for the taskManager plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'taskManager'] --- import taskManagerObj from './task_manager.devdocs.json'; diff --git a/api_docs/telemetry.mdx b/api_docs/telemetry.mdx index 0a7024331eead..9ac74e95ecb80 100644 --- a/api_docs/telemetry.mdx +++ b/api_docs/telemetry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetry title: "telemetry" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetry plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetry'] --- import telemetryObj from './telemetry.devdocs.json'; diff --git a/api_docs/telemetry_collection_manager.mdx b/api_docs/telemetry_collection_manager.mdx index 12c2fca9a6fad..c909c468ec348 100644 --- a/api_docs/telemetry_collection_manager.mdx +++ b/api_docs/telemetry_collection_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionManager title: "telemetryCollectionManager" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionManager plugin -date: 2024-07-03 +date: 2024-07-05 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 7e83d82956376..4e781d8dd253f 100644 --- a/api_docs/telemetry_collection_xpack.mdx +++ b/api_docs/telemetry_collection_xpack.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionXpack title: "telemetryCollectionXpack" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionXpack plugin -date: 2024-07-03 +date: 2024-07-05 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 3f8a0f8e7030c..ceaa97c7906bd 100644 --- a/api_docs/telemetry_management_section.mdx +++ b/api_docs/telemetry_management_section.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryManagementSection title: "telemetryManagementSection" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryManagementSection plugin -date: 2024-07-03 +date: 2024-07-05 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 649d488386060..64b745d79b682 100644 --- a/api_docs/text_based_languages.mdx +++ b/api_docs/text_based_languages.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/textBasedLanguages title: "textBasedLanguages" image: https://source.unsplash.com/400x175/?github description: API docs for the textBasedLanguages plugin -date: 2024-07-03 +date: 2024-07-05 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 70ffb2a2f29df..9e62db6d89993 100644 --- a/api_docs/threat_intelligence.mdx +++ b/api_docs/threat_intelligence.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/threatIntelligence title: "threatIntelligence" image: https://source.unsplash.com/400x175/?github description: API docs for the threatIntelligence plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'threatIntelligence'] --- import threatIntelligenceObj from './threat_intelligence.devdocs.json'; diff --git a/api_docs/timelines.devdocs.json b/api_docs/timelines.devdocs.json index 1dbc6c1702f89..53bf4c3913ee6 100644 --- a/api_docs/timelines.devdocs.json +++ b/api_docs/timelines.devdocs.json @@ -1467,386 +1467,6 @@ "classes": [], "functions": [], "interfaces": [ - { - "parentPluginId": "timelines", - "id": "def-common.BrowserField", - "type": "Interface", - "tags": [ - "deprecated" - ], - "label": "BrowserField", - "description": [], - "path": "x-pack/plugins/timelines/common/search_strategy/index_fields/index.ts", - "deprecated": true, - "trackAdoption": false, - "references": [ - { - "plugin": "@kbn/securitysolution-data-table", - "path": "x-pack/packages/security-solution/data_table/components/data_table/column_headers/helpers.tsx" - }, - { - "plugin": "@kbn/securitysolution-data-table", - "path": "x-pack/packages/security-solution/data_table/components/data_table/column_headers/helpers.tsx" - }, - { - "plugin": "@kbn/securitysolution-data-table", - "path": "x-pack/packages/security-solution/data_table/components/data_table/column_headers/helpers.tsx" - }, - { - "plugin": "@kbn/securitysolution-data-table", - "path": "x-pack/packages/security-solution/data_table/components/data_table/column_headers/helpers.tsx" - }, - { - "plugin": "@kbn/securitysolution-data-table", - "path": "x-pack/packages/security-solution/data_table/components/data_table/column_headers/helpers.tsx" - }, - { - "plugin": "@kbn/securitysolution-data-table", - "path": "x-pack/packages/security-solution/data_table/components/data_table/column_headers/helpers.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_summary.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/event_details/cti_details/enrichment_summary.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/containers/source/use_data_view.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/containers/source/use_data_view.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/containers/source/use_data_view.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/containers/source/use_data_view.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/containers/source/index.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/containers/source/index.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/containers/source/index.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/containers/source/index.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/containers/source/index.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/event_details/types.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/event_details/types.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/event_details/types.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/timelines/components/edit_data_provider/helpers.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/timelines/components/edit_data_provider/helpers.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/event_details/table/field_value_cell.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/event_details/table/field_value_cell.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/event_details/table/use_action_cell_data_provider.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/event_details/table/use_action_cell_data_provider.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/utils.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/utils.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/utils.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/threatmatch_input/index.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/threatmatch_input/index.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/ml/hooks/use_ml_rule_config.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/ml/hooks/use_ml_rule_config.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/common/components/ml/hooks/use_ml_rule_config.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/index.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/index.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/index.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/index.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/detections/components/alerts_kpis/common/hooks.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/detections/components/alerts_kpis/common/hooks.ts" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/detections/components/alerts_kpis/common/hooks.ts" - } - ], - "children": [ - { - "parentPluginId": "timelines", - "id": "def-common.BrowserField.aggregatable", - "type": "boolean", - "tags": [], - "label": "aggregatable", - "description": [], - "path": "x-pack/plugins/timelines/common/search_strategy/index_fields/index.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "timelines", - "id": "def-common.BrowserField.fields", - "type": "Object", - "tags": [], - "label": "fields", - "description": [], - "signature": [ - "{ [x: string]: Partial<", - { - "pluginId": "timelines", - "scope": "common", - "docId": "kibTimelinesPluginApi", - "section": "def-common.BrowserField", - "text": "BrowserField" - }, - ">; }" - ], - "path": "x-pack/plugins/timelines/common/search_strategy/index_fields/index.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "timelines", - "id": "def-common.BrowserField.format", - "type": "string", - "tags": [], - "label": "format", - "description": [], - "path": "x-pack/plugins/timelines/common/search_strategy/index_fields/index.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "timelines", - "id": "def-common.BrowserField.indexes", - "type": "Array", - "tags": [], - "label": "indexes", - "description": [], - "signature": [ - "string[]" - ], - "path": "x-pack/plugins/timelines/common/search_strategy/index_fields/index.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "timelines", - "id": "def-common.BrowserField.name", - "type": "string", - "tags": [], - "label": "name", - "description": [], - "path": "x-pack/plugins/timelines/common/search_strategy/index_fields/index.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "timelines", - "id": "def-common.BrowserField.searchable", - "type": "boolean", - "tags": [], - "label": "searchable", - "description": [], - "path": "x-pack/plugins/timelines/common/search_strategy/index_fields/index.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "timelines", - "id": "def-common.BrowserField.type", - "type": "string", - "tags": [], - "label": "type", - "description": [], - "path": "x-pack/plugins/timelines/common/search_strategy/index_fields/index.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "timelines", - "id": "def-common.BrowserField.esTypes", - "type": "Array", - "tags": [], - "label": "esTypes", - "description": [], - "signature": [ - "string[] | undefined" - ], - "path": "x-pack/plugins/timelines/common/search_strategy/index_fields/index.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "timelines", - "id": "def-common.BrowserField.subType", - "type": "CompoundType", - "tags": [], - "label": "subType", - "description": [], - "signature": [ - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.IFieldSubType", - "text": "IFieldSubType" - }, - " | undefined" - ], - "path": "x-pack/plugins/timelines/common/search_strategy/index_fields/index.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "timelines", - "id": "def-common.BrowserField.readFromDocValues", - "type": "boolean", - "tags": [], - "label": "readFromDocValues", - "description": [], - "path": "x-pack/plugins/timelines/common/search_strategy/index_fields/index.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "timelines", - "id": "def-common.BrowserField.runtimeField", - "type": "Object", - "tags": [], - "label": "runtimeField", - "description": [], - "signature": [ - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.RuntimeField", - "text": "RuntimeField" - }, - " | undefined" - ], - "path": "x-pack/plugins/timelines/common/search_strategy/index_fields/index.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "timelines", "id": "def-common.CursorType", @@ -3925,23 +3545,224 @@ }, { "parentPluginId": "timelines", - "id": "def-common.BrowserFields", + "id": "def-common.BrowserField", "type": "Type", "tags": [ "deprecated" ], - "label": "BrowserFields", + "label": "BrowserField", "description": [], "signature": [ - "{ [x: string]: Partial<", + "Omit<", { - "pluginId": "timelines", + "pluginId": "dataViews", "scope": "common", - "docId": "kibTimelinesPluginApi", - "section": "def-common.BrowserField", - "text": "BrowserField" + "docId": "kibDataViewsPluginApi", + "section": "def-common.FieldSpec", + "text": "FieldSpec" + }, + ", \"format\"> & { format?: string | undefined; }" + ], + "path": "x-pack/plugins/timelines/common/search_strategy/index_fields/index.ts", + "deprecated": true, + "trackAdoption": false, + "references": [ + { + "plugin": "@kbn/securitysolution-data-table", + "path": "x-pack/packages/security-solution/data_table/components/data_table/column_headers/helpers.tsx" + }, + { + "plugin": "@kbn/securitysolution-data-table", + "path": "x-pack/packages/security-solution/data_table/components/data_table/column_headers/helpers.tsx" + }, + { + "plugin": "@kbn/securitysolution-data-table", + "path": "x-pack/packages/security-solution/data_table/components/data_table/column_headers/helpers.tsx" + }, + { + "plugin": "@kbn/securitysolution-data-table", + "path": "x-pack/packages/security-solution/data_table/components/data_table/column_headers/helpers.tsx" + }, + { + "plugin": "@kbn/securitysolution-data-table", + "path": "x-pack/packages/security-solution/data_table/components/data_table/column_headers/helpers.tsx" + }, + { + "plugin": "@kbn/securitysolution-data-table", + "path": "x-pack/packages/security-solution/data_table/components/data_table/column_headers/helpers.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/common/search_strategy/index_fields/index.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/components/drag_and_drop/helpers.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/containers/source/use_data_view.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/containers/source/use_data_view.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/containers/source/use_data_view.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/containers/source/use_data_view.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/containers/source/index.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/containers/source/index.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/containers/source/index.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/containers/source/index.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/containers/source/index.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/components/event_details/types.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/components/event_details/types.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/components/event_details/types.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/formatted_field.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/components/event_details/table/field_value_cell.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/components/event_details/table/field_value_cell.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/components/event_details/table/use_action_cell_data_provider.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/components/event_details/table/use_action_cell_data_provider.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/utils.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/utils.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/utils.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/components/ml/hooks/use_ml_rule_config.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/components/ml/hooks/use_ml_rule_config.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/common/components/ml/hooks/use_ml_rule_config.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/index.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/index.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/index.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/index.tsx" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/components/alerts_kpis/common/hooks.ts" + }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/components/alerts_kpis/common/hooks.ts" }, - ">; }" + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/public/detections/components/alerts_kpis/common/hooks.ts" + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "timelines", + "id": "def-common.BrowserFields", + "type": "Type", + "tags": [ + "deprecated" + ], + "label": "BrowserFields", + "description": [], + "signature": [ + "{ [x: string]: ", + "FieldCategory", + "; }" ], "path": "x-pack/plugins/timelines/common/search_strategy/index_fields/index.ts", "deprecated": true, @@ -4263,14 +4084,6 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/common/components/event_details/columns.tsx" }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/query_bar/index.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/query_bar/index.tsx" - }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/body/column_headers/index.tsx" @@ -4411,14 +4224,6 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/flyout/document_details/shared/context.tsx" }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/index.tsx" - }, - { - "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/index.tsx" - }, { "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/shared/utils.ts" diff --git a/api_docs/timelines.mdx b/api_docs/timelines.mdx index a626d21d4d91f..b1b3d17e090c3 100644 --- a/api_docs/timelines.mdx +++ b/api_docs/timelines.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/timelines title: "timelines" image: https://source.unsplash.com/400x175/?github description: API docs for the timelines plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'timelines'] --- import timelinesObj from './timelines.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/security-threat-hunting-investigations](https://github.com/org | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 239 | 1 | 195 | 17 | +| 228 | 1 | 184 | 18 | ## Client diff --git a/api_docs/transform.mdx b/api_docs/transform.mdx index 931f49b4d2549..0238230f087a6 100644 --- a/api_docs/transform.mdx +++ b/api_docs/transform.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/transform title: "transform" image: https://source.unsplash.com/400x175/?github description: API docs for the transform plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'transform'] --- import transformObj from './transform.devdocs.json'; diff --git a/api_docs/triggers_actions_ui.devdocs.json b/api_docs/triggers_actions_ui.devdocs.json index e8e1b4e820781..23ad7592bc323 100644 --- a/api_docs/triggers_actions_ui.devdocs.json +++ b/api_docs/triggers_actions_ui.devdocs.json @@ -177,7 +177,7 @@ "label": "start", "description": [], "signature": [ - "(_: ", + "(core: ", { "pluginId": "@kbn/core-lifecycle-browser", "scope": "common", @@ -203,7 +203,7 @@ "id": "def-public.Plugin.start.$1", "type": "Object", "tags": [], - "label": "_", + "label": "core", "description": [], "signature": [ { @@ -2399,8 +2399,8 @@ "pluginId": "@kbn/alerts-ui-shared", "scope": "common", "docId": "kibKbnAlertsUiSharedPluginApi", - "section": "def-common.RuleFormErrors", - "text": "RuleFormErrors" + "section": "def-common.RuleFormParamsErrors", + "text": "RuleFormParamsErrors" } ], "path": "packages/kbn-alerts-ui-shared/src/common/types/action_types.ts", diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx index 2718fe6ad9a64..d349ca9c3bd9d 100644 --- a/api_docs/triggers_actions_ui.mdx +++ b/api_docs/triggers_actions_ui.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/triggersActionsUi title: "triggersActionsUi" image: https://source.unsplash.com/400x175/?github description: API docs for the triggersActionsUi plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'triggersActionsUi'] --- import triggersActionsUiObj from './triggers_actions_ui.devdocs.json'; diff --git a/api_docs/ui_actions.mdx b/api_docs/ui_actions.mdx index d205d4a6a6b47..19f24144210d7 100644 --- a/api_docs/ui_actions.mdx +++ b/api_docs/ui_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActions title: "uiActions" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActions plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActions'] --- import uiActionsObj from './ui_actions.devdocs.json'; diff --git a/api_docs/ui_actions_enhanced.mdx b/api_docs/ui_actions_enhanced.mdx index 1e219825899d7..b86dfc06e3148 100644 --- a/api_docs/ui_actions_enhanced.mdx +++ b/api_docs/ui_actions_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActionsEnhanced title: "uiActionsEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActionsEnhanced plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActionsEnhanced'] --- import uiActionsEnhancedObj from './ui_actions_enhanced.devdocs.json'; diff --git a/api_docs/unified_doc_viewer.mdx b/api_docs/unified_doc_viewer.mdx index e75531b5a08b5..80e3365e08bf0 100644 --- a/api_docs/unified_doc_viewer.mdx +++ b/api_docs/unified_doc_viewer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedDocViewer title: "unifiedDocViewer" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedDocViewer plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedDocViewer'] --- import unifiedDocViewerObj from './unified_doc_viewer.devdocs.json'; diff --git a/api_docs/unified_histogram.devdocs.json b/api_docs/unified_histogram.devdocs.json index 0518cdf17da56..17cc0d1a80cb9 100644 --- a/api_docs/unified_histogram.devdocs.json +++ b/api_docs/unified_histogram.devdocs.json @@ -614,7 +614,7 @@ }, ") => void) | undefined; } & Pick<", "UnifiedHistogramLayoutProps", - ", \"className\" | \"children\" | \"query\" | \"filters\" | \"columns\" | \"container\" | \"onBrushEnd\" | \"disabledActions\" | \"timeRange\" | \"dataView\" | \"table\" | \"services\" | \"relativeTimeRange\" | \"renderCustomChartToggleActions\" | \"onFilter\" | \"externalVisContext\" | \"withDefaultActions\" | \"abortController\"> & ", + ", \"className\" | \"children\" | \"query\" | \"filters\" | \"services\" | \"columns\" | \"container\" | \"onBrushEnd\" | \"disabledActions\" | \"timeRange\" | \"dataView\" | \"table\" | \"relativeTimeRange\" | \"renderCustomChartToggleActions\" | \"onFilter\" | \"externalVisContext\" | \"withDefaultActions\" | \"abortController\"> & ", { "pluginId": "@kbn/shared-ux-utility", "scope": "common", @@ -1615,7 +1615,7 @@ }, ") => void) | undefined; } & Pick<", "UnifiedHistogramLayoutProps", - ", \"className\" | \"children\" | \"query\" | \"filters\" | \"columns\" | \"container\" | \"onBrushEnd\" | \"disabledActions\" | \"timeRange\" | \"dataView\" | \"table\" | \"services\" | \"relativeTimeRange\" | \"renderCustomChartToggleActions\" | \"onFilter\" | \"externalVisContext\" | \"withDefaultActions\" | \"abortController\">" + ", \"className\" | \"children\" | \"query\" | \"filters\" | \"services\" | \"columns\" | \"container\" | \"onBrushEnd\" | \"disabledActions\" | \"timeRange\" | \"dataView\" | \"table\" | \"relativeTimeRange\" | \"renderCustomChartToggleActions\" | \"onFilter\" | \"externalVisContext\" | \"withDefaultActions\" | \"abortController\">" ], "path": "src/plugins/unified_histogram/public/container/container.tsx", "deprecated": false, diff --git a/api_docs/unified_histogram.mdx b/api_docs/unified_histogram.mdx index 7971b588823c4..3ea4b0538b2df 100644 --- a/api_docs/unified_histogram.mdx +++ b/api_docs/unified_histogram.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedHistogram title: "unifiedHistogram" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedHistogram plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedHistogram'] --- import unifiedHistogramObj from './unified_histogram.devdocs.json'; diff --git a/api_docs/unified_search.mdx b/api_docs/unified_search.mdx index 01f3cb26b1283..8e1460ae12830 100644 --- a/api_docs/unified_search.mdx +++ b/api_docs/unified_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch title: "unifiedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch'] --- import unifiedSearchObj from './unified_search.devdocs.json'; diff --git a/api_docs/unified_search_autocomplete.mdx b/api_docs/unified_search_autocomplete.mdx index 0d196da450fb8..74c3210c84180 100644 --- a/api_docs/unified_search_autocomplete.mdx +++ b/api_docs/unified_search_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch-autocomplete title: "unifiedSearch.autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch.autocomplete plugin -date: 2024-07-03 +date: 2024-07-05 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 98ae9800e33e9..000808f6f484f 100644 --- a/api_docs/uptime.mdx +++ b/api_docs/uptime.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uptime title: "uptime" image: https://source.unsplash.com/400x175/?github description: API docs for the uptime plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uptime'] --- import uptimeObj from './uptime.devdocs.json'; diff --git a/api_docs/url_forwarding.mdx b/api_docs/url_forwarding.mdx index b7a52c67051ad..01722c0624d3a 100644 --- a/api_docs/url_forwarding.mdx +++ b/api_docs/url_forwarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/urlForwarding title: "urlForwarding" image: https://source.unsplash.com/400x175/?github description: API docs for the urlForwarding plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'urlForwarding'] --- import urlForwardingObj from './url_forwarding.devdocs.json'; diff --git a/api_docs/usage_collection.mdx b/api_docs/usage_collection.mdx index c87cffe2a5204..337d383b43898 100644 --- a/api_docs/usage_collection.mdx +++ b/api_docs/usage_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/usageCollection title: "usageCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the usageCollection plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'usageCollection'] --- import usageCollectionObj from './usage_collection.devdocs.json'; diff --git a/api_docs/ux.mdx b/api_docs/ux.mdx index c6b23229e9a9f..e65e989f1b22f 100644 --- a/api_docs/ux.mdx +++ b/api_docs/ux.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ux title: "ux" image: https://source.unsplash.com/400x175/?github description: API docs for the ux plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ux'] --- import uxObj from './ux.devdocs.json'; diff --git a/api_docs/vis_default_editor.mdx b/api_docs/vis_default_editor.mdx index ccb746bc4f629..5075f9096e781 100644 --- a/api_docs/vis_default_editor.mdx +++ b/api_docs/vis_default_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visDefaultEditor title: "visDefaultEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the visDefaultEditor plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visDefaultEditor'] --- import visDefaultEditorObj from './vis_default_editor.devdocs.json'; diff --git a/api_docs/vis_type_gauge.mdx b/api_docs/vis_type_gauge.mdx index 996d6169acaee..17da32fc022ba 100644 --- a/api_docs/vis_type_gauge.mdx +++ b/api_docs/vis_type_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeGauge title: "visTypeGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeGauge plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeGauge'] --- import visTypeGaugeObj from './vis_type_gauge.devdocs.json'; diff --git a/api_docs/vis_type_heatmap.mdx b/api_docs/vis_type_heatmap.mdx index 4368d698226a5..8108dd83c4c9a 100644 --- a/api_docs/vis_type_heatmap.mdx +++ b/api_docs/vis_type_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeHeatmap title: "visTypeHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeHeatmap plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeHeatmap'] --- import visTypeHeatmapObj from './vis_type_heatmap.devdocs.json'; diff --git a/api_docs/vis_type_pie.mdx b/api_docs/vis_type_pie.mdx index 2346e3f40f5cf..89df6dd2feb20 100644 --- a/api_docs/vis_type_pie.mdx +++ b/api_docs/vis_type_pie.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypePie title: "visTypePie" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypePie plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypePie'] --- import visTypePieObj from './vis_type_pie.devdocs.json'; diff --git a/api_docs/vis_type_table.mdx b/api_docs/vis_type_table.mdx index 80a0b0fde21b7..725a30b66220b 100644 --- a/api_docs/vis_type_table.mdx +++ b/api_docs/vis_type_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTable title: "visTypeTable" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTable plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTable'] --- import visTypeTableObj from './vis_type_table.devdocs.json'; diff --git a/api_docs/vis_type_timelion.mdx b/api_docs/vis_type_timelion.mdx index fdeeefc3ed663..256e1d1ac0dcd 100644 --- a/api_docs/vis_type_timelion.mdx +++ b/api_docs/vis_type_timelion.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimelion title: "visTypeTimelion" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimelion plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimelion'] --- import visTypeTimelionObj from './vis_type_timelion.devdocs.json'; diff --git a/api_docs/vis_type_timeseries.mdx b/api_docs/vis_type_timeseries.mdx index 9c7a592c9ddda..b4866554fac19 100644 --- a/api_docs/vis_type_timeseries.mdx +++ b/api_docs/vis_type_timeseries.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimeseries title: "visTypeTimeseries" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimeseries plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimeseries'] --- import visTypeTimeseriesObj from './vis_type_timeseries.devdocs.json'; diff --git a/api_docs/vis_type_vega.mdx b/api_docs/vis_type_vega.mdx index 74038a3a81b30..a82be5a6757c5 100644 --- a/api_docs/vis_type_vega.mdx +++ b/api_docs/vis_type_vega.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVega title: "visTypeVega" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVega plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVega'] --- import visTypeVegaObj from './vis_type_vega.devdocs.json'; diff --git a/api_docs/vis_type_vislib.mdx b/api_docs/vis_type_vislib.mdx index 8c14dbd90d8f4..1a65152d73abf 100644 --- a/api_docs/vis_type_vislib.mdx +++ b/api_docs/vis_type_vislib.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVislib title: "visTypeVislib" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVislib plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVislib'] --- import visTypeVislibObj from './vis_type_vislib.devdocs.json'; diff --git a/api_docs/vis_type_xy.mdx b/api_docs/vis_type_xy.mdx index 6336eb414e724..272e6aa67104a 100644 --- a/api_docs/vis_type_xy.mdx +++ b/api_docs/vis_type_xy.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeXy title: "visTypeXy" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeXy plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeXy'] --- import visTypeXyObj from './vis_type_xy.devdocs.json'; diff --git a/api_docs/visualizations.devdocs.json b/api_docs/visualizations.devdocs.json index bfea478cf29ce..46fb8a61a8352 100644 --- a/api_docs/visualizations.devdocs.json +++ b/api_docs/visualizations.devdocs.json @@ -9691,7 +9691,7 @@ "label": "mode", "description": [], "signature": [ - "\"full\" | \"custom\" | \"dataBounds\"" + "\"custom\" | \"full\" | \"dataBounds\"" ], "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts", "deprecated": false, @@ -14067,7 +14067,7 @@ "label": "yLeftScale", "description": [], "signature": [ - "\"log\" | \"time\" | \"linear\" | \"sqrt\" | undefined" + "\"log\" | \"sqrt\" | \"time\" | \"linear\" | undefined" ], "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts", "deprecated": false, @@ -14081,7 +14081,7 @@ "label": "yRightScale", "description": [], "signature": [ - "\"log\" | \"time\" | \"linear\" | \"sqrt\" | undefined" + "\"log\" | \"sqrt\" | \"time\" | \"linear\" | undefined" ], "path": "src/plugins/visualizations/common/convert_to_lens/types/configurations.ts", "deprecated": false, diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx index a019b4c4840b9..e656a9b38b032 100644 --- a/api_docs/visualizations.mdx +++ b/api_docs/visualizations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visualizations title: "visualizations" image: https://source.unsplash.com/400x175/?github description: API docs for the visualizations plugin -date: 2024-07-03 +date: 2024-07-05 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations'] --- import visualizationsObj from './visualizations.devdocs.json'; diff --git a/catalog-info.yaml b/catalog-info.yaml index 95d625355d4db..aae8fc1af81d8 100644 --- a/catalog-info.yaml +++ b/catalog-info.yaml @@ -39,41 +39,6 @@ spec: type: url target: https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/locations.yml ---- - -apiVersion: backstage.io/v1alpha1 -kind: Resource -metadata: - name: kibana-tests-pipeline - description: Definition of the kibana pipeline - links: - - title: Pipeline - url: https://buildkite.com/elastic/kibana-tests -spec: - type: buildkite-pipeline - owner: group:kibana-tech-leads - system: buildkite - implementation: - apiVersion: buildkite.elastic.dev/v1 - kind: Pipeline - metadata: - name: kibana-tests - description: Pipeline that tests the service integration in various environments - spec: - repository: elastic/kibana - pipeline_file: ./.buildkite/pipelines/quality-gates/pipeline.kibana-tests.yaml - provider_settings: - trigger_mode: none - teams: - kibana-operations: - access_level: MANAGE_BUILD_AND_READ - kibana-release-operators: - access_level: BUILD_AND_READ - cloud-tooling: - access_level: BUILD_AND_READ - everyone: - access_level: READ_ONLY - --- apiVersion: backstage.io/v1alpha1 kind: Component @@ -189,37 +154,6 @@ spec: access_level: MANAGE_BUILD_AND_READ everyone: access_level: READ_ONLY ---- -# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json -apiVersion: backstage.io/v1alpha1 -kind: Resource -metadata: - name: buildkite-pipeline-kibana-emergency-release - description: Emergency release - links: - - title: Pipeline - url: https://buildkite.com/elastic/kibana-emergency-release -spec: - type: buildkite-pipeline - owner: group:kibana-operations - system: buildkite - implementation: - apiVersion: buildkite.elastic.dev/v1 - kind: Pipeline - metadata: - name: kibana / emergency release - spec: - repository: elastic/kibana - provider_settings: - trigger_mode: none - pipeline_file: ".buildkite/pipelines/emergency_release.yml" - teams: - kibana-operations: - access_level: MANAGE_BUILD_AND_READ - kibana-release-operators: - access_level: BUILD_AND_READ - everyone: - access_level: READ_ONLY # Please avoid creating new kibana pipelines in this file to avoid bloating. # Instead, create a new file in the pipeline-resource-definitions directory, and wire it in through the locations.yml file. diff --git a/dev_docs/tutorials/generating_oas_for_http_apis.mdx b/dev_docs/tutorials/generating_oas_for_http_apis.mdx new file mode 100644 index 0000000000000..f9490a1e2867a --- /dev/null +++ b/dev_docs/tutorials/generating_oas_for_http_apis.mdx @@ -0,0 +1,178 @@ +--- +id: kibDevTutorialGeneratingOASForHTTPAPIs +slug: /kibana-dev-docs/genereating-oas-for-http-apis +title: Generating OAS for HTTP APIs +description: This tutorial demonstrates how to generate OpenAPI specification for HTTP APIs. +date: 2024-07-04 +tags: ['kibana', 'onboarding', 'dev', 'architecture', 'http', 'rest', 'api'] +--- + + + If your route declares `access: 'public'` you **must** provide up-to-date OpenAPI specification for it. Docs for these routes get hosted on [on our docs site](https://www.elastic.co/docs/api/doc/serverless) and are used for client integrations. For example: our [Elastic stack terraform provider](https://github.com/elastic/terraform-provider-elasticstack). + + +### Important components + +To get OAS generated for HTTP APIs you must use the following components: + +1. Core's `router` or `router.versioned` for defining HTTP APIs provided via the `core.http` service to all plugins +2. `@kbn/config-schema` request and response schemas, skip to this FAQ for more information + + + Kibana's core platform supports `@kbn/config-schema` as a first-class citizen for various schema purposes: configuration, saved objects, and HTTP API request/response bodies. + + Developers can leverage `@kbn/config-schema` as a single-source of truth for runtime validation, TypeScript interfaces, and OpenAPI specification. + + +### How do I see my HTTP API's OAS? + +In `kibana.dev.yml` add the following configuration: + +```yaml +server.oas.enabled: true +``` + +Launch Kibana and send the following request: + +```bash +curl -s -uelastic:changeme http://localhost:5601/api/oas\?pathStartsWith\=/api/foo +``` + +The value returned should contain the OpenAPI specification for your route and any other path's start with `/api/foo`. + +Other useful query parameters for filtering are: + * `pluginId` - get the OAS for a specific plugin, for example: `@kbn/data-views-plugin` + * `access` - filter for specific access levels: `public` or `internal` are supported + +### Some good practices to consider + +#### 1. Runtime schema definitions + +```typescript +// In server/schemas/v1.ts +import { schema, TypeOf } from '@kbn/config-schema'; + +export const fooResource = schema.object({ + name: schema.string() + // ...and any other fields you may need +}); + +export type FooResource = TypeOf; + +// In common/foo/v1.ts +export type { FooResource } from '../server/schemas/v1'; + +// In common/index.ts expose this as the "latest" schema shape +export type { FooResource } from './latest'; + +export * as fooResourceV1 from '../foo/v1'; +``` + +This example demonstrates how you can organize runtime schemas to prepare for: + +1. Being versioned +2. Have TypeScript references available to client and server code in your plugin + +See for more information on this organizational pattern. + +#### 2. Route definitions + +```typescript +// Somewhere in your plugin's server/routes folder +import { schema, TypeOf } from '@kbn/config-schema'; +import type { FooResource } from '../../../common'; +import { fooResource } from '../../schemas/v1'; + +// Note: this response schema is instantiated lazily to avoid creating schemas that are not needed in most cases! +const fooResourceResponse = () => { + return schema.object({ + id: schema.string({ maxLength: 20 }), + name: schema.string(), + createdAt: schema.string(), + }) +} + +// Note: TypeOf can extract types for lazily instantiated schemas +type FooResourceResponse = TypeOf + +function registerFooRoute(router: IRouter, docLinks: DoclinksStart) { + router.versioned + .post({ + path: '/api/foo', + access: 'public', + summary: 'Create a foo resource' + description: `A foo resource enables baz. See the following [documentation](${docLinks.links.fooResource}).`, + }) + .addVersion({ + version: '2023-10-31', + validate: { + request: { + body: , + }, + response: { + 200: { + body: fooResourceResponse, + }, + }, + }, + }, + async (ctx, req, res) => { + const core = await ctx.core; + const savedObjectsClient = core.savedObjects.client; + const body = req.body; + const foo = await createFoo({ name: body.name }); + // This is our HTTP translation layer to ensure only the necessary fields included + const responseBody: FooResourceResponse = { + id: foo.id, + name: foo.name, + createdAt: foo.createdAt, + }; + return res.ok({ body: responseBody }); + } + ); +} +``` + +#### 3. Generating OAS + +See this section about viewing your HTTP APIs OAS. + +#### 4. Iterating on OAS + +From here, you can develop your route and schema definitions iteratively. After each change the Kibana server will +automatically reload and the latest OAS should reflect the current state of your code! + +For example, let's add a few descriptions to our schema members: + +```typescript +const fooResourceResponse = () => { + return schema.object({ + id: schema.string({ maxLength: 20, meta: { description: 'An unique ID for a foo resource.'} }), + name: schema.string({ meta: { description: 'A human friendly name for a foo resource.'} }), + createdAt: schema.string({ meta: { description: 'The ISO date a foo resource was created.'} }), + }) +} +``` + +This descriptions should now be reflected in the OAS generated for your route. + +#### 5. Publishing OAS + +OAS for public routes are written to the Kibana repo as a snapshot that will ultimately be published. + + + At the time of writing we only capture OAS for a subset of Kibana's HTTP APIs to give teams time to check and improve the quality of generated OAS. + + If you would like OAS for your endpoints to be included in the snapshot, **please reach out to #kibana-core**. + + + +### FAQs + +#### What about runtime validation libary X? +Teams have adopted different runtime validation libraries for their HTTP APIs. Kibana core does not intend to support all runtime validation libraries. + +Reach out to #kibana-core with questions, concerns or issues you may be facing with `@kbn/config-schema` and we will help you find a solution. + +#### What about internal HTTP APIs? +It's possible to generate OpenAPI specification for `access: 'internal'` routes but it is not required. The benefit will largely be for your team's internal reference and for other teams to discover your APIs. If you follow the practices outlined in this tutorial it should be simple to generate OAS for internal routes as well. diff --git a/dev_docs/tutorials/versioning_http_apis.mdx b/dev_docs/tutorials/versioning_http_apis.mdx index b0a4bf899158c..25361ba2ae792 100644 --- a/dev_docs/tutorials/versioning_http_apis.mdx +++ b/dev_docs/tutorials/versioning_http_apis.mdx @@ -3,7 +3,7 @@ id: kibDevTutorialVersioningHTTPAPIs slug: /kibana-dev-docs/versioning-http-apis title: Versioning HTTP APIs description: This tutorial demonstrates how to create or migrate to versionable HTTP APIs. -date: 2023-02-09 +date: 2024-07-04 tags: ['kibana', 'onboarding', 'dev', 'architecture'] --- diff --git a/docs/management/connectors/action-types/gemini.asciidoc b/docs/management/connectors/action-types/gemini.asciidoc index 6ba03f247461a..3c835d981465c 100644 --- a/docs/management/connectors/action-types/gemini.asciidoc +++ b/docs/management/connectors/action-types/gemini.asciidoc @@ -29,7 +29,7 @@ image::management/connectors/images/gemini-connector.png[{gemini} connector] Name:: The name of the connector. API URL:: The {gemini} request URL. -PROJECT ID:: The project which has Vertex AI endpoint enabled. +Project ID:: The project which has Vertex AI endpoint enabled. Region:: The GCP region where the Vertex AI endpoint enabled. Default model:: The GAI model for {gemini} to use. Current support is for the Google Gemini models, defaulting to gemini-1.5-pro-001. The model can be set on a per request basis by including a "model" parameter alongside the request body. Credentials JSON:: The GCP service account JSON file for authentication. @@ -47,7 +47,7 @@ image::management/connectors/images/gemini-params.png[{gemini} params test] The {gemini} actions have the following configuration properties. -Body:: A stringified JSON payload sent to the {gemini} Invoke Model API URL. For example: +Body:: A stringified JSON payload sent to the {gemini} invoke model API. For example: + [source,text] -- @@ -65,7 +65,7 @@ Body:: A stringified JSON payload sent to the {gemini} Invoke Model API URL }) } -- -Model:: An optional string that will overwrite the connector's default model. For +Model:: An optional string that overwrites the connector's default model. [float] [[gemini-connector-networking-configuration]] diff --git a/docs/setup/settings.asciidoc b/docs/setup/settings.asciidoc index cb096ec127154..6df6c8f3c95ee 100644 --- a/docs/setup/settings.asciidoc +++ b/docs/setup/settings.asciidoc @@ -85,6 +85,9 @@ enforce even rudimentary CSP rules, though {kib} is still accessible. This configuration is effectively ignored when <> is enabled. *Default: `true`* +`permissionsPolicy.report_to:`:: +Add sources for the https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissions-Policy[Permissions Policy `report-to` directive]. + [[elasticsearch-maxSockets]] `elasticsearch.maxSockets`:: The maximum number of sockets that can be used for communications with {es}. *Default: `Infinity`* @@ -424,6 +427,12 @@ Refer to the https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissio directives, values, and text format. To disable, set to `null`. *Default:* `camera=(), display-capture=(), fullscreen=(self), geolocation=(), microphone=(), web-share=()` +[[server-securityResponseHeaders-permissionsPolicyReportOnly]] `server.securityResponseHeaders.permissionsPolicyReportOnly`:: +experimental[] Controls whether the https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissions-Policy[`Permissions-Policy-Report-Only`] header +is used in all responses to the client from the {kib} server, and specifies what value is used. Allowed values are any text value or `null`. +Refer to the https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissions-Policy[`Permissions-Policy` documentation] for defined +directives, values, and text format. + [[server-securityResponseHeaders-disableEmbedding]]`server.securityResponseHeaders.disableEmbedding`:: Controls whether the https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy[`Content-Security-Policy`] and https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options[`X-Frame-Options`] headers are configured to disable embedding diff --git a/examples/controls_example/public/app/app.tsx b/examples/controls_example/public/app/app.tsx index aad5dc38df167..d6d8df443c340 100644 --- a/examples/controls_example/public/app/app.tsx +++ b/examples/controls_example/public/app/app.tsx @@ -16,6 +16,7 @@ import { EuiTab, EuiTabs, } from '@elastic/eui'; +import { I18nProvider } from '@kbn/i18n-react'; import React, { useState } from 'react'; import ReactDOM from 'react-dom'; @@ -47,35 +48,37 @@ const App = ({ } return ( - - - - - - + + + - - onSelectedTabChanged(CONTROLS_REFACTOR_TEST)} - isSelected={CONTROLS_REFACTOR_TEST === selectedTabId} - > - Register a new React control - - onSelectedTabChanged(CONTROLS_AS_A_BUILDING_BLOCK)} - isSelected={CONTROLS_AS_A_BUILDING_BLOCK === selectedTabId} - > - Controls as a building block - - + + + + + + onSelectedTabChanged(CONTROLS_REFACTOR_TEST)} + isSelected={CONTROLS_REFACTOR_TEST === selectedTabId} + > + Register a new React control + + onSelectedTabChanged(CONTROLS_AS_A_BUILDING_BLOCK)} + isSelected={CONTROLS_AS_A_BUILDING_BLOCK === selectedTabId} + > + Controls as a building block + + - + - {renderTabContent()} - - - - + {renderTabContent()} + + + + + ); }; diff --git a/examples/controls_example/public/app/react_control_example.tsx b/examples/controls_example/public/app/react_control_example.tsx index ebc6fbba31533..391f41e0ac819 100644 --- a/examples/controls_example/public/app/react_control_example.tsx +++ b/examples/controls_example/public/app/react_control_example.tsx @@ -6,14 +6,16 @@ * Side Public License, v 1. */ +import React, { useEffect, useMemo, useState } from 'react'; +import { BehaviorSubject, combineLatest } from 'rxjs'; + import { EuiButton, EuiButtonGroup, + EuiCallOut, EuiCodeBlock, - EuiEmptyPrompt, EuiFlexGroup, EuiFlexItem, - EuiLoadingSpinner, EuiSpacer, EuiSuperDatePicker, OnTimeChangeProps, @@ -23,27 +25,20 @@ import { CoreStart } from '@kbn/core/public'; import { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; import { ReactEmbeddableRenderer, ViewMode } from '@kbn/embeddable-plugin/public'; import { AggregateQuery, Filter, Query, TimeRange } from '@kbn/es-query'; -import { combineCompatibleChildrenApis, PresentationContainer } from '@kbn/presentation-containers'; +import { combineCompatibleChildrenApis } from '@kbn/presentation-containers'; import { apiPublishesDataLoading, HasUniqueId, PublishesDataLoading, - PublishesUnifiedSearch, - PublishesViewMode, - PublishingSubject, useBatchedPublishingSubjects, - useStateFromPublishingSubject, ViewMode as ViewModeType, } from '@kbn/presentation-publishing'; import { toMountPoint } from '@kbn/react-kibana-mount'; -import React, { useEffect, useMemo, useState } from 'react'; -import useAsync from 'react-use/lib/useAsync'; -import useMount from 'react-use/lib/useMount'; -import { BehaviorSubject, combineLatest } from 'rxjs'; + import { ControlGroupApi } from '../react_controls/control_group/types'; +import { RANGE_SLIDER_CONTROL_TYPE } from '../react_controls/data_controls/range_slider/types'; import { SEARCH_CONTROL_TYPE } from '../react_controls/data_controls/search_control/types'; import { TIMESLIDER_CONTROL_TYPE } from '../react_controls/timeslider_control/types'; -import { RANGE_SLIDER_CONTROL_TYPE } from '../react_controls/data_controls/range_slider/types'; const toggleViewButtons = [ { @@ -104,18 +99,7 @@ const controlGroupPanels = { }, }; -/** - * I am mocking the dashboard API so that the data table embeddble responds to changes to the - * data view publishing subject from the control group - */ -type MockedDashboardApi = PresentationContainer & - PublishesDataLoading & - PublishesViewMode & - PublishesUnifiedSearch & { - setViewMode: (newViewMode: ViewMode) => void; - setChild: (child: HasUniqueId) => void; - unifiedSearchFilters$: PublishingSubject; - }; +const WEB_LOGS_DATA_VIEW_ID = '90943e30-9a47-11e8-b64d-95841ca0b247'; export const ReactControlExample = ({ core, @@ -145,28 +129,34 @@ export const ReactControlExample = ({ const timeslice$ = useMemo(() => { return new BehaviorSubject<[number, number] | undefined>(undefined); }, []); - const [dataLoading, timeRange] = useBatchedPublishingSubjects(dataLoading$, timeRange$); + const viewMode$ = useMemo(() => { + return new BehaviorSubject(ViewMode.EDIT as ViewModeType); + }, []); + const [dataLoading, timeRange, viewMode] = useBatchedPublishingSubjects( + dataLoading$, + timeRange$, + viewMode$ + ); - const [dashboardApi, setDashboardApi] = useState(undefined); const [controlGroupApi, setControlGroupApi] = useState(undefined); - const viewModeSelected = useStateFromPublishingSubject(dashboardApi?.viewMode); + const [dataViewNotFound, setDataViewNotFound] = useState(false); - useMount(() => { - const viewMode = new BehaviorSubject(ViewMode.EDIT as ViewModeType); + const dashboardApi = useMemo(() => { const query$ = new BehaviorSubject(undefined); const children$ = new BehaviorSubject<{ [key: string]: unknown }>({}); - setDashboardApi({ + return { dataLoading: dataLoading$, - viewMode, unifiedSearchFilters$, + viewMode: viewMode$, filters$, query$, timeRange$, timeslice$, children$, - setViewMode: (newViewMode) => viewMode.next(newViewMode), - setChild: (child) => children$.next({ ...children$.getValue(), [child.uuid]: child }), + publishFilters: (newFilters: Filter[] | undefined) => filters$.next(newFilters), + setChild: (child: HasUniqueId) => + children$.next({ ...children$.getValue(), [child.uuid]: child }), removePanel: () => {}, replacePanel: () => { return Promise.resolve(''); @@ -177,8 +167,9 @@ export const ReactControlExample = ({ addNewPanel: () => { return Promise.resolve(undefined); }, - }); - }); + }; + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); useEffect(() => { const subscription = combineCompatibleChildrenApis( @@ -199,13 +190,18 @@ export const ReactControlExample = ({ }; }, [dashboardApi, dataLoading$]); - // TODO: Maybe remove `useAsync` - see https://github.com/elastic/kibana/pull/182842#discussion_r1624909709 - const { - loading, - value: dataViews, - error, - } = useAsync(async () => { - return await dataViewsService.find('kibana_sample_data_logs'); + useEffect(() => { + let ignore = false; + dataViewsService.get(WEB_LOGS_DATA_VIEW_ID).catch(() => { + if (!ignore) { + setDataViewNotFound(true); + } + }); + + return () => { + ignore = true; + }; + // eslint-disable-next-line react-hooks/exhaustive-deps }, []); useEffect(() => { @@ -244,20 +240,16 @@ export const ReactControlExample = ({ }; }, [controlGroupFilters$, filters$, unifiedSearchFilters$]); - if (error || (!dataViews?.[0]?.id && !loading)) - return ( - There was an error!} - body={

{error ? error.message : 'Please add at least one data view.'}

} - /> - ); - - return loading ? ( - - ) : ( + return ( <> + {dataViewNotFound && ( + <> + +

{`Install "Sample web logs" to run example`}

+
+ + + )} { - dashboardApi?.setViewMode(value); + viewMode$.next(value); }} /> @@ -336,12 +328,12 @@ export const ReactControlExample = ({ { name: `controlGroup_${searchControlId}:${SEARCH_CONTROL_TYPE}DataView`, type: 'index-pattern', - id: dataViews?.[0].id!, + id: WEB_LOGS_DATA_VIEW_ID, }, { name: `controlGroup_${rangeSliderControlId}:${RANGE_SLIDER_CONTROL_TYPE}DataView`, type: 'index-pattern', - id: dataViews?.[0].id!, + id: WEB_LOGS_DATA_VIEW_ID, }, ], }), diff --git a/examples/controls_example/public/react_controls/control_error_component.tsx b/examples/controls_example/public/react_controls/control_error_component.tsx index eea1709db6480..bcc30192e02f4 100644 --- a/examples/controls_example/public/react_controls/control_error_component.tsx +++ b/examples/controls_example/public/react_controls/control_error_component.tsx @@ -9,7 +9,7 @@ import React, { useState } from 'react'; import { EuiButtonEmpty, EuiPopover } from '@elastic/eui'; -import { FormattedMessage, I18nProvider } from '@kbn/i18n-react'; +import { FormattedMessage } from '@kbn/i18n-react'; import { Markdown } from '@kbn/shared-ux-markdown'; /** TODO: This file is duplicated from the controls plugin to avoid exporting it */ @@ -24,13 +24,15 @@ export const ControlError = ({ error }: ControlErrorProps) => { const popoverButton = ( setPopoverOpen((open) => !open)} - className={'errorEmbeddableCompact__button'} + className="errorEmbeddableCompact__button controlErrorButton" textProps={{ className: 'errorEmbeddableCompact__text' }} + contentProps={{ className: 'controlErrorButton--content' }} > { ); return ( - - setPopoverOpen(false)} - > - - {errorMessage} - - - + setPopoverOpen(false)} + > + + {errorMessage} + + ); }; diff --git a/examples/controls_example/public/react_controls/control_group/get_control_group_factory.tsx b/examples/controls_example/public/react_controls/control_group/get_control_group_factory.tsx index 31112f5d009a2..8d69d99b8d192 100644 --- a/examples/controls_example/public/react_controls/control_group/get_control_group_factory.tsx +++ b/examples/controls_example/public/react_controls/control_group/get_control_group_factory.tsx @@ -230,7 +230,7 @@ export const getControlGroupEmbeddableFactory = (services: { return { api, - Component: (props, test) => { + Component: () => { const controlsInOrder = useStateFromPublishingSubject(controlOrder); useEffect(() => { diff --git a/examples/controls_example/public/react_controls/control_panel.scss b/examples/controls_example/public/react_controls/control_panel.scss new file mode 100644 index 0000000000000..bd347ac124d4d --- /dev/null +++ b/examples/controls_example/public/react_controls/control_panel.scss @@ -0,0 +1,36 @@ +.controlPanel { + width: 100%; + max-inline-size: 100% !important; + height: calc($euiButtonHeight - 2px); + box-shadow: none !important; + background-color: $euiFormBackgroundColor !important; + + border-radius: 0 $euiBorderRadius $euiBorderRadius 0 !important; + &--roundedBorders { + border-radius: $euiBorderRadius !important; + } + + &--label { + @include euiTextTruncate; + max-width: 40%; + background-color: transparent; + border-radius: $euiBorderRadius; + + margin-left: 0 !important; + padding-left: 0 !important; + } + + &--hideComponent { + display: none; + } + + .controlErrorButton { + width: 100%; + border-radius: 0 $euiBorderRadius $euiBorderRadius 0 !important; + + &--content { + justify-content: left; + padding-left: $euiSizeM; + } + } +} \ No newline at end of file diff --git a/examples/controls_example/public/react_controls/control_panel.tsx b/examples/controls_example/public/react_controls/control_panel.tsx index 7dd8df3596749..a427b3ed1801a 100644 --- a/examples/controls_example/public/react_controls/control_panel.tsx +++ b/examples/controls_example/public/react_controls/control_panel.tsx @@ -10,7 +10,6 @@ import classNames from 'classnames'; import React, { useState } from 'react'; import { EuiFlexItem, EuiFormControlLayout, EuiFormLabel, EuiFormRow, EuiIcon } from '@elastic/eui'; -import { css } from '@emotion/react'; import { ViewMode } from '@kbn/embeddable-plugin/public'; import { i18n } from '@kbn/i18n'; import { @@ -19,15 +18,24 @@ import { useBatchedOptionalPublishingSubjects, } from '@kbn/presentation-publishing'; import { FloatingActions } from '@kbn/presentation-util-plugin/public'; -import { euiThemeVars } from '@kbn/ui-theme'; import { ControlError } from './control_error_component'; import { ControlPanelProps, DefaultControlApi } from './types'; +import './control_panel.scss'; + /** * TODO: Handle dragging */ -const DragHandle = ({ isEditable, controlTitle }: { isEditable: boolean; controlTitle?: string }) => +const DragHandle = ({ + isEditable, + controlTitle, + hideEmptyDragHandle, +}: { + isEditable: boolean; + controlTitle?: string; + hideEmptyDragHandle: boolean; +}) => isEditable ? ( - ) : null; + ) : hideEmptyDragHandle ? null : ( + + ); export const ControlPanel = ({ Component, @@ -115,63 +125,49 @@ export const ControlPanel = - {blockingError ? ( - - - - ) : ( - + + {api?.CustomPrependComponent ? ( - ) : usingTwoLineLayout ? ( - - ) : ( - <> - {' '} - - {panelTitle || defaultPanelTitle} - - - ) - } - > + ) : usingTwoLineLayout ? null : ( + + {panelTitle || defaultPanelTitle} + + )} + + } + > + <> + {blockingError && ( + + )} { if (newApi && !api) setApi(newApi); }} /> - - )} + + diff --git a/examples/controls_example/public/react_controls/control_renderer.tsx b/examples/controls_example/public/react_controls/control_renderer.tsx index 1629673e64f7b..feea0269ee883 100644 --- a/examples/controls_example/public/react_controls/control_renderer.tsx +++ b/examples/controls_example/public/react_controls/control_renderer.tsx @@ -10,7 +10,6 @@ import React, { useImperativeHandle, useMemo } from 'react'; import { BehaviorSubject } from 'rxjs'; import { v4 as generateId } from 'uuid'; -import { SerializedStyles } from '@emotion/react'; import { StateComparators } from '@kbn/presentation-publishing'; import { getControlFactory } from './control_factory_registry'; @@ -68,7 +67,7 @@ export const ControlRenderer = < parentApi ); - return React.forwardRef((props, ref) => { + return React.forwardRef((props, ref) => { // expose the api into the imperative handle useImperativeHandle(ref, () => api, []); return ; diff --git a/examples/controls_example/public/react_controls/data_controls/data_control_editor.tsx b/examples/controls_example/public/react_controls/data_controls/data_control_editor.tsx index 9f0db921b0778..c35462b66ecb2 100644 --- a/examples/controls_example/public/react_controls/data_controls/data_control_editor.tsx +++ b/examples/controls_example/public/react_controls/data_controls/data_control_editor.tsx @@ -30,7 +30,15 @@ import { EuiTitle, EuiToolTip, } from '@elastic/eui'; +import { + ControlWidth, + DEFAULT_CONTROL_GROW, + DEFAULT_CONTROL_WIDTH, +} from '@kbn/controls-plugin/common'; +import { CONTROL_WIDTH_OPTIONS } from '@kbn/controls-plugin/public'; +import { DataControlFieldRegistry } from '@kbn/controls-plugin/public/types'; import { DataViewField } from '@kbn/data-views-plugin/common'; +import { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; import { useBatchedPublishingSubjects } from '@kbn/presentation-publishing'; import { LazyDataViewPicker, @@ -38,13 +46,6 @@ import { withSuspense, } from '@kbn/presentation-util-plugin/public'; -import { - ControlWidth, - DEFAULT_CONTROL_GROW, - DEFAULT_CONTROL_WIDTH, -} from '@kbn/controls-plugin/common'; -import { CONTROL_WIDTH_OPTIONS } from '@kbn/controls-plugin/public'; -import { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; import { getAllControlTypes, getControlFactory } from '../control_factory_registry'; import { ControlGroupApi } from '../control_group/types'; import { ControlStateManager } from '../types'; @@ -69,6 +70,65 @@ export interface ControlEditorProps< const FieldPicker = withSuspense(LazyFieldPicker, null); const DataViewPicker = withSuspense(LazyDataViewPicker, null); +const CompatibleControlTypesComponent = ({ + fieldRegistry, + selectedFieldName, + selectedControlType, + setSelectedControlType, +}: { + fieldRegistry?: DataControlFieldRegistry; + selectedFieldName: string; + selectedControlType?: string; + setSelectedControlType: (type: string) => void; +}) => { + const dataControlFactories = useMemo(() => { + return getAllControlTypes() + .map((type) => getControlFactory(type)) + .filter((factory) => { + return isDataControlFactory(factory); + }); + }, []); + + return ( + + {dataControlFactories.map((factory) => { + const disabled = + fieldRegistry && selectedFieldName + ? !fieldRegistry[selectedFieldName]?.compatibleControlTypes.includes(factory.type) + : true; + const keyPadMenuItem = ( + setSelectedControlType(factory.type)} + label={factory.getDisplayName()} + > + + + ); + + return disabled ? ( + + {keyPadMenuItem} + + ) : ( + keyPadMenuItem + ); + })} + + ); +}; + export const DataControlEditor = ({ controlId, controlType, @@ -139,57 +199,6 @@ export const DataControlEditor = ({ ); }, [selectedFieldName, setControlEditorValid, selectedDataView, selectedControlType]); - const dataControlFactories = useMemo(() => { - return getAllControlTypes() - .map((type) => getControlFactory(type)) - .filter((factory) => { - return isDataControlFactory(factory); - }); - }, []); - - const CompatibleControlTypesComponent = useMemo(() => { - return ( - - {dataControlFactories.map((factory) => { - const disabled = - fieldRegistry && selectedFieldName - ? !fieldRegistry[selectedFieldName]?.compatibleControlTypes.includes(factory.type) - : true; - const keyPadMenuItem = ( - setSelectedControlType(factory.type)} - label={factory.getDisplayName()} - > - - - ); - - return disabled ? ( - - {keyPadMenuItem} - - ) : ( - keyPadMenuItem - ); - })} - - ); - }, [selectedFieldName, fieldRegistry, selectedControlType, controlType, dataControlFactories]); - const CustomSettingsComponent = useMemo(() => { if (!selectedControlType || !selectedFieldName || !fieldRegistry) return; @@ -254,6 +263,7 @@ export const DataControlEditor = ({ selectedDataViewId={selectedDataViewId} onChangeDataViewId={(newDataViewId) => { stateManager.dataViewId.next(newDataViewId); + setSelectedControlType(undefined); }} trigger={{ label: @@ -300,7 +310,15 @@ export const DataControlEditor = ({ - {CompatibleControlTypesComponent} + {/* wrapping in `div` so that focus gets passed properly to the form row */} +
+ +
= ({ step, value, uuid, + ...rest }: Props) => { const rangeSliderRef = useRef(null); @@ -178,6 +179,7 @@ export const RangeSliderControl: FC = ({ max={displayedMax} isLoading={isLoading} inputPopoverProps={{ + ...rest, panelMinWidth: MIN_POPOVER_WIDTH, }} append={ diff --git a/examples/controls_example/public/react_controls/data_controls/range_slider/get_range_slider_control_factory.tsx b/examples/controls_example/public/react_controls/data_controls/range_slider/get_range_slider_control_factory.tsx index 0fea543373341..79670226c6666 100644 --- a/examples/controls_example/public/react_controls/data_controls/range_slider/get_range_slider_control_factory.tsx +++ b/examples/controls_example/public/react_controls/data_controls/range_slider/get_range_slider_control_factory.tsx @@ -209,7 +209,7 @@ export const getRangesliderControlFactory = ( return { api, - Component: () => { + Component: (controlPanelClassNames) => { const [dataLoading, dataViews, fieldName, max, min, selectionHasNotResults, step, value] = useBatchedPublishingSubjects( dataLoading$, @@ -245,6 +245,7 @@ export const getRangesliderControlFactory = ( return ( { + Component: (controlPanelClassNames) => { const currentSearch = useStateFromPublishingSubject(searchString); useEffect(() => { @@ -202,7 +202,7 @@ export const getSearchControlFactory = ({ return ( & // control titles cannot be hidden HasEditCapabilities & - CanClearSelections & PublishesDataViews & PublishesFilters & { setOutputFilter: (filter: Filter | undefined) => void; // a control should only ever output a **single** filter diff --git a/examples/controls_example/public/react_controls/timeslider_control/components/index.scss b/examples/controls_example/public/react_controls/timeslider_control/components/index.scss index 3c7478c097bf7..9fb6510b1a934 100644 --- a/examples/controls_example/public/react_controls/timeslider_control/components/index.scss +++ b/examples/controls_example/public/react_controls/timeslider_control/components/index.scss @@ -1,23 +1,19 @@ - -.timeSlider__popoverOverride { - width: 100%; - max-inline-size: 100% !important; -} - .timeSlider-playToggle:enabled { background-color: $euiColorPrimary !important; } +.timeSlider-prependButton { + background-color: transparent !important; +} + .timeSlider__anchor { width: 100%; height: 100%; box-shadow: none; overflow: hidden; - @include euiFormControlSideBorderRadius($euiFormControlBorderRadius, $side: 'right', $internal: true); .euiText { - background-color: $euiFormBackgroundColor !important; - // background-color: transparent !important; TODO revert to this rule once control group provides background color + background-color: transparent !important; &:hover { text-decoration: underline; diff --git a/examples/controls_example/public/react_controls/timeslider_control/components/time_slider_prepend.tsx b/examples/controls_example/public/react_controls/timeslider_control/components/time_slider_prepend.tsx index 14927317f9e7e..decc50bb8c38e 100644 --- a/examples/controls_example/public/react_controls/timeslider_control/components/time_slider_prepend.tsx +++ b/examples/controls_example/public/react_controls/timeslider_control/components/time_slider_prepend.tsx @@ -6,13 +6,12 @@ * Side Public License, v 1. */ -import { EuiButtonIcon } from '@elastic/eui'; -import React, { FC, useCallback, useState } from 'react'; -import { Observable, Subscription } from 'rxjs'; -import { first } from 'rxjs'; +import { EuiButtonIcon, EuiFlexItem } from '@elastic/eui'; import { ViewMode } from '@kbn/presentation-publishing'; -import { TimeSliderStrings } from './time_slider_strings'; +import React, { FC, useCallback, useState } from 'react'; +import { first, Observable, Subscription } from 'rxjs'; import { PlayButton } from './play_button'; +import { TimeSliderStrings } from './time_slider_strings'; interface Props { onNext: () => void; @@ -66,35 +65,43 @@ export const TimeSliderPrepend: FC = (props: Props) => { }, [props, subscription, timeoutId]); return ( -
- { - onPause(); - props.onPrevious(); - }} - iconType="framePrevious" - color="text" - aria-label={TimeSliderStrings.control.getPreviousButtonAriaLabel()} - data-test-subj="timeSlider-previousTimeWindow" - /> - - { - onPause(); - props.onNext(); - }} - iconType="frameNext" - color="text" - aria-label={TimeSliderStrings.control.getNextButtonAriaLabel()} - data-test-subj="timeSlider-nextTimeWindow" - /> -
+ <> + + { + onPause(); + props.onPrevious(); + }} + iconType="framePrevious" + color="text" + className={'timeSlider-prependButton'} + aria-label={TimeSliderStrings.control.getPreviousButtonAriaLabel()} + data-test-subj="timeSlider-previousTimeWindow" + /> + + + + + + { + onPause(); + props.onNext(); + }} + iconType="frameNext" + color="text" + className={'timeSlider-prependButton'} + aria-label={TimeSliderStrings.control.getNextButtonAriaLabel()} + data-test-subj="timeSlider-nextTimeWindow" + /> + + ); }; diff --git a/examples/controls_example/public/react_controls/timeslider_control/get_timeslider_control_factory.tsx b/examples/controls_example/public/react_controls/timeslider_control/get_timeslider_control_factory.tsx index c264eaf175ff9..b0c7a8e2164f7 100644 --- a/examples/controls_example/public/react_controls/timeslider_control/get_timeslider_control_factory.tsx +++ b/examples/controls_example/public/react_controls/timeslider_control/get_timeslider_control_factory.tsx @@ -53,6 +53,14 @@ export const getTimesliderControlFactory = ( const { timeRangeMeta$, formatDate, cleanupTimeRangeSubscription } = initTimeRangeSubscription(controlGroupApi, services); const timeslice$ = new BehaviorSubject<[number, number] | undefined>(undefined); + const isAnchored$ = new BehaviorSubject(initialState.isAnchored); + const isPopoverOpen$ = new BehaviorSubject(false); + + const timeRangePercentage = initTimeRangePercentage( + initialState, + syncTimesliceWithTimeRangePercentage + ); + function syncTimesliceWithTimeRangePercentage( startPercentage: number | undefined, endPercentage: number | undefined @@ -73,18 +81,16 @@ export const getTimesliderControlFactory = ( ]); setSelectedRange(to - from); } - const timeRangePercentage = initTimeRangePercentage( - initialState, - syncTimesliceWithTimeRangePercentage - ); + function setTimeslice(timeslice?: Timeslice) { timeRangePercentage.setTimeRangePercentage(timeslice, timeRangeMeta$.value); timeslice$.next(timeslice); } - const isAnchored$ = new BehaviorSubject(initialState.isAnchored); + function setIsAnchored(isAnchored: boolean | undefined) { isAnchored$.next(isAnchored); } + let selectedRange: number | undefined; function setSelectedRange(nextSelectedRange?: number) { selectedRange = @@ -176,10 +182,6 @@ export const getTimesliderControlFactory = ( setTimeslice([from, Math.min(to, timeRangeMax)]); } - const isPopoverOpen$ = new BehaviorSubject(false); - function setIsPopoverOpen(value: boolean) { - isPopoverOpen$.next(value); - } const viewModeSubject = getViewModeSubject(controlGroupApi) ?? new BehaviorSubject('view' as ViewMode); @@ -217,6 +219,9 @@ export const getTimesliderControlFactory = ( references: [], }; }, + clearSelections: () => { + setTimeslice(undefined); + }, CustomPrependComponent: () => { const [autoApplySelections, viewMode] = useBatchedPublishingSubjects( controlGroupApi.autoApplySelections$, @@ -229,7 +234,7 @@ export const getTimesliderControlFactory = ( onPrevious={onPrevious} viewMode={viewMode} disablePlayButton={!autoApplySelections} - setIsPopoverOpen={setIsPopoverOpen} + setIsPopoverOpen={(value) => isPopoverOpen$.next(value)} waitForControlOutputConsumersToLoad$={waitForDashboardPanelsToLoad$} /> ); @@ -253,7 +258,7 @@ export const getTimesliderControlFactory = ( return { api, - Component: (controlStyleProps) => { + Component: (controlPanelClassNames) => { const [isAnchored, isPopoverOpen, timeRangeMeta, timeslice] = useBatchedPublishingSubjects(isAnchored$, isPopoverOpen$, timeRangeMeta$, timeslice$); @@ -273,13 +278,12 @@ export const getTimesliderControlFactory = ( return ( { - setIsPopoverOpen(!isPopoverOpen); + isPopoverOpen$.next(!isPopoverOpen); }} formatDate={formatDate} from={from} @@ -287,7 +291,7 @@ export const getTimesliderControlFactory = ( /> } isOpen={isPopoverOpen} - closePopover={() => setIsPopoverOpen(false)} + closePopover={() => isPopoverOpen$.next(false)} panelPaddingSize="s" > & + CanClearSelections & HasType & HasUniqueId & HasSerializableState & HasParentApi & { + /** TODO: Make these non-public as part of https://github.com/elastic/kibana/issues/174961 */ setDataLoading: (loading: boolean) => void; setBlockingError: (error: Error | undefined) => void; }; @@ -90,7 +91,7 @@ export type ControlStateManager = { export interface ControlPanelProps< ApiType extends DefaultControlApi = DefaultControlApi, - PropsType extends {} = { css: SerializedStyles } + PropsType extends {} = { className: string } > { Component: PanelCompatibleComponent; } diff --git a/examples/controls_example/tsconfig.json b/examples/controls_example/tsconfig.json index 5af09dd368b59..76ff8d8a75f03 100644 --- a/examples/controls_example/tsconfig.json +++ b/examples/controls_example/tsconfig.json @@ -31,7 +31,6 @@ "@kbn/react-kibana-mount", "@kbn/content-management-utils", "@kbn/presentation-util-plugin", - "@kbn/ui-theme", "@kbn/core-lifecycle-browser", "@kbn/presentation-panel-plugin", "@kbn/datemath", diff --git a/nav-kibana-dev.docnav.json b/nav-kibana-dev.docnav.json index 60dcb5d054393..050aee9d2e972 100644 --- a/nav-kibana-dev.docnav.json +++ b/nav-kibana-dev.docnav.json @@ -135,6 +135,9 @@ "id": "kibDevTutorialVersioningInterfaces", "label": "Versioning interfaces" }, + { + "id": "kibDevTutorialGeneratingOASForHTTPAPIs" + }, { "id": "kibDevTutorialSubmitPullRequest" }, diff --git a/package.json b/package.json index e4e89ddceb856..c86e3062dd2ea 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "dashboarding" ], "private": true, - "version": "8.15.0", + "version": "8.16.0", "branch": "main", "types": "./kibana.d.ts", "tsdocMetadata": "./build/tsdoc-metadata.json", diff --git a/packages/core/http/core-http-server-internal/index.ts b/packages/core/http/core-http-server-internal/index.ts index b9d4edd8a8628..cf9fe65afdb18 100644 --- a/packages/core/http/core-http-server-internal/index.ts +++ b/packages/core/http/core-http-server-internal/index.ts @@ -27,4 +27,8 @@ export { type ExternalUrlConfigType, } from './src/external_url'; +export type { PermissionsPolicyConfigType } from './src/permissions_policy'; + +export { permissionsPolicyConfig } from './src/permissions_policy'; + export { createCookieSessionStorageFactory } from './src/cookie_session_storage'; diff --git a/packages/core/http/core-http-server-internal/src/http_config.test.ts b/packages/core/http/core-http-server-internal/src/http_config.test.ts index 97da37fe703b0..45efca0b3376b 100644 --- a/packages/core/http/core-http-server-internal/src/http_config.test.ts +++ b/packages/core/http/core-http-server-internal/src/http_config.test.ts @@ -9,6 +9,7 @@ import { v4 as uuidv4 } from 'uuid'; import { config, HttpConfig } from './http_config'; import { cspConfig } from './csp'; +import { permissionsPolicyConfig } from './permissions_policy'; import { ExternalUrlConfig } from './external_url'; const validHostnames = ['www.example.com', '8.8.8.8', '::1', 'localhost', '0.0.0.0']; @@ -654,7 +655,13 @@ describe('HttpConfig', () => { }, }); const rawCspConfig = cspConfig.schema.validate({}); - const httpConfig = new HttpConfig(rawConfig, rawCspConfig, ExternalUrlConfig.DEFAULT); + const rawPermissionsPolicyConfig = permissionsPolicyConfig.schema.validate({}); + const httpConfig = new HttpConfig( + rawConfig, + rawCspConfig, + ExternalUrlConfig.DEFAULT, + rawPermissionsPolicyConfig + ); expect(httpConfig.customResponseHeaders).toEqual({ string: 'string', @@ -668,7 +675,13 @@ describe('HttpConfig', () => { it('defaults restrictInternalApis to false', () => { const rawConfig = config.schema.validate({}, {}); const rawCspConfig = cspConfig.schema.validate({}); - const httpConfig = new HttpConfig(rawConfig, rawCspConfig, ExternalUrlConfig.DEFAULT); + const rawPermissionsPolicyConfig = permissionsPolicyConfig.schema.validate({}); + const httpConfig = new HttpConfig( + rawConfig, + rawCspConfig, + ExternalUrlConfig.DEFAULT, + rawPermissionsPolicyConfig + ); expect(httpConfig.restrictInternalApis).toBe(false); }); }); diff --git a/packages/core/http/core-http-server-internal/src/http_config.ts b/packages/core/http/core-http-server-internal/src/http_config.ts index 746420fad810a..30fee577b9e1f 100644 --- a/packages/core/http/core-http-server-internal/src/http_config.ts +++ b/packages/core/http/core-http-server-internal/src/http_config.ts @@ -23,6 +23,7 @@ import { securityResponseHeadersSchema, } from './security_response_headers_config'; import { CdnConfig } from './cdn_config'; +import { PermissionsPolicyConfigType } from './permissions_policy'; const SECOND = 1000; @@ -343,14 +344,16 @@ export class HttpConfig implements IHttpConfig { constructor( rawHttpConfig: HttpConfigType, rawCspConfig: CspConfigType, - rawExternalUrlConfig: ExternalUrlConfig + rawExternalUrlConfig: ExternalUrlConfig, + rawPermissionsPolicyConfig: PermissionsPolicyConfigType ) { this.autoListen = rawHttpConfig.autoListen; this.host = rawHttpConfig.host; this.port = rawHttpConfig.port; this.cors = rawHttpConfig.cors; const { securityResponseHeaders, disableEmbedding } = parseRawSecurityResponseHeadersConfig( - rawHttpConfig.securityResponseHeaders + rawHttpConfig.securityResponseHeaders, + rawPermissionsPolicyConfig ); this.securityResponseHeaders = securityResponseHeaders; this.customResponseHeaders = Object.entries(rawHttpConfig.customResponseHeaders ?? {}).reduce( diff --git a/packages/core/http/core-http-server-internal/src/http_service.test.ts b/packages/core/http/core-http-server-internal/src/http_service.test.ts index e5ef15594b836..9867e97e0dfd5 100644 --- a/packages/core/http/core-http-server-internal/src/http_service.test.ts +++ b/packages/core/http/core-http-server-internal/src/http_service.test.ts @@ -23,6 +23,7 @@ import { HttpService } from './http_service'; import { HttpConfigType, config } from './http_config'; import { cspConfig } from './csp'; import { externalUrlConfig, ExternalUrlConfig } from './external_url'; +import { permissionsPolicyConfig } from './permissions_policy'; const logger = loggingSystemMock.create(); const env = Env.createDefault(REPO_ROOT, getEnvOptions()); @@ -42,6 +43,7 @@ const createConfigService = (value: Partial = {}) => { configService.setSchema(config.path, config.schema); configService.setSchema(cspConfig.path, cspConfig.schema); configService.setSchema(externalUrlConfig.path, externalUrlConfig.schema); + configService.setSchema(permissionsPolicyConfig.path, permissionsPolicyConfig.schema); return configService; }; const contextPreboot = contextServiceMock.createPrebootContract(); diff --git a/packages/core/http/core-http-server-internal/src/http_service.ts b/packages/core/http/core-http-server-internal/src/http_service.ts index 7e2168d397fee..05e5f48e5666d 100644 --- a/packages/core/http/core-http-server-internal/src/http_service.ts +++ b/packages/core/http/core-http-server-internal/src/http_service.ts @@ -29,6 +29,7 @@ import type { import { Router, RouterOptions } from '@kbn/core-http-router-server-internal'; import { CspConfigType, cspConfig } from './csp'; +import { PermissionsPolicyConfigType, permissionsPolicyConfig } from './permissions_policy'; import { HttpConfig, HttpConfigType, config as httpConfig } from './http_config'; import { HttpServer } from './http_server'; import { HttpsRedirectServer } from './https_redirect_server'; @@ -76,7 +77,13 @@ export class HttpService configService.atPath(httpConfig.path, { ignoreUnchanged: false }), configService.atPath(cspConfig.path), configService.atPath(externalUrlConfig.path), - ]).pipe(map(([http, csp, externalUrl]) => new HttpConfig(http, csp, externalUrl))); + configService.atPath(permissionsPolicyConfig.path), + ]).pipe( + map( + ([http, csp, externalUrl, permissionsPolicy]) => + new HttpConfig(http, csp, externalUrl, permissionsPolicy) + ) + ); const shutdownTimeout$ = this.config$.pipe(map(({ shutdownTimeout }) => shutdownTimeout)); this.prebootServer = new HttpServer(coreContext, 'Preboot', shutdownTimeout$); this.httpServer = new HttpServer(coreContext, 'Kibana', shutdownTimeout$); diff --git a/packages/core/http/core-http-server-internal/src/permissions_policy/config.ts b/packages/core/http/core-http-server-internal/src/permissions_policy/config.ts new file mode 100644 index 0000000000000..f9bfe44807be3 --- /dev/null +++ b/packages/core/http/core-http-server-internal/src/permissions_policy/config.ts @@ -0,0 +1,26 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { TypeOf, schema } from '@kbn/config-schema'; +import type { ServiceConfigDescriptor } from '@kbn/core-base-server-internal'; + +const configSchema = schema.object({ + report_to: schema.arrayOf(schema.string(), { + defaultValue: [], + }), +}); + +/** + * @internal + */ +export type PermissionsPolicyConfigType = TypeOf; + +export const permissionsPolicyConfig: ServiceConfigDescriptor = { + path: 'permissionsPolicy', + schema: configSchema, +}; diff --git a/packages/core/http/core-http-server-internal/src/permissions_policy/index.ts b/packages/core/http/core-http-server-internal/src/permissions_policy/index.ts new file mode 100644 index 0000000000000..a7e4a0057c88c --- /dev/null +++ b/packages/core/http/core-http-server-internal/src/permissions_policy/index.ts @@ -0,0 +1,9 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ +export { permissionsPolicyConfig } from './config'; +export type { PermissionsPolicyConfigType } from './config'; diff --git a/packages/core/http/core-http-server-internal/src/security_response_headers_config.test.ts b/packages/core/http/core-http-server-internal/src/security_response_headers_config.test.ts index d4a0e1e384efc..4eea3469688cd 100644 --- a/packages/core/http/core-http-server-internal/src/security_response_headers_config.test.ts +++ b/packages/core/http/core-http-server-internal/src/security_response_headers_config.test.ts @@ -14,7 +14,7 @@ import { describe('parseRawSecurityResponseHeadersConfig', () => { it('returns default values', () => { const config = schema.validate({}); - const result = parse(config); + const result = parse(config, { report_to: [] }); expect(result.disableEmbedding).toBe(false); expect(result.securityResponseHeaders).toMatchInlineSnapshot(` Object { @@ -30,7 +30,7 @@ describe('parseRawSecurityResponseHeadersConfig', () => { it('a custom value results in the expected Strict-Transport-Security header', () => { const strictTransportSecurity = 'max-age=31536000; includeSubDomains'; const config = schema.validate({ strictTransportSecurity }); - const result = parse(config); + const result = parse(config, { report_to: [] }); expect(result.securityResponseHeaders['Strict-Transport-Security']).toEqual( strictTransportSecurity ); @@ -38,7 +38,7 @@ describe('parseRawSecurityResponseHeadersConfig', () => { it('a null value removes the Strict-Transport-Security header', () => { const config = schema.validate({ strictTransportSecurity: null }); - const result = parse(config); + const result = parse(config, { report_to: [] }); expect(result.securityResponseHeaders['Strict-Transport-Security']).toBeUndefined(); }); }); @@ -47,13 +47,13 @@ describe('parseRawSecurityResponseHeadersConfig', () => { it('a custom value results in the expected X-Content-Type-Options header', () => { const xContentTypeOptions = 'nosniff'; // there is no other valid value to test with const config = schema.validate({ xContentTypeOptions }); - const result = parse(config); + const result = parse(config, { report_to: [] }); expect(result.securityResponseHeaders['X-Content-Type-Options']).toEqual(xContentTypeOptions); }); it('a null value removes the X-Content-Type-Options header', () => { const config = schema.validate({ xContentTypeOptions: null }); - const result = parse(config); + const result = parse(config, { report_to: [] }); expect(result.securityResponseHeaders['X-Content-Type-Options']).toBeUndefined(); }); }); @@ -62,13 +62,13 @@ describe('parseRawSecurityResponseHeadersConfig', () => { it('a custom value results in the expected Referrer-Policy header', () => { const referrerPolicy = 'strict-origin-when-cross-origin'; const config = schema.validate({ referrerPolicy }); - const result = parse(config); + const result = parse(config, { report_to: [] }); expect(result.securityResponseHeaders['Referrer-Policy']).toEqual(referrerPolicy); }); it('a null value removes the Referrer-Policy header', () => { const config = schema.validate({ referrerPolicy: null }); - const result = parse(config); + const result = parse(config, { report_to: [] }); expect(result.securityResponseHeaders['Referrer-Policy']).toBeUndefined(); }); }); @@ -77,21 +77,45 @@ describe('parseRawSecurityResponseHeadersConfig', () => { it('a custom value results in the expected Permissions-Policy header', () => { const permissionsPolicy = 'display-capture=(self)'; const config = schema.validate({ permissionsPolicy }); - const result = parse(config); + const result = parse(config, { report_to: [] }); expect(result.securityResponseHeaders['Permissions-Policy']).toEqual(permissionsPolicy); }); it('a null value removes the Permissions-Policy header', () => { const config = schema.validate({ permissionsPolicy: null }); - const result = parse(config); + const result = parse(config, { report_to: [] }); expect(result.securityResponseHeaders['Permissions-Policy']).toBeUndefined(); }); + + it('includes report-to directive if it is provided', () => { + const config = schema.validate({ permissionsPolicy: 'display-capture=(self)' }); + const result = parse(config, { report_to: ['violations-endpoint'] }); + expect(result.securityResponseHeaders['Permissions-Policy']).toEqual( + 'display-capture=(self);report-to=violations-endpoint' + ); + }); + }); + + describe('permissionsPolicyReportOnly', () => { + it('a custom value results in the expected Permissions-Policy-Report-Only header', () => { + const config = schema.validate({ permissionsPolicyReportOnly: 'display-capture=(self)' }); + const result = parse(config, { report_to: ['violations-endpoint'] }); + expect(result.securityResponseHeaders['Permissions-Policy-Report-Only']).toEqual( + 'display-capture=(self);report-to=violations-endpoint' + ); + }); + + it('includes Permissions-Policy-Report-Only only if report-to directive is set', () => { + const config = schema.validate({ permissionsPolicy: 'display-capture=(self)' }); + const result = parse(config, { report_to: [] }); + expect(result.securityResponseHeaders['Permissions-Policy-Report-Only']).toBeUndefined(); + }); }); describe('disableEmbedding', () => { it('a true value results in the expected X-Frame-Options header and expected disableEmbedding result value', () => { const config = schema.validate({ disableEmbedding: true }); - const result = parse(config); + const result = parse(config, { report_to: [] }); expect(result.securityResponseHeaders['X-Frame-Options']).toMatchInlineSnapshot( `"SAMEORIGIN"` ); @@ -103,7 +127,7 @@ describe('parseRawSecurityResponseHeadersConfig', () => { it('a custom value results in the expected Cross-Origin-Opener-Policy header', () => { const crossOriginOpenerPolicy = 'same-origin-allow-popups'; const config = schema.validate({ crossOriginOpenerPolicy }); - const result = parse(config); + const result = parse(config, { report_to: [] }); expect(result.securityResponseHeaders['Cross-Origin-Opener-Policy']).toEqual( crossOriginOpenerPolicy ); @@ -111,7 +135,7 @@ describe('parseRawSecurityResponseHeadersConfig', () => { it('a null value removes the Cross-Origin-Opener-Policy header', () => { const config = schema.validate({ crossOriginOpenerPolicy: null }); - const result = parse(config); + const result = parse(config, { report_to: [] }); expect(result.securityResponseHeaders['Cross-Origin-Opener-Policy']).toBeUndefined(); }); }); diff --git a/packages/core/http/core-http-server-internal/src/security_response_headers_config.ts b/packages/core/http/core-http-server-internal/src/security_response_headers_config.ts index 7eb6f6e31d574..b62c8aa1ee5d1 100644 --- a/packages/core/http/core-http-server-internal/src/security_response_headers_config.ts +++ b/packages/core/http/core-http-server-internal/src/security_response_headers_config.ts @@ -7,6 +7,7 @@ */ import { schema, TypeOf } from '@kbn/config-schema'; +import { PermissionsPolicyConfigType } from './permissions_policy'; export const securityResponseHeadersSchema = schema.object({ strictTransportSecurity: schema.oneOf([schema.string(), schema.literal(null)], { @@ -38,6 +39,7 @@ export const securityResponseHeadersSchema = schema.object({ defaultValue: 'camera=(), display-capture=(), fullscreen=(self), geolocation=(), microphone=(), web-share=()', }), + permissionsPolicyReportOnly: schema.maybe(schema.oneOf([schema.string(), schema.literal(null)])), disableEmbedding: schema.boolean({ defaultValue: false }), // is used to control X-Frame-Options and CSP headers crossOriginOpenerPolicy: schema.oneOf( // See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy @@ -58,7 +60,8 @@ export const securityResponseHeadersSchema = schema.object({ * @internal */ export function parseRawSecurityResponseHeadersConfig( - raw: TypeOf + raw: TypeOf, + rawPermissionsPolicyConfig: PermissionsPolicyConfigType ) { const securityResponseHeaders: Record = {}; const { disableEmbedding } = raw; @@ -72,9 +75,21 @@ export function parseRawSecurityResponseHeadersConfig( if (raw.referrerPolicy) { securityResponseHeaders['Referrer-Policy'] = raw.referrerPolicy; } + + const reportTo = rawPermissionsPolicyConfig.report_to.length + ? `;report-to=${rawPermissionsPolicyConfig.report_to}` + : ''; + if (raw.permissionsPolicy) { - securityResponseHeaders['Permissions-Policy'] = raw.permissionsPolicy; + securityResponseHeaders['Permissions-Policy'] = `${raw.permissionsPolicy}${reportTo}`; } + + if (raw.permissionsPolicyReportOnly && reportTo) { + securityResponseHeaders[ + 'Permissions-Policy-Report-Only' + ] = `${raw.permissionsPolicyReportOnly}${reportTo}`; + } + if (raw.crossOriginOpenerPolicy) { securityResponseHeaders['Cross-Origin-Opener-Policy'] = raw.crossOriginOpenerPolicy; } diff --git a/packages/core/http/core-http-server-mocks/src/test_utils.ts b/packages/core/http/core-http-server-mocks/src/test_utils.ts index 552306cefbab3..e82fc41170999 100644 --- a/packages/core/http/core-http-server-mocks/src/test_utils.ts +++ b/packages/core/http/core-http-server-mocks/src/test_utils.ts @@ -91,6 +91,11 @@ export const createConfigService = ({ ...csp, }); } + if (path === 'permissionsPolicy') { + return new BehaviorSubject({ + report_to: [], + }); + } throw new Error(`Unexpected config path: ${path}`); }); return configService; diff --git a/packages/core/rendering/core-rendering-server-internal/src/bootstrap/__snapshots__/render_template.test.ts.snap b/packages/core/rendering/core-rendering-server-internal/src/bootstrap/__snapshots__/render_template.test.ts.snap index af1808d9a2019..c1754bce247a9 100644 --- a/packages/core/rendering/core-rendering-server-internal/src/bootstrap/__snapshots__/render_template.test.ts.snap +++ b/packages/core/rendering/core-rendering-server-internal/src/bootstrap/__snapshots__/render_template.test.ts.snap @@ -64,10 +64,12 @@ if (window.__kbnStrictCsp__ && window.__kbnCspNotEnforced__) { var errorTitleEl = document.createElement('h1'); errorTitleEl.innerText = errorTitle; errorTitleEl.style.margin = '20px'; + errorTitleEl.style.color = '#1a1c21'; var errorTextEl = document.createElement('p'); errorTextEl.innerText = errorText; errorTextEl.style.margin = '20px'; + errorTextEl.style.color = '#343741'; var errorReloadEl = document.createElement('button'); errorReloadEl.innerText = errorReload; diff --git a/packages/core/rendering/core-rendering-server-internal/src/bootstrap/render_template.ts b/packages/core/rendering/core-rendering-server-internal/src/bootstrap/render_template.ts index fbb7a4290bf14..7644841ddead0 100644 --- a/packages/core/rendering/core-rendering-server-internal/src/bootstrap/render_template.ts +++ b/packages/core/rendering/core-rendering-server-internal/src/bootstrap/render_template.ts @@ -80,10 +80,12 @@ if (window.__kbnStrictCsp__ && window.__kbnCspNotEnforced__) { var errorTitleEl = document.createElement('h1'); errorTitleEl.innerText = errorTitle; errorTitleEl.style.margin = '20px'; + errorTitleEl.style.color = '#1a1c21'; var errorTextEl = document.createElement('p'); errorTextEl.innerText = errorText; errorTextEl.style.margin = '20px'; + errorTextEl.style.color = '#343741'; var errorReloadEl = document.createElement('button'); errorReloadEl.innerText = errorReload; diff --git a/packages/core/root/core-root-server-internal/src/register_service_config.ts b/packages/core/root/core-root-server-internal/src/register_service_config.ts index be67627720b34..3398c8e7b506e 100644 --- a/packages/core/root/core-root-server-internal/src/register_service_config.ts +++ b/packages/core/root/core-root-server-internal/src/register_service_config.ts @@ -14,7 +14,12 @@ import { coreDeprecationProvider } from '@kbn/core-config-server-internal'; import { nodeConfig } from '@kbn/core-node-server-internal'; import { pidConfig } from '@kbn/core-environment-server-internal'; import { executionContextConfig } from '@kbn/core-execution-context-server-internal'; -import { config as httpConfig, cspConfig, externalUrlConfig } from '@kbn/core-http-server-internal'; +import { + config as httpConfig, + cspConfig, + externalUrlConfig, + permissionsPolicyConfig, +} from '@kbn/core-http-server-internal'; import { config as elasticsearchConfig } from '@kbn/core-elasticsearch-server-internal'; import { config as coreAppConfig } from '@kbn/core-apps-server-internal'; import { opsConfig } from '@kbn/core-metrics-server-internal'; @@ -56,6 +61,7 @@ export function registerServiceConfig(configService: ConfigService) { serverlessConfig, statusConfig, uiSettingsConfig, + permissionsPolicyConfig, ]; configService.addDeprecationProvider(rootConfigPath, coreDeprecationProvider); diff --git a/packages/core/saved-objects/core-saved-objects-server/index.ts b/packages/core/saved-objects/core-saved-objects-server/index.ts index 1ff74905b0b0f..189f28bf2c803 100644 --- a/packages/core/saved-objects/core-saved-objects-server/index.ts +++ b/packages/core/saved-objects/core-saved-objects-server/index.ts @@ -61,6 +61,7 @@ export { ALERTING_CASES_SAVED_OBJECT_INDEX, SECURITY_SOLUTION_SAVED_OBJECT_INDEX, ANALYTICS_SAVED_OBJECT_INDEX, + USAGE_COUNTERS_SAVED_OBJECT_INDEX, ALL_SAVED_OBJECT_INDICES, } from './src/saved_objects_index_pattern'; export type { diff --git a/packages/core/saved-objects/core-saved-objects-server/src/saved_objects_index_pattern.ts b/packages/core/saved-objects/core-saved-objects-server/src/saved_objects_index_pattern.ts index 93160c6b9bd45..e84403e29ca12 100644 --- a/packages/core/saved-objects/core-saved-objects-server/src/saved_objects_index_pattern.ts +++ b/packages/core/saved-objects/core-saved-objects-server/src/saved_objects_index_pattern.ts @@ -19,6 +19,8 @@ export const INGEST_SAVED_OBJECT_INDEX = `${MAIN_SAVED_OBJECT_INDEX}_ingest`; export const ALERTING_CASES_SAVED_OBJECT_INDEX = `${MAIN_SAVED_OBJECT_INDEX}_alerting_cases`; export const SECURITY_SOLUTION_SAVED_OBJECT_INDEX = `${MAIN_SAVED_OBJECT_INDEX}_security_solution`; export const ANALYTICS_SAVED_OBJECT_INDEX = `${MAIN_SAVED_OBJECT_INDEX}_analytics`; +export const USAGE_COUNTERS_SAVED_OBJECT_INDEX = `${MAIN_SAVED_OBJECT_INDEX}_usage_counters`; + export const ALL_SAVED_OBJECT_INDICES = [ MAIN_SAVED_OBJECT_INDEX, TASK_MANAGER_SAVED_OBJECT_INDEX, @@ -26,4 +28,5 @@ export const ALL_SAVED_OBJECT_INDICES = [ INGEST_SAVED_OBJECT_INDEX, SECURITY_SOLUTION_SAVED_OBJECT_INDEX, ANALYTICS_SAVED_OBJECT_INDEX, + USAGE_COUNTERS_SAVED_OBJECT_INDEX, ]; diff --git a/packages/deeplinks/observability/locators/index.ts b/packages/deeplinks/observability/locators/index.ts index 73fe4b64bce9f..67e79ecb577ea 100644 --- a/packages/deeplinks/observability/locators/index.ts +++ b/packages/deeplinks/observability/locators/index.ts @@ -6,7 +6,8 @@ * Side Public License, v 1. */ +export * from './dataset_quality'; export * from './logs_explorer'; export * from './observability_logs_explorer'; export * from './observability_onboarding'; -export * from './dataset_quality'; +export * from './uptime'; diff --git a/packages/deeplinks/observability/locators/uptime.ts b/packages/deeplinks/observability/locators/uptime.ts new file mode 100644 index 0000000000000..a0f42801b6610 --- /dev/null +++ b/packages/deeplinks/observability/locators/uptime.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 { SerializableRecord } from '@kbn/utility-types'; + +export const uptimeOverviewLocatorID = 'UPTIME_OVERVIEW_LOCATOR'; + +export interface UptimeOverviewLocatorInfraParams extends SerializableRecord { + ip?: string; + host?: string; + container?: string; + pod?: string; +} + +export interface UptimeOverviewLocatorParams extends SerializableRecord { + dateRangeStart?: string; + dateRangeEnd?: string; + search?: string; +} diff --git a/packages/kbn-alerting-types/circuit_breaker_message_header.ts b/packages/kbn-alerting-types/circuit_breaker_message_header.ts new file mode 100644 index 0000000000000..c88a76ff9ef7e --- /dev/null +++ b/packages/kbn-alerting-types/circuit_breaker_message_header.ts @@ -0,0 +1,9 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export const errorMessageHeader = 'Error validating circuit breaker'; diff --git a/packages/kbn-alerting-types/index.ts b/packages/kbn-alerting-types/index.ts index 1b82df61427e1..c54289d2ecc65 100644 --- a/packages/kbn-alerting-types/index.ts +++ b/packages/kbn-alerting-types/index.ts @@ -15,3 +15,4 @@ export * from './r_rule_types'; export * from './rule_types'; export * from './alerting_framework_health_types'; export * from './action_variable'; +export * from './circuit_breaker_message_header'; diff --git a/packages/kbn-alerting-types/rule_types.ts b/packages/kbn-alerting-types/rule_types.ts index c0cb500740cb8..cc960592ae209 100644 --- a/packages/kbn-alerting-types/rule_types.ts +++ b/packages/kbn-alerting-types/rule_types.ts @@ -237,7 +237,7 @@ export interface Rule { revision: number; running?: boolean | null; viewInAppRelativeUrl?: string; - alertDelay?: AlertDelay; + alertDelay?: AlertDelay | null; } export type SanitizedRule = Omit< diff --git a/packages/kbn-alerts-ui-shared/src/common/apis/create_rule/transform_create_rule_body.ts b/packages/kbn-alerts-ui-shared/src/common/apis/create_rule/transform_create_rule_body.ts index 261641d2c18a9..9baae0267d22f 100644 --- a/packages/kbn-alerts-ui-shared/src/common/apis/create_rule/transform_create_rule_body.ts +++ b/packages/kbn-alerts-ui-shared/src/common/apis/create_rule/transform_create_rule_body.ts @@ -11,7 +11,7 @@ import { CreateRuleBody } from './types'; export const transformCreateRuleBody: RewriteResponseCase = ({ ruleTypeId, - actions, + actions = [], alertDelay, ...res }): any => ({ diff --git a/packages/kbn-alerts-ui-shared/src/common/apis/create_rule/types.ts b/packages/kbn-alerts-ui-shared/src/common/apis/create_rule/types.ts index dfea6fb77de32..e40059d5e6860 100644 --- a/packages/kbn-alerts-ui-shared/src/common/apis/create_rule/types.ts +++ b/packages/kbn-alerts-ui-shared/src/common/apis/create_rule/types.ts @@ -14,10 +14,10 @@ export interface CreateRuleBody enabled: Rule['enabled']; consumer: Rule['consumer']; tags: Rule['tags']; - throttle?: Rule['throttle']; params: Rule['params']; schedule: Rule['schedule']; actions: Rule['actions']; + throttle?: Rule['throttle']; notifyWhen?: Rule['notifyWhen']; alertDelay?: Rule['alertDelay']; } diff --git a/packages/kbn-alerts-ui-shared/src/common/apis/fetch_ui_health_status/types.ts b/packages/kbn-alerts-ui-shared/src/common/apis/fetch_ui_health_status/types.ts index bf0ee678d8949..3fe902a11583a 100644 --- a/packages/kbn-alerts-ui-shared/src/common/apis/fetch_ui_health_status/types.ts +++ b/packages/kbn-alerts-ui-shared/src/common/apis/fetch_ui_health_status/types.ts @@ -13,3 +13,12 @@ export interface UiHealthCheck { export interface UiHealthCheckResponse { isAlertsAvailable: boolean; } + +export const healthCheckErrors = { + ALERTS_ERROR: 'alertsError', + ENCRYPTION_ERROR: 'encryptionError', + API_KEYS_DISABLED_ERROR: 'apiKeysDisabledError', + API_KEYS_AND_ENCRYPTION_ERROR: 'apiKeysAndEncryptionError', +} as const; + +export type HealthCheckErrors = typeof healthCheckErrors[keyof typeof healthCheckErrors]; diff --git a/packages/kbn-alerts-ui-shared/src/common/apis/index.ts b/packages/kbn-alerts-ui-shared/src/common/apis/index.ts new file mode 100644 index 0000000000000..8d7e06d6d6f41 --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/common/apis/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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export * from './fetch_ui_health_status'; +export * from './fetch_alerting_framework_health'; +export * from './fetch_ui_config'; +export * from './create_rule'; +export * from './update_rule'; +export * from './resolve_rule'; diff --git a/packages/kbn-alerts-ui-shared/src/common/apis/update_rule/transform_update_rule_body.ts b/packages/kbn-alerts-ui-shared/src/common/apis/update_rule/transform_update_rule_body.ts index f0493a1c164f2..959cf5c7cdd3c 100644 --- a/packages/kbn-alerts-ui-shared/src/common/apis/update_rule/transform_update_rule_body.ts +++ b/packages/kbn-alerts-ui-shared/src/common/apis/update_rule/transform_update_rule_body.ts @@ -10,7 +10,7 @@ import { RewriteResponseCase } from '@kbn/actions-types'; import { UpdateRuleBody } from './types'; export const transformUpdateRuleBody: RewriteResponseCase = ({ - actions, + actions = [], alertDelay, ...res }): any => ({ diff --git a/packages/kbn-alerts-ui-shared/src/common/apis/update_rule/types.ts b/packages/kbn-alerts-ui-shared/src/common/apis/update_rule/types.ts index bca55de97dc29..dac91fa2076f6 100644 --- a/packages/kbn-alerts-ui-shared/src/common/apis/update_rule/types.ts +++ b/packages/kbn-alerts-ui-shared/src/common/apis/update_rule/types.ts @@ -12,9 +12,9 @@ export interface UpdateRuleBody name: Rule['name']; tags: Rule['tags']; schedule: Rule['schedule']; - throttle?: Rule['throttle']; params: Rule['params']; actions: Rule['actions']; + throttle?: Rule['throttle']; notifyWhen?: Rule['notifyWhen']; alertDelay?: Rule['alertDelay']; } diff --git a/packages/kbn-alerts-ui-shared/src/common/apis/update_rule/update_rule.test.ts b/packages/kbn-alerts-ui-shared/src/common/apis/update_rule/update_rule.test.ts index 64f9bf686ba2d..28a0c39c998df 100644 --- a/packages/kbn-alerts-ui-shared/src/common/apis/update_rule/update_rule.test.ts +++ b/packages/kbn-alerts-ui-shared/src/common/apis/update_rule/update_rule.test.ts @@ -118,7 +118,7 @@ describe('updateRule', () => { Array [ "/api/alerting/rule/12%2F3", Object { - "body": "{\\"name\\":\\"test\\",\\"tags\\":[\\"foo\\"],\\"schedule\\":{\\"interval\\":\\"1m\\"},\\"params\\":{},\\"actions\\":[{\\"group\\":\\"default\\",\\"id\\":\\"2\\",\\"params\\":{},\\"frequency\\":{\\"notify_when\\":\\"onActionGroupChange\\",\\"throttle\\":null,\\"summary\\":false},\\"use_alert_data_for_template\\":false},{\\"id\\":\\".test-system-action\\",\\"params\\":{}}],\\"alert_delay\\":{\\"active\\":10}}", + "body": "{\\"name\\":\\"test\\",\\"tags\\":[\\"foo\\"],\\"schedule\\":{\\"interval\\":\\"1m\\"},\\"params\\":{},\\"actions\\":[],\\"alert_delay\\":{\\"active\\":10}}", }, ] `); diff --git a/packages/kbn-alerts-ui-shared/src/common/apis/update_rule/update_rule.ts b/packages/kbn-alerts-ui-shared/src/common/apis/update_rule/update_rule.ts index bae2fc52f5180..7d9dbf71211ee 100644 --- a/packages/kbn-alerts-ui-shared/src/common/apis/update_rule/update_rule.ts +++ b/packages/kbn-alerts-ui-shared/src/common/apis/update_rule/update_rule.ts @@ -21,6 +21,14 @@ export const UPDATE_FIELDS: Array = [ 'schedule', 'params', 'alertDelay', +]; + +export const UPDATE_FIELDS_WITH_ACTIONS: Array = [ + 'name', + 'tags', + 'schedule', + 'params', + 'alertDelay', 'actions', ]; diff --git a/packages/kbn-alerts-ui-shared/src/common/hooks/index.ts b/packages/kbn-alerts-ui-shared/src/common/hooks/index.ts index 322d466b715ab..c0d4c5586b1e2 100644 --- a/packages/kbn-alerts-ui-shared/src/common/hooks/index.ts +++ b/packages/kbn-alerts-ui-shared/src/common/hooks/index.ts @@ -8,8 +8,10 @@ export * from './use_load_rule_types_query'; export * from './use_load_ui_config'; +export * from './use_health_check'; export * from './use_load_ui_health'; export * from './use_load_alerting_framework_health'; export * from './use_create_rule'; export * from './use_update_rule'; export * from './use_resolve_rule'; +export * from './use_get_alerts_group_aggregations_query'; diff --git a/packages/kbn-alerts-ui-shared/src/common/hooks/use_get_alerts_group_aggregations_query.test.tsx b/packages/kbn-alerts-ui-shared/src/common/hooks/use_get_alerts_group_aggregations_query.test.tsx new file mode 100644 index 0000000000000..f4566ffed2e45 --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/common/hooks/use_get_alerts_group_aggregations_query.test.tsx @@ -0,0 +1,89 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React from 'react'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import { renderHook } from '@testing-library/react-hooks/dom'; +import type { HttpStart } from '@kbn/core-http-browser'; +import { ToastsStart } from '@kbn/core-notifications-browser'; +import { AlertConsumers } from '@kbn/rule-data-utils'; + +import { useGetAlertsGroupAggregationsQuery } from './use_get_alerts_group_aggregations_query'; +import { waitFor } from '@testing-library/react'; +import { BASE_RAC_ALERTS_API_PATH } from '../constants'; + +const queryClient = new QueryClient({ + defaultOptions: { + queries: { + retry: false, + }, + }, +}); + +const wrapper = ({ children }: { children: Node }) => ( + {children} +); + +const mockHttp = { + post: jest.fn(), +}; +const http = mockHttp as unknown as HttpStart; + +const mockToasts = { + addDanger: jest.fn(), +}; +const toasts = mockToasts as unknown as ToastsStart; + +const params = { + featureIds: [AlertConsumers.STACK_ALERTS], + groupByField: 'kibana.alert.rule.name', +}; + +describe('useAlertsGroupAggregationsQuery', () => { + afterEach(() => { + jest.clearAllMocks(); + }); + + test('displays toast on errors', async () => { + mockHttp.post.mockRejectedValue(new Error('An error occurred')); + renderHook( + () => + useGetAlertsGroupAggregationsQuery({ + params, + enabled: true, + toasts, + http, + }), + { wrapper } + ); + + await waitFor(() => expect(mockToasts.addDanger).toHaveBeenCalled()); + }); + + test('calls API endpoint with the correct body', async () => { + renderHook( + () => + useGetAlertsGroupAggregationsQuery({ + params, + enabled: true, + toasts, + http, + }), + { wrapper } + ); + + await waitFor(() => + expect(mockHttp.post).toHaveBeenLastCalledWith( + `${BASE_RAC_ALERTS_API_PATH}/_group_aggregations`, + { + body: JSON.stringify(params), + } + ) + ); + }); +}); diff --git a/packages/kbn-alerts-ui-shared/src/common/hooks/use_get_alerts_group_aggregations_query.ts b/packages/kbn-alerts-ui-shared/src/common/hooks/use_get_alerts_group_aggregations_query.ts new file mode 100644 index 0000000000000..eab5b9ac510fa --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/common/hooks/use_get_alerts_group_aggregations_query.ts @@ -0,0 +1,80 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { i18n } from '@kbn/i18n'; +import { useQuery } from '@tanstack/react-query'; +import type { HttpStart } from '@kbn/core-http-browser'; +import type { ToastsStart } from '@kbn/core-notifications-browser'; +import { SearchResponseBody } from '@elastic/elasticsearch/lib/api/types'; +import { AlertConsumers } from '@kbn/rule-data-utils'; +import type { + AggregationsAggregationContainer, + QueryDslQueryContainer, + SortCombinations, +} from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import { BASE_RAC_ALERTS_API_PATH } from '../constants'; + +export interface UseGetAlertsGroupAggregationsQueryProps { + http: HttpStart; + toasts: ToastsStart; + enabled?: boolean; + params: { + featureIds: AlertConsumers[]; + groupByField: string; + aggregations?: Record; + filters?: QueryDslQueryContainer[]; + sort?: SortCombinations[]; + pageIndex?: number; + pageSize?: number; + }; +} + +/** + * Fetches alerts aggregations for a given groupByField. + * + * Some default aggregations are applied: + * - `groupByFields`, to get the buckets based on the provided grouping field, + * - `unitsCount`, to count the number of alerts in each bucket, + * - `unitsCount`, to count the total number of alerts targeted by the query, + * - `groupsCount`, to count the total number of groups. + * + * The provided `aggregations` are applied within `groupByFields`. Here the `groupByField` runtime + * field can be used to perform grouping-based aggregations. + * + * Applies alerting RBAC through featureIds. + */ +export const useGetAlertsGroupAggregationsQuery = ({ + http, + toasts, + enabled = true, + params, +}: UseGetAlertsGroupAggregationsQueryProps) => { + const onErrorFn = (error: Error) => { + if (error) { + toasts.addDanger( + i18n.translate( + 'alertsUIShared.hooks.useFindAlertsQuery.unableToFetchAlertsGroupingAggregations', + { + defaultMessage: 'Unable to fetch alerts grouping aggregations', + } + ) + ); + } + }; + + return useQuery({ + queryKey: ['getAlertsGroupAggregations', JSON.stringify(params)], + queryFn: () => + http.post>(`${BASE_RAC_ALERTS_API_PATH}/_group_aggregations`, { + body: JSON.stringify(params), + }), + onError: onErrorFn, + refetchOnWindowFocus: false, + enabled, + }); +}; diff --git a/packages/kbn-alerts-ui-shared/src/common/hooks/use_health_check.test.tsx b/packages/kbn-alerts-ui-shared/src/common/hooks/use_health_check.test.tsx new file mode 100644 index 0000000000000..b46a44d928a7c --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/common/hooks/use_health_check.test.tsx @@ -0,0 +1,175 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React from 'react'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import { renderHook } from '@testing-library/react-hooks/dom'; +import { waitFor } from '@testing-library/react'; +import type { HttpStart } from '@kbn/core-http-browser'; + +import { useHealthCheck } from './use_health_check'; +import { healthCheckErrors } from '../apis'; + +jest.mock('../apis/fetch_ui_health_status/fetch_ui_health_status', () => ({ + fetchUiHealthStatus: jest.fn(), +})); + +jest.mock('../apis/fetch_alerting_framework_health/fetch_alerting_framework_health', () => ({ + fetchAlertingFrameworkHealth: jest.fn(), +})); + +const { fetchUiHealthStatus } = jest.requireMock( + '../apis/fetch_ui_health_status/fetch_ui_health_status' +); +const { fetchAlertingFrameworkHealth } = jest.requireMock( + '../apis/fetch_alerting_framework_health/fetch_alerting_framework_health' +); + +const queryClient = new QueryClient(); + +const wrapper = ({ children }: { children: Node }) => ( + {children} +); + +const httpMock = jest.fn(); + +describe('useHealthCheck', () => { + afterEach(() => { + jest.clearAllMocks(); + }); + + test('should return null if there are no errors', async () => { + fetchUiHealthStatus.mockResolvedValueOnce({ + isRulesAvailable: true, + }); + + fetchAlertingFrameworkHealth.mockResolvedValueOnce({ + isSufficientlySecure: true, + hasPermanentEncryptionKey: true, + }); + + const { result } = renderHook( + () => { + return useHealthCheck({ + http: httpMock as unknown as HttpStart, + }); + }, + { wrapper } + ); + + await waitFor(() => { + return expect(result.current.isLoading).toEqual(false); + }); + + expect(result.current.error).toBeNull(); + }); + + test('should return alerts error if rules are not available', async () => { + fetchUiHealthStatus.mockResolvedValueOnce({ + isRulesAvailable: false, + }); + + fetchAlertingFrameworkHealth.mockResolvedValueOnce({ + isSufficientlySecure: true, + hasPermanentEncryptionKey: true, + }); + + const { result } = renderHook( + () => { + return useHealthCheck({ + http: httpMock as unknown as HttpStart, + }); + }, + { wrapper } + ); + + await waitFor(() => { + return expect(result.current.isLoading).toEqual(false); + }); + + expect(result.current.error).toEqual(healthCheckErrors.ALERTS_ERROR); + }); + + test('should return API keys encryption error if not secure or has no encryption key', async () => { + fetchUiHealthStatus.mockResolvedValueOnce({ + isRulesAvailable: true, + }); + + fetchAlertingFrameworkHealth.mockResolvedValueOnce({ + isSufficientlySecure: false, + hasPermanentEncryptionKey: false, + }); + + const { result } = renderHook( + () => { + return useHealthCheck({ + http: httpMock as unknown as HttpStart, + }); + }, + { wrapper } + ); + + await waitFor(() => { + return expect(result.current.isLoading).toEqual(false); + }); + + expect(result.current.error).toEqual(healthCheckErrors.API_KEYS_AND_ENCRYPTION_ERROR); + }); + + test('should return encryption error if has no encryption key', async () => { + fetchUiHealthStatus.mockResolvedValueOnce({ + isRulesAvailable: true, + }); + + fetchAlertingFrameworkHealth.mockResolvedValueOnce({ + isSufficientlySecure: true, + hasPermanentEncryptionKey: false, + }); + + const { result } = renderHook( + () => { + return useHealthCheck({ + http: httpMock as unknown as HttpStart, + }); + }, + { wrapper } + ); + + await waitFor(() => { + return expect(result.current.isLoading).toEqual(false); + }); + + expect(result.current.error).toEqual(healthCheckErrors.ENCRYPTION_ERROR); + }); + + test('should return API keys disabled error is API keys are disabled', async () => { + fetchUiHealthStatus.mockResolvedValueOnce({ + isRulesAvailable: true, + }); + + fetchAlertingFrameworkHealth.mockResolvedValueOnce({ + isSufficientlySecure: false, + hasPermanentEncryptionKey: true, + }); + + const { result } = renderHook( + () => { + return useHealthCheck({ + http: httpMock as unknown as HttpStart, + }); + }, + { wrapper } + ); + + await waitFor(() => { + return expect(result.current.isLoading).toEqual(false); + }); + + expect(result.current.error).toEqual(healthCheckErrors.API_KEYS_DISABLED_ERROR); + }); +}); diff --git a/packages/kbn-alerts-ui-shared/src/common/hooks/use_health_check.tsx b/packages/kbn-alerts-ui-shared/src/common/hooks/use_health_check.tsx new file mode 100644 index 0000000000000..fd3355b38f2e4 --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/common/hooks/use_health_check.tsx @@ -0,0 +1,101 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { useMemo } from 'react'; +import type { HttpStart } from '@kbn/core-http-browser'; +import { useLoadAlertingFrameworkHealth } from './use_load_alerting_framework_health'; +import { useLoadUiHealth } from './use_load_ui_health'; +import { healthCheckErrors, HealthCheckErrors } from '../apis'; + +export interface UseHealthCheckProps { + http: HttpStart; +} + +export interface UseHealthCheckResult { + isLoading: boolean; + healthCheckError: HealthCheckErrors | null; +} + +export interface HealthStatus { + isRulesAvailable: boolean; + isSufficientlySecure: boolean; + hasPermanentEncryptionKey: boolean; +} + +export const useHealthCheck = (props: UseHealthCheckProps) => { + const { http } = props; + + const { + data: uiHealth, + isLoading: isLoadingUiHealth, + isInitialLoading: isInitialLoadingUiHealth, + } = useLoadUiHealth({ http }); + + const { + data: alertingFrameworkHealth, + isLoading: isLoadingAlertingFrameworkHealth, + isInitialLoading: isInitialLoadingAlertingFrameworkHealth, + } = useLoadAlertingFrameworkHealth({ http }); + + const isLoading = useMemo(() => { + return isLoadingUiHealth || isLoadingAlertingFrameworkHealth; + }, [isLoadingUiHealth, isLoadingAlertingFrameworkHealth]); + + const isInitialLoading = useMemo(() => { + return isInitialLoadingUiHealth || isInitialLoadingAlertingFrameworkHealth; + }, [isInitialLoadingUiHealth, isInitialLoadingAlertingFrameworkHealth]); + + const alertingHealth: HealthStatus | null = useMemo(() => { + if (isLoading || isInitialLoading || !uiHealth || !alertingFrameworkHealth) { + return null; + } + if (!uiHealth.isRulesAvailable) { + return { + ...uiHealth, + isSufficientlySecure: false, + hasPermanentEncryptionKey: false, + }; + } + return { + ...uiHealth, + isSufficientlySecure: alertingFrameworkHealth.isSufficientlySecure, + hasPermanentEncryptionKey: alertingFrameworkHealth.hasPermanentEncryptionKey, + }; + }, [isLoading, isInitialLoading, uiHealth, alertingFrameworkHealth]); + + const error = useMemo(() => { + const { + isRulesAvailable, + isSufficientlySecure = false, + hasPermanentEncryptionKey = false, + } = alertingHealth || {}; + + if (isLoading || isInitialLoading || !alertingHealth) { + return null; + } + if (isSufficientlySecure && hasPermanentEncryptionKey) { + return null; + } + if (!isRulesAvailable) { + return healthCheckErrors.ALERTS_ERROR; + } + if (!isSufficientlySecure && !hasPermanentEncryptionKey) { + return healthCheckErrors.API_KEYS_AND_ENCRYPTION_ERROR; + } + if (!hasPermanentEncryptionKey) { + return healthCheckErrors.ENCRYPTION_ERROR; + } + return healthCheckErrors.API_KEYS_DISABLED_ERROR; + }, [isLoading, isInitialLoading, alertingHealth]); + + return { + isLoading, + isInitialLoading, + error, + }; +}; diff --git a/packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_types_query.ts b/packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_types_query.ts index c89837cee6f68..ef95fcb81b6e7 100644 --- a/packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_types_query.ts +++ b/packages/kbn-alerts-ui-shared/src/common/hooks/use_load_rule_types_query.ts @@ -108,7 +108,7 @@ export const useLoadRuleTypesQuery = ({ return { ruleTypesState: { - initialLoad: isLoading || isInitialLoading, + isInitialLoad: isInitialLoading, isLoading: isLoading || isFetching, data: filteredIndex, error, diff --git a/packages/kbn-alerts-ui-shared/src/common/types/action_types.ts b/packages/kbn-alerts-ui-shared/src/common/types/action_types.ts index 9fd39aebfc270..a377ca33b6fae 100644 --- a/packages/kbn-alerts-ui-shared/src/common/types/action_types.ts +++ b/packages/kbn-alerts-ui-shared/src/common/types/action_types.ts @@ -11,7 +11,7 @@ import type { RuleActionParam, ActionVariable } from '@kbn/alerting-types'; import { IconType, RecursivePartial } from '@elastic/eui'; import { PublicMethodsOf } from '@kbn/utility-types'; import { TypeRegistry } from '../type_registry'; -import { RuleFormErrors } from '.'; +import { RuleFormParamsErrors } from './rule_types'; export interface GenericValidationResult { errors: Record, string[] | unknown>; @@ -77,7 +77,7 @@ export interface ActionParamsProps { actionParams: Partial; index: number; editAction: (key: string, value: RuleActionParam, index: number) => void; - errors: RuleFormErrors; + errors: RuleFormParamsErrors; ruleTypeId?: string; messageVariables?: ActionVariable[]; defaultMessage?: string; diff --git a/packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts b/packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts index 26c854d95b00e..c68345cd96c69 100644 --- a/packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts +++ b/packages/kbn-alerts-ui-shared/src/common/types/rule_types.ts @@ -30,8 +30,18 @@ export type RuleTypeIndexWithDescriptions = Map export type RuleTypeParams = Record; -export interface RuleFormErrors { - [key: string]: string | string[] | RuleFormErrors; +export interface RuleFormBaseErrors { + name?: string[]; + interval?: string[]; + consumer?: string[]; + ruleTypeId?: string[]; + actionConnectors?: string[]; + alertDelay?: string[]; + tags?: string[]; +} + +export interface RuleFormParamsErrors { + [key: string]: string | string[] | RuleFormParamsErrors; } export interface MinimumScheduleInterval { @@ -81,7 +91,7 @@ export interface RuleTypeParamsExpressionProps< value: SanitizedRule[Prop] | null ) => void; onChangeMetaData: (metadata: MetaData) => void; - errors: RuleFormErrors; + errors: RuleFormParamsErrors; defaultActionGroupId: string; actionGroups: Array>; metadata?: MetaData; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/constants.ts b/packages/kbn-alerts-ui-shared/src/rule_form/constants.ts new file mode 100644 index 0000000000000..fb3235e73df44 --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/constants.ts @@ -0,0 +1,59 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { + ES_QUERY_ID, + OBSERVABILITY_THRESHOLD_RULE_TYPE_ID, + ML_ANOMALY_DETECTION_RULE_TYPE_ID, + RuleCreationValidConsumer, + AlertConsumers, +} from '@kbn/rule-data-utils'; +import { RuleFormData } from './types'; + +export const DEFAULT_RULE_INTERVAL = '1m'; + +export const ALERTING_FEATURE_ID = 'alerts'; + +export const GET_DEFAULT_FORM_DATA = ({ + ruleTypeId, + name, + consumer, + schedule, +}: { + ruleTypeId: RuleFormData['ruleTypeId']; + name: RuleFormData['name']; + consumer: RuleFormData['consumer']; + schedule?: RuleFormData['schedule']; +}) => { + return { + tags: [], + params: {}, + schedule: schedule || { + interval: DEFAULT_RULE_INTERVAL, + }, + consumer, + ruleTypeId, + name, + }; +}; + +export const MULTI_CONSUMER_RULE_TYPE_IDS = [ + OBSERVABILITY_THRESHOLD_RULE_TYPE_ID, + ES_QUERY_ID, + ML_ANOMALY_DETECTION_RULE_TYPE_ID, +]; + +export const DEFAULT_VALID_CONSUMERS: RuleCreationValidConsumer[] = [ + AlertConsumers.LOGS, + AlertConsumers.INFRASTRUCTURE, + 'stackAlerts', + 'alerts', +]; + +export const createRuleRoute = '/rule/create/:ruleTypeId' as const; +export const editRuleRoute = '/rule/edit/:id' as const; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/create_rule_form.tsx b/packages/kbn-alerts-ui-shared/src/rule_form/create_rule_form.tsx new file mode 100644 index 0000000000000..e2725c1db54cf --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/create_rule_form.tsx @@ -0,0 +1,170 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React, { useCallback } from 'react'; +import { EuiLoadingElastic } from '@elastic/eui'; +import { toMountPoint } from '@kbn/react-kibana-mount'; +import type { RuleCreationValidConsumer } from '@kbn/rule-data-utils'; +import type { RuleFormData, RuleFormPlugins } from './types'; +import { ALERTING_FEATURE_ID, DEFAULT_VALID_CONSUMERS, GET_DEFAULT_FORM_DATA } from './constants'; +import { RuleFormStateProvider } from './rule_form_state'; +import { useCreateRule } from '../common/hooks'; +import { RulePage } from './rule_page'; +import { + RuleFormCircuitBreakerError, + RuleFormErrorPromptWrapper, + RuleFormHealthCheckError, + RuleFormRuleTypeError, +} from './rule_form_errors'; +import { useLoadDependencies } from './hooks/use_load_dependencies'; +import { + getInitialConsumer, + getInitialMultiConsumer, + getInitialSchedule, + parseRuleCircuitBreakerErrorMessage, +} from './utils'; +import { RULE_CREATE_SUCCESS_TEXT, RULE_CREATE_ERROR_TEXT } from './translations'; + +export interface CreateRuleFormProps { + ruleTypeId: string; + plugins: RuleFormPlugins; + consumer?: string; + multiConsumerSelection?: RuleCreationValidConsumer | null; + hideInterval?: boolean; + validConsumers?: RuleCreationValidConsumer[]; + filteredRuleTypes?: string[]; + shouldUseRuleProducer?: boolean; + returnUrl: string; +} + +export const CreateRuleForm = (props: CreateRuleFormProps) => { + const { + ruleTypeId, + plugins, + consumer = ALERTING_FEATURE_ID, + multiConsumerSelection, + validConsumers = DEFAULT_VALID_CONSUMERS, + filteredRuleTypes = [], + shouldUseRuleProducer = false, + returnUrl, + } = props; + + const { http, docLinks, notification, ruleTypeRegistry, i18n, theme } = plugins; + const { toasts } = notification; + + const { mutate, isLoading: isSaving } = useCreateRule({ + http, + onSuccess: ({ name }) => { + toasts.addSuccess(RULE_CREATE_SUCCESS_TEXT(name)); + }, + onError: (error) => { + const message = parseRuleCircuitBreakerErrorMessage( + error.body?.message || RULE_CREATE_ERROR_TEXT + ); + toasts.addDanger({ + title: message.summary, + ...(message.details && { + text: toMountPoint( + {message.details}, + { i18n, theme } + ), + }), + }); + }, + }); + + const { isInitialLoading, ruleType, ruleTypeModel, uiConfig, healthCheckError } = + useLoadDependencies({ + http, + toasts: notification.toasts, + ruleTypeRegistry, + ruleTypeId, + consumer, + validConsumers, + filteredRuleTypes, + }); + + const onSave = useCallback( + (newFormData: RuleFormData) => { + mutate({ + formData: { + name: newFormData.name, + ruleTypeId: newFormData.ruleTypeId!, + enabled: true, + consumer: newFormData.consumer, + tags: newFormData.tags, + params: newFormData.params, + schedule: newFormData.schedule, + // TODO: Will add actions in the actions PR + actions: [], + notifyWhen: newFormData.notifyWhen, + alertDelay: newFormData.alertDelay, + }, + }); + }, + [mutate] + ); + + if (isInitialLoading) { + return ( + + + + ); + } + + if (!ruleType || !ruleTypeModel) { + return ( + + + + ); + } + + if (healthCheckError) { + return ( + + + + ); + } + + return ( +
+ + + +
+ ); +}; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/edit_rule_form.tsx b/packages/kbn-alerts-ui-shared/src/rule_form/edit_rule_form.tsx new file mode 100644 index 0000000000000..c5ce99b21cc30 --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/edit_rule_form.tsx @@ -0,0 +1,134 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React, { useCallback } from 'react'; +import { EuiLoadingElastic } from '@elastic/eui'; +import { toMountPoint } from '@kbn/react-kibana-mount'; +import type { RuleFormData, RuleFormPlugins } from './types'; +import { RuleFormStateProvider } from './rule_form_state'; +import { useUpdateRule } from '../common/hooks'; +import { RulePage } from './rule_page'; +import { RuleFormHealthCheckError } from './rule_form_errors/rule_form_health_check_error'; +import { useLoadDependencies } from './hooks/use_load_dependencies'; +import { + RuleFormCircuitBreakerError, + RuleFormErrorPromptWrapper, + RuleFormResolveRuleError, + RuleFormRuleTypeError, +} from './rule_form_errors'; +import { RULE_EDIT_ERROR_TEXT, RULE_EDIT_SUCCESS_TEXT } from './translations'; +import { parseRuleCircuitBreakerErrorMessage } from './utils'; + +export interface EditRuleFormProps { + id: string; + plugins: RuleFormPlugins; + returnUrl: string; +} + +export const EditRuleForm = (props: EditRuleFormProps) => { + const { id, plugins, returnUrl } = props; + const { http, notification, docLinks, ruleTypeRegistry, i18n, theme } = plugins; + const { toasts } = notification; + + const { mutate, isLoading: isSaving } = useUpdateRule({ + http, + onSuccess: ({ name }) => { + toasts.addSuccess(RULE_EDIT_SUCCESS_TEXT(name)); + }, + onError: (error) => { + const message = parseRuleCircuitBreakerErrorMessage( + error.body?.message || RULE_EDIT_ERROR_TEXT + ); + toasts.addDanger({ + title: message.summary, + ...(message.details && { + text: toMountPoint( + {message.details}, + { i18n, theme } + ), + }), + }); + }, + }); + + const { isInitialLoading, ruleType, ruleTypeModel, uiConfig, healthCheckError, fetchedFormData } = + useLoadDependencies({ + http, + toasts: notification.toasts, + ruleTypeRegistry, + id, + }); + + const onSave = useCallback( + (newFormData: RuleFormData) => { + mutate({ + id, + formData: { + name: newFormData.name, + tags: newFormData.tags, + schedule: newFormData.schedule, + params: newFormData.params, + // TODO: Will add actions in the actions PR + actions: [], + notifyWhen: newFormData.notifyWhen, + alertDelay: newFormData.alertDelay, + }, + }); + }, + [id, mutate] + ); + + if (isInitialLoading) { + return ( + + + + ); + } + + if (!ruleType || !ruleTypeModel) { + return ( + + + + ); + } + + if (!fetchedFormData) { + return ( + + + + ); + } + + if (healthCheckError) { + return ( + + + + ); + } + + return ( +
+ + + +
+ ); +}; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/hooks/index.ts b/packages/kbn-alerts-ui-shared/src/rule_form/hooks/index.ts new file mode 100644 index 0000000000000..49e2882aaede7 --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/hooks/index.ts @@ -0,0 +1,10 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export * from './use_rule_form_dispatch'; +export * from './use_rule_form_state'; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/hooks/use_load_dependencies.test.tsx b/packages/kbn-alerts-ui-shared/src/rule_form/hooks/use_load_dependencies.test.tsx new file mode 100644 index 0000000000000..abafebd94774e --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/hooks/use_load_dependencies.test.tsx @@ -0,0 +1,317 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React from 'react'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import { renderHook } from '@testing-library/react-hooks/dom'; +import { waitFor } from '@testing-library/react'; +import type { HttpStart } from '@kbn/core-http-browser'; +import type { ToastsStart } from '@kbn/core-notifications-browser'; + +import { useLoadDependencies } from './use_load_dependencies'; +import { RuleTypeRegistryContract } from '../../common'; + +jest.mock('../../common/hooks/use_load_ui_config', () => ({ + useLoadUiConfig: jest.fn(), +})); + +jest.mock('../../common/hooks/use_health_check', () => ({ + useHealthCheck: jest.fn(), +})); + +jest.mock('../../common/hooks/use_resolve_rule', () => ({ + useResolveRule: jest.fn(), +})); + +jest.mock('../../common/hooks/use_load_rule_types_query', () => ({ + useLoadRuleTypesQuery: jest.fn(), +})); + +jest.mock('../utils/get_authorized_rule_types', () => ({ + getAvailableRuleTypes: jest.fn(), +})); + +const { useLoadUiConfig } = jest.requireMock('../../common/hooks/use_load_ui_config'); +const { useHealthCheck } = jest.requireMock('../../common/hooks/use_health_check'); +const { useResolveRule } = jest.requireMock('../../common/hooks/use_resolve_rule'); +const { useLoadRuleTypesQuery } = jest.requireMock('../../common/hooks/use_load_rule_types_query'); +const { getAvailableRuleTypes } = jest.requireMock('../utils/get_authorized_rule_types'); + +const uiConfigMock = { + isUsingSecurity: true, + minimumScheduleInterval: { + value: '1m', + enforce: true, + }, +}; + +const ruleMock = { + params: {}, + consumer: 'stackAlerts', + schedule: { interval: '1m' }, + tags: [], + name: 'test', + enabled: true, + throttle: null, + ruleTypeId: '.index-threshold', + actions: [], + notifyWhen: 'onActionGroupChange', + alertDelay: { + active: 10, + }, +}; + +useLoadUiConfig.mockReturnValue({ + isLoading: false, + isInitialLoading: false, + data: uiConfigMock, +}); + +useHealthCheck.mockReturnValue({ + isLoading: false, + isInitialLoading: false, + error: null, +}); + +useResolveRule.mockReturnValue({ + isLoading: false, + isInitialLoading: false, + data: ruleMock, +}); + +const indexThresholdRuleType = { + enabledInLicense: true, + recoveryActionGroup: { + id: 'recovered', + name: 'Recovered', + }, + actionGroups: [], + defaultActionGroupId: 'threshold met', + minimumLicenseRequired: 'basic', + authorizedConsumers: { + stackAlerts: { + read: true, + all: true, + }, + }, + ruleTaskTimeout: '5m', + doesSetRecoveryContext: true, + hasAlertsMappings: true, + hasFieldsForAAD: false, + id: '.index-threshold', + name: 'Index threshold', + category: 'management', + producer: 'stackAlerts', + alerts: {}, + is_exportable: true, +}; + +const indexThresholdRuleTypeModel = { + id: '.index-threshold', + description: 'Alert when an aggregated query meets the threshold.', + iconClass: 'alert', + ruleParamsExpression: () =>
, + defaultActionMessage: + 'Rule {{rule.name}} is active for group {{context.group}}:\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}}\n- Timestamp: {{context.date}}', + requiresAppContext: false, +}; + +const ruleTypeIndex = new Map(); + +ruleTypeIndex.set('.index-threshold', indexThresholdRuleType); + +useLoadRuleTypesQuery.mockReturnValue({ + ruleTypesState: { + isLoading: false, + isInitialLoading: false, + data: ruleTypeIndex, + }, +}); + +getAvailableRuleTypes.mockReturnValue([ + { + ruleType: indexThresholdRuleType, + ruleTypeModel: indexThresholdRuleTypeModel, + }, +]); + +const queryClient = new QueryClient(); + +const wrapper = ({ children }: { children: Node }) => ( + {children} +); + +const httpMock = jest.fn(); +const toastsMock = jest.fn(); + +const ruleTypeRegistryMock: RuleTypeRegistryContract = { + has: jest.fn(), + register: jest.fn(), + get: jest.fn(), + list: jest.fn(), +}; + +describe('useLoadDependencies', () => { + afterEach(() => { + jest.clearAllMocks(); + }); + + test('loads all rule form dependencies', async () => { + const { result } = renderHook( + () => { + return useLoadDependencies({ + http: httpMock as unknown as HttpStart, + toasts: toastsMock as unknown as ToastsStart, + ruleTypeRegistry: ruleTypeRegistryMock, + }); + }, + { wrapper } + ); + + await waitFor(() => { + return expect(result.current.isLoading).toEqual(false); + }); + + expect(result.current).toEqual({ + isLoading: false, + isInitialLoading: false, + ruleType: indexThresholdRuleType, + ruleTypeModel: indexThresholdRuleTypeModel, + uiConfig: uiConfigMock, + healthCheckError: null, + fetchedFormData: ruleMock, + }); + }); + + test('should call useLoadRuleTypesQuery with fitlered rule types', async () => { + const { result } = renderHook( + () => { + return useLoadDependencies({ + http: httpMock as unknown as HttpStart, + toasts: toastsMock as unknown as ToastsStart, + ruleTypeRegistry: ruleTypeRegistryMock, + filteredRuleTypes: ['test-rule-type'], + }); + }, + { wrapper } + ); + + await waitFor(() => { + return expect(result.current.isInitialLoading).toEqual(false); + }); + + expect(useLoadRuleTypesQuery).toBeCalledWith({ + http: httpMock, + toasts: toastsMock, + filteredRuleTypes: ['test-rule-type'], + }); + }); + + test('should call getAvailableRuleTypes with the correct params', async () => { + const { result } = renderHook( + () => { + return useLoadDependencies({ + http: httpMock as unknown as HttpStart, + toasts: toastsMock as unknown as ToastsStart, + ruleTypeRegistry: ruleTypeRegistryMock, + validConsumers: ['stackAlerts', 'logs'], + consumer: 'logs', + }); + }, + { wrapper } + ); + + await waitFor(() => { + return expect(result.current.isInitialLoading).toEqual(false); + }); + + expect(getAvailableRuleTypes).toBeCalledWith({ + consumer: 'logs', + ruleTypeRegistry: ruleTypeRegistryMock, + ruleTypes: [indexThresholdRuleType], + validConsumers: ['stackAlerts', 'logs'], + }); + }); + + test('should call resolve rule with the correct params', async () => { + const { result } = renderHook( + () => { + return useLoadDependencies({ + http: httpMock as unknown as HttpStart, + toasts: toastsMock as unknown as ToastsStart, + ruleTypeRegistry: ruleTypeRegistryMock, + id: 'test-rule-id', + }); + }, + { wrapper } + ); + + await waitFor(() => { + return expect(result.current.isInitialLoading).toEqual(false); + }); + + expect(useResolveRule).toBeCalledWith({ + http: httpMock, + id: 'test-rule-id', + }); + }); + + test('should use the ruleTypeId passed in if creating a rule', async () => { + useResolveRule.mockReturnValue({ + isLoading: false, + isInitialLoading: false, + data: null, + }); + + const { result } = renderHook( + () => { + return useLoadDependencies({ + http: httpMock as unknown as HttpStart, + toasts: toastsMock as unknown as ToastsStart, + ruleTypeRegistry: ruleTypeRegistryMock, + ruleTypeId: '.index-threshold', + consumer: 'stackAlerts', + }); + }, + { wrapper } + ); + + await waitFor(() => { + return expect(result.current.isInitialLoading).toEqual(false); + }); + + expect(result.current.ruleType).toEqual(indexThresholdRuleType); + }); + + test('should not use ruleTypeId if it is editing a rule', async () => { + useResolveRule.mockReturnValue({ + isLoading: false, + isInitialLoading: false, + data: null, + }); + + const { result } = renderHook( + () => { + return useLoadDependencies({ + http: httpMock as unknown as HttpStart, + toasts: toastsMock as unknown as ToastsStart, + ruleTypeRegistry: ruleTypeRegistryMock, + id: 'rule-id', + consumer: 'stackAlerts', + }); + }, + { wrapper } + ); + + await waitFor(() => { + return expect(result.current.isInitialLoading).toEqual(false); + }); + + expect(result.current.ruleType).toBeFalsy(); + }); +}); diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/hooks/use_load_dependencies.ts b/packages/kbn-alerts-ui-shared/src/rule_form/hooks/use_load_dependencies.ts new file mode 100644 index 0000000000000..1432a4f2a4d11 --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/hooks/use_load_dependencies.ts @@ -0,0 +1,134 @@ +/* + * Copyright 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 { HttpStart } from '@kbn/core-http-browser'; +import type { ToastsStart } from '@kbn/core-notifications-browser'; +import { RuleCreationValidConsumer } from '@kbn/rule-data-utils'; +import { useMemo } from 'react'; +import { + useHealthCheck, + useLoadRuleTypesQuery, + useLoadUiConfig, + useResolveRule, +} from '../../common/hooks'; +import { getAvailableRuleTypes } from '../utils'; +import { RuleTypeRegistryContract } from '../../common'; + +export interface UseLoadDependencies { + http: HttpStart; + toasts: ToastsStart; + ruleTypeRegistry: RuleTypeRegistryContract; + consumer?: string; + id?: string; + ruleTypeId?: string; + validConsumers?: RuleCreationValidConsumer[]; + filteredRuleTypes?: string[]; +} + +export const useLoadDependencies = (props: UseLoadDependencies) => { + const { + http, + toasts, + ruleTypeRegistry, + consumer, + validConsumers, + id, + ruleTypeId, + filteredRuleTypes = [], + } = props; + + const { + data: uiConfig, + isLoading: isLoadingUiConfig, + isInitialLoading: isInitialLoadingUiConfig, + } = useLoadUiConfig({ http }); + + const { + error: healthCheckError, + isLoading: isLoadingHealthCheck, + isInitialLoading: isInitialLoadingHealthCheck, + } = useHealthCheck({ http }); + + const { + data: fetchedFormData, + isLoading: isLoadingRule, + isInitialLoading: isInitialLoadingRule, + } = useResolveRule({ http, id }); + + const { + ruleTypesState: { + data: ruleTypeIndex, + isLoading: isLoadingRuleTypes, + isInitialLoad: isInitialLoadingRuleTypes, + }, + } = useLoadRuleTypesQuery({ + http, + toasts, + filteredRuleTypes, + }); + + const computedRuleTypeId = useMemo(() => { + return fetchedFormData?.ruleTypeId || ruleTypeId; + }, [fetchedFormData, ruleTypeId]); + + const authorizedRuleTypeItems = useMemo(() => { + const computedConsumer = consumer || fetchedFormData?.consumer; + if (!computedConsumer) { + return []; + } + return getAvailableRuleTypes({ + consumer: computedConsumer, + ruleTypes: [...ruleTypeIndex.values()], + ruleTypeRegistry, + validConsumers, + }); + }, [consumer, ruleTypeIndex, ruleTypeRegistry, validConsumers, fetchedFormData]); + + const [ruleType, ruleTypeModel] = useMemo(() => { + const item = authorizedRuleTypeItems.find(({ ruleType: rt }) => { + return rt.id === computedRuleTypeId; + }); + + return [item?.ruleType, item?.ruleTypeModel]; + }, [authorizedRuleTypeItems, computedRuleTypeId]); + + const isLoading = useMemo(() => { + if (id === undefined) { + return isLoadingUiConfig || isLoadingHealthCheck || isLoadingRuleTypes; + } + return isLoadingUiConfig || isLoadingHealthCheck || isLoadingRule || isLoadingRuleTypes; + }, [id, isLoadingUiConfig, isLoadingHealthCheck, isLoadingRule, isLoadingRuleTypes]); + + const isInitialLoading = useMemo(() => { + if (id === undefined) { + return isInitialLoadingUiConfig || isInitialLoadingHealthCheck || isInitialLoadingRuleTypes; + } + return ( + isInitialLoadingUiConfig || + isInitialLoadingHealthCheck || + isInitialLoadingRule || + isInitialLoadingRuleTypes + ); + }, [ + id, + isInitialLoadingUiConfig, + isInitialLoadingHealthCheck, + isInitialLoadingRule, + isInitialLoadingRuleTypes, + ]); + + return { + isLoading, + isInitialLoading: !!isInitialLoading, + ruleType, + ruleTypeModel, + uiConfig, + healthCheckError, + fetchedFormData, + }; +}; diff --git a/src/plugins/usage_collection/common/ui_counters.ts b/packages/kbn-alerts-ui-shared/src/rule_form/hooks/use_rule_form_dispatch.ts similarity index 51% rename from src/plugins/usage_collection/common/ui_counters.ts rename to packages/kbn-alerts-ui-shared/src/rule_form/hooks/use_rule_form_dispatch.ts index 3ed6e44aee419..be2bef9a63f64 100644 --- a/src/plugins/usage_collection/common/ui_counters.ts +++ b/packages/kbn-alerts-ui-shared/src/rule_form/hooks/use_rule_form_dispatch.ts @@ -6,18 +6,9 @@ * Side Public License, v 1. */ -export const serializeUiCounterName = ({ - appName, - eventName, -}: { - appName: string; - eventName: string; -}) => { - return `${appName}:${eventName}`; -}; +import { useContext } from 'react'; +import { RuleFormReducerContext } from '../rule_form_state/rule_form_state_context'; -export const deserializeUiCounterName = (key: string) => { - const [appName, ...restKey] = key.split(':'); - const eventName = restKey.join(':'); - return { appName, eventName }; +export const useRuleFormDispatch = () => { + return useContext(RuleFormReducerContext); }; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/hooks/use_rule_form_state.ts b/packages/kbn-alerts-ui-shared/src/rule_form/hooks/use_rule_form_state.ts new file mode 100644 index 0000000000000..d9770609a9ae3 --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/hooks/use_rule_form_state.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 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 { useContext } from 'react'; +import { RuleFormStateContext } from '../rule_form_state/rule_form_state_context'; + +export const useRuleFormState = () => { + return useContext(RuleFormStateContext); +}; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/index.ts b/packages/kbn-alerts-ui-shared/src/rule_form/index.ts index 3751b1848d23e..842efff5d4fe3 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/index.ts +++ b/packages/kbn-alerts-ui-shared/src/rule_form/index.ts @@ -9,5 +9,8 @@ export * from './rule_definition'; export * from './rule_actions'; export * from './rule_details'; +export * from './rule_page'; +export * from './rule_form'; export * from './utils'; export * from './types'; +export * from './constants'; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_alert_delay.test.tsx b/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_alert_delay.test.tsx index 0613fa616de2c..c7b228bcbec27 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_alert_delay.test.tsx +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_alert_delay.test.tsx @@ -12,45 +12,56 @@ import { RuleAlertDelay } from './rule_alert_delay'; const mockOnChange = jest.fn(); +jest.mock('../hooks', () => ({ + useRuleFormState: jest.fn(), + useRuleFormDispatch: jest.fn(), +})); + +const { useRuleFormState, useRuleFormDispatch } = jest.requireMock('../hooks'); + describe('RuleAlertDelay', () => { + beforeEach(() => { + useRuleFormState.mockReturnValue({ + formData: { + alertDelay: { + active: 5, + }, + }, + }); + useRuleFormDispatch.mockReturnValue(mockOnChange); + }); + afterEach(() => { jest.resetAllMocks(); }); test('Renders correctly', () => { - render( - - ); - + render(); expect(screen.getByTestId('alertDelay')).toBeInTheDocument(); }); test('Should handle input change', () => { - render( - - ); - + render(); fireEvent.change(screen.getByTestId('alertDelayInput'), { target: { value: '3', }, }); - expect(mockOnChange).toHaveBeenCalledWith('alertDelay', { active: 3 }); + expect(mockOnChange).toHaveBeenCalledWith({ + type: 'setAlertDelay', + payload: { active: 3 }, + }); }); test('Should only allow integers as inputs', async () => { - render(); + useRuleFormState.mockReturnValue({ + formData: { + alertDelay: null, + }, + }); + + render(); ['-', '+', 'e', 'E', '.', 'a', '01'].forEach((char) => { fireEvent.change(screen.getByTestId('alertDelayInput'), { @@ -63,36 +74,33 @@ describe('RuleAlertDelay', () => { }); test('Should call onChange with null if empty string is typed', () => { - render( - - ); - + render(); fireEvent.change(screen.getByTestId('alertDelayInput'), { target: { value: '', }, }); - expect(mockOnChange).toHaveBeenCalledWith('alertDelay', null); + expect(mockOnChange).toHaveBeenCalledWith({ + type: 'setAlertDelay', + payload: null, + }); }); test('Should display error when input is invalid', () => { - render( - - ); + }, + }, + baseErrors: { + alertDelay: 'Alert delay must be greater than 1.', + }, + }); + + render(); + expect(screen.getByTestId('alertDelayInput')).toBeInvalid(); expect(screen.getByText('Alert delay must be greater than 1.')).toBeInTheDocument(); }); }); diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_alert_delay.tsx b/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_alert_delay.tsx index 7d2a226d073b6..623fbfaaae5d0 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_alert_delay.tsx +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_alert_delay.tsx @@ -8,32 +8,43 @@ import React, { useCallback } from 'react'; import { EuiFieldNumber, EuiFormRow } from '@elastic/eui'; -import { ALERT_DELAY_TITLE_PREFIX, ALERT_DELAY_TITLE_SUFFIX } from '../translations'; -import { RuleFormErrors, Rule, RuleTypeParams } from '../../common'; +import { + ALERT_DELAY_TITLE_PREFIX, + ALERT_DELAY_TITLE_SUFFIX, + ALERT_DELAY_TITLE, +} from '../translations'; +import { useRuleFormState, useRuleFormDispatch } from '../hooks'; const INTEGER_REGEX = /^[1-9][0-9]*$/; const INVALID_KEYS = ['-', '+', '.', 'e', 'E']; -export interface RuleAlertDelayProps { - alertDelay?: Rule['alertDelay'] | null; - errors?: RuleFormErrors; - onChange: (property: string, value: unknown) => void; -} +export const RuleAlertDelay = () => { + const { formData, baseErrors } = useRuleFormState(); -export const RuleAlertDelay = (props: RuleAlertDelayProps) => { - const { alertDelay, errors = {}, onChange } = props; + const dispatch = useRuleFormDispatch(); + + const { alertDelay } = formData; const onAlertDelayChange = useCallback( (e: React.ChangeEvent) => { - const value = e.target.value.trim(); + if (!e.target.validity.valid) { + return; + } + const value = e.target.value; if (value === '') { - onChange('alertDelay', null); + dispatch({ + type: 'setAlertDelay', + payload: null, + }); } else if (INTEGER_REGEX.test(value)) { const parsedValue = parseInt(value, 10); - onChange('alertDelay', { active: parsedValue }); + dispatch({ + type: 'setAlertDelay', + payload: { active: parsedValue }, + }); } }, - [onChange] + [dispatch] ); const onKeyDown = useCallback((e: React.KeyboardEvent) => { @@ -45,8 +56,9 @@ export const RuleAlertDelay = (props: RuleAlertDelayProps) => { return ( 0} - error={errors.alertDelay} + label={ALERT_DELAY_TITLE} + isInvalid={!!baseErrors?.alertDelay?.length} + error={baseErrors?.alertDelay} data-test-subj="alertDelay" display="rowCompressed" > @@ -57,7 +69,7 @@ export const RuleAlertDelay = (props: RuleAlertDelayProps) => { name="alertDelay" data-test-subj="alertDelayInput" prepend={[ALERT_DELAY_TITLE_PREFIX]} - isInvalid={errors.alertDelay?.length > 0} + isInvalid={!!baseErrors?.alertDelay?.length} append={ALERT_DELAY_TITLE_SUFFIX} onChange={onAlertDelayChange} onKeyDown={onKeyDown} diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_consumer_selection.test.tsx b/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_consumer_selection.test.tsx index 1a1a577d5d684..26bf94744f6ba 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_consumer_selection.test.tsx +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_consumer_selection.test.tsx @@ -14,78 +14,72 @@ import { RuleConsumerSelection } from './rule_consumer_selection'; const mockOnChange = jest.fn(); const mockConsumers: RuleCreationValidConsumer[] = ['logs', 'infrastructure', 'stackAlerts']; +jest.mock('../hooks', () => ({ + useRuleFormState: jest.fn(), + useRuleFormDispatch: jest.fn(), +})); + +const { useRuleFormState, useRuleFormDispatch } = jest.requireMock('../hooks'); + describe('RuleConsumerSelection', () => { - test('Renders correctly', () => { - render( - - ); + beforeEach(() => { + useRuleFormState.mockReturnValue({ + multiConsumerSelection: 'stackAlerts', + }); + useRuleFormDispatch.mockReturnValue(mockOnChange); + }); + afterEach(() => { + jest.resetAllMocks(); + }); + + test('Renders correctly', () => { + render(); expect(screen.getByTestId('ruleConsumerSelection')).toBeInTheDocument(); }); test('Should default to the selected consumer', () => { - render( - - ); - + render(); expect(screen.getByTestId('comboBoxSearchInput')).toHaveValue('Stack Rules'); }); it('Should not display the initial selected consumer if it is not a selectable option', () => { - render( - - ); + useRuleFormState.mockReturnValue({ + multiConsumerSelection: 'logs', + }); + render(); expect(screen.getByTestId('comboBoxSearchInput')).toHaveValue(''); }); it('should display nothing if there is only 1 consumer to select', () => { - render( - - ); + useRuleFormState.mockReturnValue({ + multiConsumerSelection: null, + }); + render(); expect(screen.queryByTestId('ruleConsumerSelection')).not.toBeInTheDocument(); }); it('should be able to select logs and call onChange', () => { - render( - - ); + useRuleFormState.mockReturnValue({ + multiConsumerSelection: null, + }); + render(); fireEvent.click(screen.getByTestId('comboBoxToggleListButton')); fireEvent.click(screen.getByTestId('ruleConsumerSelectionOption-logs')); - expect(mockOnChange).toHaveBeenLastCalledWith('consumer', 'logs'); + expect(mockOnChange).toHaveBeenLastCalledWith({ + type: 'setMultiConsumer', + payload: 'logs', + }); }); it('should be able to show errors when there is one', () => { - render( - - ); + useRuleFormState.mockReturnValue({ + multiConsumerSelection: null, + baseErrors: { consumer: ['Scope is required'] }, + }); + render(); expect(screen.queryAllByText('Scope is required')).toHaveLength(1); }); }); diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_consumer_selection.tsx b/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_consumer_selection.tsx index e8bc0993734d3..d22a296162a59 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_consumer_selection.tsx +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_consumer_selection.tsx @@ -9,8 +9,13 @@ import React, { useMemo, useCallback } from 'react'; import { EuiComboBox, EuiFormRow, EuiComboBoxOptionOption } from '@elastic/eui'; import { AlertConsumers, RuleCreationValidConsumer } from '@kbn/rule-data-utils'; -import { FEATURE_NAME_MAP, CONSUMER_SELECT_COMBO_BOX_TITLE } from '../translations'; -import { RuleFormErrors } from '../../common'; +import { + CONSUMER_SELECT_TITLE, + FEATURE_NAME_MAP, + CONSUMER_SELECT_COMBO_BOX_TITLE, +} from '../translations'; +import { useRuleFormState, useRuleFormDispatch } from '../hooks'; +import { getValidatedMultiConsumer } from '../utils'; export const VALID_CONSUMERS: RuleCreationValidConsumer[] = [ AlertConsumers.LOGS, @@ -20,10 +25,7 @@ export const VALID_CONSUMERS: RuleCreationValidConsumer[] = [ ]; export interface RuleConsumerSelectionProps { - consumers: RuleCreationValidConsumer[]; - selectedConsumer?: RuleCreationValidConsumer | null; - errors?: RuleFormErrors; - onChange: (property: string, value: unknown) => void; + validConsumers: RuleCreationValidConsumer[]; } const SINGLE_SELECTION = { asPlainText: true }; @@ -31,26 +33,24 @@ const SINGLE_SELECTION = { asPlainText: true }; type ComboBoxOption = EuiComboBoxOptionOption; export const RuleConsumerSelection = (props: RuleConsumerSelectionProps) => { - const { consumers, selectedConsumer, errors = {}, onChange } = props; + const { validConsumers } = props; - const isInvalid = (errors.consumer?.length || 0) > 0; + const { multiConsumerSelection, baseErrors } = useRuleFormState(); + + const dispatch = useRuleFormDispatch(); const validatedSelectedConsumer = useMemo(() => { - if ( - selectedConsumer && - consumers.includes(selectedConsumer) && - FEATURE_NAME_MAP[selectedConsumer] - ) { - return selectedConsumer; - } - return null; - }, [selectedConsumer, consumers]); + return getValidatedMultiConsumer({ + multiConsumerSelection, + validConsumers, + }); + }, [multiConsumerSelection, validConsumers]); const selectedOptions = useMemo(() => { if (validatedSelectedConsumer) { return [ { - value: validatedSelectedConsumer, + value: validatedSelectedConsumer as RuleCreationValidConsumer, label: FEATURE_NAME_MAP[validatedSelectedConsumer], }, ]; @@ -59,7 +59,7 @@ export const RuleConsumerSelection = (props: RuleConsumerSelectionProps) => { }, [validatedSelectedConsumer]); const formattedSelectOptions = useMemo(() => { - return consumers + return validConsumers .reduce((result, consumer) => { if (FEATURE_NAME_MAP[consumer]) { result.push({ @@ -71,29 +71,36 @@ export const RuleConsumerSelection = (props: RuleConsumerSelectionProps) => { return result; }, []) .sort((a, b) => a.value!.localeCompare(b.value!)); - }, [consumers]); + }, [validConsumers]); const onConsumerChange = useCallback( (selected: ComboBoxOption[]) => { if (selected.length > 0) { const newSelectedConsumer = selected[0]; - onChange('consumer', newSelectedConsumer.value); + dispatch({ + type: 'setMultiConsumer', + payload: newSelectedConsumer.value!, + }); } else { - onChange('consumer', null); + dispatch({ + type: 'setMultiConsumer', + payload: 'alerts', + }); } }, - [onChange] + [dispatch] ); - if (consumers.length <= 1 || consumers.includes(AlertConsumers.OBSERVABILITY)) { + if (validConsumers.length <= 1 || validConsumers.includes(AlertConsumers.OBSERVABILITY)) { return null; } return ( ({ + useRuleFormState: jest.fn(), + useRuleFormDispatch: jest.fn(), +})); const ruleType = { id: '.es-query', @@ -40,6 +44,8 @@ const ruleType = { authorizedConsumers: { alerting: { read: true, all: true }, test: { read: true, all: true }, + stackAlerts: { read: true, all: true }, + logs: { read: true, all: true }, }, actionVariables: { params: [], @@ -60,7 +66,7 @@ const ruleModel: RuleTypeModel = { requiresAppContext: false, }; -const requiredPlugins = { +const plugins = { charts: {} as ChartsPluginSetup, data: {} as DataPublicPluginStart, dataViews: {} as DataViewsPublicPluginStart, @@ -68,152 +74,156 @@ const requiredPlugins = { docLinks: {} as DocLinksStart, }; +const { useRuleFormState, useRuleFormDispatch } = jest.requireMock('../hooks'); + const mockOnChange = jest.fn(); describe('Rule Definition', () => { + beforeEach(() => { + useRuleFormDispatch.mockReturnValue(mockOnChange); + }); + + afterEach(() => { + jest.resetAllMocks(); + }); + test('Renders correctly', () => { - render( - - ); + useRuleFormState.mockReturnValue({ + plugins, + formData: { + id: 'test-id', + params: {}, + schedule: { + interval: '1m', + }, + alertDelay: { + active: 5, + }, + notifyWhen: null, + consumer: 'stackAlerts', + }, + selectedRuleType: ruleType, + selectedRuleTypeModel: ruleModel, + canShowConsumerSelection: true, + validConsumers: ['logs', 'stackAlerts'], + }); + + render(); expect(screen.getByTestId('ruleDefinition')).toBeInTheDocument(); expect(screen.getByTestId('ruleSchedule')).toBeInTheDocument(); expect(screen.getByTestId('ruleConsumerSelection')).toBeInTheDocument(); expect(screen.getByTestId('ruleDefinitionHeaderDocsLink')).toBeInTheDocument(); + expect(screen.getByTestId('alertDelay')).not.toBeVisible(); - expect(screen.getByText(ALERT_DELAY_TITLE)).not.toBeVisible(); expect(screen.getByText('Expression')).toBeInTheDocument(); }); test('Hides doc link if not provided', () => { - render( - - ); + useRuleFormState.mockReturnValue({ + plugins, + formData: { + id: 'test-id', + params: {}, + schedule: { + interval: '1m', + }, + alertDelay: { + active: 5, + }, + notifyWhen: null, + consumer: 'stackAlerts', + }, + selectedRuleType: ruleType, + selectedRuleTypeModel: { + ...ruleModel, + documentationUrl: null, + }, + }); + render(); expect(screen.queryByTestId('ruleDefinitionHeaderDocsLink')).not.toBeInTheDocument(); }); test('Hides consumer selection if canShowConsumerSelection is false', () => { - render( - - ); + useRuleFormState.mockReturnValue({ + plugins, + formData: { + id: 'test-id', + params: {}, + schedule: { + interval: '1m', + }, + alertDelay: { + active: 5, + }, + notifyWhen: null, + consumer: 'stackAlerts', + }, + selectedRuleType: ruleType, + selectedRuleTypeModel: ruleModel, + }); + + render(); expect(screen.queryByTestId('ruleConsumerSelection')).not.toBeInTheDocument(); }); test('Can toggle advanced options', async () => { - render( - - ); + useRuleFormState.mockReturnValue({ + plugins, + formData: { + id: 'test-id', + params: {}, + schedule: { + interval: '1m', + }, + alertDelay: { + active: 5, + }, + notifyWhen: null, + consumer: 'stackAlerts', + }, + selectedRuleType: ruleType, + selectedRuleTypeModel: ruleModel, + }); + + render(); fireEvent.click(screen.getByTestId('advancedOptionsAccordionButton')); - expect(screen.getByText(ALERT_DELAY_TITLE)).toBeVisible(); + expect(screen.getByTestId('alertDelay')).toBeVisible(); }); test('Calls onChange when inputs are modified', () => { - render( - - ); + useRuleFormState.mockReturnValue({ + plugins, + formData: { + id: 'test-id', + params: {}, + schedule: { + interval: '1m', + }, + alertDelay: { + active: 5, + }, + notifyWhen: null, + consumer: 'stackAlerts', + }, + selectedRuleType: ruleType, + selectedRuleTypeModel: ruleModel, + }); + + render(); fireEvent.change(screen.getByTestId('ruleScheduleNumberInput'), { target: { value: '10', }, }); - expect(mockOnChange).toHaveBeenCalledWith('interval', '10m'); + expect(mockOnChange).toHaveBeenCalledWith({ + type: 'setSchedule', + payload: { + interval: '10m', + }, + }); }); }); diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_definition.tsx b/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_definition.tsx index 08f74ba8fc46b..104d698b343c7 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_definition.tsx +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_definition.tsx @@ -16,100 +16,63 @@ import { EuiText, EuiLink, EuiDescribedFormGroup, + EuiIconTip, EuiAccordion, EuiPanel, EuiSpacer, EuiErrorBoundary, - EuiIconTip, } from '@elastic/eui'; -import { - RuleCreationValidConsumer, - ES_QUERY_ID, - OBSERVABILITY_THRESHOLD_RULE_TYPE_ID, - ML_ANOMALY_DETECTION_RULE_TYPE_ID, -} from '@kbn/rule-data-utils'; -import type { ChartsPluginSetup } from '@kbn/charts-plugin/public'; -import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; -import type { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; -import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public'; -import type { DocLinksStart } from '@kbn/core-doc-links-browser'; -import type { RuleType } from '@kbn/triggers-actions-ui-types'; -import type { - RuleTypeModel, - RuleFormErrors, - MinimumScheduleInterval, - Rule, - RuleTypeParams, -} from '../../common'; import { DOC_LINK_TITLE, LOADING_RULE_TYPE_PARAMS_TITLE, SCHEDULE_TITLE, SCHEDULE_DESCRIPTION_TEXT, + SCHEDULE_TOOLTIP_TEXT, ALERT_DELAY_TITLE, SCOPE_TITLE, SCOPE_DESCRIPTION_TEXT, ADVANCED_OPTIONS_TITLE, ALERT_DELAY_DESCRIPTION_TEXT, - SCHEDULE_TOOLTIP_TEXT, ALERT_DELAY_HELP_TEXT, } from '../translations'; import { RuleAlertDelay } from './rule_alert_delay'; import { RuleConsumerSelection } from './rule_consumer_selection'; import { RuleSchedule } from './rule_schedule'; +import { useRuleFormState, useRuleFormDispatch } from '../hooks'; +import { MULTI_CONSUMER_RULE_TYPE_IDS } from '../constants'; +import { getAuthorizedConsumers } from '../utils'; -const MULTI_CONSUMER_RULE_TYPE_IDS = [ - OBSERVABILITY_THRESHOLD_RULE_TYPE_ID, - ES_QUERY_ID, - ML_ANOMALY_DETECTION_RULE_TYPE_ID, -]; - -interface RuleDefinitionProps { - requiredPlugins: { - charts: ChartsPluginSetup; - data: DataPublicPluginStart; - dataViews: DataViewsPublicPluginStart; - unifiedSearch: UnifiedSearchPublicPluginStart; - docLinks: DocLinksStart; - }; - formValues: { - id?: Rule['id']; - params: Rule['params']; - schedule: Rule['schedule']; - alertDelay?: Rule['alertDelay']; - notifyWhen?: Rule['notifyWhen']; - consumer?: Rule['consumer']; - }; - minimumScheduleInterval?: MinimumScheduleInterval; - errors?: RuleFormErrors; - canShowConsumerSelection?: boolean; - authorizedConsumers?: RuleCreationValidConsumer[]; - selectedRuleTypeModel: RuleTypeModel; - selectedRuleType: RuleType; - validConsumers?: RuleCreationValidConsumer[]; - onChange: (property: string, value: unknown) => void; -} - -export const RuleDefinition = (props: RuleDefinitionProps) => { +export const RuleDefinition = () => { const { - requiredPlugins, - formValues, - errors = {}, - canShowConsumerSelection = false, - authorizedConsumers = [], - selectedRuleTypeModel, + id, + formData, + plugins, + paramsErrors, + metadata, selectedRuleType, - minimumScheduleInterval, - onChange, - } = props; + selectedRuleTypeModel, + validConsumers, + canShowConsumerSelection = false, + } = useRuleFormState(); + + const dispatch = useRuleFormDispatch(); - const { charts, data, dataViews, unifiedSearch, docLinks } = requiredPlugins; + const { charts, data, dataViews, unifiedSearch, docLinks } = plugins; - const { id, params, schedule, alertDelay, notifyWhen, consumer = 'alerts' } = formValues; + const { params, schedule, notifyWhen } = formData; - const [metadata, setMetadata] = useState>(); const [isAdvancedOptionsVisible, setIsAdvancedOptionsVisible] = useState(false); + const authorizedConsumers = useMemo(() => { + if (!validConsumers?.length) { + return []; + } + return getAuthorizedConsumers({ + ruleType: selectedRuleType, + validConsumers, + }); + }, [selectedRuleType, validConsumers]); + const shouldShowConsumerSelect = useMemo(() => { if (!canShowConsumerSelection) { return false; @@ -132,21 +95,40 @@ export const RuleDefinition = (props: RuleDefinitionProps) => { return documentationUrl; }, [selectedRuleTypeModel, docLinks]); + const onChangeMetaData = useCallback( + (newMetadata) => { + dispatch({ + type: 'setMetadata', + payload: newMetadata, + }); + }, + [dispatch] + ); + const onSetRuleParams = useCallback( (property: string, value: unknown) => { - onChange('params', { - ...params, - [property]: value, + dispatch({ + type: 'setParamsProperty', + payload: { + property, + value, + }, }); }, - [onChange, params] + [dispatch] ); - const onSetRule = useCallback( + const onSetRuleProperty = useCallback( (property: string, value: unknown) => { - onChange(property, value); + dispatch({ + type: 'setRuleProperty', + payload: { + property, + value, + }, + }); }, - [onChange] + [dispatch] ); return ( @@ -197,9 +179,9 @@ export const RuleDefinition = (props: RuleDefinitionProps) => { ruleInterval={schedule.interval} ruleThrottle={''} alertNotifyWhen={notifyWhen || 'onActionGroupChange'} - errors={errors} + errors={paramsErrors || {}} setRuleParams={onSetRuleParams} - setRuleProperty={onSetRule} + setRuleProperty={onSetRuleProperty} defaultActionGroupId={selectedRuleType.defaultActionGroupId} actionGroups={selectedRuleType.actionGroups} metadata={metadata} @@ -207,7 +189,7 @@ export const RuleDefinition = (props: RuleDefinitionProps) => { data={data} dataViews={dataViews} unifiedSearch={unifiedSearch} - onChangeMetaData={setMetadata} + onChangeMetaData={onChangeMetaData} /> @@ -232,12 +214,7 @@ export const RuleDefinition = (props: RuleDefinitionProps) => { } > - + {shouldShowConsumerSelect && ( { title={

{SCOPE_TITLE}

} description={

{SCOPE_DESCRIPTION_TEXT}

} > - +
)} @@ -286,7 +258,7 @@ export const RuleDefinition = (props: RuleDefinitionProps) => { } > - + diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_schedule.test.tsx b/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_schedule.test.tsx index e0f2f3c9ab5a1..d545bea542815 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_schedule.test.tsx +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_schedule.test.tsx @@ -13,37 +13,86 @@ import { RuleSchedule } from './rule_schedule'; const mockOnChange = jest.fn(); +jest.mock('../hooks', () => ({ + useRuleFormState: jest.fn(), + useRuleFormDispatch: jest.fn(), +})); + +const { useRuleFormState, useRuleFormDispatch } = jest.requireMock('../hooks'); + describe('RuleSchedule', () => { + beforeEach(() => { + useRuleFormDispatch.mockReturnValue(mockOnChange); + }); + afterEach(() => { jest.resetAllMocks(); }); test('Renders correctly', () => { - render(); + useRuleFormState.mockReturnValue({ + formData: { + schedule: { + interval: '5m', + }, + }, + }); + render(); expect(screen.getByTestId('ruleSchedule')).toBeInTheDocument(); }); test('Should allow interval number to be changed', () => { - render(); + useRuleFormState.mockReturnValue({ + formData: { + schedule: { + interval: '5m', + }, + }, + }); + render(); fireEvent.change(screen.getByTestId('ruleScheduleNumberInput'), { target: { value: '10', }, }); - expect(mockOnChange).toHaveBeenCalledWith('interval', '10m'); + expect(mockOnChange).toHaveBeenCalledWith({ + type: 'setSchedule', + payload: { + interval: '10m', + }, + }); }); test('Should allow interval unit to be changed', () => { - render(); + useRuleFormState.mockReturnValue({ + formData: { + schedule: { + interval: '5m', + }, + }, + }); + render(); userEvent.selectOptions(screen.getByTestId('ruleScheduleUnitInput'), 'hours'); - expect(mockOnChange).toHaveBeenCalledWith('interval', '5h'); + expect(mockOnChange).toHaveBeenCalledWith({ + type: 'setSchedule', + payload: { + interval: '5h', + }, + }); }); test('Should only allow integers as inputs', async () => { - render(); + useRuleFormState.mockReturnValue({ + formData: { + schedule: { + interval: '5m', + }, + }, + }); + render(); ['-', '+', 'e', 'E', '.', 'a', '01'].forEach((char) => { fireEvent.change(screen.getByTestId('ruleScheduleNumberInput'), { @@ -56,30 +105,35 @@ describe('RuleSchedule', () => { }); test('Should display error properly', () => { - render( - - ); + useRuleFormState.mockReturnValue({ + formData: { + schedule: { + interval: '5m', + }, + }, + baseErrors: { + interval: 'something went wrong!', + }, + }); + render(); expect(screen.getByText('something went wrong!')).toBeInTheDocument(); + expect(screen.getByTestId('ruleScheduleNumberInput')).toBeInvalid(); }); test('Should enforce minimum schedule interval', () => { - render( - - ); + useRuleFormState.mockReturnValue({ + formData: { + schedule: { + interval: '30s', + }, + }, + minimumScheduleInterval: { + enforce: true, + value: '1m', + }, + }); + render(); expect(screen.getByText('Interval must be at least 1 minute.')).toBeInTheDocument(); }); diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_schedule.tsx b/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_schedule.tsx index 8bdadc28cee45..72468dc004546 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_schedule.tsx +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_definition/rule_schedule.tsx @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import React, { useCallback } from 'react'; +import React, { useMemo, useCallback } from 'react'; import { EuiFlexItem, EuiFormRow, EuiFlexGroup, EuiSelect, EuiFieldNumber } from '@elastic/eui'; import { parseDuration, @@ -15,12 +15,13 @@ import { getDurationNumberInItsUnit, } from '../utils/parse_duration'; import { getTimeOptions } from '../utils/get_time_options'; -import { MinimumScheduleInterval, RuleFormErrors } from '../../common'; import { SCHEDULE_TITLE_PREFIX, INTERVAL_MINIMUM_TEXT, INTERVAL_WARNING_TEXT, } from '../translations'; +import { useRuleFormState, useRuleFormDispatch } from '../hooks'; +import { MinimumScheduleInterval } from '../../common'; const INTEGER_REGEX = /^[1-9][0-9]*$/; const INVALID_KEYS = ['-', '+', '.', 'e', 'E']; @@ -47,44 +48,64 @@ const getHelpTextForInterval = ( } }; -export interface RuleScheduleProps { - interval: string; - minimumScheduleInterval?: MinimumScheduleInterval; - errors?: RuleFormErrors; - onChange: (property: string, value: unknown) => void; -} +export const RuleSchedule = () => { + const { formData, baseErrors, minimumScheduleInterval } = useRuleFormState(); -export const RuleSchedule = (props: RuleScheduleProps) => { - const { interval, minimumScheduleInterval, errors = {}, onChange } = props; + const dispatch = useRuleFormDispatch(); - const hasIntervalError = errors.interval?.length > 0; + const { + schedule: { interval }, + } = formData; - const intervalNumber = getDurationNumberInItsUnit(interval); + const hasIntervalError = useMemo(() => { + return !!baseErrors?.interval?.length; + }, [baseErrors]); - const intervalUnit = getDurationUnitValue(interval); + const intervalNumber = useMemo(() => { + return getDurationNumberInItsUnit(interval ?? 1); + }, [interval]); - // No help text if there is an error - const helpText = - minimumScheduleInterval && !hasIntervalError - ? getHelpTextForInterval(interval, minimumScheduleInterval) - : ''; + const intervalUnit = useMemo(() => { + return getDurationUnitValue(interval); + }, [interval]); + + const helpText = useMemo( + () => + minimumScheduleInterval && !hasIntervalError // No help text if there is an error + ? getHelpTextForInterval(interval, minimumScheduleInterval) + : '', + [interval, minimumScheduleInterval, hasIntervalError] + ); const onIntervalNumberChange = useCallback( (e: React.ChangeEvent) => { + if (!e.target.validity.valid) { + return; + } const value = e.target.value.trim(); if (INTEGER_REGEX.test(value)) { const parsedValue = parseInt(value, 10); - onChange('interval', `${parsedValue}${intervalUnit}`); + dispatch({ + type: 'setSchedule', + payload: { + interval: `${parsedValue}${intervalUnit}`, + }, + }); } }, - [intervalUnit, onChange] + [intervalUnit, dispatch] ); const onIntervalUnitChange = useCallback( (e: React.ChangeEvent) => { - onChange('interval', `${intervalNumber}${e.target.value}`); + dispatch({ + type: 'setSchedule', + payload: { + interval: `${intervalNumber}${e.target.value}`, + }, + }); }, - [intervalNumber, onChange] + [intervalNumber, dispatch] ); const onKeyDown = useCallback((e: React.KeyboardEvent) => { @@ -99,15 +120,15 @@ export const RuleSchedule = (props: RuleScheduleProps) => { data-test-subj="ruleSchedule" display="rowCompressed" helpText={helpText} - isInvalid={errors.interval?.length > 0} - error={errors.interval} + isInvalid={hasIntervalError} + error={baseErrors?.interval} > 0} + isInvalid={hasIntervalError} value={intervalNumber} name="interval" data-test-subj="ruleScheduleNumberInput" diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_details/rule_details.test.tsx b/packages/kbn-alerts-ui-shared/src/rule_form/rule_details/rule_details.test.tsx index 58b327af94b47..5b2430c4dc276 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/rule_details/rule_details.test.tsx +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_details/rule_details.test.tsx @@ -13,65 +13,66 @@ import { RuleDetails } from './rule_details'; const mockOnChange = jest.fn(); +jest.mock('../hooks', () => ({ + useRuleFormState: jest.fn(), + useRuleFormDispatch: jest.fn(), +})); + +const { useRuleFormState, useRuleFormDispatch } = jest.requireMock('../hooks'); + describe('RuleDetails', () => { + beforeEach(() => { + useRuleFormState.mockReturnValue({ + formData: { + name: 'test', + tags: [], + }, + }); + useRuleFormDispatch.mockReturnValue(mockOnChange); + }); + + afterEach(() => { + jest.resetAllMocks(); + }); + test('Renders correctly', () => { - render( - - ); + render(); expect(screen.getByTestId('ruleDetails')).toBeInTheDocument(); }); test('Should allow name to be changed', () => { - render( - - ); + render(); fireEvent.change(screen.getByTestId('ruleDetailsNameInput'), { target: { value: 'hello' } }); - expect(mockOnChange).toHaveBeenCalledWith('name', 'hello'); + expect(mockOnChange).toHaveBeenCalledWith({ + type: 'setName', + payload: 'hello', + }); }); test('Should allow tags to be changed', () => { - render( - - ); + render(); userEvent.type(screen.getByTestId('comboBoxInput'), 'tag{enter}'); - expect(mockOnChange).toHaveBeenCalledWith('tags', ['tag']); + expect(mockOnChange).toHaveBeenCalledWith({ + type: 'setTags', + payload: ['tag'], + }); }); test('Should display error', () => { - render( - - ); + useRuleFormState.mockReturnValue({ + formData: { + name: 'test', + tags: [], + }, + baseErrors: { + name: 'name is invalid', + tags: 'tags is invalid', + }, + }); + render(); expect(screen.getByText('name is invalid')).toBeInTheDocument(); expect(screen.getByText('tags is invalid')).toBeInTheDocument(); diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_details/rule_details.tsx b/packages/kbn-alerts-ui-shared/src/rule_form/rule_details/rule_details.tsx index 30af5dfa16ed5..9b5cd6aeffc22 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/rule_details/rule_details.tsx +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_details/rule_details.tsx @@ -15,27 +15,21 @@ import { EuiComboBoxOptionOption, EuiText, } from '@elastic/eui'; -import type { RuleFormErrors, Rule, RuleTypeParams } from '../../common'; import { RULE_DETAILS_TITLE, RULE_DETAILS_DESCRIPTION, RULE_NAME_INPUT_TITLE, RULE_TAG_INPUT_TITLE, + RULE_TAG_PLACEHOLDER, } from '../translations'; +import { useRuleFormState, useRuleFormDispatch } from '../hooks'; -export interface RuleDetailsProps { - formValues: { - tags?: Rule['tags']; - name: Rule['name']; - }; - errors?: RuleFormErrors; - onChange: (property: string, value: unknown) => void; -} +export const RuleDetails = () => { + const { formData, baseErrors } = useRuleFormState(); -export const RuleDetails = (props: RuleDetailsProps) => { - const { formValues, errors = {}, onChange } = props; + const dispatch = useRuleFormDispatch(); - const { tags = [], name } = formValues; + const { tags = [], name } = formData; const tagsOptions = useMemo(() => { return tags.map((tag: string) => ({ label: tag })); @@ -43,40 +37,49 @@ export const RuleDetails = (props: RuleDetailsProps) => { const onNameChange = useCallback( (e: React.ChangeEvent) => { - onChange('name', e.target.value); + dispatch({ + type: 'setName', + payload: e.target.value, + }); }, - [onChange] + [dispatch] ); const onAddTag = useCallback( (searchValue: string) => { - onChange('tags', tags.concat([searchValue])); + dispatch({ + type: 'setTags', + payload: tags.concat([searchValue]), + }); }, - [onChange, tags] + [dispatch, tags] ); const onSetTag = useCallback( (options: Array>) => { - onChange( - 'tags', - options.map((selectedOption) => selectedOption.label) - ); + dispatch({ + type: 'setTags', + payload: options.map((selectedOption) => selectedOption.label), + }); }, - [onChange] + [dispatch] ); const onBlur = useCallback(() => { if (!tags) { - onChange('tags', []); + dispatch({ + type: 'setTags', + payload: [], + }); } - }, [onChange, tags]); + }, [dispatch, tags]); return ( {RULE_DETAILS_TITLE}} description={ - +

{RULE_DETAILS_DESCRIPTION}

} @@ -85,12 +88,13 @@ export const RuleDetails = (props: RuleDetailsProps) => { 0} - error={errors.name} + isInvalid={!!baseErrors?.name?.length} + error={baseErrors?.name} > @@ -98,12 +102,13 @@ export const RuleDetails = (props: RuleDetailsProps) => { 0} - error={errors.tags} + isInvalid={!!baseErrors?.tags?.length} + error={baseErrors?.tags} > { + const { plugins, returnUrl } = props; + const { id, ruleTypeId } = useParams<{ + id?: string; + ruleTypeId?: string; + }>(); + + const ruleFormComponent = useMemo(() => { + if (id) { + return ; + } + if (ruleTypeId) { + return ; + } + return ( + {RULE_FORM_ROUTE_PARAMS_ERROR_TITLE}} + > + +

{RULE_FORM_ROUTE_PARAMS_ERROR_TEXT}

+
+
+ ); + }, [id, ruleTypeId, plugins, returnUrl]); + + return {ruleFormComponent}; +}; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_errors/index.ts b/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_errors/index.ts new file mode 100644 index 0000000000000..70ee9d6a89298 --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_errors/index.ts @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export * from './rule_form_health_check_error'; +export * from './rule_form_circuit_breaker_error'; +export * from './rule_form_resolve_rule_error'; +export * from './rule_form_rule_type_error'; +export * from './rule_form_error_prompt_wrapper'; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_errors/rule_form_circuit_breaker_error.test.tsx b/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_errors/rule_form_circuit_breaker_error.test.tsx new file mode 100644 index 0000000000000..37639340e0362 --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_errors/rule_form_circuit_breaker_error.test.tsx @@ -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 React from 'react'; +import { fireEvent, render, screen } from '@testing-library/react'; +import { RuleFormCircuitBreakerError } from './rule_form_circuit_breaker_error'; +import { CIRCUIT_BREAKER_SEE_FULL_ERROR_TEXT } from '../translations'; + +describe('RuleFormCircuitBreakerError', () => { + test('renders correctly', () => { + render(); + + expect(screen.getByText(CIRCUIT_BREAKER_SEE_FULL_ERROR_TEXT)).toBeInTheDocument(); + }); + + test('can toggle details', () => { + render( + +
child component
+
+ ); + + fireEvent.click(screen.getByTestId('ruleFormCircuitBreakerErrorToggleButton')); + + expect(screen.getByText('child component')).toBeInTheDocument(); + }); +}); diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_errors/rule_form_circuit_breaker_error.tsx b/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_errors/rule_form_circuit_breaker_error.tsx new file mode 100644 index 0000000000000..80e2cf8686ded --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_errors/rule_form_circuit_breaker_error.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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React, { useState, useCallback, FC } from 'react'; +import { EuiButton, EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiText } from '@elastic/eui'; +import { + CIRCUIT_BREAKER_HIDE_FULL_ERROR_TEXT, + CIRCUIT_BREAKER_SEE_FULL_ERROR_TEXT, +} from '../translations'; + +export const RuleFormCircuitBreakerError: FC<{}> = ({ children }) => { + const [showDetails, setShowDetails] = useState(false); + + const onToggleShowDetails = useCallback(() => { + setShowDetails((prev) => !prev); + }, []); + + return ( + <> + {showDetails && ( + <> + {children} + + + )} + + + + {showDetails + ? CIRCUIT_BREAKER_HIDE_FULL_ERROR_TEXT + : CIRCUIT_BREAKER_SEE_FULL_ERROR_TEXT} + + + + + ); +}; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_errors/rule_form_error_prompt_wrapper.tsx b/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_errors/rule_form_error_prompt_wrapper.tsx new file mode 100644 index 0000000000000..b7342f74d4eb9 --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_errors/rule_form_error_prompt_wrapper.tsx @@ -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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React from 'react'; +import { useEuiBackgroundColorCSS, EuiPageTemplate } from '@elastic/eui'; + +interface RuleFormErrorPromptWrapperProps { + hasBorder?: boolean; + hasShadow?: boolean; +} + +export const RuleFormErrorPromptWrapper: React.FC = ({ + children, + hasBorder, + hasShadow, +}) => { + const styles = useEuiBackgroundColorCSS().transparent; + return ( + + + {children} + + + ); +}; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_errors/rule_form_health_check_error.test.tsx b/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_errors/rule_form_health_check_error.test.tsx new file mode 100644 index 0000000000000..dc7aa851288ce --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_errors/rule_form_health_check_error.test.tsx @@ -0,0 +1,116 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React from 'react'; +import type { DocLinksStart } from '@kbn/core-doc-links-browser'; +import { render, screen } from '@testing-library/react'; +import { RuleFormHealthCheckError } from './rule_form_health_check_error'; +import { HealthCheckErrors, healthCheckErrors } from '../../common/apis'; +import { + HEALTH_CHECK_ALERTS_ERROR_TEXT, + HEALTH_CHECK_ENCRYPTION_ERROR_TEXT, + HEALTH_CHECK_API_KEY_ENCRYPTION_ERROR_TEXT, + HEALTH_CHECK_API_KEY_DISABLED_ERROR_TEXT, + HEALTH_CHECK_ALERTS_ERROR_TITLE, + HEALTH_CHECK_API_KEY_DISABLED_ERROR_TITLE, + HEALTH_CHECK_API_KEY_ENCRYPTION_ERROR_TITLE, + HEALTH_CHECK_ENCRYPTION_ERROR_TITLE, +} from '../translations'; + +const docLinksMock = { + links: { + alerting: { + generalSettings: 'generalSettings', + setupPrerequisites: 'setupPrerequisites', + }, + security: { + elasticsearchEnableApiKeys: 'elasticsearchEnableApiKeys', + }, + }, +} as DocLinksStart; + +describe('ruleFormHealthCheckError', () => { + test('renders correctly', () => { + render( + + ); + + expect(screen.getByTestId('ruleFormHealthCheckError')).toBeInTheDocument(); + }); + + test('renders alerts error', () => { + render( + + ); + expect(screen.getByText(HEALTH_CHECK_ALERTS_ERROR_TITLE)).toBeInTheDocument(); + expect(screen.getByText(HEALTH_CHECK_ALERTS_ERROR_TEXT)).toBeInTheDocument(); + expect(screen.getByTestId('ruleFormHealthCheckErrorLink')).toHaveAttribute( + 'href', + 'generalSettings' + ); + }); + + test('renders encryption error', () => { + render( + + ); + + expect(screen.getByText(HEALTH_CHECK_ENCRYPTION_ERROR_TEXT)).toBeInTheDocument(); + expect(screen.getByText(HEALTH_CHECK_ENCRYPTION_ERROR_TITLE)).toBeInTheDocument(); + expect(screen.getByTestId('ruleFormHealthCheckErrorLink')).toHaveAttribute( + 'href', + 'generalSettings' + ); + }); + + test('renders API keys and encryption error', () => { + render( + + ); + + expect(screen.getByText(HEALTH_CHECK_API_KEY_ENCRYPTION_ERROR_TEXT)).toBeInTheDocument(); + expect(screen.getByText(HEALTH_CHECK_API_KEY_ENCRYPTION_ERROR_TITLE)).toBeInTheDocument(); + expect(screen.getByTestId('ruleFormHealthCheckErrorLink')).toHaveAttribute( + 'href', + 'setupPrerequisites' + ); + }); + + test('renders API keys disabled error', () => { + render( + + ); + + expect(screen.getByText(HEALTH_CHECK_API_KEY_DISABLED_ERROR_TEXT)).toBeInTheDocument(); + expect(screen.getByText(HEALTH_CHECK_API_KEY_DISABLED_ERROR_TITLE)).toBeInTheDocument(); + expect(screen.getByTestId('ruleFormHealthCheckErrorLink')).toHaveAttribute( + 'href', + 'elasticsearchEnableApiKeys' + ); + }); + + test('should not render if unknown error is passed in', () => { + render( + + ); + + expect(screen.queryByTestId('ruleFormHealthCheckError')).not.toBeInTheDocument(); + }); +}); diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_errors/rule_form_health_check_error.tsx b/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_errors/rule_form_health_check_error.tsx new file mode 100644 index 0000000000000..e02e984a71583 --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_errors/rule_form_health_check_error.tsx @@ -0,0 +1,96 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React, { useMemo } from 'react'; +import { EuiEmptyPrompt, EuiLink, EuiText } from '@elastic/eui'; +import type { DocLinksStart } from '@kbn/core-doc-links-browser'; +import { HealthCheckErrors, healthCheckErrors } from '../../common/apis'; + +import { + HEALTH_CHECK_ALERTS_ERROR_TITLE, + HEALTH_CHECK_ALERTS_ERROR_TEXT, + HEALTH_CHECK_ENCRYPTION_ERROR_TITLE, + HEALTH_CHECK_ENCRYPTION_ERROR_TEXT, + HEALTH_CHECK_API_KEY_ENCRYPTION_ERROR_TITLE, + HEALTH_CHECK_API_KEY_ENCRYPTION_ERROR_TEXT, + HEALTH_CHECK_API_KEY_DISABLED_ERROR_TITLE, + HEALTH_CHECK_API_KEY_DISABLED_ERROR_TEXT, + HEALTH_CHECK_ACTION_TEXT, +} from '../translations'; + +export interface RuleFormHealthCheckErrorProps { + error: HealthCheckErrors; + docLinks: DocLinksStart; +} + +export const RuleFormHealthCheckError = (props: RuleFormHealthCheckErrorProps) => { + const { error, docLinks } = props; + + const errorState = useMemo(() => { + if (error === healthCheckErrors.ALERTS_ERROR) { + return { + errorTitle: HEALTH_CHECK_ALERTS_ERROR_TITLE, + errorBodyText: HEALTH_CHECK_ALERTS_ERROR_TEXT, + errorDocLink: docLinks.links.alerting.generalSettings, + }; + } + if (error === healthCheckErrors.ENCRYPTION_ERROR) { + return { + errorTitle: HEALTH_CHECK_ENCRYPTION_ERROR_TITLE, + errorBodyText: HEALTH_CHECK_ENCRYPTION_ERROR_TEXT, + errorDocLink: docLinks.links.alerting.generalSettings, + }; + } + if (error === healthCheckErrors.API_KEYS_AND_ENCRYPTION_ERROR) { + return { + errorTitle: HEALTH_CHECK_API_KEY_ENCRYPTION_ERROR_TITLE, + errorBodyText: HEALTH_CHECK_API_KEY_ENCRYPTION_ERROR_TEXT, + errorDocLink: docLinks.links.alerting.setupPrerequisites, + }; + } + if (error === healthCheckErrors.API_KEYS_DISABLED_ERROR) { + return { + errorTitle: HEALTH_CHECK_API_KEY_DISABLED_ERROR_TITLE, + errorBodyText: HEALTH_CHECK_API_KEY_DISABLED_ERROR_TEXT, + errorDocLink: docLinks.links.security.elasticsearchEnableApiKeys, + }; + } + }, [error, docLinks]); + + if (!errorState) { + return null; + } + + return ( + +

{errorState.errorTitle}

+
+ } + body={ +
+

+ {errorState.errorBodyText}  + + {HEALTH_CHECK_ACTION_TEXT} + +

+
+ } + /> + ); +}; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_errors/rule_form_resolve_rule_error.tsx b/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_errors/rule_form_resolve_rule_error.tsx new file mode 100644 index 0000000000000..83dbd70109a0b --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_errors/rule_form_resolve_rule_error.tsx @@ -0,0 +1,33 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React from 'react'; +import { EuiEmptyPrompt, EuiText } from '@elastic/eui'; +import { + RULE_FORM_RULE_NOT_FOUND_ERROR_TITLE, + RULE_FORM_RULE_NOT_FOUND_ERROR_TEXT, +} from '../translations'; + +export const RuleFormResolveRuleError = () => { + return ( + +

{RULE_FORM_RULE_NOT_FOUND_ERROR_TITLE}

+ + } + body={ + +

{RULE_FORM_RULE_NOT_FOUND_ERROR_TEXT}

+
+ } + /> + ); +}; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_errors/rule_form_rule_type_error.tsx b/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_errors/rule_form_rule_type_error.tsx new file mode 100644 index 0000000000000..f89ef35ffe020 --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_errors/rule_form_rule_type_error.tsx @@ -0,0 +1,33 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React from 'react'; +import { EuiEmptyPrompt, EuiText } from '@elastic/eui'; +import { + RULE_FORM_RULE_TYPE_NOT_FOUND_ERROR_TITLE, + RULE_FORM_RULE_TYPE_NOT_FOUND_ERROR_TEXT, +} from '../translations'; + +export const RuleFormRuleTypeError = () => { + return ( + +

{RULE_FORM_RULE_TYPE_NOT_FOUND_ERROR_TITLE}

+ + } + body={ + +

{RULE_FORM_RULE_TYPE_NOT_FOUND_ERROR_TEXT}

+
+ } + /> + ); +}; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_state/index.ts b/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_state/index.ts new file mode 100644 index 0000000000000..93aa6aa06ebf3 --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_state/index.ts @@ -0,0 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export * from './rule_form_state_context'; +export * from './rule_form_state_provider'; +export * from './rule_form_state_reducer'; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_state/rule_form_state_context.tsx b/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_state/rule_form_state_context.tsx new file mode 100644 index 0000000000000..365aa1199ce6c --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_state/rule_form_state_context.tsx @@ -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 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 { createContext } from 'react'; +import type { RuleFormState } from '../types'; +import type { RuleFormStateReducerAction } from './rule_form_state_reducer'; + +export const RuleFormStateContext = createContext({} as RuleFormState); + +export const RuleFormReducerContext = createContext>( + () => {} +); diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_state/rule_form_state_provider.tsx b/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_state/rule_form_state_provider.tsx new file mode 100644 index 0000000000000..cf9b781ead6e8 --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_state/rule_form_state_provider.tsx @@ -0,0 +1,43 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React, { useReducer } from 'react'; +import { RuleFormState } from '../types'; +import { RuleFormStateContext, RuleFormReducerContext } from './rule_form_state_context'; +import { ruleFormStateReducer } from './rule_form_state_reducer'; +import { validateRuleBase, validateRuleParams } from '../validation'; + +export interface RuleFormStateProviderProps { + initialRuleFormState: RuleFormState; +} + +export const RuleFormStateProvider: React.FC = (props) => { + const { children, initialRuleFormState } = props; + const { + formData, + selectedRuleTypeModel: ruleTypeModel, + minimumScheduleInterval, + } = initialRuleFormState; + + const [ruleFormState, dispatch] = useReducer(ruleFormStateReducer, { + ...initialRuleFormState, + baseErrors: validateRuleBase({ + formData, + minimumScheduleInterval, + }), + paramsErrors: validateRuleParams({ + formData, + ruleTypeModel, + }), + }); + return ( + + {children} + + ); +}; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_state/rule_form_state_reducer.test.tsx b/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_state/rule_form_state_reducer.test.tsx new file mode 100644 index 0000000000000..38d8c7e3e5e9b --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_state/rule_form_state_reducer.test.tsx @@ -0,0 +1,347 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React, { useReducer } from 'react'; +import { act, renderHook } from '@testing-library/react-hooks/dom'; +import { ruleFormStateReducer } from './rule_form_state_reducer'; +import { RuleFormState } from '../types'; + +jest.mock('../validation/validate_form', () => ({ + validateRuleBase: jest.fn(), + validateRuleParams: jest.fn(), +})); + +const { validateRuleBase, validateRuleParams } = jest.requireMock('../validation/validate_form'); + +validateRuleBase.mockReturnValue({}); +validateRuleParams.mockReturnValue({}); + +const indexThresholdRuleType = { + enabledInLicense: true, + recoveryActionGroup: { + id: 'recovered', + name: 'Recovered', + }, + actionGroups: [], + defaultActionGroupId: 'threshold met', + minimumLicenseRequired: 'basic', + authorizedConsumers: { + stackAlerts: { + read: true, + all: true, + }, + }, + ruleTaskTimeout: '5m', + doesSetRecoveryContext: true, + hasAlertsMappings: true, + hasFieldsForAAD: false, + id: '.index-threshold', + name: 'Index threshold', + category: 'management', + producer: 'stackAlerts', + alerts: {}, + is_exportable: true, +} as unknown as RuleFormState['selectedRuleType']; + +const indexThresholdRuleTypeModel = { + id: '.index-threshold', + description: 'Alert when an aggregated query meets the threshold.', + iconClass: 'alert', + ruleParamsExpression: () =>
, + defaultActionMessage: + 'Rule {{rule.name}} is active for group {{context.group}}:\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}}\n- Timestamp: {{context.date}}', + requiresAppContext: false, +} as unknown as RuleFormState['selectedRuleTypeModel']; + +const initialState: RuleFormState = { + formData: { + name: 'test-rule', + tags: [], + params: { + paramsValue: 'value-1', + }, + schedule: { interval: '5m' }, + consumer: 'stackAlerts', + notifyWhen: 'onActionGroupChange', + }, + plugins: {} as unknown as RuleFormState['plugins'], + selectedRuleType: indexThresholdRuleType, + selectedRuleTypeModel: indexThresholdRuleTypeModel, + multiConsumerSelection: 'stackAlerts', +}; + +describe('ruleFormStateReducer', () => { + afterEach(() => { + jest.clearAllMocks(); + }); + + test('should initialize properly', () => { + const { result } = renderHook(() => useReducer(ruleFormStateReducer, initialState)); + expect(result.current[0]).toEqual(initialState); + }); + + test('setRule works correctly', () => { + const { result } = renderHook(() => useReducer(ruleFormStateReducer, initialState)); + + const dispatch = result.current[1]; + + const updatedRule = { + name: 'test-rule-updated', + tags: ['tag'], + params: { + test: 'hello', + }, + schedule: { interval: '2m' }, + consumer: 'logs', + }; + + act(() => { + dispatch({ + type: 'setRule', + payload: updatedRule, + }); + }); + + expect(result.current[0].formData).toEqual(updatedRule); + expect(validateRuleBase).toHaveBeenCalled(); + expect(validateRuleParams).toHaveBeenCalled(); + }); + + test('setRuleProperty works correctly', () => { + const { result } = renderHook(() => useReducer(ruleFormStateReducer, initialState)); + + const dispatch = result.current[1]; + + act(() => { + dispatch({ + type: 'setRuleProperty', + payload: { + property: 'name', + value: 'test-rule-name-updated', + }, + }); + }); + + expect(result.current[0].formData).toEqual({ + ...initialState.formData, + name: 'test-rule-name-updated', + }); + expect(validateRuleBase).toHaveBeenCalled(); + expect(validateRuleParams).toHaveBeenCalled(); + }); + + test('setName works correctly', () => { + const { result } = renderHook(() => useReducer(ruleFormStateReducer, initialState)); + + const dispatch = result.current[1]; + + act(() => { + dispatch({ + type: 'setName', + payload: 'test-rule-name-updated', + }); + }); + + expect(result.current[0].formData).toEqual({ + ...initialState.formData, + name: 'test-rule-name-updated', + }); + expect(validateRuleBase).toHaveBeenCalled(); + expect(validateRuleParams).toHaveBeenCalled(); + }); + + test('setTags works correctly', () => { + const { result } = renderHook(() => useReducer(ruleFormStateReducer, initialState)); + + const dispatch = result.current[1]; + + act(() => { + dispatch({ + type: 'setTags', + payload: ['tag1', 'tag2'], + }); + }); + + expect(result.current[0].formData).toEqual({ + ...initialState.formData, + tags: ['tag1', 'tag2'], + }); + expect(validateRuleBase).toHaveBeenCalled(); + expect(validateRuleParams).toHaveBeenCalled(); + }); + + test('setParams works correctly', () => { + const { result } = renderHook(() => useReducer(ruleFormStateReducer, initialState)); + + const dispatch = result.current[1]; + + act(() => { + dispatch({ + type: 'setParams', + payload: { + anotherParamsValue: 'value-2', + }, + }); + }); + + expect(result.current[0].formData).toEqual({ + ...initialState.formData, + params: { + anotherParamsValue: 'value-2', + }, + }); + expect(validateRuleBase).toHaveBeenCalled(); + expect(validateRuleParams).toHaveBeenCalled(); + }); + + test('setParamsProperty works correctly', () => { + const { result } = renderHook(() => useReducer(ruleFormStateReducer, initialState)); + + const dispatch = result.current[1]; + + act(() => { + dispatch({ + type: 'setParamsProperty', + payload: { + property: 'anotherParamsValue', + value: 'value-2', + }, + }); + }); + + expect(result.current[0].formData).toEqual({ + ...initialState.formData, + params: { + ...initialState.formData.params, + anotherParamsValue: 'value-2', + }, + }); + expect(validateRuleBase).toHaveBeenCalled(); + expect(validateRuleParams).toHaveBeenCalled(); + }); + + test('setSchedule works correctly', () => { + const { result } = renderHook(() => useReducer(ruleFormStateReducer, initialState)); + + const dispatch = result.current[1]; + + act(() => { + dispatch({ + type: 'setSchedule', + payload: { interval: '10m' }, + }); + }); + + expect(result.current[0].formData).toEqual({ + ...initialState.formData, + schedule: { interval: '10m' }, + }); + expect(validateRuleBase).toHaveBeenCalled(); + expect(validateRuleParams).toHaveBeenCalled(); + }); + + test('setAlertDelay works correctly', () => { + const { result } = renderHook(() => useReducer(ruleFormStateReducer, initialState)); + + const dispatch = result.current[1]; + + act(() => { + dispatch({ + type: 'setAlertDelay', + payload: { active: 5 }, + }); + }); + + expect(result.current[0].formData).toEqual({ + ...initialState.formData, + alertDelay: { active: 5 }, + }); + expect(validateRuleBase).toHaveBeenCalled(); + expect(validateRuleParams).toHaveBeenCalled(); + }); + + test('setNotifyWhen works correctly', () => { + const { result } = renderHook(() => useReducer(ruleFormStateReducer, initialState)); + + const dispatch = result.current[1]; + + act(() => { + dispatch({ + type: 'setNotifyWhen', + payload: 'onActiveAlert', + }); + }); + + expect(result.current[0].formData).toEqual({ + ...initialState.formData, + notifyWhen: 'onActiveAlert', + }); + expect(validateRuleBase).toHaveBeenCalled(); + expect(validateRuleParams).toHaveBeenCalled(); + }); + + test('setConsumer works correctly', () => { + const { result } = renderHook(() => useReducer(ruleFormStateReducer, initialState)); + + const dispatch = result.current[1]; + + act(() => { + dispatch({ + type: 'setConsumer', + payload: 'logs', + }); + }); + + expect(result.current[0].formData).toEqual({ + ...initialState.formData, + consumer: 'logs', + }); + expect(validateRuleBase).toHaveBeenCalled(); + expect(validateRuleParams).toHaveBeenCalled(); + }); + + test('setMultiConsumer works correctly', () => { + const { result } = renderHook(() => useReducer(ruleFormStateReducer, initialState)); + + const dispatch = result.current[1]; + + act(() => { + dispatch({ + type: 'setMultiConsumer', + payload: 'logs', + }); + }); + + expect(result.current[0].multiConsumerSelection).toEqual('logs'); + expect(validateRuleBase).not.toHaveBeenCalled(); + expect(validateRuleParams).not.toHaveBeenCalled(); + }); + + test('setMetadata works correctly', () => { + const { result } = renderHook(() => useReducer(ruleFormStateReducer, initialState)); + + const dispatch = result.current[1]; + + act(() => { + dispatch({ + type: 'setMetadata', + payload: { + value1: 'value1', + value2: 'value2', + }, + }); + }); + + expect(result.current[0].metadata).toEqual({ + value1: 'value1', + value2: 'value2', + }); + expect(validateRuleBase).not.toHaveBeenCalled(); + expect(validateRuleParams).not.toHaveBeenCalled(); + }); +}); diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_state/rule_form_state_reducer.ts b/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_state/rule_form_state_reducer.ts new file mode 100644 index 0000000000000..727a6078aedb9 --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_form_state/rule_form_state_reducer.ts @@ -0,0 +1,195 @@ +/* + * Copyright 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 { RuleFormData, RuleFormState } from '../types'; +import { validateRuleBase, validateRuleParams } from '../validation'; + +export type RuleFormStateReducerAction = + | { + type: 'setRule'; + payload: RuleFormData; + } + | { + type: 'setRuleProperty'; + payload: { + property: string; + value: unknown; + }; + } + | { + type: 'setName'; + payload: RuleFormData['name']; + } + | { + type: 'setTags'; + payload: RuleFormData['tags']; + } + | { + type: 'setParams'; + payload: RuleFormData['params']; + } + | { + type: 'setParamsProperty'; + payload: { + property: string; + value: unknown; + }; + } + | { + type: 'setSchedule'; + payload: RuleFormData['schedule']; + } + | { + type: 'setAlertDelay'; + payload: RuleFormData['alertDelay']; + } + | { + type: 'setNotifyWhen'; + payload: RuleFormData['notifyWhen']; + } + | { + type: 'setConsumer'; + payload: RuleFormData['consumer']; + } + | { + type: 'setMultiConsumer'; + payload: RuleFormState['multiConsumerSelection']; + } + | { + type: 'setMetadata'; + payload: Record; + }; + +const getUpdateWithValidation = + (ruleFormState: RuleFormState) => + (updater: () => RuleFormData): RuleFormState => { + const { minimumScheduleInterval, selectedRuleTypeModel, multiConsumerSelection } = + ruleFormState; + + const formData = updater(); + + const formDataWithMultiConsumer = { + ...formData, + ...(multiConsumerSelection ? { consumer: multiConsumerSelection } : {}), + }; + + return { + ...ruleFormState, + formData, + baseErrors: validateRuleBase({ + formData: formDataWithMultiConsumer, + minimumScheduleInterval, + }), + paramsErrors: validateRuleParams({ + formData: formDataWithMultiConsumer, + ruleTypeModel: selectedRuleTypeModel, + }), + }; + }; + +export const ruleFormStateReducer = ( + ruleFormState: RuleFormState, + action: RuleFormStateReducerAction +): RuleFormState => { + const { formData } = ruleFormState; + const updateWithValidation = getUpdateWithValidation(ruleFormState); + + switch (action.type) { + case 'setRule': { + const { payload } = action; + return updateWithValidation(() => payload); + } + case 'setRuleProperty': { + const { + payload: { property, value }, + } = action; + return updateWithValidation(() => ({ + ...ruleFormState.formData, + [property]: value, + })); + } + case 'setName': { + const { payload } = action; + return updateWithValidation(() => ({ + ...formData, + name: payload, + })); + } + case 'setTags': { + const { payload } = action; + return updateWithValidation(() => ({ + ...formData, + tags: payload, + })); + } + case 'setParams': { + const { payload } = action; + return updateWithValidation(() => ({ + ...formData, + params: payload, + })); + } + case 'setParamsProperty': { + const { + payload: { property, value }, + } = action; + return updateWithValidation(() => ({ + ...formData, + params: { + ...formData.params, + [property]: value, + }, + })); + } + case 'setSchedule': { + const { payload } = action; + return updateWithValidation(() => ({ + ...formData, + schedule: payload, + })); + } + case 'setAlertDelay': { + const { payload } = action; + return updateWithValidation(() => ({ + ...formData, + alertDelay: payload, + })); + } + case 'setNotifyWhen': { + const { payload } = action; + return updateWithValidation(() => ({ + ...formData, + notifyWhen: payload, + })); + } + case 'setConsumer': { + const { payload } = action; + return updateWithValidation(() => ({ + ...formData, + consumer: payload, + })); + } + case 'setMultiConsumer': { + const { payload } = action; + return { + ...ruleFormState, + multiConsumerSelection: payload, + }; + } + case 'setMetadata': { + const { payload } = action; + return { + ...ruleFormState, + metadata: payload, + }; + } + default: { + return ruleFormState; + } + } +}; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/index.ts b/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/index.ts new file mode 100644 index 0000000000000..6bd6f350a560d --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/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. + */ + +export * from './rule_page'; +export * from './rule_page_name_input'; +export * from './rule_page_footer'; +export * from './rule_page_confirm_create_rule'; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/rule_page.test.tsx b/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/rule_page.test.tsx new file mode 100644 index 0000000000000..f57aa8f09102b --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/rule_page.test.tsx @@ -0,0 +1,115 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React from 'react'; +import { fireEvent, render, screen } from '@testing-library/react'; +import { RulePage } from './rule_page'; +import { + RULE_FORM_PAGE_RULE_DEFINITION_TITLE, + RULE_FORM_PAGE_RULE_ACTIONS_TITLE, + RULE_FORM_PAGE_RULE_DETAILS_TITLE, +} from '../translations'; +import { RuleFormData } from '../types'; + +jest.mock('../rule_definition', () => ({ + RuleDefinition: () =>
, +})); + +jest.mock('../rule_actions', () => ({ + RuleActions: () =>
, +})); + +jest.mock('../rule_details', () => ({ + RuleDetails: () =>
, +})); + +jest.mock('../hooks', () => ({ + useRuleFormState: jest.fn(), + useRuleFormDispatch: jest.fn(), +})); + +const { useRuleFormState } = jest.requireMock('../hooks'); + +const navigateToUrl = jest.fn(); + +const formDataMock: RuleFormData = { + params: { + aggType: 'count', + termSize: 5, + thresholdComparator: '>', + timeWindowSize: 5, + timeWindowUnit: 'm', + groupBy: 'all', + threshold: [1000], + index: ['.kibana'], + timeField: 'alert.executionStatus.lastExecutionDate', + }, + consumer: 'stackAlerts', + schedule: { interval: '1m' }, + tags: [], + name: 'test', + notifyWhen: 'onActionGroupChange', + alertDelay: { + active: 10, + }, +}; + +useRuleFormState.mockReturnValue({ + plugins: { + application: { + navigateToUrl, + }, + }, + baseErrors: {}, + paramsErrors: {}, + multiConsumerSelection: 'logs', + formData: formDataMock, +}); + +const onSave = jest.fn(); +const returnUrl = 'management'; + +describe('rulePage', () => { + afterEach(() => { + jest.clearAllMocks(); + }); + + test('renders correctly', () => { + render(); + + expect(screen.getByText(RULE_FORM_PAGE_RULE_DEFINITION_TITLE)).toBeInTheDocument(); + expect(screen.getByText(RULE_FORM_PAGE_RULE_ACTIONS_TITLE)).toBeInTheDocument(); + expect(screen.getByText(RULE_FORM_PAGE_RULE_DETAILS_TITLE)).toBeInTheDocument(); + }); + + test('should call onSave when save button is pressed', () => { + render(); + + fireEvent.click(screen.getByTestId('rulePageFooterSaveButton')); + fireEvent.click(screen.getByTestId('confirmModalConfirmButton')); + + expect(onSave).toHaveBeenCalledWith({ + ...formDataMock, + consumer: 'logs', + }); + }); + + test('should call onCancel when the cancel button is clicked', () => { + render(); + + fireEvent.click(screen.getByTestId('rulePageFooterCancelButton')); + expect(navigateToUrl).toHaveBeenCalledWith('management'); + }); + + test('should call onCancel when the return button is clicked', () => { + render(); + + fireEvent.click(screen.getByTestId('rulePageReturnButton')); + expect(navigateToUrl).toHaveBeenCalledWith('management'); + }); +}); diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/rule_page.tsx b/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/rule_page.tsx new file mode 100644 index 0000000000000..8b8b97e39a3ca --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/rule_page.tsx @@ -0,0 +1,135 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React, { useCallback, useMemo } from 'react'; +import { + EuiPageTemplate, + EuiHorizontalRule, + EuiSpacer, + EuiSteps, + EuiStepsProps, + useEuiBackgroundColorCSS, + EuiButtonEmpty, + EuiFlexGroup, + EuiFlexItem, +} from '@elastic/eui'; +import { + RuleDefinition, + RuleActions, + RuleDetails, + RulePageNameInput, + RulePageFooter, + RuleFormData, +} from '..'; +import { useRuleFormState } from '../hooks'; +import { + RULE_FORM_PAGE_RULE_DEFINITION_TITLE, + RULE_FORM_PAGE_RULE_ACTIONS_TITLE, + RULE_FORM_PAGE_RULE_DETAILS_TITLE, + RULE_FORM_RETURN_TITLE, +} from '../translations'; + +export interface RulePageProps { + isEdit?: boolean; + isSaving?: boolean; + returnUrl: string; + onSave: (formData: RuleFormData) => void; +} + +export const RulePage = (props: RulePageProps) => { + const { isEdit = false, isSaving = false, returnUrl, onSave } = props; + + const { + plugins: { application }, + formData, + multiConsumerSelection, + } = useRuleFormState(); + + const styles = useEuiBackgroundColorCSS().transparent; + + const onCancel = useCallback(() => { + application.navigateToUrl(returnUrl); + }, [application, returnUrl]); + + const onSaveInternal = useCallback(() => { + onSave({ + ...formData, + ...(multiConsumerSelection ? { consumer: multiConsumerSelection } : {}), + }); + }, [onSave, formData, multiConsumerSelection]); + + const steps: EuiStepsProps['steps'] = useMemo(() => { + return [ + { + title: RULE_FORM_PAGE_RULE_DEFINITION_TITLE, + children: , + }, + { + title: RULE_FORM_PAGE_RULE_ACTIONS_TITLE, + children: ( + <> + {}} /> + + + + ), + }, + { + title: RULE_FORM_PAGE_RULE_DETAILS_TITLE, + children: ( + <> + + + + + ), + }, + ]; + }, []); + + return ( + + + + + + {RULE_FORM_RETURN_TITLE} + + + + + + + + + + + + + + + + ); +}; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/rule_page_confirm_create_rule.test.tsx b/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/rule_page_confirm_create_rule.test.tsx new file mode 100644 index 0000000000000..9563a6a22855c --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/rule_page_confirm_create_rule.test.tsx @@ -0,0 +1,48 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React from 'react'; +import { fireEvent, render, screen } from '@testing-library/react'; +import { RulePageConfirmCreateRule } from './rule_page_confirm_create_rule'; +import { + CONFIRM_RULE_SAVE_CONFIRM_BUTTON_TEXT, + CONFIRM_RULE_SAVE_CANCEL_BUTTON_TEXT, + CONFIRM_RULE_SAVE_MESSAGE_TEXT, +} from '../translations'; + +const onConfirmMock = jest.fn(); +const onCancelMock = jest.fn(); + +describe('rulePageConfirmCreateRule', () => { + afterEach(() => { + jest.clearAllMocks(); + }); + + test('renders correctly', () => { + render(); + + expect(screen.getByTestId('rulePageConfirmCreateRule')).toBeInTheDocument(); + expect(screen.getByText(CONFIRM_RULE_SAVE_CONFIRM_BUTTON_TEXT)).toBeInTheDocument(); + expect(screen.getByText(CONFIRM_RULE_SAVE_CANCEL_BUTTON_TEXT)).toBeInTheDocument(); + expect(screen.getByText(CONFIRM_RULE_SAVE_MESSAGE_TEXT)).toBeInTheDocument(); + }); + + test('can confirm rule creation', () => { + render(); + + fireEvent.click(screen.getByTestId('confirmModalConfirmButton')); + expect(onConfirmMock).toHaveBeenCalled(); + }); + + test('can cancel rule creation', () => { + render(); + + fireEvent.click(screen.getByTestId('confirmModalCancelButton')); + expect(onCancelMock).toHaveBeenCalled(); + }); +}); diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/rule_page_confirm_create_rule.tsx b/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/rule_page_confirm_create_rule.tsx new file mode 100644 index 0000000000000..2436eb10aa6ca --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/rule_page_confirm_create_rule.tsx @@ -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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React from 'react'; +import { EuiConfirmModal, EuiText } from '@elastic/eui'; +import { + CONFIRMATION_RULE_SAVE_TITLE, + CONFIRM_RULE_SAVE_CONFIRM_BUTTON_TEXT, + CONFIRM_RULE_SAVE_CANCEL_BUTTON_TEXT, + CONFIRM_RULE_SAVE_MESSAGE_TEXT, +} from '../translations'; + +export interface RulePageConfirmCreateRuleProps { + onCancel: () => void; + onConfirm: () => void; +} + +export const RulePageConfirmCreateRule = (props: RulePageConfirmCreateRuleProps) => { + const { onCancel, onConfirm } = props; + + return ( + + +

{CONFIRM_RULE_SAVE_MESSAGE_TEXT}

+
+
+ ); +}; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/rule_page_footer.test.tsx b/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/rule_page_footer.test.tsx new file mode 100644 index 0000000000000..56edf2bacb15e --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/rule_page_footer.test.tsx @@ -0,0 +1,105 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React from 'react'; +import { fireEvent, render, screen } from '@testing-library/react'; +import { RulePageFooter } from './rule_page_footer'; +import { + RULE_PAGE_FOOTER_CANCEL_TEXT, + RULE_PAGE_FOOTER_CREATE_TEXT, + RULE_PAGE_FOOTER_SAVE_TEXT, + RULE_PAGE_FOOTER_SHOW_REQUEST_TEXT, +} from '../translations'; + +jest.mock('../validation/validate_form', () => ({ + hasRuleErrors: jest.fn(), +})); + +jest.mock('../hooks', () => ({ + useRuleFormState: jest.fn(), +})); + +const { hasRuleErrors } = jest.requireMock('../validation/validate_form'); +const { useRuleFormState } = jest.requireMock('../hooks'); + +const onSave = jest.fn(); +const onCancel = jest.fn(); + +hasRuleErrors.mockReturnValue(false); +useRuleFormState.mockReturnValue({ + baseErrors: {}, + paramsErrors: {}, +}); + +describe('rulePageFooter', () => { + afterEach(() => { + jest.clearAllMocks(); + }); + + test('renders create footer correctly', () => { + render(); + + expect(screen.getByText(RULE_PAGE_FOOTER_CANCEL_TEXT)).toBeInTheDocument(); + expect(screen.getByText(RULE_PAGE_FOOTER_SHOW_REQUEST_TEXT)).toBeInTheDocument(); + expect(screen.getByText(RULE_PAGE_FOOTER_CREATE_TEXT)).toBeInTheDocument(); + }); + + test('renders edit footer correctly', () => { + render(); + + expect(screen.getByText(RULE_PAGE_FOOTER_CANCEL_TEXT)).toBeInTheDocument(); + expect(screen.getByText(RULE_PAGE_FOOTER_SHOW_REQUEST_TEXT)).toBeInTheDocument(); + expect(screen.getByText(RULE_PAGE_FOOTER_SAVE_TEXT)).toBeInTheDocument(); + }); + + test('should open show request modal when the button is clicked', () => { + render(); + + fireEvent.click(screen.getByTestId('rulePageFooterShowRequestButton')); + expect(screen.getByTestId('rulePageShowRequestModal')).toBeInTheDocument(); + }); + + test('should show create rule confirmation', () => { + render(); + + fireEvent.click(screen.getByTestId('rulePageFooterSaveButton')); + expect(screen.getByTestId('rulePageConfirmCreateRule')).toBeInTheDocument(); + }); + + test('should show call onSave if clicking rule confirmation', () => { + render(); + + fireEvent.click(screen.getByTestId('rulePageFooterSaveButton')); + fireEvent.click(screen.getByTestId('confirmModalConfirmButton')); + expect(onSave).toHaveBeenCalled(); + }); + + test('should cancel when the cancel button is clicked', () => { + render(); + + fireEvent.click(screen.getByTestId('rulePageFooterCancelButton')); + expect(onCancel).toHaveBeenCalled(); + }); + + test('should disable buttons when saving', () => { + render(); + + expect(screen.getByTestId('rulePageFooterCancelButton')).toBeDisabled(); + expect(screen.getByTestId('rulePageFooterShowRequestButton')).toBeDisabled(); + expect(screen.getByTestId('rulePageFooterSaveButton')).toBeDisabled(); + }); + + test('should disable save and show request buttons when there is an error', () => { + hasRuleErrors.mockReturnValue(true); + render(); + + expect(screen.getByTestId('rulePageFooterShowRequestButton')).toBeDisabled(); + expect(screen.getByTestId('rulePageFooterSaveButton')).toBeDisabled(); + expect(screen.getByTestId('rulePageFooterCancelButton')).not.toBeDisabled(); + }); +}); diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/rule_page_footer.tsx b/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/rule_page_footer.tsx new file mode 100644 index 0000000000000..82f4d8fa15597 --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/rule_page_footer.tsx @@ -0,0 +1,126 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React, { useCallback, useMemo, useState } from 'react'; +import { EuiFlexGroup, EuiFlexItem, EuiButton, EuiButtonEmpty } from '@elastic/eui'; +import { + RULE_PAGE_FOOTER_CANCEL_TEXT, + RULE_PAGE_FOOTER_SHOW_REQUEST_TEXT, + RULE_PAGE_FOOTER_CREATE_TEXT, + RULE_PAGE_FOOTER_SAVE_TEXT, +} from '../translations'; +import { useRuleFormState } from '../hooks'; +import { hasRuleErrors } from '../validation'; +import { RulePageShowRequestModal } from './rule_page_show_request_modal'; +import { RulePageConfirmCreateRule } from './rule_page_confirm_create_rule'; + +export interface RulePageFooterProps { + isEdit?: boolean; + isSaving?: boolean; + onCancel: () => void; + onSave: () => void; +} + +export const RulePageFooter = (props: RulePageFooterProps) => { + const [showRequestModal, setShowRequestModal] = useState(false); + const [showCreateConfirmation, setShowCreateConfirmation] = useState(false); + + const { isEdit = false, isSaving = false, onCancel, onSave } = props; + + const { baseErrors, paramsErrors } = useRuleFormState(); + + const hasErrors = useMemo(() => { + return hasRuleErrors({ + baseErrors: baseErrors || {}, + paramsErrors: paramsErrors || {}, + }); + }, [baseErrors, paramsErrors]); + + const saveButtonText = useMemo(() => { + if (isEdit) { + return RULE_PAGE_FOOTER_SAVE_TEXT; + } + return RULE_PAGE_FOOTER_CREATE_TEXT; + }, [isEdit]); + + const onOpenShowRequestModalClick = useCallback(() => { + setShowRequestModal(true); + }, []); + + const onCloseShowRequestModalClick = useCallback(() => { + setShowRequestModal(false); + }, []); + + const onSaveClick = useCallback(() => { + if (isEdit) { + onSave(); + } else { + setShowCreateConfirmation(true); + } + }, [isEdit, onSave]); + + const onCreateConfirmClick = useCallback(() => { + setShowCreateConfirmation(false); + onSave(); + }, [onSave]); + + const onCreateCancelClick = useCallback(() => { + setShowCreateConfirmation(false); + }, []); + + return ( + <> + + + + {RULE_PAGE_FOOTER_CANCEL_TEXT} + + + + + + + {RULE_PAGE_FOOTER_SHOW_REQUEST_TEXT} + + + + + {saveButtonText} + + + + + + {showRequestModal && ( + + )} + {showCreateConfirmation && ( + + )} + + ); +}; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/rule_page_name_input.test.tsx b/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/rule_page_name_input.test.tsx new file mode 100644 index 0000000000000..01cfe884075a8 --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/rule_page_name_input.test.tsx @@ -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 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React from 'react'; +import { fireEvent, render, screen } from '@testing-library/react'; +import { RulePageNameInput } from './rule_page_name_input'; + +jest.mock('../hooks', () => ({ + useRuleFormState: jest.fn(), + useRuleFormDispatch: jest.fn(), +})); + +const { useRuleFormState, useRuleFormDispatch } = jest.requireMock('../hooks'); + +const dispatch = jest.fn(); + +useRuleFormState.mockReturnValue({ + formData: { + name: 'test-name', + }, +}); + +useRuleFormDispatch.mockReturnValue(dispatch); + +describe('rulePageNameInput', () => { + afterEach(() => { + jest.clearAllMocks(); + }); + + test('renders correctly', () => { + render(); + + expect(screen.getByText('test-name')).toBeInTheDocument(); + }); + + test('should become an input if the edit button is pressed', () => { + render(); + + fireEvent.click(screen.getByTestId('rulePageNameInputButton')); + + fireEvent.change(screen.getByTestId('rulePageNameInputField'), { + target: { + value: 'hello', + }, + }); + + expect(dispatch).toHaveBeenLastCalledWith({ + type: 'setName', + payload: 'hello', + }); + }); + + test('should be invalid if there is an error', () => { + useRuleFormState.mockReturnValue({ + formData: { + name: '', + }, + baseErrors: { + name: ['Invalid name'], + }, + }); + + render(); + + fireEvent.click(screen.getByTestId('rulePageNameInputButton')); + + expect(screen.getByTestId('rulePageNameInputField')).toBeInvalid(); + expect(screen.getByText('Invalid name')).toBeInTheDocument(); + }); +}); diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/rule_page_name_input.tsx b/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/rule_page_name_input.tsx new file mode 100644 index 0000000000000..f1278add5737b --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/rule_page_name_input.tsx @@ -0,0 +1,143 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React, { useState, useCallback, useMemo } from 'react'; +import { + EuiTitle, + EuiFieldText, + EuiButtonEmpty, + EuiButtonIcon, + EuiFlexGroup, + EuiFlexItem, + useEuiTheme, + EuiFormRow, +} from '@elastic/eui'; +import { + RULE_NAME_ARIA_LABEL_TEXT, + RULE_NAME_INPUT_TITLE, + RULE_NAME_INPUT_BUTTON_ARIA_LABEL, +} from '../translations'; +import { useRuleFormState, useRuleFormDispatch } from '../hooks'; + +export const RulePageNameInput = () => { + const [isEditing, setIsEditing] = useState(false); + + const { formData, baseErrors } = useRuleFormState(); + + const { name } = formData; + + const dispatch = useRuleFormDispatch(); + + const { euiTheme } = useEuiTheme(); + + const isNameInvalid = useMemo(() => { + return !!baseErrors?.name?.length; + }, [baseErrors]); + + const inputStyles: React.CSSProperties = useMemo(() => { + return { + fontSize: 'inherit', + fontWeight: 'inherit', + lineHeight: 'inherit', + padding: 'inherit', + boxShadow: 'none', + backgroundColor: euiTheme.colors.lightestShade, + }; + }, [euiTheme]); + + const buttonStyles: React.CSSProperties = useMemo(() => { + return { + padding: 'inherit', + }; + }, []); + + const onInputChange = useCallback( + (e: React.ChangeEvent) => { + dispatch({ + type: 'setName', + payload: e.target.value, + }); + }, + [dispatch] + ); + + const onEdit = useCallback(() => { + setIsEditing(true); + }, []); + + const onCancelEdit = useCallback(() => { + if (isNameInvalid) { + return; + } + setIsEditing(false); + }, [isNameInvalid]); + + const onkeyDown = useCallback( + (e: React.KeyboardEvent) => { + if (isNameInvalid) { + return; + } + if (e.key === 'Enter' || e.key === 'Escape') { + setIsEditing(false); + } + }, + [isNameInvalid] + ); + + if (isEditing) { + return ( + + + + +

+ +

+
+
+
+ + + +
+ ); + } + + return ( + + +

{name}

+
+
+ ); +}; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/rule_page_show_request_modal.test.tsx b/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/rule_page_show_request_modal.test.tsx new file mode 100644 index 0000000000000..eb74be908e1b0 --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/rule_page_show_request_modal.test.tsx @@ -0,0 +1,156 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React from 'react'; +import { fireEvent, render, screen } from '@testing-library/react'; +import { RulePageShowRequestModal } from './rule_page_show_request_modal'; +import { RuleFormData } from '../types'; + +jest.mock('../hooks', () => ({ + useRuleFormState: jest.fn(), +})); + +const { useRuleFormState } = jest.requireMock('../hooks'); + +const formData: RuleFormData = { + params: { + searchType: 'esQuery', + timeWindowSize: 5, + timeWindowUnit: 'm', + threshold: [1000], + thresholdComparator: '>', + size: 100, + esQuery: '{\n "query":{\n "match_all" : {}\n }\n }', + aggType: 'count', + groupBy: 'all', + termSize: 5, + excludeHitsFromPreviousRun: false, + sourceFields: [], + index: ['.kibana'], + timeField: 'created_at', + }, + consumer: 'stackAlerts', + ruleTypeId: '.es-query', + schedule: { interval: '1m' }, + tags: ['test'], + name: 'test', +}; + +const onCloseMock = jest.fn(); + +describe('rulePageShowRequestModal', () => { + afterEach(() => { + jest.clearAllMocks(); + }); + + test('renders create request correctly', async () => { + useRuleFormState.mockReturnValue({ formData, multiConsumerSelection: 'logs' }); + + render(); + + expect(screen.getByTestId('modalHeaderTitle').textContent).toBe('Create alerting rule request'); + expect(screen.getByTestId('modalSubtitle').textContent).toBe( + 'This Kibana request will create this rule.' + ); + expect(screen.getByTestId('modalRequestCodeBlock').textContent).toMatchInlineSnapshot(` + "POST kbn:/api/alerting/rule + { + \\"params\\": { + \\"searchType\\": \\"esQuery\\", + \\"timeWindowSize\\": 5, + \\"timeWindowUnit\\": \\"m\\", + \\"threshold\\": [ + 1000 + ], + \\"thresholdComparator\\": \\">\\", + \\"size\\": 100, + \\"esQuery\\": \\"{\\\\n \\\\\\"query\\\\\\":{\\\\n \\\\\\"match_all\\\\\\" : {}\\\\n }\\\\n }\\", + \\"aggType\\": \\"count\\", + \\"groupBy\\": \\"all\\", + \\"termSize\\": 5, + \\"excludeHitsFromPreviousRun\\": false, + \\"sourceFields\\": [], + \\"index\\": [ + \\".kibana\\" + ], + \\"timeField\\": \\"created_at\\" + }, + \\"consumer\\": \\"logs\\", + \\"schedule\\": { + \\"interval\\": \\"1m\\" + }, + \\"tags\\": [ + \\"test\\" + ], + \\"name\\": \\"test\\", + \\"rule_type_id\\": \\".es-query\\", + \\"actions\\": [] + }" + `); + }); + + test('renders edit request correctly', async () => { + useRuleFormState.mockReturnValue({ + formData, + multiConsumerSelection: 'logs', + id: 'test-id', + }); + + render(); + + expect(screen.getByTestId('modalHeaderTitle').textContent).toBe('Edit alerting rule request'); + expect(screen.getByTestId('modalSubtitle').textContent).toBe( + 'This Kibana request will edit this rule.' + ); + expect(screen.getByTestId('modalRequestCodeBlock').textContent).toMatchInlineSnapshot(` + "PUT kbn:/api/alerting/rule/test-id + { + \\"name\\": \\"test\\", + \\"tags\\": [ + \\"test\\" + ], + \\"schedule\\": { + \\"interval\\": \\"1m\\" + }, + \\"params\\": { + \\"searchType\\": \\"esQuery\\", + \\"timeWindowSize\\": 5, + \\"timeWindowUnit\\": \\"m\\", + \\"threshold\\": [ + 1000 + ], + \\"thresholdComparator\\": \\">\\", + \\"size\\": 100, + \\"esQuery\\": \\"{\\\\n \\\\\\"query\\\\\\":{\\\\n \\\\\\"match_all\\\\\\" : {}\\\\n }\\\\n }\\", + \\"aggType\\": \\"count\\", + \\"groupBy\\": \\"all\\", + \\"termSize\\": 5, + \\"excludeHitsFromPreviousRun\\": false, + \\"sourceFields\\": [], + \\"index\\": [ + \\".kibana\\" + ], + \\"timeField\\": \\"created_at\\" + }, + \\"actions\\": [] + }" + `); + }); + + test('can close modal', () => { + useRuleFormState.mockReturnValue({ + formData, + multiConsumerSelection: 'logs', + id: 'test-id', + }); + + render(); + fireEvent.click(screen.getByLabelText('Closes this modal window')); + expect(onCloseMock).toHaveBeenCalled(); + }); +}); diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/rule_page_show_request_modal.tsx b/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/rule_page_show_request_modal.tsx new file mode 100644 index 0000000000000..9d405e9aa920f --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/rule_page/rule_page_show_request_modal.tsx @@ -0,0 +1,151 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React, { useMemo } from 'react'; +import { pick, omit } from 'lodash'; +import { i18n } from '@kbn/i18n'; +import { + EuiModal, + EuiModalHeader, + EuiModalHeaderTitle, + EuiModalBody, + EuiCodeBlock, + EuiText, + EuiTextColor, + EuiFlexGroup, + EuiFlexItem, +} from '@elastic/eui'; +import { BASE_ALERTING_API_PATH } from '../../common/constants'; +import { RuleFormData } from '../types'; +import { + CreateRuleBody, + UPDATE_FIELDS, + UpdateRuleBody, + transformCreateRuleBody, + transformUpdateRuleBody, +} from '../../common/apis'; +import { useRuleFormState } from '../hooks'; + +const stringifyBodyRequest = ({ + formData, + isEdit, +}: { + formData: RuleFormData; + isEdit: boolean; +}): string => { + try { + const request = isEdit + ? transformUpdateRuleBody(pick(formData, UPDATE_FIELDS) as UpdateRuleBody) + : transformCreateRuleBody(omit(formData, 'id') as CreateRuleBody); + return JSON.stringify(request, null, 2); + } catch { + return SHOW_REQUEST_MODAL_ERROR; + } +}; + +export interface RulePageShowRequestModalProps { + onClose: () => void; + isEdit?: boolean; +} + +export const RulePageShowRequestModal = (props: RulePageShowRequestModalProps) => { + const { onClose, isEdit = false } = props; + + const { formData, id, multiConsumerSelection } = useRuleFormState(); + + const formattedRequest = useMemo(() => { + return stringifyBodyRequest({ + formData: { + ...formData, + ...(multiConsumerSelection ? { consumer: multiConsumerSelection } : {}), + }, + isEdit, + }); + }, [formData, isEdit, multiConsumerSelection]); + + return ( + + + + + + {SHOW_REQUEST_MODAL_TITLE(isEdit)} + + + + +

+ {SHOW_REQUEST_MODAL_SUBTITLE(isEdit)} +

+
+
+
+
+ + + {`${isEdit ? 'PUT' : 'POST'} kbn:${BASE_ALERTING_API_PATH}/rule${ + isEdit ? `/${id}` : '' + }\n${formattedRequest}`} + + +
+ ); +}; + +const SHOW_REQUEST_MODAL_EDIT = i18n.translate( + 'alertsUIShared.ruleForm.showRequestModal.subheadingTitleEdit', + { + defaultMessage: 'edit', + } +); + +const SHOW_REQUEST_MODAL_CREATE = i18n.translate( + 'alertsUIShared.ruleForm.showRequestModal.subheadingTitleCreate', + { + defaultMessage: 'create', + } +); + +const SHOW_REQUEST_MODAL_SUBTITLE = (edit: boolean) => + i18n.translate('alertsUIShared.ruleForm.showRequestModal.subheadingTitle', { + defaultMessage: 'This Kibana request will {requestType} this rule.', + values: { requestType: edit ? SHOW_REQUEST_MODAL_EDIT : SHOW_REQUEST_MODAL_CREATE }, + }); + +const SHOW_REQUEST_MODAL_TITLE_EDIT = i18n.translate( + 'alertsUIShared.ruleForm.showRequestModal.headerTitleEdit', + { + defaultMessage: 'Edit', + } +); + +const SHOW_REQUEST_MODAL_TITLE_CREATE = i18n.translate( + 'alertsUIShared.ruleForm.showRequestModal.headerTitleCreate', + { + defaultMessage: 'Create', + } +); + +const SHOW_REQUEST_MODAL_TITLE = (edit: boolean) => + i18n.translate('alertsUIShared.ruleForm.showRequestModal.headerTitle', { + defaultMessage: '{requestType} alerting rule request', + values: { + requestType: edit ? SHOW_REQUEST_MODAL_TITLE_EDIT : SHOW_REQUEST_MODAL_TITLE_CREATE, + }, + }); + +const SHOW_REQUEST_MODAL_ERROR = i18n.translate( + 'alertsUIShared.ruleForm.showRequestModal.somethingWentWrongDescription', + { + defaultMessage: 'Sorry about that, something went wrong.', + } +); diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/translations.ts b/packages/kbn-alerts-ui-shared/src/rule_form/translations.ts index d9c86b60e7d9f..326c384dca528 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/translations.ts +++ b/packages/kbn-alerts-ui-shared/src/rule_form/translations.ts @@ -217,9 +217,253 @@ export const RULE_NAME_INPUT_TITLE = i18n.translate( } ); +export const RULE_NAME_INPUT_BUTTON_ARIA_LABEL = i18n.translate( + 'alertsUIShared.ruleForm.ruleDetails.ruleNameInputButtonAriaLabel', + { + defaultMessage: 'Save rule name', + } +); + export const RULE_TAG_INPUT_TITLE = i18n.translate( 'alertsUIShared.ruleForm.ruleDetails.ruleTagsInputTitle', { defaultMessage: 'Tags', } ); + +export const RULE_TAG_PLACEHOLDER = i18n.translate( + 'alertsUIShared.ruleForm.ruleDetails.ruleTagsPlaceholder', + { + defaultMessage: 'Add tags', + } +); + +export const RULE_NAME_ARIA_LABEL_TEXT = i18n.translate( + 'alertsUIShared.ruleForm.rulePage.ruleNameAriaLabelText', + { + defaultMessage: 'Edit rule name', + } +); + +export const RULE_PAGE_FOOTER_CANCEL_TEXT = i18n.translate( + 'alertsUIShared.ruleForm.rulePageFooter.cancelText', + { + defaultMessage: 'Cancel', + } +); + +export const RULE_PAGE_FOOTER_SHOW_REQUEST_TEXT = i18n.translate( + 'alertsUIShared.ruleForm.rulePageFooter.showRequestText', + { + defaultMessage: 'Show request', + } +); + +export const RULE_PAGE_FOOTER_CREATE_TEXT = i18n.translate( + 'alertsUIShared.ruleForm.rulePageFooter.createText', + { + defaultMessage: 'Create rule', + } +); + +export const RULE_PAGE_FOOTER_SAVE_TEXT = i18n.translate( + 'alertsUIShared.ruleForm.rulePageFooter.saveText', + { + defaultMessage: 'Save rule', + } +); + +export const HEALTH_CHECK_ALERTS_ERROR_TITLE = i18n.translate( + 'alertsUIShared.healthCheck.alertsErrorTitle', + { + defaultMessage: 'You must enable Alerting and Actions', + } +); + +export const HEALTH_CHECK_ALERTS_ERROR_TEXT = i18n.translate( + 'alertsUIShared.healthCheck.alertsErrorText', + { + defaultMessage: 'To create a rule, you must enable the alerting and actions plugins.', + } +); + +export const HEALTH_CHECK_ENCRYPTION_ERROR_TITLE = i18n.translate( + 'alertsUIShared.healthCheck.encryptionErrorTitle', + { + defaultMessage: 'Additional setup required', + } +); + +export const HEALTH_CHECK_ENCRYPTION_ERROR_TEXT = i18n.translate( + 'alertsUIShared.healthCheck.encryptionErrorText', + { + defaultMessage: 'You must configure an encryption key to use Alerting.', + } +); + +export const HEALTH_CHECK_API_KEY_ENCRYPTION_ERROR_TITLE = i18n.translate( + 'alertsUIShared.healthCheck.healthCheck.apiKeysAndEncryptionErrorTitle', + { + defaultMessage: 'Additional setup required', + } +); + +export const HEALTH_CHECK_API_KEY_ENCRYPTION_ERROR_TEXT = i18n.translate( + 'alertsUIShared.healthCheck.apiKeysAndEncryptionErrorText', + { + defaultMessage: 'You must enable API keys and configure an encryption key to use Alerting.', + } +); + +export const HEALTH_CHECK_API_KEY_DISABLED_ERROR_TITLE = i18n.translate( + 'alertsUIShared.healthCheck.apiKeysDisabledErrorTitle', + { + defaultMessage: 'Additional setup required', + } +); + +export const HEALTH_CHECK_API_KEY_DISABLED_ERROR_TEXT = i18n.translate( + 'alertsUIShared.healthCheck.apiKeysDisabledErrorText', + { + defaultMessage: 'You must enable API keys to use Alerting.', + } +); + +export const HEALTH_CHECK_ACTION_TEXT = i18n.translate('alertsUIShared.healthCheck.actionText', { + defaultMessage: 'Learn more.', +}); + +export const RULE_FORM_ROUTE_PARAMS_ERROR_TITLE = i18n.translate( + 'alertsUIShared.ruleForm.routeParamsErrorTitle', + { + defaultMessage: 'Unable to load rule form.', + } +); + +export const RULE_FORM_ROUTE_PARAMS_ERROR_TEXT = i18n.translate( + 'alertsUIShared.ruleForm.routeParamsErrorText', + { + defaultMessage: 'There was an error loading the rule form. Please ensure the route is correct.', + } +); + +export const RULE_FORM_RULE_TYPE_NOT_FOUND_ERROR_TITLE = i18n.translate( + 'alertsUIShared.ruleForm.ruleTypeNotFoundErrorTitle', + { + defaultMessage: 'Unable to load rule type.', + } +); + +export const RULE_FORM_RULE_NOT_FOUND_ERROR_TITLE = i18n.translate( + 'alertsUIShared.ruleForm.ruleNotFoundErrorTitle', + { + defaultMessage: 'Unable to load rule', + } +); + +export const RULE_FORM_RULE_TYPE_NOT_FOUND_ERROR_TEXT = i18n.translate( + 'alertsUIShared.ruleForm.ruleTypeNotFoundErrorText', + { + defaultMessage: + 'There was an error loading the rule type. Please ensure you have access to the rule type selected.', + } +); + +export const RULE_FORM_RULE_NOT_FOUND_ERROR_TEXT = i18n.translate( + 'alertsUIShared.ruleForm.ruleNotFoundErrorText', + { + defaultMessage: + 'There was an error loading the rule. Please ensure you have access to the rule selected.', + } +); + +export const RULE_CREATE_SUCCESS_TEXT = (ruleName: string) => + i18n.translate('alertsUIShared.ruleForm.createSuccessText', { + defaultMessage: 'Created rule "{ruleName}"', + values: { + ruleName, + }, + }); + +export const RULE_CREATE_ERROR_TEXT = i18n.translate('alertsUIShared.ruleForm.createErrorText', { + defaultMessage: 'Cannot create rule.', +}); + +export const RULE_EDIT_ERROR_TEXT = i18n.translate('alertsUIShared.ruleForm.editErrorText', { + defaultMessage: 'Cannot update rule.', +}); + +export const RULE_EDIT_SUCCESS_TEXT = (ruleName: string) => + i18n.translate('alertsUIShared.ruleForm.editSuccessText', { + defaultMessage: 'Updated "{ruleName}"', + values: { + ruleName, + }, + }); + +export const CIRCUIT_BREAKER_SEE_FULL_ERROR_TEXT = i18n.translate( + 'alertsUIShared.ruleForm.circuitBreakerSeeFullErrorText', + { + defaultMessage: 'See full error', + } +); + +export const CIRCUIT_BREAKER_HIDE_FULL_ERROR_TEXT = i18n.translate( + 'alertsUIShared.ruleForm.circuitBreakerHideFullErrorText', + { + defaultMessage: 'Hide full error', + } +); + +export const CONFIRMATION_RULE_SAVE_TITLE = i18n.translate( + 'alertsUIShared.ruleForm.confirmRuleSaveTitle', + { + defaultMessage: 'Save rule with no actions?', + } +); + +export const CONFIRM_RULE_SAVE_CONFIRM_BUTTON_TEXT = i18n.translate( + 'alertsUIShared.ruleForm.confirmRuleSaveConfirmButtonText', + { + defaultMessage: 'Save rule', + } +); + +export const CONFIRM_RULE_SAVE_CANCEL_BUTTON_TEXT = i18n.translate( + 'alertsUIShared.ruleForm.confirmRuleSaveCancelButtonText', + { + defaultMessage: 'Cancel', + } +); + +export const CONFIRM_RULE_SAVE_MESSAGE_TEXT = i18n.translate( + 'alertsUIShared.ruleForm.confirmRuleSaveMessageText', + { + defaultMessage: 'You can add an action at anytime.', + } +); + +export const RULE_FORM_PAGE_RULE_DEFINITION_TITLE = i18n.translate( + 'alertsUIShared.ruleForm.ruleDefinitionTitle', + { + defaultMessage: 'Rule definition', + } +); + +export const RULE_FORM_PAGE_RULE_ACTIONS_TITLE = i18n.translate( + 'alertsUIShared.ruleForm.ruleActionsTitle', + { + defaultMessage: 'Actions', + } +); + +export const RULE_FORM_PAGE_RULE_DETAILS_TITLE = i18n.translate( + 'alertsUIShared.ruleForm.ruleDetailsTitle', + { + defaultMessage: 'Rule details', + } +); + +export const RULE_FORM_RETURN_TITLE = i18n.translate('alertsUIShared.ruleForm.returnTitle', { + defaultMessage: 'Return', +}); diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/types.ts b/packages/kbn-alerts-ui-shared/src/rule_form/types.ts index dff86d5ce61fd..9b2d5bfac281b 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/types.ts +++ b/packages/kbn-alerts-ui-shared/src/rule_form/types.ts @@ -6,7 +6,27 @@ * Side Public License, v 1. */ -import { Rule, RuleTypeParams } from '../common'; +import type { DocLinksStart } from '@kbn/core-doc-links-browser'; +import type { HttpStart } from '@kbn/core-http-browser'; +import type { I18nStart } from '@kbn/core-i18n-browser'; +import type { ThemeServiceStart } from '@kbn/core-theme-browser'; +import type { ApplicationStart } from '@kbn/core-application-browser'; +import type { NotificationsStart } from '@kbn/core-notifications-browser'; +import type { ChartsPluginSetup } from '@kbn/charts-plugin/public'; +import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; +import type { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; +import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public'; +import { RuleCreationValidConsumer } from '@kbn/rule-data-utils'; +import { + MinimumScheduleInterval, + Rule, + RuleFormBaseErrors, + RuleFormParamsErrors, + RuleTypeModel, + RuleTypeParams, + RuleTypeRegistryContract, + RuleTypeWithDescription, +} from '../common/types'; export interface RuleFormData { name: Rule['name']; @@ -19,5 +39,34 @@ export interface RuleFormData { ruleTypeId?: Rule['ruleTypeId']; } +export interface RuleFormPlugins { + http: HttpStart; + i18n: I18nStart; + theme: ThemeServiceStart; + application: ApplicationStart; + notification: NotificationsStart; + charts: ChartsPluginSetup; + data: DataPublicPluginStart; + dataViews: DataViewsPublicPluginStart; + unifiedSearch: UnifiedSearchPublicPluginStart; + docLinks: DocLinksStart; + ruleTypeRegistry: RuleTypeRegistryContract; +} + +export interface RuleFormState { + id?: string; + formData: RuleFormData; + plugins: RuleFormPlugins; + baseErrors?: RuleFormBaseErrors; + paramsErrors?: RuleFormParamsErrors; + selectedRuleType: RuleTypeWithDescription; + selectedRuleTypeModel: RuleTypeModel; + multiConsumerSelection?: RuleCreationValidConsumer | null; + metadata?: Record; + minimumScheduleInterval?: MinimumScheduleInterval; + canShowConsumerSelection?: boolean; + validConsumers?: RuleCreationValidConsumer[]; +} + export type InitialRule = Partial & Pick; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/utils/get_authorized_consumers.ts b/packages/kbn-alerts-ui-shared/src/rule_form/utils/get_authorized_consumers.ts new file mode 100644 index 0000000000000..7fdde54ec53b9 --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/utils/get_authorized_consumers.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 { RuleCreationValidConsumer } from '@kbn/rule-data-utils'; +import { RuleTypeWithDescription } from '../../common/types'; + +export const getAuthorizedConsumers = ({ + ruleType, + validConsumers, +}: { + ruleType: RuleTypeWithDescription; + validConsumers: RuleCreationValidConsumer[]; +}) => { + if (!ruleType.authorizedConsumers) { + return []; + } + return Object.entries(ruleType.authorizedConsumers).reduce( + (result, [authorizedConsumer, privilege]) => { + if ( + privilege.all && + validConsumers.includes(authorizedConsumer as RuleCreationValidConsumer) + ) { + result.push(authorizedConsumer as RuleCreationValidConsumer); + } + return result; + }, + [] + ); +}; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/utils/get_authorized_rule_types.ts b/packages/kbn-alerts-ui-shared/src/rule_form/utils/get_authorized_rule_types.ts new file mode 100644 index 0000000000000..38e63c58d7393 --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/utils/get_authorized_rule_types.ts @@ -0,0 +1,91 @@ +/* + * Copyright 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 { RuleCreationValidConsumer } from '@kbn/rule-data-utils'; +import { + RuleTypeModel, + RuleTypeRegistryContract, + RuleTypeWithDescription, +} from '../../common/types'; +import { ALERTING_FEATURE_ID, MULTI_CONSUMER_RULE_TYPE_IDS } from '../constants'; + +export type RuleTypeItems = Array<{ + ruleTypeModel: RuleTypeModel; + ruleType: RuleTypeWithDescription; +}>; + +const hasAllPrivilege = (consumer: string, ruleType: RuleTypeWithDescription): boolean => { + return ruleType.authorizedConsumers[consumer]?.all ?? false; +}; + +const authorizedToDisplayRuleType = ({ + consumer, + ruleType, + validConsumers, +}: { + consumer: string; + ruleType: RuleTypeWithDescription; + validConsumers?: RuleCreationValidConsumer[]; +}) => { + if (!ruleType) { + return false; + } + // If we have a generic threshold/ES query rule... + if (MULTI_CONSUMER_RULE_TYPE_IDS.includes(ruleType.id)) { + // And an array of valid consumers are passed in, we will show it + // if the rule type has at least one of the consumers as authorized + if (Array.isArray(validConsumers)) { + return validConsumers.some((c) => hasAllPrivilege(c, ruleType)); + } + // If no array was passed in, then we will show it if at least one of its + // authorized consumers allows it to be shown. + return Object.entries(ruleType.authorizedConsumers).some(([_, privilege]) => { + return privilege.all; + }); + } + // For non-generic threshold/ES query rules, we will still do the check + // against `alerts` since we are still setting rule consumers to `alerts` + return hasAllPrivilege(consumer, ruleType); +}; + +export const getAvailableRuleTypes = ({ + consumer, + ruleTypes, + ruleTypeRegistry, + validConsumers, +}: { + consumer: string; + ruleTypes: RuleTypeWithDescription[]; + ruleTypeRegistry: RuleTypeRegistryContract; + validConsumers?: RuleCreationValidConsumer[]; +}): RuleTypeItems => { + return ruleTypeRegistry + .list() + .reduce((arr: RuleTypeItems, ruleTypeRegistryItem: RuleTypeModel) => { + const ruleType = ruleTypes.find((item) => ruleTypeRegistryItem.id === item.id); + if (ruleType) { + arr.push({ + ruleType, + ruleTypeModel: ruleTypeRegistryItem, + }); + } + return arr; + }, []) + .filter(({ ruleType }) => + authorizedToDisplayRuleType({ + consumer, + ruleType, + validConsumers, + }) + ) + .filter((item) => + consumer === ALERTING_FEATURE_ID + ? !item.ruleTypeModel.requiresAppContext + : item.ruleType!.producer === consumer + ); +}; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/utils/get_errors.ts b/packages/kbn-alerts-ui-shared/src/rule_form/utils/get_errors.ts deleted file mode 100644 index b0ff1f1fd067b..0000000000000 --- a/packages/kbn-alerts-ui-shared/src/rule_form/utils/get_errors.ts +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import { - RuleTypeModel, - RuleFormErrors, - ValidationResult, - MinimumScheduleInterval, -} from '../../common'; -import { parseDuration, formatDuration } from './parse_duration'; -import { - NAME_REQUIRED_TEXT, - CONSUMER_REQUIRED_TEXT, - RULE_TYPE_REQUIRED_TEXT, - INTERVAL_REQUIRED_TEXT, - INTERVAL_MINIMUM_TEXT, - RULE_ALERT_DELAY_BELOW_MINIMUM_TEXT, -} from '../translations'; -import { InitialRule } from '../types'; - -export function validateBaseProperties({ - rule, - minimumScheduleInterval, -}: { - rule: InitialRule; - minimumScheduleInterval?: MinimumScheduleInterval; -}): ValidationResult { - const validationResult = { errors: {} }; - - const errors = { - name: new Array(), - interval: new Array(), - consumer: new Array(), - ruleTypeId: new Array(), - actionConnectors: new Array(), - alertDelay: new Array(), - }; - - validationResult.errors = errors; - - if (!rule.name) { - errors.name.push(NAME_REQUIRED_TEXT); - } - - if (rule.consumer === null) { - errors.consumer.push(CONSUMER_REQUIRED_TEXT); - } - - if (rule.schedule.interval.length < 2) { - errors.interval.push(INTERVAL_REQUIRED_TEXT); - } else if (minimumScheduleInterval && minimumScheduleInterval.enforce) { - const duration = parseDuration(rule.schedule.interval); - const minimumDuration = parseDuration(minimumScheduleInterval.value); - if (duration < minimumDuration) { - errors.interval.push( - INTERVAL_MINIMUM_TEXT(formatDuration(minimumScheduleInterval.value, true)) - ); - } - } - - if (!rule.ruleTypeId) { - errors.ruleTypeId.push(RULE_TYPE_REQUIRED_TEXT); - } - - if (rule.alertDelay?.active && rule.alertDelay?.active < 1) { - errors.alertDelay.push(RULE_ALERT_DELAY_BELOW_MINIMUM_TEXT); - } - - return validationResult; -} - -export function getRuleErrors({ - rule, - ruleTypeModel, - minimumScheduleInterval, - isServerless, -}: { - rule: InitialRule; - ruleTypeModel: RuleTypeModel | null; - minimumScheduleInterval?: MinimumScheduleInterval; - isServerless?: boolean; -}) { - const ruleParamsErrors: RuleFormErrors = ruleTypeModel - ? ruleTypeModel.validate(rule.params, isServerless).errors - : {}; - - const ruleBaseErrors = validateBaseProperties({ - rule, - minimumScheduleInterval, - }).errors as RuleFormErrors; - - const ruleErrors = { - ...ruleParamsErrors, - ...ruleBaseErrors, - } as RuleFormErrors; - - return { - ruleParamsErrors, - ruleBaseErrors, - ruleErrors, - }; -} diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/utils/get_initial_consumer.ts b/packages/kbn-alerts-ui-shared/src/rule_form/utils/get_initial_consumer.ts new file mode 100644 index 0000000000000..15d61ac186e16 --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/utils/get_initial_consumer.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 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 { RuleTypeWithDescription } from '../../common'; +import { MULTI_CONSUMER_RULE_TYPE_IDS } from '../constants'; + +export const getInitialConsumer = ({ + consumer, + ruleType, + shouldUseRuleProducer, +}: { + consumer: string; + ruleType: RuleTypeWithDescription; + shouldUseRuleProducer: boolean; +}) => { + if (shouldUseRuleProducer && !MULTI_CONSUMER_RULE_TYPE_IDS.includes(ruleType.id)) { + return ruleType.producer; + } + return consumer; +}; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/utils/get_initial_multi_consumer.ts b/packages/kbn-alerts-ui-shared/src/rule_form/utils/get_initial_multi_consumer.ts new file mode 100644 index 0000000000000..029c0de434a78 --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/utils/get_initial_multi_consumer.ts @@ -0,0 +1,78 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { AlertConsumers, RuleCreationValidConsumer } from '@kbn/rule-data-utils'; +import { RuleTypeWithDescription } from '../../common/types'; +import { MULTI_CONSUMER_RULE_TYPE_IDS } from '../constants'; +import { FEATURE_NAME_MAP } from '../translations'; + +export const getValidatedMultiConsumer = ({ + multiConsumerSelection, + validConsumers, +}: { + multiConsumerSelection?: RuleCreationValidConsumer | null; + validConsumers: RuleCreationValidConsumer[]; +}) => { + if ( + multiConsumerSelection && + validConsumers.includes(multiConsumerSelection) && + FEATURE_NAME_MAP[multiConsumerSelection] + ) { + return multiConsumerSelection; + } + return null; +}; + +export const getInitialMultiConsumer = ({ + multiConsumerSelection, + validConsumers, + ruleType, +}: { + multiConsumerSelection?: RuleCreationValidConsumer | null; + validConsumers: RuleCreationValidConsumer[]; + ruleType: RuleTypeWithDescription; +}): RuleCreationValidConsumer | null => { + // If rule type doesn't support multi-consumer or no valid consumers exists, + // return nothing + if (!MULTI_CONSUMER_RULE_TYPE_IDS.includes(ruleType.id) || validConsumers.length === 0) { + return null; + } + + // Use the only value in valid consumers + if (validConsumers.length === 1) { + return validConsumers[0]; + } + + // If o11y is in the valid consumers, just use that + if (validConsumers.includes(AlertConsumers.OBSERVABILITY)) { + return AlertConsumers.OBSERVABILITY; + } + + // User passed in null explicitly, won't set initial consumer + if (multiConsumerSelection === null) { + return null; + } + + const validatedConsumer = getValidatedMultiConsumer({ + multiConsumerSelection, + validConsumers, + }); + + // If validated consumer exists and no o11y in valid consumers, just use that + if (validatedConsumer) { + return validatedConsumer; + } + + // If validated consumer doesn't exist and stack alerts does, use that + if (validConsumers.includes(AlertConsumers.STACK_ALERTS)) { + return AlertConsumers.STACK_ALERTS; + } + + // All else fails, just use the first valid consumer + return validConsumers[0]; +}; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/utils/get_initial_schedule.ts b/packages/kbn-alerts-ui-shared/src/rule_form/utils/get_initial_schedule.ts new file mode 100644 index 0000000000000..7e2226c1094c3 --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/utils/get_initial_schedule.ts @@ -0,0 +1,43 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { parseDuration } from './parse_duration'; +import { DEFAULT_RULE_INTERVAL } from '../constants'; +import { MinimumScheduleInterval, RuleTypeWithDescription } from '../../common/types'; +import { RuleFormData } from '../types'; + +const getInitialInterval = (interval: string) => { + if (parseDuration(interval) > parseDuration(DEFAULT_RULE_INTERVAL)) { + return interval; + } + return DEFAULT_RULE_INTERVAL; +}; + +export const getInitialSchedule = ({ + ruleType, + minimumScheduleInterval, + initialSchedule, +}: { + ruleType: RuleTypeWithDescription; + minimumScheduleInterval?: MinimumScheduleInterval; + initialSchedule?: RuleFormData['schedule']; +}): RuleFormData['schedule'] => { + if (initialSchedule) { + return initialSchedule; + } + + if (minimumScheduleInterval?.value) { + return { interval: getInitialInterval(minimumScheduleInterval.value) }; + } + + if (ruleType.defaultScheduleInterval) { + return { interval: ruleType.defaultScheduleInterval }; + } + + return { interval: DEFAULT_RULE_INTERVAL }; +}; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/utils/index.ts b/packages/kbn-alerts-ui-shared/src/rule_form/utils/index.ts index b25e2f561a86a..8c17eb7e17aa1 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/utils/index.ts +++ b/packages/kbn-alerts-ui-shared/src/rule_form/utils/index.ts @@ -6,6 +6,11 @@ * Side Public License, v 1. */ -export * from './get_errors'; export * from './get_time_options'; export * from './parse_duration'; +export * from './parse_rule_circuit_breaker_error_message'; +export * from './get_authorized_rule_types'; +export * from './get_authorized_consumers'; +export * from './get_initial_multi_consumer'; +export * from './get_initial_schedule'; +export * from './get_initial_consumer'; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/utils/parse_duration.ts b/packages/kbn-alerts-ui-shared/src/rule_form/utils/parse_duration.ts index 81578eb5ae71b..e1d65c64599fb 100644 --- a/packages/kbn-alerts-ui-shared/src/rule_form/utils/parse_duration.ts +++ b/packages/kbn-alerts-ui-shared/src/rule_form/utils/parse_duration.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -export const DEFAULT_RULE_INTERVAL = '1m'; +import { DEFAULT_RULE_INTERVAL } from '../constants'; const SECONDS_REGEX = /^[1-9][0-9]*s$/; const MINUTES_REGEX = /^[1-9][0-9]*m$/; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/utils/parse_rule_circuit_breaker_error_message.ts b/packages/kbn-alerts-ui-shared/src/rule_form/utils/parse_rule_circuit_breaker_error_message.ts new file mode 100644 index 0000000000000..93e5eb1205007 --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/utils/parse_rule_circuit_breaker_error_message.ts @@ -0,0 +1,27 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { errorMessageHeader } from '@kbn/alerting-types'; + +export const parseRuleCircuitBreakerErrorMessage = ( + message: string +): { + summary: string; + details?: string; +} => { + if (!message.includes(errorMessageHeader)) { + return { + summary: message, + }; + } + const segments = message.split(' - '); + return { + summary: segments[1], + details: segments[2], + }; +}; diff --git a/src/plugins/data_view_editor/public/components/rollup_beta_warning/index.ts b/packages/kbn-alerts-ui-shared/src/rule_form/validation/index.ts similarity index 85% rename from src/plugins/data_view_editor/public/components/rollup_beta_warning/index.ts rename to packages/kbn-alerts-ui-shared/src/rule_form/validation/index.ts index 4c72c12312855..f6ff7478601c1 100644 --- a/src/plugins/data_view_editor/public/components/rollup_beta_warning/index.ts +++ b/packages/kbn-alerts-ui-shared/src/rule_form/validation/index.ts @@ -6,4 +6,4 @@ * Side Public License, v 1. */ -export { RollupBetaWarning } from './rollup_beta_warning'; +export * from './validate_form'; diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/validation/validate_form.test.ts b/packages/kbn-alerts-ui-shared/src/rule_form/validation/validate_form.test.ts new file mode 100644 index 0000000000000..1719ee68f399b --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/validation/validate_form.test.ts @@ -0,0 +1,192 @@ +/* + * Copyright 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 { validateRuleBase, validateRuleParams, hasRuleErrors } from './validate_form'; +import { RuleFormData } from '../types'; +import { + CONSUMER_REQUIRED_TEXT, + INTERVAL_MINIMUM_TEXT, + INTERVAL_REQUIRED_TEXT, + NAME_REQUIRED_TEXT, + RULE_ALERT_DELAY_BELOW_MINIMUM_TEXT, + RULE_TYPE_REQUIRED_TEXT, +} from '../translations'; +import { formatDuration } from '../utils'; +import { RuleTypeModel } from '../../common'; + +const formDataMock: RuleFormData = { + params: { + aggType: 'count', + termSize: 5, + thresholdComparator: '>', + timeWindowSize: 5, + timeWindowUnit: 'm', + groupBy: 'all', + threshold: [1000], + index: ['.kibana'], + timeField: 'alert.executionStatus.lastExecutionDate', + }, + consumer: 'stackAlerts', + schedule: { interval: '1m' }, + tags: [], + name: 'test', + notifyWhen: 'onActionGroupChange', + alertDelay: { + active: 10, + }, +}; + +const ruleTypeModelMock = { + validate: jest.fn().mockReturnValue({ + errors: { + someError: 'test', + }, + }), +}; + +describe('validateRuleBase', () => { + test('should validate name', () => { + const result = validateRuleBase({ + formData: { + ...formDataMock, + name: '', + }, + }); + expect(result.name).toEqual([NAME_REQUIRED_TEXT]); + }); + + test('should validate consumer', () => { + const result = validateRuleBase({ + formData: { + ...formDataMock, + consumer: '', + }, + }); + expect(result.consumer).toEqual([CONSUMER_REQUIRED_TEXT]); + }); + + test('should validate schedule', () => { + let result = validateRuleBase({ + formData: { + ...formDataMock, + schedule: { + interval: '1', + }, + }, + }); + expect(result.interval).toEqual([INTERVAL_REQUIRED_TEXT]); + + result = validateRuleBase({ + formData: { + ...formDataMock, + schedule: { + interval: '1m', + }, + }, + minimumScheduleInterval: { + value: '5m', + enforce: true, + }, + }); + expect(result.interval).toEqual([INTERVAL_MINIMUM_TEXT(formatDuration('5m', true))]); + }); + + test('should validate rule type ID', () => { + const result = validateRuleBase({ + formData: { + ...formDataMock, + ruleTypeId: '', + }, + }); + expect(result.ruleTypeId).toEqual([RULE_TYPE_REQUIRED_TEXT]); + }); + + test('should validate alert delay', () => { + const result = validateRuleBase({ + formData: { + ...formDataMock, + alertDelay: { + active: 0, + }, + }, + }); + expect(result.alertDelay).toEqual([RULE_ALERT_DELAY_BELOW_MINIMUM_TEXT]); + }); +}); + +describe('validateRuleParams', () => { + test('should validate rule params', () => { + const result = validateRuleParams({ + formData: formDataMock, + ruleTypeModel: ruleTypeModelMock as unknown as RuleTypeModel, + isServerless: false, + }); + + expect(ruleTypeModelMock.validate).toHaveBeenCalledWith( + { + aggType: 'count', + groupBy: 'all', + index: ['.kibana'], + termSize: 5, + threshold: [1000], + thresholdComparator: '>', + timeField: 'alert.executionStatus.lastExecutionDate', + timeWindowSize: 5, + timeWindowUnit: 'm', + }, + false + ); + + expect(result).toEqual({ + someError: 'test', + }); + }); +}); +describe('hasRuleErrors', () => { + test('should return false if there are no errors', () => { + const result = hasRuleErrors({ + baseErrors: {}, + paramsErrors: {}, + }); + + expect(result).toBeFalsy(); + }); + + test('should return true if base has errors', () => { + const result = hasRuleErrors({ + baseErrors: { + name: ['error'], + }, + paramsErrors: {}, + }); + + expect(result).toBeTruthy(); + }); + + test('should return true if params have errors', () => { + let result = hasRuleErrors({ + baseErrors: {}, + paramsErrors: { + someValue: ['error'], + }, + }); + + expect(result).toBeTruthy(); + + result = hasRuleErrors({ + baseErrors: {}, + paramsErrors: { + someNestedValue: { + someValue: ['error'], + }, + }, + }); + + expect(result).toBeTruthy(); + }); +}); diff --git a/packages/kbn-alerts-ui-shared/src/rule_form/validation/validate_form.ts b/packages/kbn-alerts-ui-shared/src/rule_form/validation/validate_form.ts new file mode 100644 index 0000000000000..012a1dcf83d72 --- /dev/null +++ b/packages/kbn-alerts-ui-shared/src/rule_form/validation/validate_form.ts @@ -0,0 +1,120 @@ +/* + * Copyright 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 { isObject } from 'lodash'; +import { RuleFormData } from '../types'; +import { parseDuration, formatDuration } from '../utils'; +import { + NAME_REQUIRED_TEXT, + CONSUMER_REQUIRED_TEXT, + RULE_TYPE_REQUIRED_TEXT, + INTERVAL_REQUIRED_TEXT, + INTERVAL_MINIMUM_TEXT, + RULE_ALERT_DELAY_BELOW_MINIMUM_TEXT, +} from '../translations'; +import { + MinimumScheduleInterval, + RuleFormBaseErrors, + RuleFormParamsErrors, + RuleTypeModel, +} from '../../common'; + +export function validateRuleBase({ + formData, + minimumScheduleInterval, +}: { + formData: RuleFormData; + minimumScheduleInterval?: MinimumScheduleInterval; +}): RuleFormBaseErrors { + const errors = { + name: new Array(), + interval: new Array(), + consumer: new Array(), + ruleTypeId: new Array(), + actionConnectors: new Array(), + alertDelay: new Array(), + tags: new Array(), + }; + + if (!formData.name) { + errors.name.push(NAME_REQUIRED_TEXT); + } + + if (!formData.consumer) { + errors.consumer.push(CONSUMER_REQUIRED_TEXT); + } + + if (formData.schedule.interval.length < 2) { + errors.interval.push(INTERVAL_REQUIRED_TEXT); + } else if (minimumScheduleInterval && minimumScheduleInterval.enforce) { + const duration = parseDuration(formData.schedule.interval); + const minimumDuration = parseDuration(minimumScheduleInterval.value); + if (duration < minimumDuration) { + errors.interval.push( + INTERVAL_MINIMUM_TEXT(formatDuration(minimumScheduleInterval.value, true)) + ); + } + } + + if (!formData.ruleTypeId) { + errors.ruleTypeId.push(RULE_TYPE_REQUIRED_TEXT); + } + + if ( + formData.alertDelay && + !isNaN(formData.alertDelay?.active) && + formData.alertDelay?.active < 1 + ) { + errors.alertDelay.push(RULE_ALERT_DELAY_BELOW_MINIMUM_TEXT); + } + + return errors; +} + +export const validateRuleParams = ({ + formData, + ruleTypeModel, + isServerless, +}: { + formData: RuleFormData; + ruleTypeModel: RuleTypeModel; + isServerless?: boolean; +}): RuleFormParamsErrors => { + return ruleTypeModel.validate(formData.params, isServerless).errors; +}; + +const hasRuleBaseErrors = (errors: RuleFormBaseErrors) => { + return Object.values(errors).some((error: string[]) => error.length > 0); +}; + +const hasRuleParamsErrors = (errors: RuleFormParamsErrors): boolean => { + const values = Object.values(errors); + let hasError = false; + for (const value of values) { + if (Array.isArray(value) && value.length > 0) { + return true; + } + if (typeof value === 'string' && value.trim() !== '') { + return true; + } + if (isObject(value)) { + hasError = hasRuleParamsErrors(value as RuleFormParamsErrors); + } + } + return hasError; +}; + +export const hasRuleErrors = ({ + baseErrors, + paramsErrors, +}: { + baseErrors: RuleFormBaseErrors; + paramsErrors: RuleFormParamsErrors; +}): boolean => { + return hasRuleBaseErrors(baseErrors) || hasRuleParamsErrors(paramsErrors); +}; diff --git a/packages/kbn-alerts-ui-shared/tsconfig.json b/packages/kbn-alerts-ui-shared/tsconfig.json index c22c1ac1beac7..8edc3ff6eda78 100644 --- a/packages/kbn-alerts-ui-shared/tsconfig.json +++ b/packages/kbn-alerts-ui-shared/tsconfig.json @@ -38,5 +38,9 @@ "@kbn/charts-plugin", "@kbn/data-plugin", "@kbn/utility-types", + "@kbn/core-application-browser", + "@kbn/react-kibana-mount", + "@kbn/core-i18n-browser", + "@kbn/core-theme-browser", ] } diff --git a/packages/kbn-apm-synthtrace-client/src/lib/logs/index.ts b/packages/kbn-apm-synthtrace-client/src/lib/logs/index.ts index 489221eea3d7a..4e7ab744d8ecd 100644 --- a/packages/kbn-apm-synthtrace-client/src/lib/logs/index.ts +++ b/packages/kbn-apm-synthtrace-client/src/lib/logs/index.ts @@ -14,6 +14,7 @@ export type LogDocument = Fields & 'input.type': string; 'log.file.path'?: string; 'service.name'?: string; + 'service.environment'?: string; 'data_stream.namespace': string; 'data_stream.type': string; 'data_stream.dataset': string; diff --git a/packages/kbn-check-mappings-update-cli/current_fields.json b/packages/kbn-check-mappings-update-cli/current_fields.json index e0f2ae0f4f4ba..de4d0b258db5e 100644 --- a/packages/kbn-check-mappings-update-cli/current_fields.json +++ b/packages/kbn-check-mappings-update-cli/current_fields.json @@ -1029,6 +1029,12 @@ "createDate", "slug" ], + "usage-counter": [ + "counterName", + "counterType", + "domainId", + "source" + ], "usage-counters": [ "domainId" ], diff --git a/packages/kbn-check-mappings-update-cli/current_mappings.json b/packages/kbn-check-mappings-update-cli/current_mappings.json index 778ed3c37992c..6a447dcbc26bf 100644 --- a/packages/kbn-check-mappings-update-cli/current_mappings.json +++ b/packages/kbn-check-mappings-update-cli/current_mappings.json @@ -3407,6 +3407,23 @@ } } }, + "usage-counter": { + "dynamic": false, + "properties": { + "counterName": { + "type": "keyword" + }, + "counterType": { + "type": "keyword" + }, + "domainId": { + "type": "keyword" + }, + "source": { + "type": "keyword" + } + } + }, "usage-counters": { "dynamic": false, "properties": { diff --git a/packages/kbn-openapi-generator/src/parser/lib/get_circular_refs.ts b/packages/kbn-openapi-generator/src/parser/lib/get_circular_refs.ts index da9649d5f0c6d..5c1e71170d8c5 100644 --- a/packages/kbn-openapi-generator/src/parser/lib/get_circular_refs.ts +++ b/packages/kbn-openapi-generator/src/parser/lib/get_circular_refs.ts @@ -9,7 +9,8 @@ import type { OpenApiDocument } from '../openapi_types'; import type { PlainObject } from './helpers/plain_object'; import { extractByJsonPointer } from './helpers/extract_by_json_pointer'; -import { findRefs } from './find_refs'; +import { findLocalRefs } from './helpers/find_local_refs'; +import { parseRef } from './helpers/parse_ref'; /** * Extracts circular references from a provided document. @@ -19,7 +20,7 @@ export function getCircularRefs(document: OpenApiDocument): Set { const localRefs = findLocalRefs(document); const circularRefs = new Set(); const resolveLocalRef = (localRef: string): PlainObject => - extractByJsonPointer(document, extractJsonPointer(localRef)); + extractByJsonPointer(document, parseRef(localRef).pointer); // In general references represent a disconnected graph. To find // all references cycles we need to check each reference. @@ -80,26 +81,3 @@ function findCycleHeadRef( return result; } - -/** - * Finds local references - */ -function findLocalRefs(obj: unknown): string[] { - return findRefs(obj).filter((ref) => isLocalRef(ref)); -} - -/** - * Checks whether the provided ref is local. - * Local references start with `#/` - */ -function isLocalRef(ref: string): boolean { - return ref.startsWith('#/'); -} - -/** - * Extracts a JSON Pointer from a local reference - * by getting rid of the leading slash - */ -function extractJsonPointer(ref: string): string { - return ref.substring(1); -} diff --git a/packages/kbn-openapi-generator/src/parser/lib/get_components.ts b/packages/kbn-openapi-generator/src/parser/lib/get_components.ts index 6e98793de1afb..ff2f77aced821 100644 --- a/packages/kbn-openapi-generator/src/parser/lib/get_components.ts +++ b/packages/kbn-openapi-generator/src/parser/lib/get_components.ts @@ -6,12 +6,124 @@ * Side Public License, v 1. */ -import type { OpenApiDocument } from '../openapi_types'; +import type { + OpenApiDocument, + OpenApiComponentsObject, + OpenApiSchemasObject, +} from '../openapi_types'; +import { extractByJsonPointer } from './helpers/extract_by_json_pointer'; +import { findLocalRefs } from './helpers/find_local_refs'; +import { parseRef } from './helpers/parse_ref'; -export function getComponents(parsedSchema: OpenApiDocument) { - if (parsedSchema.components?.['x-codegen-enabled'] === false) { +/** + * Returns document components. + * + * It performs topological sorting of component schemas to enable arbitrary + * schemas definition order. + */ +export function getComponents(document: OpenApiDocument): OpenApiComponentsObject | undefined { + if (document.components?.['x-codegen-enabled'] === false) { return undefined; } - return parsedSchema.components; + if (!document.components) { + return; + } + + const refsAdjList = buildLocalRefsAdjacencyList(document.components); + const sortedSchemaRefs = sortTopologically( + refsAdjList, + Array.from(Object.keys(document.components?.schemas ?? {})) + ); + // Starting from ES2020 functions returning or traversing object properties + // make it in ascending chronological order of property creation. It makes + // it possible to assemble schemas object which will be traversed in + // the right order preserving topological sorting. + const sortedSchemas: OpenApiSchemasObject = {}; + + for (const schemaName of sortedSchemaRefs) { + sortedSchemas[schemaName] = extractByJsonPointer(document, `/components/schemas/${schemaName}`); + } + + return { + ...document.components, + schemas: sortedSchemas, + }; +} + +/** + * References adjacency list with keys as schema name and value + * as a set of schemas the key references to. + */ +type ReferencesAdjacencyList = Map>; + +/** + * Builds a references adjacency list. An adjacency list allow to apply + * any graph algorithms working with adjacency lists. + * See https://en.wikipedia.org/wiki/Adjacency_list + */ +function buildLocalRefsAdjacencyList( + componentsObj: OpenApiComponentsObject +): ReferencesAdjacencyList { + if (!componentsObj.schemas) { + return new Map(); + } + + const adjacencyList: ReferencesAdjacencyList = new Map(); + + for (const [schemaName, schema] of Object.entries(componentsObj.schemas)) { + const dependencies = adjacencyList.get(schemaName); + const dependencySchemaNames = findLocalRefs(schema).map((ref) => parseRef(ref).schemaName); + + if (!dependencies) { + adjacencyList.set(schemaName, new Set(dependencySchemaNames)); + } else { + for (const dependencySchemaName of dependencySchemaNames) { + dependencies.add(dependencySchemaName); + } + } + } + + return adjacencyList; +} + +/** + * Sorts dependent references in topological order. Local dependencies are placed + * before dependent schemas. External references aren't involved. + * See https://en.wikipedia.org/wiki/Topological_sorting + * + * It uses Depth First Search (DFS) variant of topological sort to preserve schemas + * definition order in OpenAPI specification document. Topological sorting doesn't + * define any order for non dependent schemas. Preserving original ordering looks + * like a good option to minimize diffs and have higher result predictability. + * + * @param adjacencyList An adjacency list, e.g. built via buildLocalRefsAdjacencyList + * @param originalOrder A string array having schema names sorted in OpenAPI spec order + * @returns A string array sorting in topological way + */ +function sortTopologically( + adjacencyList: ReferencesAdjacencyList, + originalOrder: string[] +): string[] { + const sortedSchemas: string[] = []; + const visited = new Set(); + const addToSorted = (schemaName: string): void => { + if (visited.has(schemaName)) { + return; + } + + visited.add(schemaName); + + for (const dependencySchemaName of adjacencyList.get(schemaName) ?? []) { + addToSorted(dependencySchemaName); + } + + sortedSchemas.push(schemaName); + }; + + for (const schemaName of originalOrder) { + addToSorted(schemaName); + } + + return sortedSchemas; } diff --git a/packages/kbn-openapi-generator/src/parser/lib/get_imports_map.ts b/packages/kbn-openapi-generator/src/parser/lib/get_imports_map.ts index 634ac82aaae8c..d843bef8456cc 100644 --- a/packages/kbn-openapi-generator/src/parser/lib/get_imports_map.ts +++ b/packages/kbn-openapi-generator/src/parser/lib/get_imports_map.ts @@ -8,7 +8,7 @@ import { uniq } from 'lodash'; import type { OpenApiDocument } from '../openapi_types'; -import { findRefs } from './find_refs'; +import { findRefs } from './helpers/find_refs'; export interface ImportsMap { [importPath: string]: string[]; diff --git a/packages/kbn-openapi-generator/src/parser/lib/helpers/find_local_refs.ts b/packages/kbn-openapi-generator/src/parser/lib/helpers/find_local_refs.ts new file mode 100644 index 0000000000000..8dc9c5a5d7b1e --- /dev/null +++ b/packages/kbn-openapi-generator/src/parser/lib/helpers/find_local_refs.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 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 { findRefs } from './find_refs'; +import { isLocalRef } from './is_local_ref'; + +/** + * Finds local references + */ +export function findLocalRefs(obj: unknown): string[] { + return findRefs(obj).filter((ref) => isLocalRef(ref)); +} diff --git a/packages/kbn-openapi-generator/src/parser/lib/find_refs.ts b/packages/kbn-openapi-generator/src/parser/lib/helpers/find_refs.ts similarity index 87% rename from packages/kbn-openapi-generator/src/parser/lib/find_refs.ts rename to packages/kbn-openapi-generator/src/parser/lib/helpers/find_refs.ts index 1829c0a5e7ee2..49965fde840ab 100644 --- a/packages/kbn-openapi-generator/src/parser/lib/find_refs.ts +++ b/packages/kbn-openapi-generator/src/parser/lib/helpers/find_refs.ts @@ -6,8 +6,8 @@ * Side Public License, v 1. */ -import { hasRef } from './helpers/has_ref'; -import { traverseObject } from './helpers/traverse_object'; +import { hasRef } from './has_ref'; +import { traverseObject } from './traverse_object'; /** * Traverse the OpenAPI document recursively and find all references diff --git a/packages/kbn-openapi-generator/src/parser/lib/helpers/is_local_ref.ts b/packages/kbn-openapi-generator/src/parser/lib/helpers/is_local_ref.ts new file mode 100644 index 0000000000000..40b1973330236 --- /dev/null +++ b/packages/kbn-openapi-generator/src/parser/lib/helpers/is_local_ref.ts @@ -0,0 +1,15 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +/** + * Checks whether the provided ref is local. + * Local references start with `#/` + */ +export function isLocalRef(ref: string): boolean { + return ref.startsWith('#/'); +} diff --git a/packages/kbn-openapi-generator/src/parser/lib/helpers/parse_ref.ts b/packages/kbn-openapi-generator/src/parser/lib/helpers/parse_ref.ts new file mode 100644 index 0000000000000..75ee17951cba2 --- /dev/null +++ b/packages/kbn-openapi-generator/src/parser/lib/helpers/parse_ref.ts @@ -0,0 +1,46 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +interface ParsedRef { + uri: string; + pointer: string; + schemaName: string; +} + +/** + * Parses an OpenAPI reference a.k.a JSON reference + * See https://datatracker.ietf.org/doc/html/draft-pbryan-zyp-json-ref-03 + * + * JSON reference consists of an optional uri and required JSON pointer + * looking like `uri#pointer`. While RFC implies URI usage mostly relative + * paths are used. + * + * An example looks like + * + * ``` + * ../path/to/my/file.schema.yaml#/components/schemas/MySchema + * ``` + * + * This function returns `uri`, JSON `pointer` and + * `schemaName` which is the last part of the JSON pointer. In the example + * above `schemaName` is `MySchema`. + */ +export function parseRef(ref: string): ParsedRef { + if (!ref.includes('#')) { + throw new Error(`Reference parse error: provided ref is not valid "${ref}"`); + } + + const [uri, pointer] = ref.split('#'); + const schemaName = pointer.split('/').at(-1)!; + + return { + uri, + pointer, + schemaName, + }; +} diff --git a/packages/kbn-openapi-generator/src/parser/openapi_types.ts b/packages/kbn-openapi-generator/src/parser/openapi_types.ts index c8b1e4f715345..669d1d9b68764 100644 --- a/packages/kbn-openapi-generator/src/parser/openapi_types.ts +++ b/packages/kbn-openapi-generator/src/parser/openapi_types.ts @@ -16,6 +16,11 @@ interface AdditionalProperties { } export type OpenApiDocument = OpenAPIV3.Document; +export type OpenApiComponentsObject = OpenAPIV3.ComponentsObject; +export type OpenApiSchemasObject = Record< + string, + OpenAPIV3.ReferenceObject | OpenAPIV3.SchemaObject +>; // Override the OpenAPI types to add the x-codegen-enabled property to the // components object. diff --git a/packages/kbn-openapi-generator/src/template_service/register_helpers.ts b/packages/kbn-openapi-generator/src/template_service/register_helpers.ts index 55f2d9d60f37a..f02f295954465 100644 --- a/packages/kbn-openapi-generator/src/template_service/register_helpers.ts +++ b/packages/kbn-openapi-generator/src/template_service/register_helpers.ts @@ -71,7 +71,7 @@ export function registerHelpers(handlebarsInstance: typeof Handlebars) { }); /** - * Checks whether provided schema is circular or a part of the circular chain. + * Checks whether provided schema is circular or a part of a circular chain. * * It's expected that `context.circularRefs` has been filled by the parser. */ diff --git a/packages/kbn-openapi-generator/src/template_service/templates/ts_input_type.handlebars b/packages/kbn-openapi-generator/src/template_service/templates/ts_input_type.handlebars index 453e4cdf452d5..5091c6f9a7019 100644 --- a/packages/kbn-openapi-generator/src/template_service/templates/ts_input_type.handlebars +++ b/packages/kbn-openapi-generator/src/template_service/templates/ts_input_type.handlebars @@ -3,7 +3,8 @@ {{~/if~}} {{~#if $ref~}} - {{referenceName}}Input + {{referenceName}} + {{~#if (isCircularRef $ref)}}Input{{/if~}} {{~#if nullable}} | null {{/if~}} {{~/if~}} diff --git a/packages/kbn-optimizer/limits.yml b/packages/kbn-optimizer/limits.yml index c4958003bcfb6..00bcbf6481939 100644 --- a/packages/kbn-optimizer/limits.yml +++ b/packages/kbn-optimizer/limits.yml @@ -103,7 +103,7 @@ pageLoadAssetSize: maps: 90000 mapsEms: 26072 metricsDataAccess: 73287 - ml: 82210 + ml: 85000 mockIdpPlugin: 30000 monitoring: 80000 navigation: 37269 diff --git a/packages/kbn-shared-svg/index.ts b/packages/kbn-shared-svg/index.ts index 215431706ab94..525b3f456fd7e 100644 --- a/packages/kbn-shared-svg/index.ts +++ b/packages/kbn-shared-svg/index.ts @@ -10,5 +10,12 @@ import noResultsIllustrationDark from './src/assets/no_results_dark.svg'; import noResultsIllustrationLight from './src/assets/no_results_light.svg'; import dashboardsLight from './src/assets/dashboards_light.svg'; import dashboardsDark from './src/assets/dashboards_dark.svg'; +import apmLight from './src/assets/oblt_apm_light.svg'; -export { noResultsIllustrationDark, noResultsIllustrationLight, dashboardsLight, dashboardsDark }; +export { + noResultsIllustrationDark, + noResultsIllustrationLight, + dashboardsLight, + dashboardsDark, + apmLight, +}; diff --git a/packages/kbn-shared-svg/src/assets/oblt_apm_light.svg b/packages/kbn-shared-svg/src/assets/oblt_apm_light.svg new file mode 100644 index 0000000000000..b3cd9c0e9c344 --- /dev/null +++ b/packages/kbn-shared-svg/src/assets/oblt_apm_light.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/packages/kbn-test/src/mocha/junit_report_generation.js b/packages/kbn-test/src/mocha/junit_report_generation.js index fcf31672d7996..99a5079e7b26e 100644 --- a/packages/kbn-test/src/mocha/junit_report_generation.js +++ b/packages/kbn-test/src/mocha/junit_report_generation.js @@ -94,7 +94,12 @@ export function setupJUnitReportGeneration(runner, options = {}) { .map((node) => ({ skipped: true, node })); // cache codeowners for quicker lookup - const reversedCodeowners = getPathsWithOwnersReversed(); + let reversedCodeowners = []; + try { + reversedCodeowners = getPathsWithOwnersReversed(); + } catch { + /* no-op */ + } const commandLine = prettifyCommandLine(process.argv); diff --git a/scripts/dev_docs.sh b/scripts/dev_docs.sh index 202d3d84df5ff..17ccd0287f09b 100755 --- a/scripts/dev_docs.sh +++ b/scripts/dev_docs.sh @@ -88,9 +88,12 @@ module.exports = { ], "nav": { "structure": [ - "nav-elastic-developer-guide", - "nav-kibana-team", - "nav-kibana-dev" + { + collection: 'Elastic Developer Guide', + navs: ['nav-elastic-developer-guide'], + }, + { collection: 'Kibana Team', navs: ['nav-kibana-team'] }, + { collection: 'Kibana Developer Guide', navs: ['nav-kibana-dev'] }, ], "default": "nav-kibana-dev" } diff --git a/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts b/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts index 732685c732ff7..af946130df77d 100644 --- a/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts +++ b/src/core/server/integration_tests/ci_checks/saved_objects/check_registered_types.test.ts @@ -168,6 +168,7 @@ describe('checking migration metadata changes on all registered SO types', () => "uptime-dynamic-settings": "b6756ff71d6b5258971b1c8fd433d167affbde52", "uptime-synthetics-api-key": "7ae976a461248f9dbd8442af14a179bdbc229eca", "url": "c923a4a5002a09c0080c9095e958f07d518e6704", + "usage-counter": "3a104db0c9867da2d0436e20604a11dc5d0bb59e", "usage-counters": "48782b3bcb6b5a23ba6f2bfe3a380d835e68890a", "visualization": "93a3e73994ad836fe2b1dccbe208238f41f63da0", "workplace_search_telemetry": "52b32b47ee576f554ac77cb1d5896dfbcfe9a1fb", diff --git a/src/core/server/integration_tests/elasticsearch/version_compatibility.test.ts b/src/core/server/integration_tests/elasticsearch/version_compatibility.test.ts index eb6cc767d5817..bfd7575d58283 100644 --- a/src/core/server/integration_tests/elasticsearch/version_compatibility.test.ts +++ b/src/core/server/integration_tests/elasticsearch/version_compatibility.test.ts @@ -91,7 +91,8 @@ describe('Version Compatibility', () => { await expect(startServers({ customKibanaVersion: previousMinor() })).resolves.toBeUndefined(); }); - it('should flag the incompatibility on version mismatch (ES is previous minor)', async () => { + // FLAKY: https://github.com/elastic/kibana/issues/171289 + it.skip('should flag the incompatibility on version mismatch (ES is previous minor)', async () => { const found$ = new Subject(); consoleSpy.mockImplementation((str) => { if (str.includes('is incompatible')) { diff --git a/src/core/server/integration_tests/http/http2_protocol.test.ts b/src/core/server/integration_tests/http/http2_protocol.test.ts index f76076de81d43..b1db89a023230 100644 --- a/src/core/server/integration_tests/http/http2_protocol.test.ts +++ b/src/core/server/integration_tests/http/http2_protocol.test.ts @@ -17,12 +17,14 @@ import { config as httpConfig, cspConfig, externalUrlConfig, + permissionsPolicyConfig, } from '@kbn/core-http-server-internal'; import { mockCoreContext } from '@kbn/core-base-server-mocks'; import type { Logger } from '@kbn/logging'; const CSP_CONFIG = cspConfig.schema.validate({}); const EXTERNAL_URL_CONFIG = externalUrlConfig.schema.validate({}); +const PERMISSIONS_POLICY_CONFIG = permissionsPolicyConfig.schema.validate({}); describe('Http2 - Smoke tests', () => { let server: HttpServer; @@ -56,7 +58,7 @@ describe('Http2 - Smoke tests', () => { }, shutdownTimeout: '5s', }); - config = new HttpConfig(rawConfig, CSP_CONFIG, EXTERNAL_URL_CONFIG); + config = new HttpConfig(rawConfig, CSP_CONFIG, EXTERNAL_URL_CONFIG, PERMISSIONS_POLICY_CONFIG); server = new HttpServer(coreContext, 'tests', of(config.shutdownTimeout)); }); diff --git a/src/core/server/integration_tests/http/set_tls_config.test.ts b/src/core/server/integration_tests/http/set_tls_config.test.ts index 4966ecafce411..e0c30efafc109 100644 --- a/src/core/server/integration_tests/http/set_tls_config.test.ts +++ b/src/core/server/integration_tests/http/set_tls_config.test.ts @@ -14,12 +14,14 @@ import { config as httpConfig, cspConfig, externalUrlConfig, + permissionsPolicyConfig, } from '@kbn/core-http-server-internal'; import { flattenCertificateChain, fetchPeerCertificate, isServerTLS } from './tls_utils'; describe('setTlsConfig', () => { const CSP_CONFIG = cspConfig.schema.validate({}); const EXTERNAL_URL_CONFIG = externalUrlConfig.schema.validate({}); + const PERMISSIONS_POLICY_CONFIG = permissionsPolicyConfig.schema.validate({}); beforeAll(() => { process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; @@ -39,7 +41,12 @@ describe('setTlsConfig', () => { }, shutdownTimeout: '1s', }); - const firstConfig = new HttpConfig(rawHttpConfig, CSP_CONFIG, EXTERNAL_URL_CONFIG); + const firstConfig = new HttpConfig( + rawHttpConfig, + CSP_CONFIG, + EXTERNAL_URL_CONFIG, + PERMISSIONS_POLICY_CONFIG + ); const serverOptions = getServerOptions(firstConfig); const server = createServer(serverOptions); @@ -85,7 +92,12 @@ describe('setTlsConfig', () => { shutdownTimeout: '1s', }); - const secondConfig = new HttpConfig(secondRawConfig, CSP_CONFIG, EXTERNAL_URL_CONFIG); + const secondConfig = new HttpConfig( + secondRawConfig, + CSP_CONFIG, + EXTERNAL_URL_CONFIG, + PERMISSIONS_POLICY_CONFIG + ); setTlsConfig(server, secondConfig.ssl); diff --git a/src/core/server/integration_tests/http/tls_config_reload.test.ts b/src/core/server/integration_tests/http/tls_config_reload.test.ts index ad2c530faae52..030b22e2f497c 100644 --- a/src/core/server/integration_tests/http/tls_config_reload.test.ts +++ b/src/core/server/integration_tests/http/tls_config_reload.test.ts @@ -17,6 +17,7 @@ import { config as httpConfig, cspConfig, externalUrlConfig, + permissionsPolicyConfig, } from '@kbn/core-http-server-internal'; import { isServerTLS, flattenCertificateChain, fetchPeerCertificate } from './tls_utils'; import { mockCoreContext } from '@kbn/core-base-server-mocks'; @@ -24,6 +25,7 @@ import type { Logger } from '@kbn/logging'; const CSP_CONFIG = cspConfig.schema.validate({}); const EXTERNAL_URL_CONFIG = externalUrlConfig.schema.validate({}); +const PERMISSIONS_POLICY_CONFIG = permissionsPolicyConfig.schema.validate({}); const enhanceWithContext = (fn: (...args: any[]) => any) => fn.bind(null, {}); describe('HttpServer - TLS config', () => { @@ -54,7 +56,12 @@ describe('HttpServer - TLS config', () => { }, shutdownTimeout: '1s', }); - const firstConfig = new HttpConfig(rawHttpConfig, CSP_CONFIG, EXTERNAL_URL_CONFIG); + const firstConfig = new HttpConfig( + rawHttpConfig, + CSP_CONFIG, + EXTERNAL_URL_CONFIG, + PERMISSIONS_POLICY_CONFIG + ); const config$ = new BehaviorSubject(firstConfig); @@ -109,7 +116,12 @@ describe('HttpServer - TLS config', () => { shutdownTimeout: '1s', }); - const secondConfig = new HttpConfig(secondRawConfig, CSP_CONFIG, EXTERNAL_URL_CONFIG); + const secondConfig = new HttpConfig( + secondRawConfig, + CSP_CONFIG, + EXTERNAL_URL_CONFIG, + PERMISSIONS_POLICY_CONFIG + ); config$.next(secondConfig); const secondCertificate = await fetchPeerCertificate(firstConfig.host, firstConfig.port); diff --git a/src/core/server/integration_tests/saved_objects/migrations/group2/check_target_mappings.test.ts b/src/core/server/integration_tests/saved_objects/migrations/group2/check_target_mappings.test.ts index 9a89ecb13d71b..e79084ebdc34a 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group2/check_target_mappings.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/group2/check_target_mappings.test.ts @@ -122,7 +122,7 @@ describe('migration v2 - CHECK_TARGET_MAPPINGS', () => { // Check for migration steps present in the logs logs = await fs.readFile(logFilePath, 'utf-8'); - expect(logs).not.toMatch('CREATE_NEW_TARGET'); + expect(logs).not.toMatch('[.kibana] CREATE_NEW_TARGET'); expect(logs).toMatch('CHECK_TARGET_MAPPINGS -> UPDATE_TARGET_MAPPINGS_PROPERTIES'); expect(logs).toMatch( 'UPDATE_TARGET_MAPPINGS_PROPERTIES -> UPDATE_TARGET_MAPPINGS_PROPERTIES_WAIT_FOR_TASK' diff --git a/src/core/server/integration_tests/saved_objects/migrations/group2/multiple_kibana_nodes.test.ts b/src/core/server/integration_tests/saved_objects/migrations/group2/multiple_kibana_nodes.test.ts index 65fc3830ae069..80d75d757ca4d 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group2/multiple_kibana_nodes.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/group2/multiple_kibana_nodes.test.ts @@ -106,7 +106,8 @@ async function createRoot({ logFileName }: CreateRootConfig) { // suite is very long, the 10mins default can cause timeouts jest.setTimeout(15 * 60 * 1000); -describe('migration v2', () => { +// FLAKY: https://github.com/elastic/kibana/issues/156117 +describe.skip('migration v2', () => { let esServer: TestElasticsearchUtils; let rootA: Root; let rootB: Root; diff --git a/src/core/server/integration_tests/saved_objects/migrations/group3/type_registrations.test.ts b/src/core/server/integration_tests/saved_objects/migrations/group3/type_registrations.test.ts index a137b905f07a7..2228b19956bb3 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group3/type_registrations.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/group3/type_registrations.test.ts @@ -146,7 +146,8 @@ const previouslyRegisteredTypes = [ 'synthetics-dynamic-settings', 'uptime-synthetics-api-key', 'url', - 'usage-counters', + 'usage-counter', // added in 8.16.0: richer mappings, located in .kibana_usage_counters + 'usage-counters', // deprecated in favor of 'usage-counter' 'visualization', 'workplace_search_telemetry', ].sort(); diff --git a/src/core/server/integration_tests/saved_objects/migrations/group5/dot_kibana_split.test.ts b/src/core/server/integration_tests/saved_objects/migrations/group5/dot_kibana_split.test.ts index c4c56442c23f8..ba164e223be55 100644 --- a/src/core/server/integration_tests/saved_objects/migrations/group5/dot_kibana_split.test.ts +++ b/src/core/server/integration_tests/saved_objects/migrations/group5/dot_kibana_split.test.ts @@ -173,135 +173,15 @@ describe('split .kibana index into multiple system indices', () => { }) ); - expect(indicesInfo[`.kibana_${currentVersion}_001`].mappings?._meta?.indexTypesMap) - .toMatchInlineSnapshot(` - Object { - ".kibana": Array [ - "action", - "action_task_params", - "ad_hoc_run_params", - "alert", - "api_key_pending_invalidation", - "apm-custom-dashboards", - "apm-indices", - "apm-server-schema", - "apm-service-group", - "apm-telemetry", - "app_search_telemetry", - "application_usage_daily", - "application_usage_totals", - "canvas-element", - "canvas-workpad-template", - "cases", - "cases-comments", - "cases-configure", - "cases-connector-mappings", - "cases-rules", - "cases-telemetry", - "cases-user-actions", - "cloud-security-posture-settings", - "config", - "config-global", - "connector_token", - "core-usage-stats", - "csp-rule-template", - "endpoint:unified-user-artifact-manifest", - "endpoint:user-artifact-manifest", - "enterprise_search_telemetry", - "entity-definition", - "entity-discovery-api-key", - "epm-packages", - "epm-packages-assets", - "event-annotation-group", - "event_loop_delays_daily", - "exception-list", - "exception-list-agnostic", - "file", - "file-upload-usage-collection-telemetry", - "fileShare", - "fleet-fleet-server-host", - "fleet-message-signing-keys", - "fleet-preconfiguration-deletion-record", - "fleet-proxy", - "fleet-setup-lock", - "fleet-uninstall-tokens", - "graph-workspace", - "guided-onboarding-guide-state", - "guided-onboarding-plugin-state", - "index-pattern", - "infra-custom-dashboards", - "infrastructure-monitoring-log-view", - "infrastructure-ui-source", - "ingest-agent-policies", - "ingest-download-sources", - "ingest-outputs", - "ingest-package-policies", - "ingest_manager_settings", - "inventory-view", - "kql-telemetry", - "legacy-url-alias", - "lens", - "lens-ui-telemetry", - "links", - "maintenance-window", - "map", - "metrics-data-source", - "metrics-explorer-view", - "ml-job", - "ml-module", - "ml-trained-model", - "monitoring-telemetry", - "observability-onboarding-state", - "osquery-manager-usage-metric", - "osquery-pack", - "osquery-pack-asset", - "osquery-saved-query", - "policy-settings-protection-updates-note", - "query", - "risk-engine-configuration", - "rules-settings", - "sample-data-telemetry", - "search-session", - "search-telemetry", - "security-rule", - "security-solution-signals-migration", - "siem-detection-engine-rule-actions", - "siem-ui-timeline", - "siem-ui-timeline-note", - "siem-ui-timeline-pinned-event", - "slo", - "slo-settings", - "space", - "spaces-usage-stats", - "synthetics-dynamic-settings", - "synthetics-monitor", - "synthetics-param", - "synthetics-privates-locations", - "tag", - "telemetry", - "threshold-explorer-view", - "ui-metric", - "upgrade-assistant-ml-upgrade-operation", - "upgrade-assistant-reindex-operation", - "uptime-dynamic-settings", - "uptime-synthetics-api-key", - "url", - "usage-counters", - "workplace_search_telemetry", - ], - ".kibana_so_search": Array [ - "search", - ], - ".kibana_so_ui": Array [ - "canvas-workpad", - "dashboard", - "visualization", - ], - ".kibana_task_manager": Array [ - "task", - ], - } - `); + const typesMap = indicesInfo[`.kibana_${currentVersion}_001`].mappings?._meta?.indexTypesMap; + + expect(Array.isArray(typesMap['.kibana'])).toEqual(true); + expect(typesMap['.kibana'].length > 50).toEqual(true); + expect(typesMap['.kibana'].includes('action')).toEqual(true); + expect(typesMap['.kibana'].includes('cases')).toEqual(true); + expect(typesMap['.kibana_so_search']).toEqual(['search']); + expect(typesMap['.kibana_so_ui']).toEqual(['canvas-workpad', 'dashboard', 'visualization']); + expect(typesMap['.kibana_task_manager']).toEqual(['task']); const logs = await parseLogFile(logFilePathFirstRun); @@ -506,6 +386,7 @@ describe('split .kibana index into multiple system indices', () => { '.kibana_task_manager': { task: 5, }, + '.kibana_usage_counters': {}, }); }); diff --git a/src/core/server/integration_tests/saved_objects/service/lib/repository_with_proxy.test.ts b/src/core/server/integration_tests/saved_objects/service/lib/repository_with_proxy.test.ts index 035da58c60fa1..0a75e27da0830 100644 --- a/src/core/server/integration_tests/saved_objects/service/lib/repository_with_proxy.test.ts +++ b/src/core/server/integration_tests/saved_objects/service/lib/repository_with_proxy.test.ts @@ -9,7 +9,7 @@ import Hapi from '@hapi/hapi'; import h2o2 from '@hapi/h2o2'; import { URL } from 'url'; -import { SavedObject, ALL_SAVED_OBJECT_INDICES } from '@kbn/core-saved-objects-server'; +import type { SavedObject } from '@kbn/core-saved-objects-server'; import type { ISavedObjectsRepository } from '@kbn/core-saved-objects-api-server'; import type { InternalCoreSetup, InternalCoreStart } from '@kbn/core-lifecycle-server-internal'; import { Root } from '@kbn/core-root-server-internal'; @@ -18,7 +18,6 @@ import { createTestServers, type TestElasticsearchUtils, } from '@kbn/core-test-helpers-kbn-server'; -import { kibanaPackageJson as pkg } from '@kbn/repo-info'; import { declareGetRoute, declareDeleteRoute, @@ -32,7 +31,8 @@ import { declarePassthroughRoute, declareIndexRoute, setProxyInterrupt, - allCombinationsPermutations, + getVersionedKibanaIndex, + getIndicesWithNamespaceAwareTypes, } from './repository_with_proxy_utils'; let esServer: TestElasticsearchUtils; @@ -93,29 +93,40 @@ describe('404s from proxies', () => { ? parseInt(process.env.TEST_PROXY_SERVER_PORT, 10) : 5698; + // Setup kibana configured to use proxy as ES backend + root = createRootWithCorePlugins({ + elasticsearch: { + hosts: [`http://${esHostname}:${proxyPort}`], + }, + migrations: { + skip: false, + }, + }); + await root.preboot(); + const setup = await root.setup(); + registerSOTypes(setup); + // Setup custom hapi hapiServer with h2o2 plugin for proxying hapiServer = Hapi.server({ port: proxyPort, }); + const mainIndex = getVersionedKibanaIndex(); await hapiServer.register(h2o2); // register specific routes to modify the response and a catch-all to relay the request/response as-is + declareGetRoute(hapiServer, esHostname, esPort, mainIndex); + declareDeleteRoute(hapiServer, esHostname, esPort, mainIndex); + declarePostUpdateRoute(hapiServer, esHostname, esPort, mainIndex); - allCombinationsPermutations( - ALL_SAVED_OBJECT_INDICES.map((indexPattern) => `${indexPattern}_${pkg.version}`) - ) - .map((indices) => indices.join(',')) - .forEach((kbnIndexPath) => { - declareGetRoute(hapiServer, esHostname, esPort, kbnIndexPath); - declareDeleteRoute(hapiServer, esHostname, esPort, kbnIndexPath); - declarePostUpdateRoute(hapiServer, esHostname, esPort, kbnIndexPath); - - declareGetSearchRoute(hapiServer, esHostname, esPort, kbnIndexPath); - declarePostSearchRoute(hapiServer, esHostname, esPort, kbnIndexPath); - declarePostPitRoute(hapiServer, esHostname, esPort, kbnIndexPath); - declarePostUpdateByQueryRoute(hapiServer, esHostname, esPort, kbnIndexPath); - declareIndexRoute(hapiServer, esHostname, esPort, kbnIndexPath); - }); + declareGetSearchRoute(hapiServer, esHostname, esPort, mainIndex); + declarePostSearchRoute(hapiServer, esHostname, esPort, mainIndex); + declarePostPitRoute(hapiServer, esHostname, esPort, mainIndex); + declareIndexRoute(hapiServer, esHostname, esPort, mainIndex); + + // the deleteByNamespace performs an updateByQuery under the hood. + // It targets all SO indices that have namespace-aware types + const nsIndices = getIndicesWithNamespaceAwareTypes(setup.savedObjects.getTypeRegistry()); + declarePostUpdateByQueryRoute(hapiServer, esHostname, esPort, nsIndices); // register index-agnostic routes declarePostBulkRoute(hapiServer, esHostname, esPort); @@ -124,19 +135,6 @@ describe('404s from proxies', () => { await hapiServer.start(); - // Setup kibana configured to use proxy as ES backend - root = createRootWithCorePlugins({ - elasticsearch: { - hosts: [`http://${esHostname}:${proxyPort}`], - }, - migrations: { - skip: false, - }, - }); - await root.preboot(); - const setup = await root.setup(); - registerSOTypes(setup); - start = await root.start(); }); diff --git a/src/core/server/integration_tests/saved_objects/service/lib/repository_with_proxy_utils.ts b/src/core/server/integration_tests/saved_objects/service/lib/repository_with_proxy_utils.ts index 6f40d19f609d9..8419d4865c5c7 100644 --- a/src/core/server/integration_tests/saved_objects/service/lib/repository_with_proxy_utils.ts +++ b/src/core/server/integration_tests/saved_objects/service/lib/repository_with_proxy_utils.ts @@ -6,7 +6,13 @@ * Side Public License, v 1. */ import Hapi from '@hapi/hapi'; -import { IncomingMessage } from 'http'; +import type { IncomingMessage } from 'http'; +import { LEGACY_URL_ALIAS_TYPE } from '@kbn/core-saved-objects-base-server-internal'; +import { + type ISavedObjectTypeRegistry, + MAIN_SAVED_OBJECT_INDEX, +} from '@kbn/core-saved-objects-server'; +import { kibanaPackageJson as pkg } from '@kbn/repo-info'; // proxy setup const defaultProxyOptions = (hostname: string, port: string) => ({ @@ -304,21 +310,32 @@ export const declarePassthroughRoute = (hapiServer: Hapi.Server, hostname: strin }, }); -export function allCombinationsPermutations(collection: T[]): T[][] { - const recur = (subcollection: T[], size: number): T[][] => { - if (size <= 0) { - return [[]]; - } - const permutations: T[][] = []; - subcollection.forEach((value, index, array) => { - array = array.slice(); - array.splice(index, 1); - recur(array, size - 1).forEach((permutation) => { - permutation.unshift(value); - permutations.push(permutation); - }); - }); - return permutations; - }; - return collection.map((_, n) => recur(collection, n + 1)).flat(); -} +/** + * Obtain the versioned Kibana index, tipically used by the Elasticsearch client + * e.g. .kibana_8.15.0 + * @returns string + */ +export const getVersionedKibanaIndex = (): string => { + return `${MAIN_SAVED_OBJECT_INDEX}_${pkg.version}`; +}; + +/** + * Obtain a comma separated list of all SO indices that contain namespace-aware SO types + * inspired on delete_by_namespace.ts + * + * @param registry The SO type registry to query registered types + * @returns string + */ +export const getIndicesWithNamespaceAwareTypes = (registry: ISavedObjectTypeRegistry): string => { + const allTypes = registry.getAllTypes(); + const unique = (array: string[]) => [...new Set(array)]; + + return unique( + [ + ...allTypes + .filter((type) => !registry.isNamespaceAgnostic(type.name)) + .map(({ name }) => name), + LEGACY_URL_ALIAS_TYPE, + ].map((type) => `${registry.getIndex(type) || MAIN_SAVED_OBJECT_INDEX}_${pkg.version}`) + ).join(','); +}; diff --git a/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker b/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker index 10fcbe6d06d6a..75237f0ea3594 100755 --- a/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker +++ b/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker @@ -40,6 +40,7 @@ kibana_vars=( csp.report_uri csp.report_to csp.report_only.form_action + permissionsPolicy.report_to data.autocomplete.valueSuggestions.terminateAfter data.autocomplete.valueSuggestions.timeout data.search.asyncSearch.waitForCompletion diff --git a/src/plugins/controls/common/options_list/types.ts b/src/plugins/controls/common/options_list/types.ts index d7f75d5c268c2..56085d7d5848f 100644 --- a/src/plugins/controls/common/options_list/types.ts +++ b/src/plugins/controls/common/options_list/types.ts @@ -13,7 +13,7 @@ import type { DataControlInput } from '../types'; import { OptionsListSearchTechnique } from './suggestions_searching'; import type { OptionsListSortingType } from './suggestions_sorting'; -export const OPTIONS_LIST_CONTROL = 'optionsListControl'; +export const OPTIONS_LIST_CONTROL = 'optionsListControl'; // TODO: Replace with OPTIONS_LIST_CONTROL_TYPE export interface OptionsListEmbeddableInput extends DataControlInput { searchTechnique?: OptionsListSearchTechnique; diff --git a/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx b/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx index 2f7e21bb3157f..98897ed4472de 100644 --- a/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx +++ b/src/plugins/data_view_editor/public/components/data_view_editor_flyout_content.tsx @@ -53,7 +53,7 @@ import { SubmittingType, AdvancedParamsContent, PreviewPanel, - RollupBetaWarning, + RollupDeprecatedWarning, } from '.'; import { editDataViewModal } from './confirm_modals/edit_data_view_changed_modal'; import { DataViewEditorService } from '../data_view_editor_service'; @@ -92,7 +92,7 @@ const IndexPatternEditorFlyoutContentComponent = ({ dataViewEditorService, }: Props) => { const { - services: { application, dataViews, uiSettings, overlays }, + services: { application, dataViews, uiSettings, overlays, docLinks }, } = useKibana(); const canSave = dataViews.getCanSaveSync(); @@ -227,7 +227,7 @@ const IndexPatternEditorFlyoutContentComponent = ({ {type === INDEX_PATTERN_TYPE.ROLLUP ? ( - + ) : ( diff --git a/src/plugins/data_view_editor/public/components/index.ts b/src/plugins/data_view_editor/public/components/index.ts index 20bb30a3ed11f..dde1646662858 100644 --- a/src/plugins/data_view_editor/public/components/index.ts +++ b/src/plugins/data_view_editor/public/components/index.ts @@ -17,4 +17,4 @@ export { PreviewPanel } from './preview_panel'; export { LoadingIndices } from './loading_indices'; export { Footer, SubmittingType } from './footer'; export { AdvancedParamsContent } from './advanced_params_content'; -export { RollupBetaWarning } from './rollup_beta_warning'; +export { RollupDeprecatedWarning } from './rollup_deprecated_warning'; diff --git a/src/plugins/data_view_editor/public/components/rollup_beta_warning/rollup_beta_warning.tsx b/src/plugins/data_view_editor/public/components/rollup_beta_warning/rollup_beta_warning.tsx deleted file mode 100644 index 15fa8d626e4a1..0000000000000 --- a/src/plugins/data_view_editor/public/components/rollup_beta_warning/rollup_beta_warning.tsx +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import React from 'react'; -import { i18n } from '@kbn/i18n'; -import { FormattedMessage } from '@kbn/i18n-react'; - -import { EuiCallOut } from '@elastic/eui'; - -const rollupBetaWarningTitle = i18n.translate( - 'indexPatternEditor.rollupIndexPattern.warning.title', - { - defaultMessage: 'Beta feature', - } -); - -export const RollupBetaWarning = () => ( - -

- -

-

- -

-
-); diff --git a/src/plugins/data_view_editor/public/components/rollup_deprecated_warning/index.ts b/src/plugins/data_view_editor/public/components/rollup_deprecated_warning/index.ts new file mode 100644 index 0000000000000..b27a5f0e2ce1d --- /dev/null +++ b/src/plugins/data_view_editor/public/components/rollup_deprecated_warning/index.ts @@ -0,0 +1,9 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export { RollupDeprecatedWarning } from './rollup_deprecated_warning'; diff --git a/src/plugins/data_view_editor/public/components/rollup_deprecated_warning/rollup_deprecated_warning.tsx b/src/plugins/data_view_editor/public/components/rollup_deprecated_warning/rollup_deprecated_warning.tsx new file mode 100644 index 0000000000000..c3cdb435556d8 --- /dev/null +++ b/src/plugins/data_view_editor/public/components/rollup_deprecated_warning/rollup_deprecated_warning.tsx @@ -0,0 +1,55 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import React from 'react'; +import { i18n } from '@kbn/i18n'; +import { FormattedMessage } from '@kbn/i18n-react'; + +import { EuiCallOut, EuiLink } from '@elastic/eui'; +import { DocLinksStart } from '@kbn/core/public'; + +interface RollupDeprecatedWarningProps { + docLinksService: DocLinksStart; +} + +const rollupBetaWarningTitle = i18n.translate( + 'indexPatternEditor.rollupIndexPattern.deprecationWarning.title', + { + defaultMessage: 'Deprecated in 8.11.0', + } +); + +export const RollupDeprecatedWarning = ({ docLinksService }: RollupDeprecatedWarningProps) => ( + + + {i18n.translate( + 'indexPatternEditor.rollupDataView.deprecationWarning.downsamplingLink', + { + defaultMessage: 'Downsampling', + } + )} + + ), + }} + /> + +); diff --git a/src/plugins/discover/public/application/context/services/__snapshots__/context.predecessors.test.ts.snap b/src/plugins/discover/public/application/context/services/__snapshots__/context.predecessors.test.ts.snap new file mode 100644 index 0000000000000..972df33dfa37d --- /dev/null +++ b/src/plugins/discover/public/application/context/services/__snapshots__/context.predecessors.test.ts.snap @@ -0,0 +1,274 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`context predecessors function fetchPredecessors should perform multiple queries until the expected hit count is returned 1`] = ` +Array [ + Array [ + "index", + Object { + "fields": Object { + "getByName": [MockFunction] { + "calls": Array [ + Array [ + "@timestamp", + ], + ], + "results": Array [ + Object { + "type": "return", + "value": undefined, + }, + ], + }, + }, + "id": "DATA_VIEW_ID", + "isTimeNanosBased": [Function], + "popularizeField": [Function], + "timeFieldName": "@timestamp", + }, + ], + Array [ + "filter", + Array [], + ], + Array [ + "trackTotalHits", + false, + ], + Array [ + "size", + 3, + ], + Array [ + "query", + Object { + "language": "lucene", + "query": Object { + "bool": Object { + "must": Object { + "constant_score": Object { + "filter": Object { + "range": Object { + "@timestamp": Object { + "format": "strict_date_optional_time", + "gte": "1972-09-27T00:00:00.000Z", + "lte": "1972-09-28T00:00:00.000Z", + }, + }, + }, + }, + }, + "must_not": Object { + "ids": Object { + "values": Array [ + "test", + ], + }, + }, + }, + }, + }, + ], + Array [ + "searchAfter", + Array [ + "1972-09-27T00:00:00.000Z", + 0, + ], + ], + Array [ + "sort", + Array [ + Object { + "@timestamp": Object { + "format": "strict_date_optional_time", + "order": "asc", + }, + }, + Object { + "_doc": "asc", + }, + ], + ], + Array [ + "version", + true, + ], + Array [ + "size", + 2, + ], + Array [ + "query", + Object { + "language": "lucene", + "query": Object { + "bool": Object { + "must": Object { + "constant_score": Object { + "filter": Object { + "range": Object { + "@timestamp": Object { + "format": "strict_date_optional_time", + "gte": "1972-09-28T00:00:00.000Z", + "lte": "1972-10-04T00:00:00.000Z", + }, + }, + }, + }, + }, + "must_not": Object { + "ids": Object { + "values": Array [ + "test", + ], + }, + }, + }, + }, + }, + ], + Array [ + "searchAfter", + Array [ + "1972-09-27T00:00:00.000Z", + 0, + ], + ], + Array [ + "sort", + Array [ + Object { + "@timestamp": Object { + "format": "strict_date_optional_time", + "order": "asc", + }, + }, + Object { + "_doc": "asc", + }, + ], + ], + Array [ + "version", + true, + ], + Array [ + "size", + 2, + ], + Array [ + "query", + Object { + "language": "lucene", + "query": Object { + "bool": Object { + "must": Object { + "constant_score": Object { + "filter": Object { + "range": Object { + "@timestamp": Object { + "format": "strict_date_optional_time", + "gte": "1972-10-04T00:00:00.000Z", + "lte": "1972-10-27T00:00:00.000Z", + }, + }, + }, + }, + }, + "must_not": Object { + "ids": Object { + "values": Array [ + "test", + ], + }, + }, + }, + }, + }, + ], + Array [ + "searchAfter", + Array [ + "1972-09-27T00:00:00.000Z", + 0, + ], + ], + Array [ + "sort", + Array [ + Object { + "@timestamp": Object { + "format": "strict_date_optional_time", + "order": "asc", + }, + }, + Object { + "_doc": "asc", + }, + ], + ], + Array [ + "version", + true, + ], + Array [ + "size", + 2, + ], + Array [ + "query", + Object { + "language": "lucene", + "query": Object { + "bool": Object { + "must": Object { + "constant_score": Object { + "filter": Object { + "range": Object { + "@timestamp": Object { + "format": "strict_date_optional_time", + "gte": "1972-10-27T00:00:00.000Z", + "lte": "1973-09-27T00:00:00.000Z", + }, + }, + }, + }, + }, + "must_not": Object { + "ids": Object { + "values": Array [ + "test", + ], + }, + }, + }, + }, + }, + ], + Array [ + "searchAfter", + Array [ + "1972-09-27T00:00:00.000Z", + 0, + ], + ], + Array [ + "sort", + Array [ + Object { + "@timestamp": Object { + "format": "strict_date_optional_time", + "order": "asc", + }, + }, + Object { + "_doc": "asc", + }, + ], + ], + Array [ + "version", + true, + ], +] +`; diff --git a/src/plugins/discover/public/application/context/services/__snapshots__/context.successors.test.ts.snap b/src/plugins/discover/public/application/context/services/__snapshots__/context.successors.test.ts.snap new file mode 100644 index 0000000000000..1f8623595b707 --- /dev/null +++ b/src/plugins/discover/public/application/context/services/__snapshots__/context.successors.test.ts.snap @@ -0,0 +1,274 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`context successors function fetchSuccessors should perform multiple queries until the expected hit count is returned 1`] = ` +Array [ + Array [ + "index", + Object { + "fields": Object { + "getByName": [MockFunction] { + "calls": Array [ + Array [ + "@timestamp", + ], + ], + "results": Array [ + Object { + "type": "return", + "value": undefined, + }, + ], + }, + }, + "id": "DATA_VIEW_ID", + "isTimeNanosBased": [Function], + "popularizeField": [Function], + "timeFieldName": "@timestamp", + }, + ], + Array [ + "filter", + Array [], + ], + Array [ + "trackTotalHits", + false, + ], + Array [ + "size", + 4, + ], + Array [ + "query", + Object { + "language": "lucene", + "query": Object { + "bool": Object { + "must": Object { + "constant_score": Object { + "filter": Object { + "range": Object { + "@timestamp": Object { + "format": "strict_date_optional_time", + "gte": "1978-03-19T00:00:00.000Z", + "lte": "1978-03-20T00:00:00.000Z", + }, + }, + }, + }, + }, + "must_not": Object { + "ids": Object { + "values": Array [ + "1", + ], + }, + }, + }, + }, + }, + ], + Array [ + "searchAfter", + Array [ + "1978-03-20T00:00:00.000Z", + 0, + ], + ], + Array [ + "sort", + Array [ + Object { + "@timestamp": Object { + "format": "strict_date_optional_time", + "order": "desc", + }, + }, + Object { + "_doc": "desc", + }, + ], + ], + Array [ + "version", + true, + ], + Array [ + "size", + 1, + ], + Array [ + "query", + Object { + "language": "lucene", + "query": Object { + "bool": Object { + "must": Object { + "constant_score": Object { + "filter": Object { + "range": Object { + "@timestamp": Object { + "format": "strict_date_optional_time", + "gte": "1978-03-13T00:00:00.000Z", + "lte": "1978-03-19T00:00:00.000Z", + }, + }, + }, + }, + }, + "must_not": Object { + "ids": Object { + "values": Array [ + "1", + ], + }, + }, + }, + }, + }, + ], + Array [ + "searchAfter", + Array [ + "1978-03-19T23:59:59.998Z", + 0, + ], + ], + Array [ + "sort", + Array [ + Object { + "@timestamp": Object { + "format": "strict_date_optional_time", + "order": "desc", + }, + }, + Object { + "_doc": "desc", + }, + ], + ], + Array [ + "version", + true, + ], + Array [ + "size", + 1, + ], + Array [ + "query", + Object { + "language": "lucene", + "query": Object { + "bool": Object { + "must": Object { + "constant_score": Object { + "filter": Object { + "range": Object { + "@timestamp": Object { + "format": "strict_date_optional_time", + "gte": "1978-02-18T00:00:00.000Z", + "lte": "1978-03-13T00:00:00.000Z", + }, + }, + }, + }, + }, + "must_not": Object { + "ids": Object { + "values": Array [ + "1", + ], + }, + }, + }, + }, + }, + ], + Array [ + "searchAfter", + Array [ + "1978-03-19T23:59:59.998Z", + 0, + ], + ], + Array [ + "sort", + Array [ + Object { + "@timestamp": Object { + "format": "strict_date_optional_time", + "order": "desc", + }, + }, + Object { + "_doc": "desc", + }, + ], + ], + Array [ + "version", + true, + ], + Array [ + "size", + 1, + ], + Array [ + "query", + Object { + "language": "lucene", + "query": Object { + "bool": Object { + "must": Object { + "constant_score": Object { + "filter": Object { + "range": Object { + "@timestamp": Object { + "format": "strict_date_optional_time", + "gte": "1977-03-20T00:00:00.000Z", + "lte": "1978-02-18T00:00:00.000Z", + }, + }, + }, + }, + }, + "must_not": Object { + "ids": Object { + "values": Array [ + "1", + ], + }, + }, + }, + }, + }, + ], + Array [ + "searchAfter", + Array [ + "1978-03-19T23:59:59.998Z", + 0, + ], + ], + Array [ + "sort", + Array [ + Object { + "@timestamp": Object { + "format": "strict_date_optional_time", + "order": "desc", + }, + }, + Object { + "_doc": "desc", + }, + ], + ], + Array [ + "version", + true, + ], +] +`; diff --git a/src/plugins/discover/public/application/context/services/_stubs.ts b/src/plugins/discover/public/application/context/services/_stubs.ts index 0122d325fd98d..8df5710f72020 100644 --- a/src/plugins/discover/public/application/context/services/_stubs.ts +++ b/src/plugins/discover/public/application/context/services/_stubs.ts @@ -44,10 +44,13 @@ export function createSearchSourceStub(hits: EsHitRecord[], timeField?: string) const searchSourceStub: any = { _stubHits: hits, _stubTimeField: timeField, - _createStubHit: (timestamp: number, tiebreaker = 0) => ({ - [searchSourceStub._stubTimeField]: timestamp, - sort: [timestamp, tiebreaker], - }), + _createStubHit: (timestamp: number, tiebreaker = 0) => { + const value = new Date(timestamp).toISOString(); + return { + [searchSourceStub._stubTimeField]: value, + sort: [value, tiebreaker], + }; + }, setParent: sinon.spy(() => searchSourceStub), setField: sinon.spy(() => searchSourceStub), removeField: sinon.spy(() => searchSourceStub), @@ -74,13 +77,13 @@ export function createContextSearchSourceStub(timeFieldName: string) { const sortDirection = lastSort[0][timeField].order; const sortFunction = sortDirection === 'asc' - ? (first: SortHit, second: SortHit) => first[timeField] - second[timeField] - : (first: SortHit, second: SortHit) => second[timeField] - first[timeField]; + ? (first: SortHit, second: SortHit) => (first[timeField] < second[timeField] ? -1 : 1) + : (first: SortHit, second: SortHit) => (second[timeField] < first[timeField] ? -1 : 1); const filteredHits = searchSourceStub._stubHits .filter( (hit: SortHit) => - moment(hit[timeField]).isSameOrAfter(timeRange.gte) && - moment(hit[timeField]).isSameOrBefore(timeRange.lte) + moment(hit[timeField]).isSameOrAfter(moment(timeRange.gte)) && + moment(hit[timeField]).isSameOrBefore(moment(timeRange.lte)) ) .sort(sortFunction); diff --git a/src/plugins/discover/public/application/context/services/context.predecessors.test.ts b/src/plugins/discover/public/application/context/services/context.predecessors.test.ts index 6ade7624c2bf9..8e96d3807e7b5 100644 --- a/src/plugins/discover/public/application/context/services/context.predecessors.test.ts +++ b/src/plugins/discover/public/application/context/services/context.predecessors.test.ts @@ -34,7 +34,6 @@ describe('context predecessors', function () { let dataPluginMock: DataPublicPluginStart; let fetchPredecessors: ( timeValIso: string, - timeValNr: number, tieBreakerField: string, tieBreakerValue: number, size: number @@ -42,18 +41,20 @@ describe('context predecessors', function () { // eslint-disable-next-line @typescript-eslint/no-explicit-any let mockSearchSource: any; - const dataView = { - id: 'DATA_VIEW_ID', - timeFieldName: '@timestamp', - isTimeNanosBased: () => false, - popularizeField: () => {}, - fields: { - getByName: jest.fn(), - }, - } as unknown as DataView; + let dataView: DataView; describe('function fetchPredecessors', function () { beforeEach(() => { + dataView = { + id: 'DATA_VIEW_ID', + timeFieldName: '@timestamp', + isTimeNanosBased: () => false, + popularizeField: () => {}, + fields: { + getByName: jest.fn(), + }, + } as unknown as DataView; + mockSearchSource = createContextSearchSourceStub('@timestamp'); dataPluginMock = { search: { @@ -63,14 +64,14 @@ describe('context predecessors', function () { }, } as unknown as DataPublicPluginStart; - fetchPredecessors = (timeValIso, timeValNr, tieBreakerField, tieBreakerValue, size = 10) => { + fetchPredecessors = (timeValIso, tieBreakerField, tieBreakerValue, size = 10) => { const anchor = buildDataTableRecord( { _id: 'test', _source: { [dataView.timeFieldName!]: timeValIso, }, - sort: [timeValNr, tieBreakerValue], + sort: [timeValIso, tieBreakerValue], } as EsHitRecord, dataView, true @@ -100,17 +101,15 @@ describe('context predecessors', function () { mockSearchSource._createStubHit(MS_PER_DAY * 1000), ]; - return fetchPredecessors(ANCHOR_TIMESTAMP_3000, MS_PER_DAY * 3000, '_doc', 0, 3).then( - ({ rows }) => { - expect(mockSearchSource.fetch$.calledOnce).toBe(true); - expect(rows).toEqual( - buildDataTableRecordList({ - records: mockSearchSource._stubHits.slice(0, 3), - dataView, - }) - ); - } - ); + return fetchPredecessors(ANCHOR_TIMESTAMP_3000, '_doc', 0, 3).then(({ rows }) => { + expect(mockSearchSource.fetch$.calledOnce).toBe(true); + expect(rows).toEqual( + buildDataTableRecordList({ + records: mockSearchSource._stubHits.slice(0, 3), + dataView, + }) + ); + }); }); it('should perform multiple queries with the last being unrestricted when too few hits are returned', function () { @@ -122,30 +121,28 @@ describe('context predecessors', function () { mockSearchSource._createStubHit(MS_PER_DAY * 2990), ]; - return fetchPredecessors(ANCHOR_TIMESTAMP_3000, MS_PER_DAY * 3000, '_doc', 0, 6).then( - ({ rows }) => { - const intervals: Timestamp[] = mockSearchSource.setField.args - .filter(([property]: string) => property === 'query') - .map(([, { query }]: [string, { query: Query }]) => - get(query, ['bool', 'must', 'constant_score', 'filter', 'range', '@timestamp']) - ); - - expect( - intervals.every(({ gte, lte }) => (gte && lte ? moment(gte).isBefore(lte) : true)) - ).toBe(true); - // should have started at the given time - expect(intervals[0].gte).toEqual(moment(MS_PER_DAY * 3000).toISOString()); - // should have ended with a half-open interval - expect(Object.keys(last(intervals) ?? {})).toEqual(['format', 'gte']); - expect(intervals.length).toBeGreaterThan(1); - expect(rows).toEqual( - buildDataTableRecordList({ - records: mockSearchSource._stubHits.slice(0, 3), - dataView, - }) + return fetchPredecessors(ANCHOR_TIMESTAMP_3000, '_doc', 0, 6).then(({ rows }) => { + const intervals: Timestamp[] = mockSearchSource.setField.args + .filter(([property]: string) => property === 'query') + .map(([, { query }]: [string, { query: Query }]) => + get(query, ['bool', 'must', 'constant_score', 'filter', 'range', '@timestamp']) ); - } - ); + + expect( + intervals.every(({ gte, lte }) => (gte && lte ? moment(gte).isBefore(lte) : true)) + ).toBe(true); + // should have started at the given time + expect(intervals[0].gte).toEqual(moment(MS_PER_DAY * 3000).toISOString()); + // should have ended with a half-open interval + expect(Object.keys(last(intervals) ?? {})).toEqual(['format', 'gte']); + expect(intervals.length).toBeGreaterThan(1); + expect(rows).toEqual( + buildDataTableRecordList({ + records: mockSearchSource._stubHits.slice(0, 3), + dataView, + }) + ); + }); }); it('should perform multiple queries until the expected hit count is returned', function () { @@ -156,47 +153,38 @@ describe('context predecessors', function () { mockSearchSource._createStubHit(MS_PER_DAY * 1000), ]; - return fetchPredecessors(ANCHOR_TIMESTAMP_1000, MS_PER_DAY * 1000, '_doc', 0, 3).then( - ({ rows }) => { - const intervals: Timestamp[] = mockSearchSource.setField.args - .filter(([property]: string) => property === 'query') - .map(([, { query }]: [string, { query: Query }]) => { - return get(query, [ - 'bool', - 'must', - 'constant_score', - 'filter', - 'range', - '@timestamp', - ]); - }); + return fetchPredecessors(ANCHOR_TIMESTAMP_1000, '_doc', 0, 3).then(({ rows }) => { + expect(mockSearchSource.setField.args).toMatchSnapshot(); - // should have started at the given time - expect(intervals[0].gte).toEqual(moment(MS_PER_DAY * 1000).toISOString()); - // should have stopped before reaching MS_PER_DAY * 1700 - expect(moment(last(intervals)?.lte).valueOf()).toBeLessThan(MS_PER_DAY * 1700); - expect(intervals.length).toBeGreaterThan(1); + const intervals: Timestamp[] = mockSearchSource.setField.args + .filter(([property]: string) => property === 'query') + .map(([, { query }]: [string, { query: Query }]) => { + return get(query, ['bool', 'must', 'constant_score', 'filter', 'range', '@timestamp']); + }); - expect(rows).toEqual( - buildDataTableRecordList({ - records: mockSearchSource._stubHits.slice(-3), - dataView, - }) - ); - } - ); + // should have started at the given time + expect(intervals[0].gte).toEqual(moment(MS_PER_DAY * 1000).toISOString()); + // should have stopped before reaching MS_PER_DAY * 1700 + expect(moment(last(intervals)?.lte).valueOf()).toBeLessThan(MS_PER_DAY * 1700); + expect(intervals.length).toBeGreaterThan(1); + + expect(rows).toEqual( + buildDataTableRecordList({ + records: mockSearchSource._stubHits.slice(-3), + dataView, + }) + ); + }); }); it('should return an empty array when no hits were found', function () { - return fetchPredecessors(ANCHOR_TIMESTAMP_3, MS_PER_DAY * 3, '_doc', 0, 3).then( - ({ rows }) => { - expect(rows).toEqual([]); - } - ); + return fetchPredecessors(ANCHOR_TIMESTAMP_3, '_doc', 0, 3).then(({ rows }) => { + expect(rows).toEqual([]); + }); }); it('should configure the SearchSource to not inherit from the implicit root', function () { - return fetchPredecessors(ANCHOR_TIMESTAMP_3, MS_PER_DAY * 3, '_doc', 0, 3).then(() => { + return fetchPredecessors(ANCHOR_TIMESTAMP_3, '_doc', 0, 3).then(() => { const setParentSpy = mockSearchSource.setParent; expect(setParentSpy.alwaysCalledWith(undefined)).toBe(true); expect(setParentSpy.called).toBe(true); @@ -204,7 +192,7 @@ describe('context predecessors', function () { }); it('should set the tiebreaker sort order to the opposite as the time field', function () { - return fetchPredecessors(ANCHOR_TIMESTAMP, MS_PER_DAY, '_doc', 0, 3).then(() => { + return fetchPredecessors(ANCHOR_TIMESTAMP, '_doc', 0, 3).then(() => { expect( mockSearchSource.setField.calledWith('sort', [ { '@timestamp': { order: 'asc', format: 'strict_date_optional_time' } }, @@ -227,14 +215,14 @@ describe('context predecessors', function () { }, } as unknown as DataPublicPluginStart; - fetchPredecessors = (timeValIso, timeValNr, tieBreakerField, tieBreakerValue, size = 10) => { + fetchPredecessors = (timeValIso, tieBreakerField, tieBreakerValue, size = 10) => { const anchor = buildDataTableRecord( { _id: 'test', _source: { [dataView.timeFieldName!]: timeValIso, }, - sort: [timeValNr, tieBreakerValue], + sort: [timeValIso, tieBreakerValue], } as EsHitRecord, dataView, true @@ -264,21 +252,19 @@ describe('context predecessors', function () { mockSearchSource._createStubHit(MS_PER_DAY * 1000), ]; - return fetchPredecessors(ANCHOR_TIMESTAMP_3000, MS_PER_DAY * 3000, '_doc', 0, 3).then( - ({ rows }) => { - const setFieldsSpy = mockSearchSource.setField.withArgs('fields'); - const removeFieldsSpy = mockSearchSource.removeField.withArgs('fieldsFromSource'); - expect(mockSearchSource.fetch$.calledOnce).toBe(true); - expect(removeFieldsSpy.calledOnce).toBe(true); - expect(setFieldsSpy.calledOnce).toBe(true); - expect(rows).toEqual( - buildDataTableRecordList({ - records: mockSearchSource._stubHits.slice(0, 3), - dataView, - }) - ); - } - ); + return fetchPredecessors(ANCHOR_TIMESTAMP_3000, '_doc', 0, 3).then(({ rows }) => { + const setFieldsSpy = mockSearchSource.setField.withArgs('fields'); + const removeFieldsSpy = mockSearchSource.removeField.withArgs('fieldsFromSource'); + expect(mockSearchSource.fetch$.calledOnce).toBe(true); + expect(removeFieldsSpy.calledOnce).toBe(true); + expect(setFieldsSpy.calledOnce).toBe(true); + expect(rows).toEqual( + buildDataTableRecordList({ + records: mockSearchSource._stubHits.slice(0, 3), + dataView, + }) + ); + }); }); }); }); diff --git a/src/plugins/discover/public/application/context/services/context.successors.test.ts b/src/plugins/discover/public/application/context/services/context.successors.test.ts index 39cc05bd76571..fb480c0b4e873 100644 --- a/src/plugins/discover/public/application/context/services/context.successors.test.ts +++ b/src/plugins/discover/public/application/context/services/context.successors.test.ts @@ -32,7 +32,6 @@ interface Timestamp { describe('context successors', function () { let fetchSuccessors: ( timeValIso: string, - timeValNr: number, tieBreakerField: string, tieBreakerValue: number, size: number @@ -40,18 +39,20 @@ describe('context successors', function () { let dataPluginMock: DataPublicPluginStart; // eslint-disable-next-line @typescript-eslint/no-explicit-any let mockSearchSource: any; - const dataView = { - id: 'DATA_VIEW_ID', - timeFieldName: '@timestamp', - isTimeNanosBased: () => false, - popularizeField: () => {}, - fields: { - getByName: jest.fn(), - }, - } as unknown as DataView; + let dataView: DataView; describe('function fetchSuccessors', function () { beforeEach(() => { + dataView = { + id: 'DATA_VIEW_ID', + timeFieldName: '@timestamp', + isTimeNanosBased: () => false, + popularizeField: () => {}, + fields: { + getByName: jest.fn(), + }, + } as unknown as DataView; + mockSearchSource = createContextSearchSourceStub('@timestamp'); dataPluginMock = { @@ -62,7 +63,7 @@ describe('context successors', function () { }, } as unknown as DataPublicPluginStart; - fetchSuccessors = (timeValIso, timeValNr, tieBreakerField, tieBreakerValue, size) => { + fetchSuccessors = (timeValIso, tieBreakerField, tieBreakerValue, size) => { const anchor = buildDataTableRecord( { _index: 't', @@ -70,7 +71,7 @@ describe('context successors', function () { _source: { [dataView.timeFieldName!]: timeValIso, }, - sort: [timeValNr, tieBreakerValue], + sort: [timeValIso, tieBreakerValue], }, dataView, true @@ -100,17 +101,15 @@ describe('context successors', function () { mockSearchSource._createStubHit(MS_PER_DAY * 3000 - 2), ]; - return fetchSuccessors(ANCHOR_TIMESTAMP_3000, MS_PER_DAY * 3000, '_doc', 0, 3).then( - ({ rows }) => { - expect(mockSearchSource.fetch$.calledOnce).toBe(true); - expect(rows).toEqual( - buildDataTableRecordList({ - records: mockSearchSource._stubHits.slice(-3), - dataView, - }) - ); - } - ); + return fetchSuccessors(ANCHOR_TIMESTAMP_3000, '_doc', 0, 3).then(({ rows }) => { + expect(mockSearchSource.fetch$.calledOnce).toBe(true); + expect(rows).toEqual( + buildDataTableRecordList({ + records: mockSearchSource._stubHits.slice(-3), + dataView, + }) + ); + }); }); it('should perform multiple queries with the last being unrestricted when too few hits are returned', function () { @@ -122,30 +121,28 @@ describe('context successors', function () { mockSearchSource._createStubHit(MS_PER_DAY * 2990), ]; - return fetchSuccessors(ANCHOR_TIMESTAMP_3000, MS_PER_DAY * 3000, '_doc', 0, 6).then( - ({ rows }) => { - const intervals: Timestamp[] = mockSearchSource.setField.args - .filter(([property]: [string]) => property === 'query') - .map(([, { query }]: [string, { query: Query }]) => - get(query, ['bool', 'must', 'constant_score', 'filter', 'range', '@timestamp']) - ); - - expect( - intervals.every(({ gte, lte }) => (gte && lte ? moment(gte).isBefore(lte) : true)) - ).toBe(true); - // should have started at the given time - expect(intervals[0].lte).toEqual(moment(MS_PER_DAY * 3000).toISOString()); - // should have ended with a half-open interval - expect(Object.keys(last(intervals) ?? {})).toEqual(['format', 'lte']); - expect(intervals.length).toBeGreaterThan(1); - expect(rows).toEqual( - buildDataTableRecordList({ - records: mockSearchSource._stubHits.slice(-3), - dataView, - }) + return fetchSuccessors(ANCHOR_TIMESTAMP_3000, '_doc', 0, 6).then(({ rows }) => { + const intervals: Timestamp[] = mockSearchSource.setField.args + .filter(([property]: [string]) => property === 'query') + .map(([, { query }]: [string, { query: Query }]) => + get(query, ['bool', 'must', 'constant_score', 'filter', 'range', '@timestamp']) ); - } - ); + + expect( + intervals.every(({ gte, lte }) => (gte && lte ? moment(gte).isBefore(lte) : true)) + ).toBe(true); + // should have started at the given time + expect(intervals[0].lte).toEqual(moment(MS_PER_DAY * 3000).toISOString()); + // should have ended with a half-open interval + expect(Object.keys(last(intervals) ?? {})).toEqual(['format', 'lte']); + expect(intervals.length).toBeGreaterThan(1); + expect(rows).toEqual( + buildDataTableRecordList({ + records: mockSearchSource._stubHits.slice(-3), + dataView, + }) + ); + }); }); it('should perform multiple queries until the expected hit count is returned', function () { @@ -158,37 +155,37 @@ describe('context successors', function () { mockSearchSource._createStubHit(MS_PER_DAY * 1000), ]; - return fetchSuccessors(ANCHOR_TIMESTAMP_3000, MS_PER_DAY * 3000, '_doc', 0, 4).then( - ({ rows }) => { - const intervals: Timestamp[] = mockSearchSource.setField.args - .filter(([property]: [string]) => property === 'query') - .map(([, { query }]: [string, { query: Query }]) => - get(query, ['bool', 'must', 'constant_score', 'filter', 'range', '@timestamp']) - ); - - // should have started at the given time - expect(intervals[0].lte).toEqual(moment(MS_PER_DAY * 3000).toISOString()); - // should have stopped before reaching MS_PER_DAY * 2200 - expect(moment(last(intervals)?.gte).valueOf()).toBeGreaterThan(MS_PER_DAY * 2200); - expect(intervals.length).toBeGreaterThan(1); - expect(rows).toEqual( - buildDataTableRecordList({ - records: mockSearchSource._stubHits.slice(0, 4), - dataView, - }) + return fetchSuccessors(ANCHOR_TIMESTAMP_3000, '_doc', 0, 4).then(({ rows }) => { + expect(mockSearchSource.setField.args).toMatchSnapshot(); + + const intervals: Timestamp[] = mockSearchSource.setField.args + .filter(([property]: [string]) => property === 'query') + .map(([, { query }]: [string, { query: Query }]) => + get(query, ['bool', 'must', 'constant_score', 'filter', 'range', '@timestamp']) ); - } - ); + + // should have started at the given time + expect(intervals[0].lte).toEqual(moment(MS_PER_DAY * 3000).toISOString()); + // should have stopped before reaching MS_PER_DAY * 2200 + expect(moment(last(intervals)?.gte).valueOf()).toBeGreaterThan(MS_PER_DAY * 2200); + expect(intervals.length).toBeGreaterThan(1); + expect(rows).toEqual( + buildDataTableRecordList({ + records: mockSearchSource._stubHits.slice(0, 4), + dataView, + }) + ); + }); }); it('should return an empty array when no hits were found', function () { - return fetchSuccessors(ANCHOR_TIMESTAMP_3, MS_PER_DAY * 3, '_doc', 0, 3).then(({ rows }) => { + return fetchSuccessors(ANCHOR_TIMESTAMP_3, '_doc', 0, 3).then(({ rows }) => { expect(rows).toEqual([]); }); }); it('should configure the SearchSource to not inherit from the implicit root', function () { - return fetchSuccessors(ANCHOR_TIMESTAMP_3, MS_PER_DAY * 3, '_doc', 0, 3).then(() => { + return fetchSuccessors(ANCHOR_TIMESTAMP_3, '_doc', 0, 3).then(() => { const setParentSpy = mockSearchSource.setParent; expect(setParentSpy.alwaysCalledWith(undefined)).toBe(true); expect(setParentSpy.called).toBe(true); @@ -196,7 +193,7 @@ describe('context successors', function () { }); it('should set the tiebreaker sort order to the same as the time field', function () { - return fetchSuccessors(ANCHOR_TIMESTAMP, MS_PER_DAY, '_doc', 0, 3).then(() => { + return fetchSuccessors(ANCHOR_TIMESTAMP, '_doc', 0, 3).then(() => { expect( mockSearchSource.setField.calledWith('sort', [ { '@timestamp': { order: SortDirection.desc, format: 'strict_date_optional_time' } }, @@ -219,7 +216,7 @@ describe('context successors', function () { }, } as unknown as DataPublicPluginStart; - fetchSuccessors = (timeValIso, timeValNr, tieBreakerField, tieBreakerValue, size) => { + fetchSuccessors = (timeValIso, tieBreakerField, tieBreakerValue, size) => { const anchor = buildDataTableRecord( { _id: '1', @@ -227,7 +224,7 @@ describe('context successors', function () { _source: { [dataView.timeFieldName!]: timeValIso, }, - sort: [timeValNr, tieBreakerValue], + sort: [timeValIso, tieBreakerValue], }, dataView, true @@ -257,7 +254,7 @@ describe('context successors', function () { mockSearchSource._createStubHit(MS_PER_DAY * 3000 - 2), ]; - return fetchSuccessors(ANCHOR_TIMESTAMP_3000, MS_PER_DAY * 3000, '_doc', 0, 3).then( + return fetchSuccessors(ANCHOR_TIMESTAMP_3000, '_doc', 0, 3).then( ({ rows, interceptedWarnings }) => { expect(mockSearchSource.fetch$.calledOnce).toBe(true); expect(rows).toEqual( @@ -291,7 +288,7 @@ describe('context successors', function () { }, } as unknown as DataPublicPluginStart; - fetchSuccessors = (timeValIso, timeValNr, tieBreakerField, tieBreakerValue, size) => { + fetchSuccessors = (timeValIso, tieBreakerField, tieBreakerValue, size) => { const anchor = buildDataTableRecord( { _id: '1', @@ -299,7 +296,7 @@ describe('context successors', function () { _source: { [dataView.timeFieldName!]: timeValIso, }, - sort: [timeValNr, tieBreakerValue], + sort: [timeValIso, tieBreakerValue], }, dataView, true @@ -332,7 +329,7 @@ describe('context successors', function () { mockSearchSource._createStubHit(MS_PER_DAY * 3000 - 2), ]; - return fetchSuccessors(ANCHOR_TIMESTAMP_3000, MS_PER_DAY * 3000, '_doc', 0, 3).then( + return fetchSuccessors(ANCHOR_TIMESTAMP_3000, '_doc', 0, 3).then( ({ rows, interceptedWarnings }) => { expect(mockSearchSource.fetch$.calledOnce).toBe(true); expect(rows).toEqual( diff --git a/src/plugins/discover/public/application/context/services/context.ts b/src/plugins/discover/public/application/context/services/context.ts index a4df96fe0bdbb..b375e3cce75f6 100644 --- a/src/plugins/discover/public/application/context/services/context.ts +++ b/src/plugins/discover/public/application/context/services/context.ts @@ -71,10 +71,11 @@ export async function fetchSurroundingDocs( const anchorRaw = anchor.raw!; const nanos = dataView.isTimeNanosBased() ? extractNanos(anchorRaw.fields?.[timeField][0]) : ''; - const timeValueMillis = - nanos !== '' ? convertIsoToMillis(anchorRaw.fields?.[timeField][0]) : anchorRaw.sort?.[0]; + const timeValueMillis = convertIsoToMillis( + nanos !== '' ? anchorRaw.fields?.[timeField][0] : anchorRaw.sort?.[0] + ); - const intervals = generateIntervals(LOOKUP_OFFSETS, timeValueMillis as number, type, sortDir); + const intervals = generateIntervals(LOOKUP_OFFSETS, timeValueMillis, type, sortDir); let rows: DataTableRecord[] = []; let interceptedWarnings: SearchResponseWarning[] = []; diff --git a/src/plugins/discover/public/application/main/components/layout/discover_histogram_layout.test.tsx b/src/plugins/discover/public/application/main/components/layout/discover_histogram_layout.test.tsx index d23dfbe4359eb..646eb9171dd05 100644 --- a/src/plugins/discover/public/application/main/components/layout/discover_histogram_layout.test.tsx +++ b/src/plugins/discover/public/application/main/components/layout/discover_histogram_layout.test.tsx @@ -13,7 +13,6 @@ import type { DataView } from '@kbn/data-views-plugin/common'; import { esHitsMock } from '@kbn/discover-utils/src/__mocks__'; import { savedSearchMockWithTimeField } from '../../../../__mocks__/saved_search'; import { - AvailableFields$, DataDocuments$, DataMain$, DataTotalHits$, @@ -93,11 +92,6 @@ const mountComponent = async ({ result: esHitsMock.map((esHit) => buildDataTableRecord(esHit, dataView)), }) as DataDocuments$; - const availableFields$ = new BehaviorSubject({ - fetchStatus: FetchStatus.COMPLETE, - fields: [] as string[], - }) as AvailableFields$; - const totalHits$ = new BehaviorSubject({ fetchStatus: FetchStatus.COMPLETE, result: Number(esHitsMock.length), @@ -107,7 +101,6 @@ const mountComponent = async ({ main$, documents$, totalHits$, - availableFields$, }; const session = getSessionServiceMock(); diff --git a/src/plugins/discover/public/application/main/components/layout/discover_layout.test.tsx b/src/plugins/discover/public/application/main/components/layout/discover_layout.test.tsx index cf3fd26a10d66..b6bf9ba4f4a94 100644 --- a/src/plugins/discover/public/application/main/components/layout/discover_layout.test.tsx +++ b/src/plugins/discover/public/application/main/components/layout/discover_layout.test.tsx @@ -21,7 +21,6 @@ import { import type { DataView } from '@kbn/data-views-plugin/public'; import { dataViewWithTimefieldMock } from '../../../../__mocks__/data_view_with_timefield'; import { - AvailableFields$, DataDocuments$, DataMain$, DataTotalHits$, @@ -83,11 +82,6 @@ async function mountComponent( result: esHitsMock.map((esHit) => buildDataTableRecord(esHit, dataView)), }) as DataDocuments$; - const availableFields$ = new BehaviorSubject({ - fetchStatus: FetchStatus.COMPLETE, - fields: [] as string[], - }) as AvailableFields$; - const totalHits$ = new BehaviorSubject({ fetchStatus: FetchStatus.COMPLETE, result: Number(esHitsMock.length), @@ -97,7 +91,6 @@ async function mountComponent( main$, documents$, totalHits$, - availableFields$, }; const session = getSessionServiceMock(); diff --git a/src/plugins/discover/public/application/main/components/layout/discover_layout.tsx b/src/plugins/discover/public/application/main/components/layout/discover_layout.tsx index 0d94041738f54..d4798089e09ee 100644 --- a/src/plugins/discover/public/application/main/components/layout/discover_layout.tsx +++ b/src/plugins/discover/public/application/main/components/layout/discover_layout.tsx @@ -389,7 +389,6 @@ export function DiscoverLayout({ stateContainer }: DiscoverLayoutProps) { trackUiMetric={trackUiMetric} onFieldEdited={onFieldEdited} onDataViewCreated={stateContainer.actions.onDataViewCreated} - availableFields$={stateContainer.dataState.data$.availableFields$} sidebarToggleState$={sidebarToggleState$} /> } diff --git a/src/plugins/discover/public/application/main/components/layout/discover_main_content.test.tsx b/src/plugins/discover/public/application/main/components/layout/discover_main_content.test.tsx index 343ceae3ed995..43d8694bd4653 100644 --- a/src/plugins/discover/public/application/main/components/layout/discover_main_content.test.tsx +++ b/src/plugins/discover/public/application/main/components/layout/discover_main_content.test.tsx @@ -14,7 +14,6 @@ import { mountWithIntl } from '@kbn/test-jest-helpers'; import { DataView } from '@kbn/data-plugin/common'; import { dataViewMock, esHitsMock } from '@kbn/discover-utils/src/__mocks__'; import { - AvailableFields$, DataDocuments$, DataMain$, DataTotalHits$, @@ -75,11 +74,6 @@ const mountComponent = async ({ result: esHitsMock.map((esHit) => buildDataTableRecord(esHit, dataViewMock)), }) as DataDocuments$; - const availableFields$ = new BehaviorSubject({ - fetchStatus: FetchStatus.COMPLETE, - fields: [] as string[], - }) as AvailableFields$; - const totalHits$ = new BehaviorSubject({ fetchStatus: FetchStatus.COMPLETE, result: Number(esHitsMock.length), @@ -90,7 +84,6 @@ const mountComponent = async ({ main$, documents$, totalHits$, - availableFields$, }; stateContainer.dataState.data$ = savedSearchData$; const dataView = stateContainer.savedSearchState diff --git a/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar_responsive.test.tsx b/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar_responsive.test.tsx index e9c48128838fb..3b1ce77bcc395 100644 --- a/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar_responsive.test.tsx +++ b/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar_responsive.test.tsx @@ -20,10 +20,7 @@ import { } from './discover_sidebar_responsive'; import { DiscoverServices } from '../../../../build_services'; import { FetchStatus, SidebarToggleState } from '../../../types'; -import { - AvailableFields$, - DataDocuments$, -} from '../../state_management/discover_data_state_container'; +import { DataDocuments$ } from '../../state_management/discover_data_state_container'; import { stubLogstashDataView } from '@kbn/data-plugin/common/stubs'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { getDiscoverStateMock } from '../../../../__mocks__/discover_state.mock'; @@ -154,10 +151,6 @@ function getCompProps(options?: { hits?: DataTableRecord[] }): DiscoverSidebarRe fetchStatus: FetchStatus.COMPLETE, result: hits, }) as DataDocuments$, - availableFields$: new BehaviorSubject({ - fetchStatus: FetchStatus.COMPLETE, - fields: [] as string[], - }) as AvailableFields$, onChangeDataView: jest.fn(), onAddFilter: jest.fn(), onAddField: jest.fn(), @@ -311,11 +304,6 @@ describe('discover responsive sidebar', function () { expect(unmappedFieldsCount.exists()).toBe(false); expect(mockCalcFieldCounts.mock.calls.length).toBe(1); - expect(props.availableFields$.getValue()).toEqual({ - fetchStatus: 'complete', - fields: ['extension'], - }); - expect(findTestSubject(comp, 'fieldListGrouped__ariaDescription').text()).toBe( '1 selected field. 4 popular fields. 3 available fields. 20 empty fields. 2 meta fields.' ); @@ -374,11 +362,6 @@ describe('discover responsive sidebar', function () { expect(metaFieldsCount.text()).toBe('2'); expect(unmappedFieldsCount.exists()).toBe(false); - expect(propsWithoutColumns.availableFields$.getValue()).toEqual({ - fetchStatus: 'complete', - fields: ['bytes', 'extension', '_id', 'phpmemory'], - }); - expect(findTestSubject(compWithoutSelected, 'fieldListGrouped__ariaDescription').text()).toBe( '4 popular fields. 3 available fields. 20 empty fields. 2 meta fields.' ); diff --git a/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar_responsive.tsx b/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar_responsive.tsx index 23778ada7566a..187a946892d1f 100644 --- a/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar_responsive.tsx +++ b/src/plugins/discover/public/application/main/components/sidebar/discover_sidebar_responsive.tsx @@ -23,10 +23,7 @@ import { } from '@kbn/unified-field-list'; import { PLUGIN_ID } from '../../../../../common'; import { useDiscoverServices } from '../../../../hooks/use_discover_services'; -import { - AvailableFields$, - DataDocuments$, -} from '../../state_management/discover_data_state_container'; +import { DataDocuments$ } from '../../state_management/discover_data_state_container'; import { calcFieldCounts } from '../../utils/calc_field_counts'; import { FetchStatus, SidebarToggleState } from '../../../types'; import { DISCOVER_TOUR_STEP_ANCHOR_IDS } from '../../../../components/discover_tour'; @@ -129,10 +126,6 @@ export interface DiscoverSidebarResponsiveProps { * callback to execute on create dataview */ onDataViewCreated: (dataView: DataView) => void; - /** - * list of available fields fetched from ES - */ - availableFields$: AvailableFields$; /** * For customization and testing purposes */ @@ -291,20 +284,6 @@ export function DiscoverSidebarResponsive(props: DiscoverSidebarResponsiveProps) }, []); const { dataViewEditor } = services; - const { availableFields$ } = props; - - useEffect(() => { - // For an external embeddable like the Field stats - // it is useful to know what fields are populated in the docs fetched - // or what fields are selected by the user - - const availableFields = - props.columns.length > 0 ? props.columns : Object.keys(sidebarState.fieldCounts || {}); - availableFields$.next({ - fetchStatus: FetchStatus.COMPLETE, - fields: availableFields, - }); - }, [selectedDataView, sidebarState.fieldCounts, props.columns, availableFields$]); const canEditDataView = Boolean(dataViewEditor?.userPermissions.editDataView()) || diff --git a/src/plugins/discover/public/application/main/data_fetching/fetch_all.test.ts b/src/plugins/discover/public/application/main/data_fetching/fetch_all.test.ts index d6999c2200436..864c44fd6ce09 100644 --- a/src/plugins/discover/public/application/main/data_fetching/fetch_all.test.ts +++ b/src/plugins/discover/public/application/main/data_fetching/fetch_all.test.ts @@ -14,7 +14,6 @@ import { savedSearchMock } from '../../../__mocks__/saved_search'; import { discoverServiceMock } from '../../../__mocks__/services'; import { fetchAll, fetchMoreDocuments } from './fetch_all'; import { - DataAvailableFieldsMsg, DataDocumentsMsg, DataMainMsg, DataTotalHitsMsg, @@ -59,9 +58,6 @@ describe('test fetchAll', () => { main$: new BehaviorSubject({ fetchStatus: FetchStatus.UNINITIALIZED }), documents$: new BehaviorSubject({ fetchStatus: FetchStatus.UNINITIALIZED }), totalHits$: new BehaviorSubject({ fetchStatus: FetchStatus.UNINITIALIZED }), - availableFields$: new BehaviorSubject({ - fetchStatus: FetchStatus.UNINITIALIZED, - }), }; searchSource = savedSearchMock.searchSource.createChild(); diff --git a/src/plugins/discover/public/application/main/state_management/discover_data_state_container.ts b/src/plugins/discover/public/application/main/state_management/discover_data_state_container.ts index aaa1f6c15c0f4..d467d965f012d 100644 --- a/src/plugins/discover/public/application/main/state_management/discover_data_state_container.ts +++ b/src/plugins/discover/public/application/main/state_management/discover_data_state_container.ts @@ -33,13 +33,11 @@ export interface SavedSearchData { main$: DataMain$; documents$: DataDocuments$; totalHits$: DataTotalHits$; - availableFields$: AvailableFields$; } export type DataMain$ = BehaviorSubject; export type DataDocuments$ = BehaviorSubject; export type DataTotalHits$ = BehaviorSubject; -export type AvailableFields$ = BehaviorSubject; export type DataFetch$ = Observable<{ options: { reset: boolean; @@ -180,7 +178,6 @@ export function getDataStateContainer({ main$: new BehaviorSubject(initialState), documents$: new BehaviorSubject(initialState), totalHits$: new BehaviorSubject(initialState), - availableFields$: new BehaviorSubject(initialState), }; let autoRefreshDone: AutoRefreshDoneFn | undefined; diff --git a/src/plugins/kibana_usage_collection/server/collectors/common/__fixtures__/counters_saved_objects.ts b/src/plugins/kibana_usage_collection/server/collectors/common/__fixtures__/counters_saved_objects.ts new file mode 100644 index 0000000000000..cf9e9c361117a --- /dev/null +++ b/src/plugins/kibana_usage_collection/server/collectors/common/__fixtures__/counters_saved_objects.ts @@ -0,0 +1,166 @@ +/* + * Copyright 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 { UsageCountersSavedObject } from '@kbn/usage-collection-plugin/server'; + +export const rawServerCounters: UsageCountersSavedObject[] = [ + { + type: 'usage-counter', + id: 'myApp:my_event:count:server:20210409', + attributes: { + domainId: 'myApp', + counterName: 'my_event', + counterType: 'count', + source: 'server', + count: 1, + }, + references: [], + coreMigrationVersion: '8.0.0', + updated_at: '2021-04-09T08:17:57.693Z', + }, + { + type: 'usage-counter', + id: 'Kibana_home:intersecting_event:loaded:server:20201023', + attributes: { + domainId: 'Kibana_home', + counterName: 'intersecting_event', + counterType: 'loaded', + source: 'server', + count: 60, + }, + references: [], + coreMigrationVersion: '8.0.0', + updated_at: '2020-10-23T11:27:57.067Z', + }, + { + type: 'usage-counter', + id: 'myApp:my_event_4457914848544:count:server:20210409', + attributes: { + domainId: 'myApp', + counterName: 'my_event_4457914848544', + counterType: 'count', + source: 'server', + count: 0, + }, + references: [], + coreMigrationVersion: '8.0.0', + updated_at: '2021-04-09T08:18:03.030Z', + }, + { + type: 'usage-counter', + id: 'myApp:my_event_malformed:count:server:20210409', + attributes: { + domainId: 'myApp', + counterName: 'my_event_malformed', + counterType: 'count', + source: 'server', + // @ts-expect-error + count: 'malformed', + }, + references: [], + coreMigrationVersion: '8.0.0', + updated_at: '2021-04-09T08:18:03.030Z', + }, + { + type: 'usage-counter', + id: 'myApp:my_event_4457914848544_2:count:server:20210409', + attributes: { + domainId: 'myApp', + counterName: 'my_event_4457914848544_2', + counterType: 'count', + source: 'server', + count: 8, + }, + references: [], + coreMigrationVersion: '8.0.0', + updated_at: '2021-04-09T08:18:03.031Z', + }, + { + type: 'usage-counter', + id: 'myApp:only_reported_in_usage_counters:count:server:20210409', + attributes: { + domainId: 'myApp', + counterName: 'only_reported_in_usage_counters', + counterType: 'count', + source: 'server', + count: 1, + }, + references: [], + coreMigrationVersion: '8.0.0', + updated_at: '2021-04-09T08:18:03.031Z', + }, + { + type: 'usage-counter', + id: 'myApp:namespaced_counter:count:server:20240627:first', + namespaces: ['first'], + attributes: { + domainId: 'myApp', + counterName: 'namespaced_counter', + counterType: 'count', + source: 'server', + count: 1, + }, + references: [], + coreMigrationVersion: '8.0.0', + updated_at: '2024-06-27T08:18:03.031Z', + }, + { + type: 'usage-counter', + id: 'myApp:namespaced_counter:count:server:20240627:second', + namespaces: ['second'], + attributes: { + domainId: 'myApp', + counterName: 'namespaced_counter', + counterType: 'count', + source: 'server', + count: 2, + }, + references: [], + coreMigrationVersion: '8.0.0', + updated_at: '2024-06-27T09:18:03.031Z', + }, + { + type: 'usage-counter', + id: 'myApp:namespaced_counter:count:server:20240627:third', + namespaces: ['third'], + attributes: { + domainId: 'myApp', + counterName: 'namespaced_counter', + counterType: 'count', + source: 'server', + count: 3, + }, + references: [], + coreMigrationVersion: '8.0.0', + updated_at: '2024-06-27T10:18:03.031Z', + }, + { + type: 'usage-counter', + id: 'myApp:namespaced_counter:count:server:20240627:default', + namespaces: ['default'], + attributes: { + domainId: 'myApp', + counterName: 'namespaced_counter', + counterType: 'count', + source: 'server', + count: 10, + }, + references: [], + coreMigrationVersion: '8.0.0', + updated_at: '2024-06-27T11:18:03.031Z', + }, +]; + +export const rawUiCounters: UsageCountersSavedObject[] = rawServerCounters.map((counter) => ({ + ...counter, + id: counter.id.replace(':server:', ':ui:'), + attributes: { + ...counter.attributes, + source: 'ui', + }, +})); diff --git a/src/plugins/kibana_usage_collection/server/collectors/common/counters.test.ts b/src/plugins/kibana_usage_collection/server/collectors/common/counters.test.ts new file mode 100644 index 0000000000000..dfc701cfa555a --- /dev/null +++ b/src/plugins/kibana_usage_collection/server/collectors/common/counters.test.ts @@ -0,0 +1,188 @@ +/* + * Copyright 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 { loggingSystemMock, savedObjectsClientMock } from '@kbn/core/server/mocks'; +import { transformRawCounter, createCounterFetcher } from './counters'; +import { rawServerCounters, rawUiCounters } from './__fixtures__/counters_saved_objects'; + +const mockLogger = loggingSystemMock.create(); + +describe('transformRawCounter', () => { + it('transforms usage counters savedObject raw entries', () => { + const result = rawServerCounters.map(transformRawCounter); + expect(result).toMatchInlineSnapshot(` + Array [ + Object { + "counterName": "my_event", + "counterType": "count", + "domainId": "myApp", + "fromTimestamp": "2021-04-09T00:00:00Z", + "lastUpdatedAt": "2021-04-09T08:17:57.693Z", + "total": 1, + }, + Object { + "counterName": "intersecting_event", + "counterType": "loaded", + "domainId": "Kibana_home", + "fromTimestamp": "2020-10-23T00:00:00Z", + "lastUpdatedAt": "2020-10-23T11:27:57.067Z", + "total": 60, + }, + undefined, + undefined, + Object { + "counterName": "my_event_4457914848544_2", + "counterType": "count", + "domainId": "myApp", + "fromTimestamp": "2021-04-09T00:00:00Z", + "lastUpdatedAt": "2021-04-09T08:18:03.031Z", + "total": 8, + }, + Object { + "counterName": "only_reported_in_usage_counters", + "counterType": "count", + "domainId": "myApp", + "fromTimestamp": "2021-04-09T00:00:00Z", + "lastUpdatedAt": "2021-04-09T08:18:03.031Z", + "total": 1, + }, + Object { + "counterName": "namespaced_counter", + "counterType": "count", + "domainId": "myApp", + "fromTimestamp": "2024-06-27T00:00:00Z", + "lastUpdatedAt": "2024-06-27T08:18:03.031Z", + "total": 1, + }, + Object { + "counterName": "namespaced_counter", + "counterType": "count", + "domainId": "myApp", + "fromTimestamp": "2024-06-27T00:00:00Z", + "lastUpdatedAt": "2024-06-27T09:18:03.031Z", + "total": 2, + }, + Object { + "counterName": "namespaced_counter", + "counterType": "count", + "domainId": "myApp", + "fromTimestamp": "2024-06-27T00:00:00Z", + "lastUpdatedAt": "2024-06-27T10:18:03.031Z", + "total": 3, + }, + Object { + "counterName": "namespaced_counter", + "counterType": "count", + "domainId": "myApp", + "fromTimestamp": "2024-06-27T00:00:00Z", + "lastUpdatedAt": "2024-06-27T11:18:03.031Z", + "total": 10, + }, + ] + `); + }); +}); + +describe('createCounterFetcher', () => { + const soClientMock = savedObjectsClientMock.create(); + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('returns saved objects only from a given source', async () => { + // @ts-expect-error incomplete mock implementation + soClientMock.find.mockImplementation(async ({ type, filter }) => { + if (type !== 'usage-counter') { + throw new Error(`unexpected type ${type}`); + } + + if (filter === 'counter.attributes.source: server') { + return { saved_objects: rawServerCounters }; + } else if (filter === 'counter.attributes.source: ui') { + return { saved_objects: rawUiCounters }; + } + + throw new Error(`unexpected filter ${filter}`); + }); + + const fetch = createCounterFetcher( + mockLogger.get(), + 'counter.attributes.source: server', + (dailyEvents) => ({ + dailyEvents, + }) + ); + // @ts-expect-error incomplete mock implementation + const { dailyEvents } = await fetch({ soClient: soClientMock }); + expect(dailyEvents).toHaveLength(5); + const intersectingEntry = dailyEvents.find( + ({ counterName, fromTimestamp }) => + counterName === 'intersecting_event' && fromTimestamp === '2020-10-23T00:00:00Z' + ); + + const onlyFromUICountersEntry = dailyEvents.find( + ({ counterName }) => counterName === 'only_reported_in_ui_counters' + ); + + const onlyFromUsageCountersEntry = dailyEvents.find( + ({ counterName }) => counterName === 'only_reported_in_usage_counters' + ); + + const invalidCountEntry = dailyEvents.find( + ({ counterName }) => counterName === 'my_event_malformed' + ); + + const zeroCountEntry = dailyEvents.find( + ({ counterName }) => counterName === 'my_event_4457914848544' + ); + + const nonUiCountersEntry = dailyEvents.find( + ({ counterName }) => counterName === 'some_event_name' + ); + + const namespacedCounterEntry = dailyEvents.find( + ({ counterName }) => counterName === 'namespaced_counter' + ); + + expect(invalidCountEntry).toBe(undefined); + expect(nonUiCountersEntry).toBe(undefined); + expect(zeroCountEntry).toBe(undefined); + expect(onlyFromUICountersEntry).toBe(undefined); + expect(onlyFromUsageCountersEntry).toMatchInlineSnapshot(` + Object { + "counterName": "only_reported_in_usage_counters", + "counterType": "count", + "domainId": "myApp", + "fromTimestamp": "2021-04-09T00:00:00Z", + "lastUpdatedAt": "2021-04-09T08:18:03.031Z", + "total": 1, + } + `); + expect(intersectingEntry).toMatchInlineSnapshot(` + Object { + "counterName": "intersecting_event", + "counterType": "loaded", + "domainId": "Kibana_home", + "fromTimestamp": "2020-10-23T00:00:00Z", + "lastUpdatedAt": "2020-10-23T11:27:57.067Z", + "total": 60, + } + `); + // we sum counters from all namespaces: 1 + 2 + 3 + 10 + expect(namespacedCounterEntry).toMatchInlineSnapshot(` + Object { + "counterName": "namespaced_counter", + "counterType": "count", + "domainId": "myApp", + "fromTimestamp": "2024-06-27T00:00:00Z", + "lastUpdatedAt": "2024-06-27T11:18:03.031Z", + "total": 16, + } + `); + }); +}); diff --git a/src/plugins/kibana_usage_collection/server/collectors/common/counters.ts b/src/plugins/kibana_usage_collection/server/collectors/common/counters.ts new file mode 100644 index 0000000000000..f20e57ab47664 --- /dev/null +++ b/src/plugins/kibana_usage_collection/server/collectors/common/counters.ts @@ -0,0 +1,102 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import moment from 'moment'; +import { Logger } from '@kbn/logging'; +import { + CollectorFetchContext, + UsageCountersSavedObject, + UsageCountersSavedObjectAttributes, + USAGE_COUNTERS_SAVED_OBJECT_TYPE, +} from '@kbn/usage-collection-plugin/server'; + +export interface CounterEvent { + domainId: string; + counterName: string; + counterType: string; + lastUpdatedAt: string; + fromTimestamp: string; + total: number; +} + +export function createCounterFetcher( + logger: Logger, + filter: string, + transform: (counters: CounterEvent[]) => T +) { + return async ({ soClient }: CollectorFetchContext) => { + const finder = soClient.createPointInTimeFinder({ + type: USAGE_COUNTERS_SAVED_OBJECT_TYPE, + namespaces: ['*'], + fields: ['count', 'counterName', 'counterType', 'domainId'], + filter, + perPage: 100, + }); + + const dailyEvents: CounterEvent[] = []; + + for await (const { saved_objects: rawUsageCounters } of finder.find()) { + rawUsageCounters.forEach((raw) => { + try { + const event = transformRawCounter(raw); + if (event) { + dailyEvents.push(event); + } + } catch (err) { + // swallow error; allows sending successfully transformed objects. + logger.debug('Error collecting usage-counter details: ' + err.message); + } + }); + } + + return transform(mergeCounters(dailyEvents)); + }; +} + +export function transformRawCounter( + rawCounter: UsageCountersSavedObject +): CounterEvent | undefined { + const { + attributes: { domainId, counterType, counterName, count }, + updated_at: lastUpdatedAt, + } = rawCounter; + + if (typeof count !== 'number' || count < 1) { + return; + } + + const fromTimestamp = moment(lastUpdatedAt).utc().startOf('day').format(); + + return { + domainId, + counterType, + counterName, + lastUpdatedAt: lastUpdatedAt!, + fromTimestamp, + total: count, + }; +} + +function mergeCounters(counters: CounterEvent[]): CounterEvent[] { + const mergedCounters = counters.reduce((acc, counter) => { + const { domainId, counterType, counterName, fromTimestamp } = counter; + const key = `${domainId}:${counterType}:${counterName}:${fromTimestamp}`; + + const existingCounter = acc[key]; + if (!existingCounter) { + acc[key] = counter; + return acc; + } else { + acc[key].total = existingCounter.total + counter.total; + acc[key].lastUpdatedAt = counter.lastUpdatedAt; + } + return acc; + }, {} as Record); + + return Object.values(mergedCounters); +} diff --git a/src/plugins/kibana_usage_collection/server/collectors/common/saved_objects.test.ts b/src/plugins/kibana_usage_collection/server/collectors/common/saved_objects.test.ts new file mode 100644 index 0000000000000..173f332c9f391 --- /dev/null +++ b/src/plugins/kibana_usage_collection/server/collectors/common/saved_objects.test.ts @@ -0,0 +1,76 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import moment from 'moment'; +import type { SavedObjectsFindResult } from '@kbn/core/server'; +import { + type UsageCountersSavedObjectAttributes, + USAGE_COUNTERS_SAVED_OBJECT_TYPE, +} from '@kbn/usage-collection-plugin/server'; + +import { isSavedObjectOlderThan } from './saved_objects'; + +export const createMockSavedObjectDoc = ( + updatedAt: moment.Moment, + id: string, + namespace?: string +) => + ({ + id, + type: USAGE_COUNTERS_SAVED_OBJECT_TYPE, + ...(namespace && { namespaces: [namespace] }), + attributes: { + count: 3, + counterName: 'testName', + counterType: 'count', + domainId: 'testDomain', + source: 'server', + }, + references: [], + updated_at: updatedAt.format(), + version: 'WzI5LDFd', + score: 0, + } as SavedObjectsFindResult); + +describe('isSavedObjectOlderThan', () => { + it(`returns true if doc is older than x days`, () => { + const numberOfDays = 1; + const startDate = moment().format(); + const doc = createMockSavedObjectDoc(moment().subtract(2, 'days'), 'some-id'); + const result = isSavedObjectOlderThan({ + numberOfDays, + startDate, + doc, + }); + expect(result).toBe(true); + }); + + it(`returns false if doc is exactly x days old`, () => { + const numberOfDays = 1; + const startDate = moment().format(); + const doc = createMockSavedObjectDoc(moment().subtract(1, 'days'), 'some-id'); + const result = isSavedObjectOlderThan({ + numberOfDays, + startDate, + doc, + }); + expect(result).toBe(false); + }); + + it(`returns false if doc is younger than x days`, () => { + const numberOfDays = 2; + const startDate = moment().format(); + const doc = createMockSavedObjectDoc(moment().subtract(1, 'days'), 'some-id'); + const result = isSavedObjectOlderThan({ + numberOfDays, + startDate, + doc, + }); + expect(result).toBe(false); + }); +}); diff --git a/src/plugins/kibana_usage_collection/server/collectors/common/saved_objects.ts b/src/plugins/kibana_usage_collection/server/collectors/common/saved_objects.ts new file mode 100644 index 0000000000000..7b42b528b266b --- /dev/null +++ b/src/plugins/kibana_usage_collection/server/collectors/common/saved_objects.ts @@ -0,0 +1,31 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import moment from 'moment'; +import { SavedObject } from '@kbn/core-saved-objects-api-server'; + +export function isSavedObjectOlderThan({ + numberOfDays, + startDate, + doc, +}: { + numberOfDays: number; + startDate: moment.Moment | string | number; + doc: Pick; +}): boolean { + const { updated_at: updatedAt } = doc; + const today = moment(startDate).startOf('day'); + const updateDay = moment(updatedAt).startOf('day'); + + const diffInDays = today.diff(updateDay, 'days'); + if (diffInDays > numberOfDays) { + return true; + } + + return false; +} diff --git a/src/plugins/kibana_usage_collection/server/collectors/ui_counters/__fixtures__/usage_counter_saved_objects.ts b/src/plugins/kibana_usage_collection/server/collectors/ui_counters/__fixtures__/usage_counter_saved_objects.ts deleted file mode 100644 index 4516e5174d402..0000000000000 --- a/src/plugins/kibana_usage_collection/server/collectors/ui_counters/__fixtures__/usage_counter_saved_objects.ts +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import type { UsageCountersSavedObject } from '@kbn/usage-collection-plugin/server'; - -export const rawUsageCounters: UsageCountersSavedObject[] = [ - { - type: 'usage-counters', - id: 'uiCounter:09042021:count:myApp:my_event', - attributes: { - count: 1, - counterName: 'myApp:my_event', - counterType: 'count', - domainId: 'uiCounter', - }, - references: [], - coreMigrationVersion: '8.0.0', - updated_at: '2021-04-09T08:17:57.693Z', - }, - { - type: 'usage-counters', - id: 'uiCounter:23102020:loaded:Kibana_home:intersecting_event', - attributes: { - count: 60, - counterName: 'Kibana_home:intersecting_event', - counterType: 'loaded', - domainId: 'uiCounter', - }, - references: [], - coreMigrationVersion: '8.0.0', - updated_at: '2020-10-23T11:27:57.067Z', - }, - { - type: 'usage-counters', - id: 'uiCounter:09042021:count:myApp:my_event_4457914848544', - attributes: { - count: 0, - counterName: 'myApp:my_event_4457914848544', - counterType: 'count', - domainId: 'uiCounter', - }, - references: [], - coreMigrationVersion: '8.0.0', - updated_at: '2021-04-09T08:18:03.030Z', - }, - { - type: 'usage-counters', - id: 'uiCounter:09042021:count:myApp:my_event_malformed', - attributes: { - // @ts-expect-error - count: 'malformed', - counterName: 'myApp:my_event_malformed', - counterType: 'count', - domainId: 'uiCounter', - }, - references: [], - coreMigrationVersion: '8.0.0', - updated_at: '2021-04-09T08:18:03.030Z', - }, - { - type: 'usage-counters', - id: 'anotherDomainId:09042021:count:some_event_name', - attributes: { - count: 4, - counterName: 'some_event_name', - counterType: 'count', - domainId: 'anotherDomainId', - }, - references: [], - coreMigrationVersion: '8.0.0', - updated_at: '2021-04-09T08:18:03.030Z', - }, - { - type: 'usage-counters', - id: 'uiCounter:09042021:count:myApp:my_event_4457914848544_2', - attributes: { - count: 8, - counterName: 'myApp:my_event_4457914848544_2', - counterType: 'count', - domainId: 'uiCounter', - }, - references: [], - coreMigrationVersion: '8.0.0', - updated_at: '2021-04-09T08:18:03.031Z', - }, - { - type: 'usage-counters', - id: 'uiCounter:09042021:count:myApp:only_reported_in_usage_counters', - attributes: { - count: 1, - counterName: 'myApp:only_reported_in_usage_counters', - counterType: 'count', - domainId: 'uiCounter', - }, - references: [], - coreMigrationVersion: '8.0.0', - updated_at: '2021-04-09T08:18:03.031Z', - }, -]; diff --git a/src/plugins/kibana_usage_collection/server/collectors/ui_counters/register_ui_counters_collector.test.ts b/src/plugins/kibana_usage_collection/server/collectors/ui_counters/register_ui_counters_collector.test.ts index 0e84df3325d3d..6d35f5baf4046 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/ui_counters/register_ui_counters_collector.test.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/ui_counters/register_ui_counters_collector.test.ts @@ -6,124 +6,49 @@ * Side Public License, v 1. */ -import { transformRawUsageCounterObject, fetchUiCounters } from './register_ui_counters_collector'; -import { rawUsageCounters } from './__fixtures__/usage_counter_saved_objects'; -import { savedObjectsClientMock } from '@kbn/core/server/mocks'; -import { USAGE_COUNTERS_SAVED_OBJECT_TYPE } from '@kbn/usage-collection-plugin/server'; - -describe('transformRawUsageCounterObject', () => { - it('transforms usage counters savedObject raw entries', () => { - const result = rawUsageCounters.map(transformRawUsageCounterObject); - expect(result).toMatchInlineSnapshot(` - Array [ - Object { - "appName": "myApp", - "counterType": "count", - "eventName": "my_event", - "fromTimestamp": "2021-04-09T00:00:00Z", - "lastUpdatedAt": "2021-04-09T08:17:57.693Z", - "total": 1, - }, - Object { - "appName": "Kibana_home", - "counterType": "loaded", - "eventName": "intersecting_event", - "fromTimestamp": "2020-10-23T00:00:00Z", - "lastUpdatedAt": "2020-10-23T11:27:57.067Z", - "total": 60, +import type { CounterEvent } from '../common/counters'; +import { toDailyEvents } from './register_ui_counters_collector'; + +describe('toDailyEvents', () => { + it('adapts counter events to have the expected UI properties', () => { + const counters: CounterEvent[] = [ + { + domainId: 'dashboards', + counterType: 'loaded', + counterName: 'lens', + lastUpdatedAt: '2024-06-19T12:03:25.795Z', + fromTimestamp: '2024-06-19T00:00:00Z', + total: 18, + }, + { + domainId: 'dashboards', + counterType: 'updated', + counterName: 'lens', + lastUpdatedAt: '2024-06-19T14:13:25.795Z', + fromTimestamp: '2024-06-19T00:00:00Z', + total: 4, + }, + ]; + + expect(toDailyEvents(counters)).toEqual({ + dailyEvents: [ + { + appName: 'dashboards', + counterType: 'loaded', + eventName: 'lens', + lastUpdatedAt: '2024-06-19T12:03:25.795Z', + fromTimestamp: '2024-06-19T00:00:00Z', + total: 18, }, - undefined, - undefined, - undefined, - Object { - "appName": "myApp", - "counterType": "count", - "eventName": "my_event_4457914848544_2", - "fromTimestamp": "2021-04-09T00:00:00Z", - "lastUpdatedAt": "2021-04-09T08:18:03.031Z", - "total": 8, + { + appName: 'dashboards', + counterType: 'updated', + eventName: 'lens', + lastUpdatedAt: '2024-06-19T14:13:25.795Z', + fromTimestamp: '2024-06-19T00:00:00Z', + total: 4, }, - Object { - "appName": "myApp", - "counterType": "count", - "eventName": "only_reported_in_usage_counters", - "fromTimestamp": "2021-04-09T00:00:00Z", - "lastUpdatedAt": "2021-04-09T08:18:03.031Z", - "total": 1, - }, - ] - `); - }); -}); - -describe('fetchUiCounters', () => { - const soClientMock = savedObjectsClientMock.create(); - beforeEach(() => { - jest.clearAllMocks(); - }); - - it('returns saved objects only from usage_counters saved objects', async () => { - // @ts-expect-error incomplete mock implementation - soClientMock.find.mockImplementation(async ({ type }) => { - switch (type) { - case USAGE_COUNTERS_SAVED_OBJECT_TYPE: - return { saved_objects: rawUsageCounters }; - default: - throw new Error(`unexpected type ${type}`); - } + ], }); - - // @ts-expect-error incomplete mock implementation - const { dailyEvents } = await fetchUiCounters({ - soClient: soClientMock, - }); - expect(dailyEvents).toHaveLength(4); - const intersectingEntry = dailyEvents.find( - ({ eventName, fromTimestamp }) => - eventName === 'intersecting_event' && fromTimestamp === '2020-10-23T00:00:00Z' - ); - - const onlyFromUICountersEntry = dailyEvents.find( - ({ eventName }) => eventName === 'only_reported_in_ui_counters' - ); - - const onlyFromUsageCountersEntry = dailyEvents.find( - ({ eventName }) => eventName === 'only_reported_in_usage_counters' - ); - - const invalidCountEntry = dailyEvents.find( - ({ eventName }) => eventName === 'my_event_malformed' - ); - - const zeroCountEntry = dailyEvents.find( - ({ eventName }) => eventName === 'my_event_4457914848544' - ); - - const nonUiCountersEntry = dailyEvents.find(({ eventName }) => eventName === 'some_event_name'); - - expect(invalidCountEntry).toBe(undefined); - expect(nonUiCountersEntry).toBe(undefined); - expect(zeroCountEntry).toBe(undefined); - expect(onlyFromUICountersEntry).toBe(undefined); - expect(onlyFromUsageCountersEntry).toMatchInlineSnapshot(` - Object { - "appName": "myApp", - "counterType": "count", - "eventName": "only_reported_in_usage_counters", - "fromTimestamp": "2021-04-09T00:00:00Z", - "lastUpdatedAt": "2021-04-09T08:18:03.031Z", - "total": 1, - } - `); - expect(intersectingEntry).toMatchInlineSnapshot(` - Object { - "appName": "Kibana_home", - "counterType": "loaded", - "eventName": "intersecting_event", - "fromTimestamp": "2020-10-23T00:00:00Z", - "lastUpdatedAt": "2020-10-23T11:27:57.067Z", - "total": 60, - } - `); }); }); diff --git a/src/plugins/kibana_usage_collection/server/collectors/ui_counters/register_ui_counters_collector.ts b/src/plugins/kibana_usage_collection/server/collectors/ui_counters/register_ui_counters_collector.ts index 77212225cc14c..024d3b7a9f562 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/ui_counters/register_ui_counters_collector.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/ui_counters/register_ui_counters_collector.ts @@ -6,24 +6,20 @@ * Side Public License, v 1. */ -import moment from 'moment'; - +import type { Logger } from '@kbn/logging'; +import { UsageCounters } from '@kbn/usage-collection-plugin/common'; import { - CollectorFetchContext, - UsageCollectionSetup, + type UsageCollectionSetup, USAGE_COUNTERS_SAVED_OBJECT_TYPE, - UsageCountersSavedObject, - UsageCountersSavedObjectAttributes, } from '@kbn/usage-collection-plugin/server'; - -import { deserializeUiCounterName } from '@kbn/usage-collection-plugin/common/ui_counters'; +import { type CounterEvent, createCounterFetcher } from '../common/counters'; interface UiCounterEvent { appName: string; eventName: string; - lastUpdatedAt?: string; - fromTimestamp?: string; counterType: string; + lastUpdatedAt: string; + fromTimestamp: string; total: number; } @@ -31,58 +27,13 @@ export interface UiUsageCounters { dailyEvents: UiCounterEvent[]; } -export function transformRawUsageCounterObject( - rawUsageCounter: UsageCountersSavedObject -): UiCounterEvent | undefined { - const { - attributes: { count, counterName, counterType, domainId }, - updated_at: lastUpdatedAt, - } = rawUsageCounter; - - if (domainId !== 'uiCounter' || typeof count !== 'number' || count < 1) { - return; - } - - const fromTimestamp = moment(lastUpdatedAt).utc().startOf('day').format(); - const { appName, eventName } = deserializeUiCounterName(counterName); - - return { - appName, - eventName, - lastUpdatedAt, - fromTimestamp, - counterType, - total: count, - }; -} - -export async function fetchUiCounters({ soClient }: CollectorFetchContext) { - const finder = soClient.createPointInTimeFinder({ - type: USAGE_COUNTERS_SAVED_OBJECT_TYPE, - fields: ['count', 'counterName', 'counterType', 'domainId'], - filter: `${USAGE_COUNTERS_SAVED_OBJECT_TYPE}.attributes.domainId: uiCounter`, - perPage: 1000, - }); - - const dailyEvents: UiCounterEvent[] = []; - - for await (const { saved_objects: rawUsageCounters } of finder.find()) { - rawUsageCounters.forEach((raw) => { - try { - const event = transformRawUsageCounterObject(raw); - if (event) { - dailyEvents.push(event); - } - } catch (_) { - // swallow error; allows sending successfully transformed objects. - } - }); - } +const UI: UsageCounters.v1.CounterEventSource = 'ui'; +const UI_COUNTERS_FILTER = `${USAGE_COUNTERS_SAVED_OBJECT_TYPE}.attributes.source: ${UI}`; - return { dailyEvents }; -} - -export function registerUiCountersUsageCollector(usageCollection: UsageCollectionSetup) { +export function registerUiCountersUsageCollector( + usageCollection: UsageCollectionSetup, + logger: Logger +) { const collector = usageCollection.makeUsageCollector({ type: 'ui_counters', schema: { @@ -105,7 +56,10 @@ export function registerUiCountersUsageCollector(usageCollection: UsageCollectio type: 'date', _meta: { description: 'Time at which the metric was captured.' }, }, - counterType: { type: 'keyword', _meta: { description: 'The type of counter used.' } }, + counterType: { + type: 'keyword', + _meta: { description: 'The type of counter used.' }, + }, total: { type: 'integer', _meta: { description: 'The total number of times the event happened.' }, @@ -113,9 +67,24 @@ export function registerUiCountersUsageCollector(usageCollection: UsageCollectio }, }, }, - fetch: fetchUiCounters, + fetch: createCounterFetcher(logger, UI_COUNTERS_FILTER, toDailyEvents), isReady: () => true, }); usageCollection.registerCollector(collector); } + +export function toDailyEvents(counters: CounterEvent[]) { + return { + dailyEvents: counters.map(toUiCounter), + }; +} + +function toUiCounter(counter: CounterEvent): UiCounterEvent { + const { domainId: appName, counterName: eventName, ...props } = counter; + return { + appName, + eventName, + ...props, + }; +} diff --git a/src/plugins/kibana_usage_collection/server/collectors/usage_counters/__fixtures__/usage_counter_saved_objects.ts b/src/plugins/kibana_usage_collection/server/collectors/usage_counters/__fixtures__/usage_counter_saved_objects.ts deleted file mode 100644 index 344d36542646d..0000000000000 --- a/src/plugins/kibana_usage_collection/server/collectors/usage_counters/__fixtures__/usage_counter_saved_objects.ts +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -import type { UsageCountersSavedObject } from '@kbn/usage-collection-plugin/server'; - -export const rawUsageCounters: UsageCountersSavedObject[] = [ - { - type: 'usage-counters', - id: 'uiCounter:09042021:count:myApp:my_event', - attributes: { - count: 13, - counterName: 'my_event', - counterType: 'count', - domainId: 'uiCounter', - }, - references: [], - coreMigrationVersion: '8.0.0', - updated_at: '2021-04-09T08:18:03.030Z', - }, - { - type: 'usage-counters', - id: 'anotherDomainId:09042021:count:some_event_name', - attributes: { - count: 4, - counterName: 'some_event_name', - counterType: 'count', - domainId: 'anotherDomainId', - }, - references: [], - coreMigrationVersion: '8.0.0', - updated_at: '2021-04-09T08:18:03.030Z', - }, - { - type: 'usage-counters', - id: 'anotherDomainId:09042021:count:some_event_name', - attributes: { - count: 4, - counterName: 'some_event_name', - counterType: 'count', - domainId: 'anotherDomainId', - }, - references: [], - coreMigrationVersion: '8.0.0', - updated_at: '2021-04-11T08:18:03.030Z', - }, - { - type: 'usage-counters', - id: 'anotherDomainId2:09042021:count:some_event_name', - attributes: { - count: 1, - counterName: 'some_event_name', - counterType: 'count', - domainId: 'anotherDomainId2', - }, - references: [], - coreMigrationVersion: '8.0.0', - updated_at: '2021-04-20T08:18:03.030Z', - }, - { - type: 'usage-counters', - id: 'anotherDomainId2:09042021:count:malformed_event', - attributes: { - // @ts-expect-error - count: 'malformed', - counterName: 'malformed_event', - counterType: 'count', - domainId: 'anotherDomainId2', - }, - references: [], - coreMigrationVersion: '8.0.0', - updated_at: '2021-04-20T08:18:03.030Z', - }, - { - type: 'usage-counters', - id: 'anotherDomainId2:09042021:custom_type:some_event_name', - attributes: { - count: 3, - counterName: 'some_event_name', - counterType: 'custom_type', - domainId: 'anotherDomainId2', - }, - references: [], - coreMigrationVersion: '8.0.0', - updated_at: '2021-04-20T08:18:03.030Z', - }, - { - type: 'usage-counters', - id: 'anotherDomainId3:09042021:custom_type:zero_count', - attributes: { - count: 0, - counterName: 'zero_count', - counterType: 'custom_type', - domainId: 'anotherDomainId3', - }, - references: [], - coreMigrationVersion: '8.0.0', - updated_at: '2021-04-20T08:18:03.030Z', - }, -]; diff --git a/src/plugins/kibana_usage_collection/server/collectors/usage_counters/integration_tests/rollups.test.ts b/src/plugins/kibana_usage_collection/server/collectors/usage_counters/integration_tests/rollups.test.ts new file mode 100644 index 0000000000000..23e0867f4942e --- /dev/null +++ b/src/plugins/kibana_usage_collection/server/collectors/usage_counters/integration_tests/rollups.test.ts @@ -0,0 +1,205 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import moment, { type MomentInput } from 'moment'; +/* + * Mocking the constructor of moment, so we can control the time of the day. + * This is to avoid flaky tests when starting to run before midnight and ending the test after midnight + * because the logic might remove one extra document since we moved to the next day. + */ +jest.doMock('moment', () => { + const mockedMoment = (date?: MomentInput) => moment(date ?? '2024-06-30T10:00:00.000Z'); + Object.setPrototypeOf(mockedMoment, moment); // inherit the prototype of `moment` so it has all the same methods. + return mockedMoment; +}); + +jest.mock('@kbn/core-saved-objects-api-server-internal/src/lib/apis/utils', () => ({ + ...jest.requireActual('@kbn/core-saved-objects-api-server-internal/src/lib/apis/utils'), + getCurrentTime: jest.fn(), +})); + +jest.mock('../../common/saved_objects', () => ({ + ...jest.requireActual('../../common/saved_objects'), + isSavedObjectOlderThan: jest.fn(), +})); + +import { getCurrentTime } from '@kbn/core-saved-objects-api-server-internal/src/lib/apis/utils'; +import type { Logger, ISavedObjectsRepository, SavedObject } from '@kbn/core/server'; +import { + type TestElasticsearchUtils, + type TestKibanaUtils, + createTestServers, + createRootWithCorePlugins, +} from '@kbn/core-test-helpers-kbn-server'; + +import { + serializeCounterKey, + type UsageCountersSavedObjectAttributes, + USAGE_COUNTERS_SAVED_OBJECT_TYPE, +} from '@kbn/usage-collection-plugin/server'; +import { rollUsageCountersIndices } from '../rollups/rollups'; +import { USAGE_COUNTERS_KEEP_DOCS_FOR_DAYS } from '../rollups/constants'; +import { isSavedObjectOlderThan } from '../../common/saved_objects'; + +const getCurrentTimeMock = getCurrentTime as jest.MockedFunction; +const isSavedObjectOlderThanMock = isSavedObjectOlderThan as jest.MockedFunction< + typeof isSavedObjectOlderThan +>; + +const ALL_COUNTERS = [ + 'domain1:a:count:server:20240624:default', + 'domain1:a:count:server:20240626:default', + 'domain1:b:count:server:20240624:one', + 'domain1:b:count:server:20240624:two', + 'domain1:b:count:server:20240626:one', + 'domain1:b:count:server:20240626:two', + 'domain2:a:count:server:20240624:default', + 'domain2:a:count:server:20240626:default', + 'domain2:c:count:server:20240626:default', +]; + +const RECENT_COUNTERS = ALL_COUNTERS.filter((key) => key.includes('20240626')); + +describe('usage-counters', () => { + let esServer: TestElasticsearchUtils; + let root: TestKibanaUtils['root']; + let internalRepository: ISavedObjectsRepository; + let logger: Logger; + + beforeAll(async () => { + const { startES } = createTestServers({ + adjustTimeout: (t: number) => jest.setTimeout(t), + }); + + esServer = await startES(); + root = createRootWithCorePlugins(); + + await root.preboot(); + await root.setup(); + const start = await root.start(); + + logger = root.logger.get('test daily rollups'); + internalRepository = start.savedObjects.createInternalRepository([ + USAGE_COUNTERS_SAVED_OBJECT_TYPE, + ]); + }); + + it('deletes documents older that the retention period, from all namespaces', async () => { + // insert a bunch of usage counters in multiple namespaces + const old = [ + createCounter('domain1', 'a', USAGE_COUNTERS_KEEP_DOCS_FOR_DAYS + 1), + createCounter('domain1', 'b', USAGE_COUNTERS_KEEP_DOCS_FOR_DAYS + 1, 'one'), + createCounter('domain1', 'b', USAGE_COUNTERS_KEEP_DOCS_FOR_DAYS + 1, 'two'), + createCounter('domain2', 'a', USAGE_COUNTERS_KEEP_DOCS_FOR_DAYS + 1), + ]; + + const recent = [ + createCounter('domain1', 'a', USAGE_COUNTERS_KEEP_DOCS_FOR_DAYS - 1), + createCounter('domain1', 'b', USAGE_COUNTERS_KEEP_DOCS_FOR_DAYS - 1, 'one'), + createCounter('domain1', 'b', USAGE_COUNTERS_KEEP_DOCS_FOR_DAYS - 1, 'two'), + createCounter('domain2', 'a', USAGE_COUNTERS_KEEP_DOCS_FOR_DAYS - 1), + createCounter('domain2', 'c', USAGE_COUNTERS_KEEP_DOCS_FOR_DAYS - 1), // different counterName (does not have an old counterpart) + ]; + + getCurrentTimeMock.mockReturnValue('2024-06-24T10:00:00.000Z'); // 6 days old + await Promise.all(old.map((counter) => incrementCounter(internalRepository, counter))); + + getCurrentTimeMock.mockReturnValue('2024-06-26T10:00:00.000Z'); // 4 days old + await Promise.all(recent.map((counter) => incrementCounter(internalRepository, counter))); + + // check that all documents are there + const beforeRollup = await internalRepository.find({ + type: USAGE_COUNTERS_SAVED_OBJECT_TYPE, + namespaces: ['*'], + }); + expect( + beforeRollup.saved_objects + .map(({ attributes, updated_at: updatedAt, namespaces }) => + serializeCounterKey({ ...attributes, date: updatedAt, namespace: namespaces?.[0] }) + ) + .sort() + ).toEqual(ALL_COUNTERS); + + // run the rollup logic + isSavedObjectOlderThanMock.mockImplementation( + ({ doc }) => doc.updated_at === '2024-06-24T10:00:00.000Z' + ); + await rollUsageCountersIndices(logger, internalRepository); + + // check only recent counters are present + const afterRollup = await internalRepository.find({ + type: USAGE_COUNTERS_SAVED_OBJECT_TYPE, + namespaces: ['*'], + }); + expect( + afterRollup.saved_objects + .map(({ attributes, updated_at: updatedAt, namespaces }) => + serializeCounterKey({ ...attributes, date: updatedAt, namespace: namespaces?.[0] }) + ) + .sort() + ).toEqual(RECENT_COUNTERS); + }); + + afterAll(async () => { + await esServer.stop(); + await root.shutdown(); + }); +}); + +function createCounter( + domainId: string, + counterName: string, + ageDays: number = 0, + namespace?: string +): SavedObject { + const date = moment('2024-06-30T10:00:00.000Z').subtract(ageDays, 'days'); + + const id = serializeCounterKey({ + domainId, + counterName, + counterType: 'count', + namespace, + source: 'server', + date, + }); + return { + type: USAGE_COUNTERS_SAVED_OBJECT_TYPE, + id, + ...(namespace && { namespaces: [namespace] }), + updated_at: date.format(), // illustrative purpose only, overriden by SOR + attributes: { + domainId, + counterName, + counterType: 'count', + source: 'server', + count: 28, + }, + references: [], + }; +} + +async function incrementCounter( + internalRepository: ISavedObjectsRepository, + counter: SavedObject +) { + const namespace = counter.namespaces?.[0]; + return await internalRepository.incrementCounter( + USAGE_COUNTERS_SAVED_OBJECT_TYPE, + counter.id, + [{ fieldName: 'count', incrementBy: counter.attributes.count }], + { + ...(namespace && { namespace }), + upsertAttributes: { + domainId: counter.attributes.domainId, + counterName: counter.attributes.counterName, + counterType: counter.attributes.counterType, + source: counter.attributes.source, + }, + } + ); +} diff --git a/src/plugins/kibana_usage_collection/server/collectors/usage_counters/register_usage_counters_collector.test.ts b/src/plugins/kibana_usage_collection/server/collectors/usage_counters/register_usage_counters_collector.test.ts index 945eb007fe23f..2412fbe2a9279 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/usage_counters/register_usage_counters_collector.test.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/usage_counters/register_usage_counters_collector.test.ts @@ -6,50 +6,49 @@ * Side Public License, v 1. */ -import { transformRawCounter } from './register_usage_counters_collector'; -import { rawUsageCounters } from './__fixtures__/usage_counter_saved_objects'; +import type { CounterEvent } from '../common/counters'; +import { toDailyEvents } from './register_usage_counters_collector'; -describe('transformRawCounter', () => { - it('transforms saved object raw entries', () => { - const result = rawUsageCounters.map(transformRawCounter); - expect(result).toMatchInlineSnapshot(` - Array [ - undefined, - Object { - "counterName": "some_event_name", - "counterType": "count", - "domainId": "anotherDomainId", - "fromTimestamp": "2021-04-09T00:00:00Z", - "lastUpdatedAt": "2021-04-09T08:18:03.030Z", - "total": 4, - }, - Object { - "counterName": "some_event_name", - "counterType": "count", - "domainId": "anotherDomainId", - "fromTimestamp": "2021-04-11T00:00:00Z", - "lastUpdatedAt": "2021-04-11T08:18:03.030Z", - "total": 4, - }, - Object { - "counterName": "some_event_name", - "counterType": "count", - "domainId": "anotherDomainId2", - "fromTimestamp": "2021-04-20T00:00:00Z", - "lastUpdatedAt": "2021-04-20T08:18:03.030Z", - "total": 1, +describe('toDailyEvents', () => { + it('adapts counter events to have the expected UI properties', () => { + const counters: CounterEvent[] = [ + { + domainId: 'foo', + counterType: 'bar', + counterName: 'count', + lastUpdatedAt: '2024-06-19T12:03:25.795Z', + fromTimestamp: '2024-06-19T00:00:00Z', + total: 18, + }, + { + domainId: 'foo', + counterType: 'baz', + counterName: 'count', + lastUpdatedAt: '2024-06-19T14:13:25.795Z', + fromTimestamp: '2024-06-19T00:00:00Z', + total: 4, + }, + ]; + + expect(toDailyEvents(counters)).toEqual({ + dailyEvents: [ + { + domainId: 'foo', + counterType: 'bar', + counterName: 'count', + lastUpdatedAt: '2024-06-19T12:03:25.795Z', + fromTimestamp: '2024-06-19T00:00:00Z', + total: 18, }, - undefined, - Object { - "counterName": "some_event_name", - "counterType": "custom_type", - "domainId": "anotherDomainId2", - "fromTimestamp": "2021-04-20T00:00:00Z", - "lastUpdatedAt": "2021-04-20T08:18:03.030Z", - "total": 3, + { + domainId: 'foo', + counterType: 'baz', + counterName: 'count', + lastUpdatedAt: '2024-06-19T14:13:25.795Z', + fromTimestamp: '2024-06-19T00:00:00Z', + total: 4, }, - undefined, - ] - `); + ], + }); }); }); diff --git a/src/plugins/kibana_usage_collection/server/collectors/usage_counters/register_usage_counters_collector.ts b/src/plugins/kibana_usage_collection/server/collectors/usage_counters/register_usage_counters_collector.ts index 807f0189a4dd0..bd06615e8eb30 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/usage_counters/register_usage_counters_collector.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/usage_counters/register_usage_counters_collector.ts @@ -6,52 +6,25 @@ * Side Public License, v 1. */ -import moment from 'moment'; +import type { Logger } from '@kbn/logging'; +import { UsageCounters } from '@kbn/usage-collection-plugin/common'; import { - CollectorFetchContext, - UsageCollectionSetup, + type UsageCollectionSetup, USAGE_COUNTERS_SAVED_OBJECT_TYPE, - UsageCountersSavedObject, - UsageCountersSavedObjectAttributes, } from '@kbn/usage-collection-plugin/server'; - -interface UsageCounterEvent { - domainId: string; - counterName: string; - counterType: string; - lastUpdatedAt?: string; - fromTimestamp?: string; - total: number; -} +import { type CounterEvent, createCounterFetcher } from '../common/counters'; export interface UsageCounters { - dailyEvents: UsageCounterEvent[]; + dailyEvents: CounterEvent[]; } -export function transformRawCounter( - rawUsageCounter: UsageCountersSavedObject -): UsageCounterEvent | undefined { - const { - attributes: { count, counterName, counterType, domainId }, - updated_at: lastUpdatedAt, - } = rawUsageCounter; - const fromTimestamp = moment(lastUpdatedAt).utc().startOf('day').format(); - - if (domainId === 'uiCounter' || typeof count !== 'number' || count < 1) { - return; - } - - return { - domainId, - counterName, - counterType, - lastUpdatedAt, - fromTimestamp, - total: count, - }; -} +const SERVER: UsageCounters.v1.CounterEventSource = 'server'; +const SERVER_COUNTERS_FILTER = `${USAGE_COUNTERS_SAVED_OBJECT_TYPE}.attributes.source: ${SERVER}`; -export function registerUsageCountersUsageCollector(usageCollection: UsageCollectionSetup) { +export function registerUsageCountersUsageCollector( + usageCollection: UsageCollectionSetup, + logger: Logger +) { const collector = usageCollection.makeUsageCollector({ type: 'usage_counters', schema: { @@ -85,33 +58,15 @@ export function registerUsageCountersUsageCollector(usageCollection: UsageCollec }, }, }, - fetch: async ({ soClient }: CollectorFetchContext) => { - const finder = soClient.createPointInTimeFinder({ - type: USAGE_COUNTERS_SAVED_OBJECT_TYPE, - fields: ['count', 'counterName', 'counterType', 'domainId'], - filter: `NOT ${USAGE_COUNTERS_SAVED_OBJECT_TYPE}.attributes.domainId: uiCounter`, - perPage: 1000, - }); - - const dailyEvents: UsageCounterEvent[] = []; - - for await (const { saved_objects: rawUsageCounters } of finder.find()) { - rawUsageCounters.forEach((rawUsageCounter) => { - try { - const event = transformRawCounter(rawUsageCounter); - if (event) { - dailyEvents.push(event); - } - } catch (_) { - // swallow error; allows sending successfully transformed objects. - } - }); - } - - return { dailyEvents }; - }, + fetch: createCounterFetcher(logger, SERVER_COUNTERS_FILTER, toDailyEvents), isReady: () => true, }); usageCollection.registerCollector(collector); } + +export function toDailyEvents(counters: CounterEvent[]) { + return { + dailyEvents: counters, + }; +} diff --git a/src/plugins/kibana_usage_collection/server/collectors/usage_counters/rollups/rollups.test.ts b/src/plugins/kibana_usage_collection/server/collectors/usage_counters/rollups/rollups.test.ts index 4397468244a1f..37c68021c9c73 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/usage_counters/rollups/rollups.test.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/usage_counters/rollups/rollups.test.ts @@ -7,70 +7,11 @@ */ import moment from 'moment'; -import { isSavedObjectOlderThan, rollUsageCountersIndices } from './rollups'; import { savedObjectsRepositoryMock, loggingSystemMock } from '@kbn/core/server/mocks'; -import { SavedObjectsFindResult } from '@kbn/core/server'; - -import { - UsageCountersSavedObjectAttributes, - USAGE_COUNTERS_SAVED_OBJECT_TYPE, -} from '@kbn/usage-collection-plugin/server'; - +import { USAGE_COUNTERS_SAVED_OBJECT_TYPE } from '@kbn/usage-collection-plugin/server'; import { USAGE_COUNTERS_KEEP_DOCS_FOR_DAYS } from './constants'; - -const createMockSavedObjectDoc = (updatedAt: moment.Moment, id: string) => - ({ - id, - type: 'usage-counter', - attributes: { - count: 3, - counterName: 'testName', - counterType: 'count', - domainId: 'testDomain', - }, - references: [], - updated_at: updatedAt.format(), - version: 'WzI5LDFd', - score: 0, - } as SavedObjectsFindResult); - -describe('isSavedObjectOlderThan', () => { - it(`returns true if doc is older than x days`, () => { - const numberOfDays = 1; - const startDate = moment().format(); - const doc = createMockSavedObjectDoc(moment().subtract(2, 'days'), 'some-id'); - const result = isSavedObjectOlderThan({ - numberOfDays, - startDate, - doc, - }); - expect(result).toBe(true); - }); - - it(`returns false if doc is exactly x days old`, () => { - const numberOfDays = 1; - const startDate = moment().format(); - const doc = createMockSavedObjectDoc(moment().subtract(1, 'days'), 'some-id'); - const result = isSavedObjectOlderThan({ - numberOfDays, - startDate, - doc, - }); - expect(result).toBe(false); - }); - - it(`returns false if doc is younger than x days`, () => { - const numberOfDays = 2; - const startDate = moment().format(); - const doc = createMockSavedObjectDoc(moment().subtract(1, 'days'), 'some-id'); - const result = isSavedObjectOlderThan({ - numberOfDays, - startDate, - doc, - }); - expect(result).toBe(false); - }); -}); +import { createMockSavedObjectDoc } from '../../common/saved_objects.test'; +import { rollUsageCountersIndices } from './rollups'; describe('rollUsageCountersIndices', () => { let logger: ReturnType; @@ -106,7 +47,7 @@ describe('rollUsageCountersIndices', () => { createMockSavedObjectDoc(moment().subtract(5, 'days'), 'doc-id-1'), createMockSavedObjectDoc(moment().subtract(9, 'days'), 'doc-id-1'), createMockSavedObjectDoc(moment().subtract(1, 'days'), 'doc-id-2'), - createMockSavedObjectDoc(moment().subtract(6, 'days'), 'doc-id-3'), + createMockSavedObjectDoc(moment().subtract(6, 'days'), 'doc-id-3', 'secondary'), ]; savedObjectClient.find.mockImplementation(async ({ type, page = 1, perPage = 10 }) => { @@ -128,7 +69,8 @@ describe('rollUsageCountersIndices', () => { expect(savedObjectClient.delete).toHaveBeenNthCalledWith( 2, USAGE_COUNTERS_SAVED_OBJECT_TYPE, - 'doc-id-3' + 'doc-id-3', + { namespace: 'secondary' } ); expect(logger.warn).toHaveBeenCalledTimes(0); }); diff --git a/src/plugins/kibana_usage_collection/server/collectors/usage_counters/rollups/rollups.ts b/src/plugins/kibana_usage_collection/server/collectors/usage_counters/rollups/rollups.ts index 621b40fb21e9c..a8cdfd92372d7 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/usage_counters/rollups/rollups.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/usage_counters/rollups/rollups.ts @@ -6,35 +6,15 @@ * Side Public License, v 1. */ -import type { ISavedObjectsRepository, Logger } from '@kbn/core/server'; import moment from 'moment'; +import type { ISavedObjectsRepository, Logger } from '@kbn/core/server'; import { - UsageCountersSavedObject, + type UsageCountersSavedObject, USAGE_COUNTERS_SAVED_OBJECT_TYPE, } from '@kbn/usage-collection-plugin/server'; import { USAGE_COUNTERS_KEEP_DOCS_FOR_DAYS } from './constants'; - -export function isSavedObjectOlderThan({ - numberOfDays, - startDate, - doc, -}: { - numberOfDays: number; - startDate: moment.Moment | string | number; - doc: Pick; -}): boolean { - const { updated_at: updatedAt } = doc; - const today = moment(startDate).startOf('day'); - const updateDay = moment(updatedAt).startOf('day'); - - const diffInDays = today.diff(updateDay, 'days'); - if (diffInDays > numberOfDays) { - return true; - } - - return false; -} +import { isSavedObjectOlderThan } from '../../common/saved_objects'; export async function rollUsageCountersIndices( logger: Logger, @@ -50,6 +30,7 @@ export async function rollUsageCountersIndices( const { saved_objects: rawUiCounterDocs } = await savedObjectsClient.find({ type: USAGE_COUNTERS_SAVED_OBJECT_TYPE, + namespaces: ['*'], perPage: 1000, // Process 1000 at a time as a compromise of speed and overload }); @@ -62,7 +43,11 @@ export async function rollUsageCountersIndices( ); return await Promise.all( - docsToDelete.map(({ id }) => savedObjectsClient.delete(USAGE_COUNTERS_SAVED_OBJECT_TYPE, id)) + docsToDelete.map(({ id, type, namespaces }) => + namespaces?.[0] + ? savedObjectsClient.delete(type, id, { namespace: namespaces[0] }) + : savedObjectsClient.delete(type, id) + ) ); } catch (err) { logger.warn(`Failed to rollup Usage Counters saved objects.`); diff --git a/src/plugins/kibana_usage_collection/server/ebt_counters/register_ebt_counters.test.ts b/src/plugins/kibana_usage_collection/server/ebt_counters/register_ebt_counters.test.ts index a2ac2366c0b3e..018e179042254 100644 --- a/src/plugins/kibana_usage_collection/server/ebt_counters/register_ebt_counters.test.ts +++ b/src/plugins/kibana_usage_collection/server/ebt_counters/register_ebt_counters.test.ts @@ -42,15 +42,17 @@ describe('registerEbtCounters', () => { code: 'test-code', count: 1, }); - expect(usageCollection.getUsageCounterByType).toHaveBeenCalledTimes(1); - expect(usageCollection.getUsageCounterByType).toHaveBeenCalledWith('ebt_counters.test-shipper'); + expect(usageCollection.getUsageCounterByDomainId).toHaveBeenCalledTimes(1); + expect(usageCollection.getUsageCounterByDomainId).toHaveBeenCalledWith( + 'ebt_counters.test-shipper' + ); expect(usageCollection.createUsageCounter).toHaveBeenCalledTimes(1); expect(usageCollection.createUsageCounter).toHaveBeenCalledWith('ebt_counters.test-shipper'); }); test('it reuses the usageCounter when it already exists', () => { const incrementCounterMock = jest.fn(); - usageCollection.getUsageCounterByType.mockReturnValue({ + usageCollection.getUsageCounterByDomainId.mockReturnValue({ incrementCounter: incrementCounterMock, }); registerEbtCounters(core.analytics, usageCollection); @@ -62,8 +64,10 @@ describe('registerEbtCounters', () => { code: 'test-code', count: 1, }); - expect(usageCollection.getUsageCounterByType).toHaveBeenCalledTimes(1); - expect(usageCollection.getUsageCounterByType).toHaveBeenCalledWith('ebt_counters.test-shipper'); + expect(usageCollection.getUsageCounterByDomainId).toHaveBeenCalledTimes(1); + expect(usageCollection.getUsageCounterByDomainId).toHaveBeenCalledWith( + 'ebt_counters.test-shipper' + ); expect(usageCollection.createUsageCounter).toHaveBeenCalledTimes(0); expect(incrementCounterMock).toHaveBeenCalledTimes(1); expect(incrementCounterMock).toHaveBeenCalledWith({ diff --git a/src/plugins/kibana_usage_collection/server/ebt_counters/register_ebt_counters.ts b/src/plugins/kibana_usage_collection/server/ebt_counters/register_ebt_counters.ts index ed2100dccf929..b075b198ce496 100644 --- a/src/plugins/kibana_usage_collection/server/ebt_counters/register_ebt_counters.ts +++ b/src/plugins/kibana_usage_collection/server/ebt_counters/register_ebt_counters.ts @@ -18,7 +18,7 @@ export function registerEbtCounters( // We create one counter per source ('client'|). const domainId = `ebt_counters.${source}`; const usageCounter = - usageCollection.getUsageCounterByType(domainId) ?? + usageCollection.getUsageCounterByDomainId(domainId) ?? usageCollection.createUsageCounter(domainId); usageCounter.incrementCounter({ diff --git a/src/plugins/kibana_usage_collection/server/plugin.ts b/src/plugins/kibana_usage_collection/server/plugin.ts index ff38116c1de44..e2b88b8881f66 100644 --- a/src/plugins/kibana_usage_collection/server/plugin.ts +++ b/src/plugins/kibana_usage_collection/server/plugin.ts @@ -72,7 +72,6 @@ export class KibanaUsageCollectionPlugin implements Plugin { public setup(coreSetup: CoreSetup, { usageCollection }: KibanaUsageCollectionPluginsDepsSetup) { registerEbtCounters(coreSetup.analytics, usageCollection); - usageCollection.createUsageCounter('uiCounters'); this.eventLoopUsageCounter = usageCollection.createUsageCounter('eventLoop'); coreSetup.coreUsageData.registerUsageCounter(usageCollection.createUsageCounter('core')); this.registerUsageCollectors( @@ -127,14 +126,14 @@ export class KibanaUsageCollectionPlugin implements Plugin { const getUiSettingsClient = () => this.uiSettingsClient; const getCoreUsageDataService = () => this.coreUsageData!; - registerUiCountersUsageCollector(usageCollection); + registerUiCountersUsageCollector(usageCollection, this.logger); registerUsageCountersRollups( this.logger.get('usage-counters-rollup'), getSavedObjectsClient, pluginStop$ ); - registerUsageCountersUsageCollector(usageCollection); + registerUsageCountersUsageCollector(usageCollection, this.logger); registerOpsStatsCollector(usageCollection, metric$); diff --git a/src/plugins/kibana_usage_collection/tsconfig.json b/src/plugins/kibana_usage_collection/tsconfig.json index 2fb915d541052..84e9a38f3e970 100644 --- a/src/plugins/kibana_usage_collection/tsconfig.json +++ b/src/plugins/kibana_usage_collection/tsconfig.json @@ -18,6 +18,7 @@ "@kbn/core-test-helpers-kbn-server", "@kbn/core-usage-data-server", "@kbn/core-saved-objects-api-server", + "@kbn/core-saved-objects-api-server-internal", ], "exclude": [ "target/**/*", diff --git a/src/plugins/usage_collection/common/index.ts b/src/plugins/usage_collection/common/index.ts new file mode 100644 index 0000000000000..3f0a94c72671f --- /dev/null +++ b/src/plugins/usage_collection/common/index.ts @@ -0,0 +1,9 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export type { UsageCounters } from './types'; diff --git a/src/plugins/usage_collection/common/types/usage_counters/v1.ts b/src/plugins/usage_collection/common/types/usage_counters/v1.ts index fa53a9d9e93b0..c18af503d06e0 100644 --- a/src/plugins/usage_collection/common/types/usage_counters/v1.ts +++ b/src/plugins/usage_collection/common/types/usage_counters/v1.ts @@ -6,10 +6,14 @@ * Side Public License, v 1. */ +export type CounterEventSource = 'server' | 'ui'; + export interface CounterMetric { domainId: string; + namespace?: string; counterName: string; counterType: string; + source: CounterEventSource; incrementBy: number; } @@ -17,10 +21,14 @@ export interface CounterMetric { * Details about the counter to be incremented */ export interface IncrementCounterParams { + /** The namespace to increment this counter on */ + namespace?: string; /** The name of the counter **/ counterName: string; /** The counter type ("count" by default) **/ counterType?: string; + /** The source of the event we are counting */ + source?: CounterEventSource; /** Increment the counter by this number (1 if not specified) **/ incrementBy?: number; } diff --git a/src/plugins/usage_collection/server/index.ts b/src/plugins/usage_collection/server/index.ts index 38298b42ed9c1..fb2894d7f3903 100644 --- a/src/plugins/usage_collection/server/index.ts +++ b/src/plugins/usage_collection/server/index.ts @@ -23,10 +23,9 @@ export type { UsageCountersSavedObjectAttributes, IncrementCounterParams, UsageCounter, - SerializeCounterParams, } from './usage_counters'; -export { USAGE_COUNTERS_SAVED_OBJECT_TYPE, serializeCounterKey } from './usage_counters'; +export { serializeCounterKey, USAGE_COUNTERS_SAVED_OBJECT_TYPE } from './usage_counters'; export type { UsageCollectionSetup } from './plugin'; export { config } from './config'; diff --git a/src/plugins/usage_collection/server/mocks.ts b/src/plugins/usage_collection/server/mocks.ts index bc59cf3cbef22..36f30357f6207 100644 --- a/src/plugins/usage_collection/server/mocks.ts +++ b/src/plugins/usage_collection/server/mocks.ts @@ -26,12 +26,12 @@ export const createUsageCollectionSetupMock = () => { executionContext: executionContextServiceMock.createSetupContract(), maximumWaitTimeForAllCollectorsInS: 1, }); - const { createUsageCounter, getUsageCounterByType } = + const { createUsageCounter, getUsageCounterByDomainId } = usageCountersServiceMock.createSetupContract(); const usageCollectionSetupMock: jest.Mocked = { createUsageCounter, - getUsageCounterByType, + getUsageCounterByDomainId, bulkFetch: jest.fn().mockImplementation(collectorSet.bulkFetch), getCollectorByType: jest.fn().mockImplementation(collectorSet.getCollectorByType), toApiFieldNames: jest.fn().mockImplementation(collectorSet.toApiFieldNames), diff --git a/src/plugins/usage_collection/server/plugin.ts b/src/plugins/usage_collection/server/plugin.ts index 7139de5091b50..ca551c129d84e 100644 --- a/src/plugins/usage_collection/server/plugin.ts +++ b/src/plugins/usage_collection/server/plugin.ts @@ -33,7 +33,7 @@ export interface UsageCollectionSetup { /** * Returns a usage counter by type */ - getUsageCounterByType: (type: string) => UsageCounter | undefined; + getUsageCounterByDomainId: (type: string) => UsageCounter | undefined; /** * Creates a usage collector to collect plugin telemetry data. * registerCollector must be called to connect the created collector with the service. @@ -112,13 +112,13 @@ export class UsageCollectionPlugin implements Plugin { bufferDurationMs: config.usageCounters.bufferDuration.asMilliseconds(), }); - const { createUsageCounter, getUsageCounterByType } = this.usageCountersService.setup(core); + const usageCountersServiceSetup = this.usageCountersService.setup(core); + const { createUsageCounter, getUsageCounterByDomainId } = usageCountersServiceSetup; - const uiCountersUsageCounter = createUsageCounter('uiCounter'); const router = core.http.createRouter(); setupRoutes({ router, - uiCountersUsageCounter, + usageCountersServiceSetup, getSavedObjects: () => this.savedObjects, collectorSet, config: { @@ -141,7 +141,7 @@ export class UsageCollectionPlugin implements Plugin { toApiFieldNames: collectorSet.toApiFieldNames, toObject: collectorSet.toObject, createUsageCounter, - getUsageCounterByType, + getUsageCounterByDomainId, }; } diff --git a/src/plugins/usage_collection/server/report/index.ts b/src/plugins/usage_collection/server/report/index.ts index 1a4cbd0e209a0..38df62c7e2f07 100644 --- a/src/plugins/usage_collection/server/report/index.ts +++ b/src/plugins/usage_collection/server/report/index.ts @@ -6,5 +6,5 @@ * Side Public License, v 1. */ -export { storeReport } from './store_report'; +export { storeUiReport } from './store_ui_report'; export { reportSchema } from './schema'; diff --git a/src/plugins/usage_collection/server/report/schema.ts b/src/plugins/usage_collection/server/report/schema.ts index 1f76d3a4db76d..9f4e65c224e08 100644 --- a/src/plugins/usage_collection/server/report/schema.ts +++ b/src/plugins/usage_collection/server/report/schema.ts @@ -36,6 +36,7 @@ export const reportSchema = schema.object({ type: schema.string(), appName: schema.string(), eventName: schema.string(), + namespace: schema.maybe(schema.string()), total: schema.number(), }) ) diff --git a/src/plugins/usage_collection/server/report/store_report.test.mocks.ts b/src/plugins/usage_collection/server/report/store_ui_report.test.mocks.ts similarity index 100% rename from src/plugins/usage_collection/server/report/store_report.test.mocks.ts rename to src/plugins/usage_collection/server/report/store_ui_report.test.mocks.ts diff --git a/src/plugins/usage_collection/server/report/store_report.test.ts b/src/plugins/usage_collection/server/report/store_ui_report.test.ts similarity index 70% rename from src/plugins/usage_collection/server/report/store_report.test.ts rename to src/plugins/usage_collection/server/report/store_ui_report.test.ts index e1c33197142d9..4fb98c8897f0a 100644 --- a/src/plugins/usage_collection/server/report/store_report.test.ts +++ b/src/plugins/usage_collection/server/report/store_ui_report.test.ts @@ -6,22 +6,24 @@ * Side Public License, v 1. */ -import { storeApplicationUsageMock } from './store_report.test.mocks'; +import { storeApplicationUsageMock } from './store_ui_report.test.mocks'; import { savedObjectsRepositoryMock } from '@kbn/core/server/mocks'; -import { storeReport } from './store_report'; -import { ReportSchemaType } from './schema'; import { METRIC_TYPE } from '@kbn/analytics'; +import type { ReportSchemaType } from './schema'; +import { storeUiReport } from './store_ui_report'; import { usageCountersServiceMock } from '../usage_counters/usage_counters_service.mock'; -describe('store_report', () => { - const usageCountersServiceSetup = usageCountersServiceMock.createSetupContract(); - const uiCountersUsageCounter = usageCountersServiceSetup.createUsageCounter('uiCounter'); - +describe('store_ui_report', () => { let repository: ReturnType; + let usageCountersServiceSetup: ReturnType; + let usageCounterMock: ReturnType; beforeEach(() => { + usageCountersServiceSetup = usageCountersServiceMock.createSetupContract(); repository = savedObjectsRepositoryMock.create(); + usageCounterMock = usageCountersServiceSetup.createUsageCounter('dashboards'); + usageCountersServiceSetup.createUsageCounter.mockReturnValue(usageCounterMock); }); afterEach(() => { @@ -64,8 +66,22 @@ describe('store_report', () => { }, }, }; - await storeReport(repository, uiCountersUsageCounter, report); + await storeUiReport(repository, usageCountersServiceSetup, report); + await new Promise((resolve) => setTimeout(resolve, 4000)); + expect(usageCountersServiceSetup.createUsageCounter.mock.calls).toMatchInlineSnapshot(` + Array [ + Array [ + "dashboards", + ], + Array [ + "test-app-name", + ], + Array [ + "test-app-name", + ], + ] + `); expect(repository.create.mock.calls).toMatchInlineSnapshot(` Array [ Array [ @@ -96,21 +112,22 @@ describe('store_report', () => { ], ] `); - expect((uiCountersUsageCounter.incrementCounter as jest.Mock).mock.calls) - .toMatchInlineSnapshot(` + expect((usageCounterMock.incrementCounter as jest.Mock).mock.calls).toMatchInlineSnapshot(` Array [ Array [ Object { - "counterName": "test-app-name:test-event-name", + "counterName": "test-event-name", "counterType": "loaded", "incrementBy": 1, + "source": "ui", }, ], Array [ Object { - "counterName": "test-app-name:test-event-name", + "counterName": "test-event-name", "counterType": "click", "incrementBy": 2, + "source": "ui", }, ], ] @@ -131,7 +148,7 @@ describe('store_report', () => { uiCounter: void 0, application_usage: void 0, }; - await storeReport(repository, uiCountersUsageCounter, report); + await storeUiReport(repository, usageCountersServiceSetup, report); expect(repository.bulkCreate).not.toHaveBeenCalled(); expect(repository.incrementCounter).not.toHaveBeenCalled(); diff --git a/src/plugins/usage_collection/server/report/store_report.ts b/src/plugins/usage_collection/server/report/store_ui_report.ts similarity index 86% rename from src/plugins/usage_collection/server/report/store_report.ts rename to src/plugins/usage_collection/server/report/store_ui_report.ts index 40ea5cbf414a8..1cf966e3466e8 100644 --- a/src/plugins/usage_collection/server/report/store_report.ts +++ b/src/plugins/usage_collection/server/report/store_ui_report.ts @@ -11,12 +11,11 @@ import moment from 'moment'; import { chain, sumBy } from 'lodash'; import { ReportSchemaType } from './schema'; import { storeApplicationUsage } from './store_application_usage'; -import { UsageCounter } from '../usage_counters'; -import { serializeUiCounterName } from '../../common/ui_counters'; +import { type UsageCountersServiceSetup } from '../usage_counters'; -export async function storeReport( +export async function storeUiReport( internalRepository: ISavedObjectsRepository, - uiCountersUsageCounter: UsageCounter, + counters: UsageCountersServiceSetup, report: ReportSchemaType ) { const uiCounters = report.uiCounter ? Object.entries(report.uiCounter) : []; @@ -60,11 +59,15 @@ export async function storeReport( // UI Counters ...uiCounters.map(async ([, metric]) => { const { appName, eventName, total, type } = metric; - const counterName = serializeUiCounterName({ appName, eventName }); - uiCountersUsageCounter.incrementCounter({ - counterName, + + const counter = + counters.getUsageCounterByDomainId(appName) ?? counters.createUsageCounter(appName); + + counter.incrementCounter({ + counterName: eventName, counterType: type, incrementBy: total, + source: 'ui', }); }), // Application Usage diff --git a/src/plugins/usage_collection/server/routes/index.ts b/src/plugins/usage_collection/server/routes/index.ts index 01d26b177218c..3bb42cf4865ce 100644 --- a/src/plugins/usage_collection/server/routes/index.ts +++ b/src/plugins/usage_collection/server/routes/index.ts @@ -16,16 +16,16 @@ import { Observable } from 'rxjs'; import { CollectorSet } from '../collector'; import { registerUiCountersRoute } from './ui_counters'; import { registerStatsRoute } from './stats'; -import type { UsageCounter } from '../usage_counters'; +import type { UsageCountersServiceSetup } from '../usage_counters'; export function setupRoutes({ router, - uiCountersUsageCounter, + usageCountersServiceSetup, getSavedObjects, ...rest }: { router: IRouter; getSavedObjects: () => ISavedObjectsRepository | undefined; - uiCountersUsageCounter: UsageCounter; + usageCountersServiceSetup: UsageCountersServiceSetup; config: { allowAnonymous: boolean; kibanaIndex: string; @@ -41,6 +41,6 @@ export function setupRoutes({ metrics: MetricsServiceSetup; overallStatus$: Observable; }) { - registerUiCountersRoute(router, getSavedObjects, uiCountersUsageCounter); + registerUiCountersRoute(router, getSavedObjects, usageCountersServiceSetup); registerStatsRoute({ router, ...rest }); } diff --git a/src/plugins/usage_collection/server/routes/ui_counters.ts b/src/plugins/usage_collection/server/routes/ui_counters.ts index 9752afeae3ef9..e19dd7c57ca6d 100644 --- a/src/plugins/usage_collection/server/routes/ui_counters.ts +++ b/src/plugins/usage_collection/server/routes/ui_counters.ts @@ -7,15 +7,15 @@ */ import { schema } from '@kbn/config-schema'; -import { IRouter, ISavedObjectsRepository } from '@kbn/core/server'; -import { storeReport, reportSchema } from '../report'; -import { UsageCounter } from '../usage_counters'; -import { UiCounters } from '../../common/types'; +import type { IRouter, ISavedObjectsRepository } from '@kbn/core/server'; +import { storeUiReport, reportSchema } from '../report'; +import type { UsageCountersServiceSetup } from '../usage_counters'; +import type { UiCounters } from '../../common/types'; export function registerUiCountersRoute( router: IRouter, getSavedObjects: () => ISavedObjectsRepository | undefined, - uiCountersUsageCounter: UsageCounter + usageCountersServiceSetup: UsageCountersServiceSetup ) { router.post( { @@ -33,7 +33,8 @@ export function registerUiCountersRoute( if (!internalRepository) { throw Error(`The saved objects client hasn't been initialised yet`); } - await storeReport(internalRepository, uiCountersUsageCounter, requestBody.report); + // we pass the whole usageCountersServiceSetup, so that we can create UI counters dynamically + await storeUiReport(internalRepository, usageCountersServiceSetup, requestBody.report); const bodyOk: UiCounters.v1.UiCountersResponseOk = { status: 'ok', }; diff --git a/src/plugins/usage_collection/server/usage_counters/index.ts b/src/plugins/usage_collection/server/usage_counters/index.ts index 05d36aaef502f..fcbcf9f02e681 100644 --- a/src/plugins/usage_collection/server/usage_counters/index.ts +++ b/src/plugins/usage_collection/server/usage_counters/index.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 { UsageCounters } from '../../common/types'; +import { UsageCounters } from '../../common'; export type IncrementCounterParams = UsageCounters.v1.IncrementCounterParams; export type { UsageCountersServiceSetup } from './usage_counters_service'; @@ -13,5 +13,4 @@ export type { UsageCountersSavedObjectAttributes, UsageCountersSavedObject } fro export type { IUsageCounter as UsageCounter } from './usage_counter'; export { UsageCountersService } from './usage_counters_service'; -export type { SerializeCounterParams } from './saved_objects'; -export { USAGE_COUNTERS_SAVED_OBJECT_TYPE, serializeCounterKey } from './saved_objects'; +export { serializeCounterKey, USAGE_COUNTERS_SAVED_OBJECT_TYPE } from './saved_objects'; diff --git a/src/plugins/usage_collection/server/usage_counters/saved_objects.test.ts b/src/plugins/usage_collection/server/usage_counters/saved_objects.test.ts index fa40fd5a8d2be..7a8934e4559fa 100644 --- a/src/plugins/usage_collection/server/usage_counters/saved_objects.test.ts +++ b/src/plugins/usage_collection/server/usage_counters/saved_objects.test.ts @@ -9,7 +9,7 @@ import { serializeCounterKey, storeCounter } from './saved_objects'; import { savedObjectsRepositoryMock } from '@kbn/core/server/mocks'; -import { UsageCounters } from '../../common/types'; +import { UsageCounters } from '../../common'; import moment from 'moment'; @@ -19,10 +19,12 @@ describe('counterKey', () => { domainId: 'a', counterName: 'b', counterType: 'c', + namespace: 'default', + source: 'ui', date: moment('09042021', 'DDMMYYYY'), }); - expect(result).toMatchInlineSnapshot(`"a:09042021:c:b"`); + expect(result).toEqual('a:b:c:ui:20210409:default'); }); }); @@ -40,20 +42,22 @@ describe('storeCounter', () => { }); it('stores counter in a saved object', async () => { - const counterMetric: UsageCounters.v1.CounterMetric = { + const metric: UsageCounters.v1.CounterMetric = { domainId: 'a', counterName: 'b', counterType: 'c', + namespace: 'default', + source: 'ui', incrementBy: 13, }; - await storeCounter(counterMetric, internalRepository); + await storeCounter({ metric, soRepository: internalRepository }); expect(internalRepository.incrementCounter).toBeCalledTimes(1); expect(internalRepository.incrementCounter.mock.calls[0]).toMatchInlineSnapshot(` Array [ - "usage-counters", - "a:09042021:c:b", + "usage-counter", + "a:b:c:ui:20210409", Array [ Object { "fieldName": "count", @@ -61,10 +65,12 @@ describe('storeCounter', () => { }, ], Object { + "namespace": "default", "upsertAttributes": Object { "counterName": "b", "counterType": "c", "domainId": "a", + "source": "ui", }, }, ] diff --git a/src/plugins/usage_collection/server/usage_counters/saved_objects.ts b/src/plugins/usage_collection/server/usage_counters/saved_objects.ts index 402dabb62b96b..21e51f81040df 100644 --- a/src/plugins/usage_collection/server/usage_counters/saved_objects.ts +++ b/src/plugins/usage_collection/server/usage_counters/saved_objects.ts @@ -6,13 +6,14 @@ * Side Public License, v 1. */ +import moment from 'moment'; +import { USAGE_COUNTERS_SAVED_OBJECT_INDEX } from '@kbn/core-saved-objects-server'; import type { SavedObject, SavedObjectsRepository, SavedObjectsServiceSetup, } from '@kbn/core/server'; -import moment from 'moment'; -import { UsageCounters } from '../../common/types'; +import { UsageCounters } from '../../common'; /** * The attributes stored in the UsageCounters' SavedObjects @@ -24,6 +25,8 @@ export interface UsageCountersSavedObjectAttributes { counterName: string; /** The counter type **/ counterType: string; + /** The source of the event that is being counted: 'server' | 'ui' **/ + source: string; /** Number of times the event has occurred **/ count: number; } @@ -34,13 +37,30 @@ export interface UsageCountersSavedObjectAttributes { export type UsageCountersSavedObject = SavedObject; /** The Saved Objects type for Usage Counters **/ -export const USAGE_COUNTERS_SAVED_OBJECT_TYPE = 'usage-counters'; +export const USAGE_COUNTERS_SAVED_OBJECT_TYPE = 'usage-counter'; -export const registerUsageCountersSavedObjectType = ( +export const registerUsageCountersSavedObjectTypes = ( savedObjectsSetup: SavedObjectsServiceSetup ) => { savedObjectsSetup.registerType({ name: USAGE_COUNTERS_SAVED_OBJECT_TYPE, + indexPattern: USAGE_COUNTERS_SAVED_OBJECT_INDEX, + hidden: false, + namespaceType: 'single', + mappings: { + dynamic: false, + properties: { + domainId: { type: 'keyword' }, + counterName: { type: 'keyword' }, + counterType: { type: 'keyword' }, + source: { type: 'keyword' }, + }, + }, + }); + + // DEPRECATED: we keep it just to ensure non-reindex migrations (serverless) + savedObjectsSetup.registerType({ + name: 'usage-counters', hidden: false, namespaceType: 'agnostic', mappings: { @@ -56,53 +76,68 @@ export const registerUsageCountersSavedObjectType = ( * Parameters to the `serializeCounterKey` method * @internal used in kibana_usage_collectors */ -export interface SerializeCounterParams { +export interface SerializeCounterKeyParams { /** The domain ID registered in the UsageCounter **/ domainId: string; /** The counter name **/ counterName: string; /** The counter type **/ counterType: string; - /** The date to which serialize the key **/ - date: moment.MomentInput; + /** The namespace of this counter */ + namespace?: string; + /** The source of the event we are counting */ + source: string; + /** The date to which serialize the key (defaults to 'now') **/ + date?: moment.MomentInput; } /** * Generates a key based on the UsageCounter details * @internal used in kibana_usage_collectors - * @param opts {@link SerializeCounterParams} + * @param opts {@link SerializeCounterKeyParams} */ export const serializeCounterKey = ({ domainId, counterName, counterType, + namespace, + source, date, -}: SerializeCounterParams) => { - const dayDate = moment(date).format('DDMMYYYY'); - return `${domainId}:${dayDate}:${counterType}:${counterName}`; +}: SerializeCounterKeyParams) => { + const dayDate = moment(date).format('YYYYMMDD'); + // e.g. 'dashboards:viewed:total:ui:20240628' // namespace-agnostic counters + // e.g. 'dashboards:viewed:total:ui:20240628:default' // namespaced counters + const namespaceSuffix = namespace ? `:${namespace}` : ''; + return `${domainId}:${counterName}:${counterType}:${source}:${dayDate}${namespaceSuffix}`; }; -export const storeCounter = async ( - counterMetric: UsageCounters.v1.CounterMetric, - internalRepository: Pick -) => { - const { counterName, counterType, domainId, incrementBy } = counterMetric; +export interface StoreCounterParams { + metric: UsageCounters.v1.CounterMetric; + soRepository: Pick; +} + +export const storeCounter = async ({ metric, soRepository }: StoreCounterParams) => { + const { namespace, counterName, counterType, domainId, source, incrementBy } = metric; + // same counter key can be used in different namespaces (no need to make namespace part of the key) const key = serializeCounterKey({ - date: moment.now(), domainId, counterName, counterType, + source, + date: moment.now(), }); - return await internalRepository.incrementCounter( + return await soRepository.incrementCounter( USAGE_COUNTERS_SAVED_OBJECT_TYPE, key, [{ fieldName: 'count', incrementBy }], { + ...(namespace && { namespace }), upsertAttributes: { domainId, counterName, counterType, + source, }, } ); diff --git a/src/plugins/usage_collection/server/usage_counters/usage_counter.test.ts b/src/plugins/usage_collection/server/usage_counters/usage_counter.test.ts index f3f6c2870ce25..aea0ab44f6cdd 100644 --- a/src/plugins/usage_collection/server/usage_counters/usage_counter.test.ts +++ b/src/plugins/usage_collection/server/usage_counters/usage_counter.test.ts @@ -5,10 +5,9 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -import { UsageCounter } from './usage_counter'; -import type { UsageCounters } from '../../common/types'; import * as Rx from 'rxjs'; -import * as rxOp from 'rxjs'; +import { UsageCounter } from './usage_counter'; +import type { UsageCounters } from '../../common'; describe('UsageCounter', () => { const domainId = 'test-domain-id'; @@ -21,18 +20,37 @@ describe('UsageCounter', () => { describe('#incrementCounter', () => { it('#incrementCounter calls counter$.next', async () => { - const result = counter$.pipe(rxOp.take(1), rxOp.toArray()).toPromise(); - usageCounter.incrementCounter({ counterName: 'test', counterType: 'type', incrementBy: 13 }); + const result = Rx.firstValueFrom(counter$.pipe(Rx.take(1), Rx.toArray())); + usageCounter.incrementCounter({ + counterName: 'test', + counterType: 'type', + incrementBy: 13, + source: 'ui', + namespace: 'second', + }); await expect(result).resolves.toEqual([ - { counterName: 'test', counterType: 'type', domainId: 'test-domain-id', incrementBy: 13 }, + { + domainId: 'test-domain-id', + counterType: 'type', + counterName: 'test', + source: 'ui', + namespace: 'second', + incrementBy: 13, + }, ]); }); it('passes default configs to counter$', async () => { - const result = counter$.pipe(rxOp.take(1), rxOp.toArray()).toPromise(); + const result = Rx.firstValueFrom(counter$.pipe(Rx.take(1), Rx.toArray())); usageCounter.incrementCounter({ counterName: 'test' }); await expect(result).resolves.toEqual([ - { counterName: 'test', counterType: 'count', domainId: 'test-domain-id', incrementBy: 1 }, + { + domainId: 'test-domain-id', + counterType: 'count', + counterName: 'test', + source: 'server', + incrementBy: 1, + }, ]); }); }); diff --git a/src/plugins/usage_collection/server/usage_counters/usage_counter.ts b/src/plugins/usage_collection/server/usage_counters/usage_counter.ts index 80bd32ae4d1db..6f8c892f2627a 100644 --- a/src/plugins/usage_collection/server/usage_counters/usage_counter.ts +++ b/src/plugins/usage_collection/server/usage_counters/usage_counter.ts @@ -7,9 +7,9 @@ */ import * as Rx from 'rxjs'; -import { UsageCounters } from '../../common/types'; +import type { UsageCounters } from '../../common'; -export interface UsageCounterDeps { +export interface UsageCounterParams { domainId: string; counter$: Rx.Subject; } @@ -31,19 +31,27 @@ export class UsageCounter implements IUsageCounter { private domainId: string; private counter$: Rx.Subject; - constructor({ domainId, counter$ }: UsageCounterDeps) { + constructor({ domainId, counter$ }: UsageCounterParams) { this.domainId = domainId; this.counter$ = counter$; } public incrementCounter = (params: UsageCounters.v1.IncrementCounterParams) => { - const { counterName, counterType = 'count', incrementBy = 1 } = params; + const { + counterName, + counterType = 'count', + source = 'server', // default behavior before introducing the property + incrementBy = 1, + namespace, + } = params; this.counter$.next({ - counterName, domainId: this.domainId, + counterName, counterType, + source, incrementBy, + ...(namespace && { namespace }), }); }; } diff --git a/src/plugins/usage_collection/server/usage_counters/usage_counters_service.mock.ts b/src/plugins/usage_collection/server/usage_counters/usage_counters_service.mock.ts index 0d96def540540..8e8627c5aea2d 100644 --- a/src/plugins/usage_collection/server/usage_counters/usage_counters_service.mock.ts +++ b/src/plugins/usage_collection/server/usage_counters/usage_counters_service.mock.ts @@ -13,7 +13,7 @@ import type { UsageCounter } from './usage_counter'; const createSetupContractMock = () => { const setupContract: jest.Mocked = { createUsageCounter: jest.fn(), - getUsageCounterByType: jest.fn(), + getUsageCounterByDomainId: jest.fn(), }; setupContract.createUsageCounter.mockReturnValue({ diff --git a/src/plugins/usage_collection/server/usage_counters/usage_counters_service.test.ts b/src/plugins/usage_collection/server/usage_counters/usage_counters_service.test.ts index 1222924b6ec94..1350c8b706b87 100644 --- a/src/plugins/usage_collection/server/usage_counters/usage_counters_service.test.ts +++ b/src/plugins/usage_collection/server/usage_counters/usage_counters_service.test.ts @@ -40,7 +40,7 @@ describe('UsageCountersService', () => { const usageCounter = createUsageCounter('test-counter'); usageCounter.incrementCounter({ counterName: 'counterA' }); - usageCounter.incrementCounter({ counterName: 'counterA' }); + usageCounter.incrementCounter({ counterName: 'counterA', namespace: 'second', source: 'ui' }); const dataInSourcePromise = usageCountersService['source$'].pipe(rxOp.toArray()).toPromise(); usageCountersService['flushCache$'].next(); @@ -48,10 +48,10 @@ describe('UsageCountersService', () => { await expect(dataInSourcePromise).resolves.toHaveLength(2); }); - it('registers savedObject type during setup', () => { + it('registers savedObject types during setup', () => { const usageCountersService = new UsageCountersService({ logger, retryCount, bufferDurationMs }); usageCountersService.setup(coreSetup); - expect(coreSetup.savedObjects.registerType).toBeCalledTimes(1); + expect(coreSetup.savedObjects.registerType).toBeCalledTimes(2); }); it('flushes cached data on start', async () => { @@ -67,28 +67,31 @@ describe('UsageCountersService', () => { const usageCounter = createUsageCounter('test-counter'); usageCounter.incrementCounter({ counterName: 'counterA' }); - usageCounter.incrementCounter({ counterName: 'counterA' }); + usageCounter.incrementCounter({ counterName: 'counterA', namespace: 'second', source: 'ui' }); const dataInSourcePromise = usageCountersService['source$'].pipe(rxOp.toArray()).toPromise(); usageCountersService.start(coreStart); usageCountersService['source$'].complete(); await expect(dataInSourcePromise).resolves.toMatchInlineSnapshot(` - Array [ - Object { - "counterName": "counterA", - "counterType": "count", - "domainId": "test-counter", - "incrementBy": 1, - }, - Object { - "counterName": "counterA", - "counterType": "count", - "domainId": "test-counter", - "incrementBy": 1, - }, - ] - `); + Array [ + Object { + "counterName": "counterA", + "counterType": "count", + "domainId": "test-counter", + "incrementBy": 1, + "source": "server", + }, + Object { + "counterName": "counterA", + "counterType": "count", + "domainId": "test-counter", + "incrementBy": 1, + "namespace": "second", + "source": "ui", + }, + ] + `); }); it('buffers data into savedObject', async () => { @@ -114,8 +117,8 @@ describe('UsageCountersService', () => { expect(mockIncrementCounter.mock.calls).toMatchInlineSnapshot(` Array [ Array [ - "usage-counters", - "test-counter:09042021:count:counterA", + "usage-counter", + "test-counter:counterA:count:server:20210409", Array [ Object { "fieldName": "count", @@ -127,12 +130,13 @@ describe('UsageCountersService', () => { "counterName": "counterA", "counterType": "count", "domainId": "test-counter", + "source": "server", }, }, ], Array [ - "usage-counters", - "test-counter:09042021:count:counterB", + "usage-counter", + "test-counter:counterB:count:server:20210409", Array [ Object { "fieldName": "count", @@ -144,6 +148,7 @@ describe('UsageCountersService', () => { "counterName": "counterB", "counterType": "count", "domainId": "test-counter", + "source": "server", }, }, ], @@ -162,9 +167,9 @@ describe('UsageCountersService', () => { const mockError = new Error('failed.'); const mockIncrementCounter = jest.fn().mockImplementation((_, key) => { switch (key) { - case 'test-counter:09042021:count:counterA': + case 'test-counter:counterA:count:server:20210409': throw mockError; - case 'test-counter:09042021:count:counterB': + case 'test-counter:counterB:count:server:20210409': return 'pass'; default: throw new Error(`unknown key ${key}`); @@ -232,11 +237,11 @@ describe('UsageCountersService', () => { Array [ Object { "incrementBy": 2, - "key": "test-counter:09042021:count:counterA", + "key": "test-counter:counterA:count:server:20210409", }, Object { "incrementBy": 1, - "key": "test-counter:09042021:count:counterA", + "key": "test-counter:counterA:count:server:20210409", }, ] `); diff --git a/src/plugins/usage_collection/server/usage_counters/usage_counters_service.ts b/src/plugins/usage_collection/server/usage_counters/usage_counters_service.ts index c0e71bdd28dbf..28c3aaf2be148 100644 --- a/src/plugins/usage_collection/server/usage_counters/usage_counters_service.ts +++ b/src/plugins/usage_collection/server/usage_counters/usage_counters_service.ts @@ -8,18 +8,18 @@ import * as Rx from 'rxjs'; import * as rxOp from 'rxjs'; -import { +import moment from 'moment'; +import type { SavedObjectsRepository, SavedObjectsServiceSetup, SavedObjectsServiceStart, } from '@kbn/core/server'; import type { Logger, LogMeta } from '@kbn/core/server'; -import moment from 'moment'; -import { UsageCounter } from './usage_counter'; -import { UsageCounters } from '../../common/types'; +import { type IUsageCounter, UsageCounter } from './usage_counter'; +import type { UsageCounters } from '../../common'; import { - registerUsageCountersSavedObjectType, + registerUsageCountersSavedObjectTypes, storeCounter, serializeCounterKey, } from './saved_objects'; @@ -35,8 +35,8 @@ export interface UsageCountersServiceDeps { } export interface UsageCountersServiceSetup { - createUsageCounter: (type: string) => UsageCounter; - getUsageCounterByType: (type: string) => UsageCounter | undefined; + createUsageCounter: (domainId: string) => IUsageCounter; + getUsageCounterByDomainId: (domainId: string) => IUsageCounter | undefined; } /* internal */ @@ -95,11 +95,11 @@ export class UsageCountersService { storingCache$.next(false); }); - registerUsageCountersSavedObjectType(core.savedObjects); + registerUsageCountersSavedObjectTypes(core.savedObjects); return { createUsageCounter: this.createUsageCounter, - getUsageCounterByType: this.getUsageCounterByType, + getUsageCounterByDomainId: this.getUsageCounterByDomainId, }; }; @@ -137,11 +137,11 @@ export class UsageCountersService { private storeDate$( counters: UsageCounters.v1.CounterMetric[], - internalRepository: Pick + soRepository: Pick ) { return Rx.forkJoin( - counters.map((counter) => - Rx.defer(() => storeCounter(counter, internalRepository)).pipe( + counters.map((metric) => + Rx.defer(() => storeCounter({ metric, soRepository })).pipe( rxOp.retry(this.retryCount), rxOp.catchError((error) => { this.logger.warn(error); @@ -152,22 +152,17 @@ export class UsageCountersService { ); } - private createUsageCounter = (type: string): UsageCounter => { - if (this.counterSets.get(type)) { - throw new Error(`Usage counter set "${type}" already exists.`); + private createUsageCounter = (domainId: string): IUsageCounter => { + if (this.counterSets.get(domainId)) { + throw new Error(`Usage counter set "${domainId}" already exists.`); } - const counterSet = new UsageCounter({ - domainId: type, - counter$: this.source$, - }); - - this.counterSets.set(type, counterSet); - + const counterSet = new UsageCounter({ domainId, counter$: this.source$ }); + this.counterSets.set(domainId, counterSet); return counterSet; }; - private getUsageCounterByType = (type: string): UsageCounter | undefined => { + private getUsageCounterByDomainId = (type: string): IUsageCounter | undefined => { return this.counterSets.get(type); }; @@ -176,8 +171,15 @@ export class UsageCountersService { ): Record => { const date = moment.now(); return counters.reduce((acc, counter) => { - const { counterName, domainId, counterType } = counter; - const key = serializeCounterKey({ domainId, counterName, counterType, date }); + const { domainId, counterName, counterType, namespace, source } = counter; + const key = serializeCounterKey({ + domainId, + counterName, + counterType, + namespace, + source, + date, + }); const existingCounter = acc[key]; if (!existingCounter) { acc[key] = counter; diff --git a/src/plugins/usage_collection/tsconfig.json b/src/plugins/usage_collection/tsconfig.json index e7c24d604be96..53fba66071c5e 100644 --- a/src/plugins/usage_collection/tsconfig.json +++ b/src/plugins/usage_collection/tsconfig.json @@ -23,6 +23,7 @@ "@kbn/analytics-collection-utils", "@kbn/logging", "@kbn/ebt", + "@kbn/core-saved-objects-server", ], "exclude": [ "target/**/*", diff --git a/test/api_integration/apis/ui_counters/ui_counters.ts b/test/api_integration/apis/ui_counters/ui_counters.ts index 3016af858d6be..cf6b6eee51d21 100644 --- a/test/api_integration/apis/ui_counters/ui_counters.ts +++ b/test/api_integration/apis/ui_counters/ui_counters.ts @@ -29,7 +29,7 @@ export default function ({ getService }: FtrProviderContext) { const { body: { saved_objects: savedObjects }, } = await supertest - .get('/api/saved_objects/_find?type=usage-counters') + .get('/api/saved_objects/_find?type=usage-counter') .set('kbn-xsrf', 'kibana') .expect(200); @@ -51,7 +51,8 @@ export default function ({ getService }: FtrProviderContext) { counterType: UiCounterMetricType ): UsageCountersSavedObject[] => { const matchingEventName = savedObjects.filter( - ({ attributes }) => attributes.counterName === `${APP_NAME}:${eventName}` + ({ attributes: { domainId, counterName } }) => + domainId === APP_NAME && counterName === eventName ); if (!matchingEventName.length) { throw new Error( diff --git a/test/functional/apps/discover/esql/_esql_columns.ts b/test/functional/apps/discover/esql/_esql_columns.ts index d48ec83f6ba91..ad1fe5d31edc9 100644 --- a/test/functional/apps/discover/esql/_esql_columns.ts +++ b/test/functional/apps/discover/esql/_esql_columns.ts @@ -36,8 +36,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { defaultIndex: 'logstash-*', }; - // FLAKY: https://github.com/elastic/kibana/issues/186416 - describe.skip('discover esql columns', async function () { + describe('discover esql columns', async function () { before(async () => { await kibanaServer.savedObjects.cleanStandardList(); await security.testUser.setRoles(['kibana_admin', 'test_logstash_reader']); @@ -95,13 +94,13 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const columns = ['@timestamp', 'Document']; expect(await dataGrid.getHeaderFields()).to.eql(columns); - await monacoEditor.setCodeEditorValue('from logstash-* | limit 1'); + await monacoEditor.setCodeEditorValue('from logstash-* | limit 500'); await testSubjects.click('querySubmitButton'); await PageObjects.header.waitUntilLoadingHasFinished(); await PageObjects.discover.waitUntilSearchingHasFinished(); expect(await dataGrid.getHeaderFields()).to.eql(columns); - await monacoEditor.setCodeEditorValue('from logs* | limit 1'); + await monacoEditor.setCodeEditorValue('from logs* | limit 500'); await testSubjects.click('querySubmitButton'); await PageObjects.header.waitUntilLoadingHasFinished(); await PageObjects.discover.waitUntilSearchingHasFinished(); @@ -113,7 +112,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(await dataGrid.getHeaderFields()).to.eql(['bytes']); // different index pattern => reset columns - await monacoEditor.setCodeEditorValue('from logstash-* | limit 1'); + await monacoEditor.setCodeEditorValue('from logstash-* | limit 500'); await testSubjects.click('querySubmitButton'); await PageObjects.header.waitUntilLoadingHasFinished(); await PageObjects.discover.waitUntilSearchingHasFinished(); diff --git a/test/plugin_functional/test_suites/usage_collection/usage_counters.ts b/test/plugin_functional/test_suites/usage_collection/usage_counters.ts index be4797b1cf61f..c7137470e0e7e 100644 --- a/test/plugin_functional/test_suites/usage_collection/usage_counters.ts +++ b/test/plugin_functional/test_suites/usage_collection/usage_counters.ts @@ -21,7 +21,7 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide await new Promise((res) => setTimeout(res, 10 * 1000)); return await supertest - .get('/api/saved_objects/_find?type=usage-counters') + .get('/api/saved_objects/_find?type=usage-counter') .set('kbn-xsrf', 'true') .expect(200) .then(({ body }) => { @@ -40,13 +40,13 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide describe('Usage Counters service', () => { before(async () => { const key = serializeCounterKey({ + domainId: 'usageCollectionTestPlugin', counterName: 'routeAccessed', counterType: 'count', - domainId: 'usageCollectionTestPlugin', - date: Date.now(), + source: 'server', }); - await supertest.delete(`/api/saved_objects/usage-counters/${key}`).set('kbn-xsrf', 'true'); + await supertest.delete(`/api/saved_objects/counter/${key}`).set('kbn-xsrf', 'true'); }); it('stores usage counters sent during start and setup', async () => { diff --git a/versions.json b/versions.json index f43e07cfdf2e2..28a0688dffa5a 100644 --- a/versions.json +++ b/versions.json @@ -2,14 +2,14 @@ "notice": "This file is not maintained outside of the main branch and should only be used for tooling.", "versions": [ { - "version": "8.15.0", + "version": "8.16.0", "branch": "main", "currentMajor": true, "currentMinor": true }, { - "version": "8.14.2", - "branch": "8.14", + "version": "8.15.0", + "branch": "8.15", "currentMajor": true, "previousMinor": true }, diff --git a/x-pack/examples/triggers_actions_ui_example/public/application.tsx b/x-pack/examples/triggers_actions_ui_example/public/application.tsx index b605a1245ab8d..49871c9e46ce8 100644 --- a/x-pack/examples/triggers_actions_ui_example/public/application.tsx +++ b/x-pack/examples/triggers_actions_ui_example/public/application.tsx @@ -7,11 +7,10 @@ import React from 'react'; import ReactDOM from 'react-dom'; -import { BrowserRouter as Router } from 'react-router-dom'; +import { Router, Routes, Route } from '@kbn/shared-ux-router'; import { QueryClient } from '@tanstack/react-query'; -import { Route } from '@kbn/shared-ux-router'; import { EuiPage, EuiTitle, EuiText, EuiSpacer } from '@elastic/eui'; -import { AppMountParameters, CoreStart } from '@kbn/core/public'; +import { AppMountParameters, CoreStart, ScopedHistory } from '@kbn/core/public'; import { TriggersAndActionsUIPublicPluginStart } from '@kbn/triggers-actions-ui-plugin/public'; import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; @@ -22,6 +21,7 @@ import type { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; import type { DataViewEditorStart } from '@kbn/data-view-editor-plugin/public'; import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public'; import { __IntlProvider as IntlProvider } from '@kbn/i18n-react'; +import { createRuleRoute, editRuleRoute, RuleForm } from '@kbn/alerts-ui-shared/src/rule_form'; import { TriggersActionsUiExamplePublicStartDeps } from './plugin'; import { Page } from './components/page'; @@ -38,13 +38,17 @@ import { RuleStatusFilterSandbox } from './components/rule_status_filter_sandbox import { AlertsTableSandbox } from './components/alerts_table_sandbox'; import { RulesSettingsLinkSandbox } from './components/rules_settings_link_sandbox'; -import { RuleDefinitionSandbox } from './components/rule_form/rule_definition_sandbox'; import { RuleActionsSandbox } from './components/rule_form/rule_actions_sandbox'; import { RuleDetailsSandbox } from './components/rule_form/rule_details_sandbox'; export interface TriggersActionsUiExampleComponentParams { http: CoreStart['http']; - basename: string; + notification: CoreStart['notifications']; + application: CoreStart['application']; + docLinks: CoreStart['docLinks']; + i18n: CoreStart['i18n']; + theme: CoreStart['theme']; + history: ScopedHistory; triggersActionsUi: TriggersAndActionsUIPublicPluginStart; data: DataPublicPluginStart; charts: ChartsPluginSetup; @@ -54,144 +58,198 @@ export interface TriggersActionsUiExampleComponentParams { } const TriggersActionsUiExampleApp = ({ - basename, + history, triggersActionsUi, + http, + application, + notification, + docLinks, + i18n, + theme, data, charts, dataViews, unifiedSearch, }: TriggersActionsUiExampleComponentParams) => { return ( - + - - ( - - -

Welcome to the Triggers Actions UI plugin example

-
- - - This example plugin displays the shareable components in the Triggers Actions UI - plugin. It also serves as a sandbox to run functional tests to ensure the shareable - components are functioning correctly outside of their original plugin. - -
- )} - /> - ( - - - - )} - /> - ( - - - - )} - /> - ( - - - - )} - /> - ( - - - - )} - /> - ( - - - - )} - /> - ( - - - - )} - /> - ( - - - - )} - /> - ( - - - - )} - /> - ( - - - - )} - /> - ( - - - - )} - /> - ( - - - - )} - /> - ( - - - - )} - /> - ( - - - - )} - /> + + + ( + + +

Welcome to the Triggers Actions UI plugin example

+
+ + + This example plugin displays the shareable components in the Triggers Actions UI + plugin. It also serves as a sandbox to run functional tests to ensure the + shareable components are functioning correctly outside of their original plugin. + +
+ )} + /> + ( + + + + )} + /> + ( + + + + )} + /> + ( + + + + )} + /> + ( + + + + )} + /> + ( + + + + )} + /> + ( + + + + )} + /> + ( + + + + )} + /> + ( + + + + )} + /> + ( + + + + )} + /> + ( + + + + )} + /> + ( + + + + )} + /> + ( + + + + )} + /> + ( + + + + )} + /> + ( + + + + )} + /> +
); @@ -202,11 +260,12 @@ export const queryClient = new QueryClient(); export const renderApp = ( core: CoreStart, deps: TriggersActionsUiExamplePublicStartDeps, - { appBasePath, element }: AppMountParameters + { appBasePath, element, history }: AppMountParameters ) => { - const { http } = core; + const { http, notifications, docLinks, application, i18n, theme } = core; const { triggersActionsUi } = deps; const { ruleTypeRegistry, actionTypeRegistry } = triggersActionsUi; + ReactDOM.render( - - + + - - + + , element diff --git a/x-pack/examples/triggers_actions_ui_example/public/components/page.tsx b/x-pack/examples/triggers_actions_ui_example/public/components/page.tsx index a03712f772341..d464549d5d8d4 100644 --- a/x-pack/examples/triggers_actions_ui_example/public/components/page.tsx +++ b/x-pack/examples/triggers_actions_ui_example/public/components/page.tsx @@ -40,14 +40,14 @@ export const Page: React.FC = (props) => { } return ( - +

{title}

- {children} + {children}
); }; diff --git a/x-pack/examples/triggers_actions_ui_example/public/components/rule_form/rule_definition_sandbox.tsx b/x-pack/examples/triggers_actions_ui_example/public/components/rule_form/rule_definition_sandbox.tsx deleted file mode 100644 index 71b8c3ccf276b..0000000000000 --- a/x-pack/examples/triggers_actions_ui_example/public/components/rule_form/rule_definition_sandbox.tsx +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React, { useMemo, useState, useCallback } from 'react'; -import { EuiLoadingSpinner, EuiCodeBlock, EuiTitle, EuiButton } from '@elastic/eui'; -import { useKibana } from '@kbn/kibana-react-plugin/public'; -import type { DocLinksStart } from '@kbn/core/public'; -import type { HttpStart } from '@kbn/core-http-browser'; -import type { ToastsStart } from '@kbn/core-notifications-browser'; -import type { TriggersAndActionsUIPublicPluginStart } from '@kbn/triggers-actions-ui-plugin/public'; -import type { ChartsPluginSetup } from '@kbn/charts-plugin/public'; -import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; -import type { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; -import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public'; -import { AlertConsumers, RuleCreationValidConsumer } from '@kbn/rule-data-utils'; -import { RuleDefinition, getRuleErrors, InitialRule } from '@kbn/alerts-ui-shared/src/rule_form'; -import { useLoadRuleTypesQuery } from '@kbn/alerts-ui-shared/src/common/hooks'; - -interface RuleDefinitionSandboxProps { - data: DataPublicPluginStart; - charts: ChartsPluginSetup; - dataViews: DataViewsPublicPluginStart; - unifiedSearch: UnifiedSearchPublicPluginStart; - triggersActionsUi: TriggersAndActionsUIPublicPluginStart; -} - -export const VALID_CONSUMERS: RuleCreationValidConsumer[] = [ - AlertConsumers.LOGS, - AlertConsumers.INFRASTRUCTURE, - AlertConsumers.STACK_ALERTS, -]; - -const DEFAULT_FORM_VALUES = (ruleTypeId: string) => ({ - id: 'test-id', - name: 'test', - params: {}, - schedule: { - interval: '1m', - }, - alertDelay: { - active: 5, - }, - notifyWhen: null, - consumer: 'stackAlerts', - enabled: true, - tags: [], - actions: [], - ruleTypeId, -}); - -export const RuleDefinitionSandbox = (props: RuleDefinitionSandboxProps) => { - const { data, charts, dataViews, unifiedSearch, triggersActionsUi } = props; - - const [ruleTypeId, setRuleTypeId] = useState('.es-query'); - - const [formValue, setFormValue] = useState(DEFAULT_FORM_VALUES(ruleTypeId)); - - const onChange = useCallback( - (property: string, value: unknown) => { - if (property === 'interval') { - setFormValue({ - ...formValue, - schedule: { - interval: value as string, - }, - }); - return; - } - if (property === 'params') { - setFormValue({ - ...formValue, - params: value as Record, - }); - return; - } - setFormValue({ - ...formValue, - [property]: value, - }); - }, - [formValue] - ); - - const onRuleTypeChange = useCallback((newRuleTypeId: string) => { - setRuleTypeId(newRuleTypeId); - setFormValue(DEFAULT_FORM_VALUES(newRuleTypeId)); - }, []); - - const { docLinks, http, toasts } = useKibana<{ - docLinks: DocLinksStart; - http: HttpStart; - toasts: ToastsStart; - }>().services; - - const { - ruleTypesState: { data: ruleTypeIndex, isLoading }, - } = useLoadRuleTypesQuery({ - http, - toasts, - }); - - const ruleTypes = useMemo(() => [...ruleTypeIndex.values()], [ruleTypeIndex]); - const selectedRuleType = ruleTypes.find((ruleType) => ruleType.id === ruleTypeId); - const selectedRuleTypeModel = triggersActionsUi.ruleTypeRegistry.get(ruleTypeId); - - const errors = useMemo(() => { - if (!selectedRuleType || !selectedRuleTypeModel) { - return {}; - } - - return getRuleErrors({ - rule: formValue, - minimumScheduleInterval: { - value: '1m', - enforce: true, - }, - ruleTypeModel: selectedRuleTypeModel, - }).ruleErrors; - }, [formValue, selectedRuleType, selectedRuleTypeModel]); - - if (isLoading || !selectedRuleType) { - return ; - } - - return ( - <> -
- -

Form State

-
- {JSON.stringify(formValue, null, 2)} -
-
- -

Switch Rule Types:

-
- onRuleTypeChange('.es-query')}>Es Query - onRuleTypeChange('metrics.alert.threshold')}> - Metric Threshold - - onRuleTypeChange('observability.rules.custom_threshold')}> - Custom Threshold - -
- - - ); -}; diff --git a/x-pack/examples/triggers_actions_ui_example/public/components/rule_form/rule_details_sandbox.tsx b/x-pack/examples/triggers_actions_ui_example/public/components/rule_form/rule_details_sandbox.tsx index 6c1b83d79f46c..56397d6030bf8 100644 --- a/x-pack/examples/triggers_actions_ui_example/public/components/rule_form/rule_details_sandbox.tsx +++ b/x-pack/examples/triggers_actions_ui_example/public/components/rule_form/rule_details_sandbox.tsx @@ -5,32 +5,9 @@ * 2.0. */ -import React, { useState, useCallback } from 'react'; +import React from 'react'; import { RuleDetails } from '@kbn/alerts-ui-shared/src/rule_form'; -import { EuiCodeBlock, EuiTitle } from '@elastic/eui'; export const RuleDetailsSandbox = () => { - const [formValues, setFormValues] = useState({ - tags: [], - name: 'test-rule', - }); - - const onChange = useCallback((property: string, value: unknown) => { - setFormValues((prevFormValues) => ({ - ...prevFormValues, - [property]: value, - })); - }, []); - - return ( - <> -
- -

Form State

-
- {JSON.stringify(formValues, null, 2)} -
- - - ); + return ; }; diff --git a/x-pack/examples/triggers_actions_ui_example/public/components/sidebar.tsx b/x-pack/examples/triggers_actions_ui_example/public/components/sidebar.tsx index a6dd96190574b..7faaae11ef0f4 100644 --- a/x-pack/examples/triggers_actions_ui_example/public/components/sidebar.tsx +++ b/x-pack/examples/triggers_actions_ui_example/public/components/sidebar.tsx @@ -6,11 +6,10 @@ */ import React from 'react'; -import { useHistory } from 'react-router-dom'; import { EuiPageSidebar, EuiSideNav } from '@elastic/eui'; +import { ScopedHistory } from '@kbn/core/public'; -export const Sidebar = () => { - const history = useHistory(); +export const Sidebar = ({ history }: { history: ScopedHistory }) => { return ( { id: 'rule-form-components', items: [ { - id: 'rule-definition', - name: 'Rule Definition', - onClick: () => history.push('/rule_definition'), + id: 'rule-create', + name: 'Rule Create', + onClick: () => history.push('/rule/create/.es-query'), + }, + { + id: 'rule-edit', + name: 'Rule Edit', + onClick: () => history.push('/rule/edit/test'), }, { id: 'rule-actions', diff --git a/x-pack/examples/triggers_actions_ui_example/tsconfig.json b/x-pack/examples/triggers_actions_ui_example/tsconfig.json index 0bb226e46c8a9..601f23edd2647 100644 --- a/x-pack/examples/triggers_actions_ui_example/tsconfig.json +++ b/x-pack/examples/triggers_actions_ui_example/tsconfig.json @@ -31,8 +31,6 @@ "@kbn/unified-search-plugin", "@kbn/alerts-ui-shared", "@kbn/data-view-editor-plugin", - "@kbn/core-http-browser", - "@kbn/core-notifications-browser", "@kbn/react-kibana-context-render", ] } diff --git a/x-pack/package.json b/x-pack/package.json index a65aaf142fd25..c4f8f4efe770d 100644 --- a/x-pack/package.json +++ b/x-pack/package.json @@ -1,6 +1,6 @@ { "name": "x-pack", - "version": "8.15.0", + "version": "8.16.0", "author": "Elastic", "private": true, "license": "Elastic-License", diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/index.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/index.ts index eb5d0738f378b..1cbe8bbf8e792 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/index.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/index.ts @@ -52,3 +52,6 @@ export * from './knowledge_base/bulk_crud_knowledge_base_route.gen'; export * from './knowledge_base/common_attributes.gen'; export * from './knowledge_base/crud_knowledge_base_route.gen'; export * from './knowledge_base/find_knowledge_base_entries_route.gen'; + +export * from './prompts/find_prompts_route.gen'; +export { PromptResponse, PromptTypeEnum } from './prompts/bulk_crud_prompts_route.gen'; diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen.ts index d0bd99e063d0c..2d7a4d762eecc 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen.ts @@ -34,6 +34,14 @@ export const PromptDetailsInError = z.object({ name: z.string().optional(), }); +/** + * Prompt type + */ +export type PromptType = z.infer; +export const PromptType = z.enum(['system', 'quick']); +export type PromptTypeEnum = typeof PromptType.enum; +export const PromptTypeEnum = PromptType.enum; + export type NormalizedPromptError = z.infer; export const NormalizedPromptError = z.object({ message: z.string(), @@ -47,11 +55,13 @@ export const PromptResponse = z.object({ id: NonEmptyString, timestamp: NonEmptyString.optional(), name: z.string(), - promptType: z.string(), + promptType: PromptType, content: z.string(), + categories: z.array(z.string()).optional(), + color: z.string().optional(), isNewConversationDefault: z.boolean().optional(), isDefault: z.boolean().optional(), - isShared: z.boolean().optional(), + consumer: z.string().optional(), updatedAt: z.string().optional(), updatedBy: z.string().optional(), createdAt: z.string().optional(), @@ -107,20 +117,24 @@ export const BulkActionBase = z.object({ export type PromptCreateProps = z.infer; export const PromptCreateProps = z.object({ name: z.string(), - promptType: z.string(), + promptType: PromptType, content: z.string(), + color: z.string().optional(), + categories: z.array(z.string()).optional(), isNewConversationDefault: z.boolean().optional(), isDefault: z.boolean().optional(), - isShared: z.boolean().optional(), + consumer: z.string().optional(), }); export type PromptUpdateProps = z.infer; export const PromptUpdateProps = z.object({ id: z.string(), content: z.string().optional(), + color: z.string().optional(), + categories: z.array(z.string()).optional(), isNewConversationDefault: z.boolean().optional(), isDefault: z.boolean().optional(), - isShared: z.boolean().optional(), + consumer: z.string().optional(), }); export type PerformBulkActionRequestBody = z.infer; diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.schema.yaml b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.schema.yaml index ede0136ba710a..5be6bde140b85 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.schema.yaml +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.schema.yaml @@ -78,6 +78,13 @@ components: required: - id + PromptType: + type: string + description: Prompt type + enum: + - system + - quick + NormalizedPromptError: type: object properties: @@ -111,15 +118,21 @@ components: name: type: string promptType: - type: string + $ref: '#/components/schemas/PromptType' content: type: string + categories: + type: array + items: + type: string + color: + type: string isNewConversationDefault: type: boolean isDefault: type: boolean - isShared: - type: boolean + consumer: + type: string updatedAt: type: string updatedBy: @@ -231,15 +244,21 @@ components: name: type: string promptType: - type: string + $ref: '#/components/schemas/PromptType' content: type: string + color: + type: string + categories: + type: array + items: + type: string isNewConversationDefault: type: boolean isDefault: type: boolean - isShared: - type: boolean + consumer: + type: string PromptUpdateProps: type: object @@ -250,9 +269,15 @@ components: type: string content: type: string + color: + type: string + categories: + type: array + items: + type: string isNewConversationDefault: type: boolean isDefault: type: boolean - isShared: - type: boolean + consumer: + type: string diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx index b8c42a787621b..8b6bba33f680a 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx @@ -11,6 +11,7 @@ import { API_ERROR } from '../translations'; import { getOptionalRequestParams } from '../helpers'; import { TraceOptions } from '../types'; export * from './conversations'; +export * from './prompts'; export interface FetchConnectorExecuteAction { conversationId: string; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/prompts/bulk_update_prompts.test.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/prompts/bulk_update_prompts.test.ts new file mode 100644 index 0000000000000..d6ba2e726a76f --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/prompts/bulk_update_prompts.test.ts @@ -0,0 +1,137 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { + API_VERSIONS, + ELASTIC_AI_ASSISTANT_PROMPTS_URL_BULK_ACTION, +} from '@kbn/elastic-assistant-common'; +import { httpServiceMock } from '@kbn/core-http-browser-mocks'; +import { IToasts } from '@kbn/core-notifications-browser'; +import { bulkUpdatePrompts } from './bulk_update_prompts'; +import { PromptTypeEnum } from '@kbn/elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen'; + +const prompt1 = { + id: 'field1', + content: 'Prompt 1', + name: 'test', + promptType: PromptTypeEnum.system, +}; +const prompt2 = { + ...prompt1, + id: 'field2', + content: 'Prompt 2', + name: 'test2', + promptType: PromptTypeEnum.system, +}; +const toasts = { + addError: jest.fn(), +}; +describe('bulkUpdatePrompts', () => { + let httpMock: ReturnType; + + beforeEach(() => { + httpMock = httpServiceMock.createSetupContract(); + + jest.clearAllMocks(); + }); + it('should send a POST request with the correct parameters and receive a successful response', async () => { + const promptsActions = { + create: [], + update: [], + delete: { ids: [] }, + }; + + await bulkUpdatePrompts(httpMock, promptsActions); + + expect(httpMock.fetch).toHaveBeenCalledWith(ELASTIC_AI_ASSISTANT_PROMPTS_URL_BULK_ACTION, { + method: 'POST', + version: API_VERSIONS.internal.v1, + body: JSON.stringify({ + create: [], + update: [], + delete: { ids: [] }, + }), + }); + }); + + it('should transform the prompts dictionary to an array of fields to create', async () => { + const promptsActions = { + create: [prompt1, prompt2], + update: [], + delete: { ids: [] }, + }; + + await bulkUpdatePrompts(httpMock, promptsActions); + + expect(httpMock.fetch).toHaveBeenCalledWith(ELASTIC_AI_ASSISTANT_PROMPTS_URL_BULK_ACTION, { + method: 'POST', + version: API_VERSIONS.internal.v1, + body: JSON.stringify({ + create: [prompt1, prompt2], + update: [], + delete: { ids: [] }, + }), + }); + }); + + it('should transform the prompts dictionary to an array of fields to update', async () => { + const promptsActions = { + update: [prompt1, prompt2], + delete: { ids: [] }, + }; + + await bulkUpdatePrompts(httpMock, promptsActions); + + expect(httpMock.fetch).toHaveBeenCalledWith(ELASTIC_AI_ASSISTANT_PROMPTS_URL_BULK_ACTION, { + method: 'POST', + version: API_VERSIONS.internal.v1, + body: JSON.stringify({ + update: [prompt1, prompt2], + delete: { ids: [] }, + }), + }); + }); + + it('should throw an error with the correct message when receiving an unsuccessful response', async () => { + httpMock.fetch.mockResolvedValue({ + success: false, + attributes: { + errors: [ + { + statusCode: 400, + message: 'Error updating prompt', + prompts: [{ id: prompt1.id, name: prompt1.content }], + }, + ], + }, + }); + const promptsActions = { + create: [], + update: [prompt1], + delete: { ids: [] }, + }; + await bulkUpdatePrompts(httpMock, promptsActions, toasts as unknown as IToasts); + expect(toasts.addError.mock.calls[0][0]).toEqual( + new Error('Error message: Error updating prompt for prompt Prompt 1') + ); + }); + + it('should handle cases where result.attributes.errors is undefined', async () => { + httpMock.fetch.mockResolvedValue({ + success: false, + attributes: {}, + }); + const promptsActions = { + create: [], + update: [], + delete: { ids: [] }, + }; + + await bulkUpdatePrompts(httpMock, promptsActions, toasts as unknown as IToasts); + expect(toasts.addError.mock.calls[0][0]).toEqual(new Error('')); + }); +}); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/prompts/bulk_update_prompts.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/prompts/bulk_update_prompts.ts new file mode 100644 index 0000000000000..2d7b053d7acbd --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/prompts/bulk_update_prompts.ts @@ -0,0 +1,54 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { i18n } from '@kbn/i18n'; +import { HttpSetup, IToasts } from '@kbn/core/public'; +import { + ELASTIC_AI_ASSISTANT_PROMPTS_URL_BULK_ACTION, + API_VERSIONS, +} from '@kbn/elastic-assistant-common'; +import { + PerformBulkActionRequestBody, + PerformBulkActionResponse, +} from '@kbn/elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen'; + +export const bulkUpdatePrompts = async ( + http: HttpSetup, + prompts: PerformBulkActionRequestBody, + toasts?: IToasts +) => { + try { + const result = await http.fetch( + ELASTIC_AI_ASSISTANT_PROMPTS_URL_BULK_ACTION, + { + method: 'POST', + version: API_VERSIONS.internal.v1, + body: JSON.stringify(prompts), + } + ); + + if (!result.success) { + const serverError = result.attributes.errors + ?.map( + (e) => + `${e.status_code ? `Error code: ${e.status_code}. ` : ''}Error message: ${ + e.message + } for prompt ${e.prompts.map((c) => c.name).join(',')}` + ) + .join(',\n'); + throw new Error(serverError); + } + return result; + } catch (error) { + toasts?.addError(error.body && error.body.message ? new Error(error.body.message) : error, { + title: i18n.translate('xpack.elasticAssistant.prompts.bulkActionspromptsError', { + defaultMessage: 'Error updating prompts {error}', + values: { error }, + }), + }); + } +}; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/prompts/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/prompts/index.tsx new file mode 100644 index 0000000000000..5a2f6bb80992b --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/prompts/index.tsx @@ -0,0 +1,9 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export * from './bulk_update_prompts'; +export * from './use_fetch_prompts'; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/prompts/use_fetch_prompts.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/prompts/use_fetch_prompts.test.tsx new file mode 100644 index 0000000000000..3ec1586d6cb44 --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/prompts/use_fetch_prompts.test.tsx @@ -0,0 +1,61 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { act, renderHook } from '@testing-library/react-hooks'; + +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import type { ReactNode } from 'react'; +import React from 'react'; +import { useFetchPrompts } from './use_fetch_prompts'; +import { HttpSetup } from '@kbn/core-http-browser'; +import { useAssistantContext } from '../../../assistant_context'; +import { API_VERSIONS, defaultAssistantFeatures } from '@kbn/elastic-assistant-common'; + +const http = { + fetch: jest.fn().mockResolvedValue(defaultAssistantFeatures), +} as unknown as HttpSetup; + +jest.mock('../../../assistant_context'); + +const createWrapper = () => { + const queryClient = new QueryClient(); + // eslint-disable-next-line react/display-name + return ({ children }: { children: ReactNode }) => ( + {children} + ); +}; + +describe('useFetchPrompts', () => { + (useAssistantContext as jest.Mock).mockReturnValue({ + http, + assistantAvailability: { + isAssistantEnabled: true, + }, + }); + it(`should make http request to fetch prompts`, async () => { + renderHook(() => useFetchPrompts(), { + wrapper: createWrapper(), + }); + + await act(async () => { + const { waitForNextUpdate } = renderHook(() => useFetchPrompts()); + await waitForNextUpdate(); + expect(http.fetch).toHaveBeenCalledWith('/internal/elastic_assistant/prompts/_find', { + method: 'GET', + query: { + page: 1, + per_page: 1000, + filter: 'consumer:*', + }, + version: API_VERSIONS.internal.v1, + signal: undefined, + }); + + expect(http.fetch).toHaveBeenCalled(); + }); + }); +}); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/prompts/use_fetch_prompts.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/prompts/use_fetch_prompts.ts new file mode 100644 index 0000000000000..18a229e524dc7 --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/prompts/use_fetch_prompts.ts @@ -0,0 +1,101 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { FindPromptsResponse } from '@kbn/elastic-assistant-common/impl/schemas/prompts/find_prompts_route.gen'; +import { useQuery } from '@tanstack/react-query'; +import { API_VERSIONS, ELASTIC_AI_ASSISTANT_PROMPTS_URL_FIND } from '@kbn/elastic-assistant-common'; +import { HttpSetup, IToasts } from '@kbn/core/public'; +import { i18n } from '@kbn/i18n'; +import { useAssistantContext } from '../../../assistant_context'; + +export interface UseFetchPromptsParams { + signal?: AbortSignal | undefined; + consumer?: string; +} + +/** + * API call for fetching prompts for current spaceId + * + * @param {Object} options - The options object. + * @param {string} options.consumer - prompt consumer + * @param {AbortSignal} [options.signal] - AbortSignal + * + * @returns {useQuery} hook for getting the status of the prompts + */ + +export const useFetchPrompts = (payload?: UseFetchPromptsParams) => { + const { + assistantAvailability: { isAssistantEnabled }, + http, + } = useAssistantContext(); + + const QUERY = { + page: 1, + per_page: 1000, // Continue use in-memory paging till the new design will be ready + filter: `consumer:${payload?.consumer ?? '*'}`, + }; + + const CACHING_KEYS = [ + ELASTIC_AI_ASSISTANT_PROMPTS_URL_FIND, + QUERY.page, + QUERY.per_page, + QUERY.filter, + API_VERSIONS.internal.v1, + ]; + + return useQuery( + CACHING_KEYS, + async () => + http.fetch(ELASTIC_AI_ASSISTANT_PROMPTS_URL_FIND, { + method: 'GET', + version: API_VERSIONS.internal.v1, + query: QUERY, + signal: payload?.signal, + }), + { + initialData: { + data: [], + page: 1, + perPage: 5, + total: 0, + }, + placeholderData: { + data: [], + page: 1, + perPage: 5, + total: 0, + }, + keepPreviousData: true, + enabled: isAssistantEnabled, + } + ); +}; + +export const getPrompts = async ({ + http, + signal, + toasts, +}: { + http: HttpSetup; + toasts: IToasts; + signal?: AbortSignal | undefined; +}) => { + try { + return await http.fetch(ELASTIC_AI_ASSISTANT_PROMPTS_URL_FIND, { + method: 'GET', + version: API_VERSIONS.internal.v1, + signal, + }); + } catch (error) { + toasts.addError(error.body && error.body.message ? new Error(error.body.message) : error, { + title: i18n.translate('xpack.elasticAssistant.prompts.getPromptsError', { + defaultMessage: 'Error fetching prompts', + }), + }); + throw error; + } +}; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_header/assistant_header_flyout.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_header/assistant_header_flyout.tsx index bd75e80aef0ca..5725d983eff33 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_header/assistant_header_flyout.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_header/assistant_header_flyout.tsx @@ -6,6 +6,7 @@ */ import React, { useState, useMemo, useCallback } from 'react'; +import { QueryObserverResult, RefetchOptions, RefetchQueryFilters } from '@tanstack/react-query'; import { EuiFlexGroup, EuiFlexItem, @@ -47,6 +48,9 @@ interface OwnProps { refetchConversationsState: () => Promise; onConversationCreate: () => Promise; isAssistantEnabled: boolean; + refetchPrompts?: ( + options?: RefetchOptions & RefetchQueryFilters + ) => Promise>; } type Props = OwnProps; @@ -74,6 +78,7 @@ export const AssistantHeaderFlyout: React.FC = ({ refetchConversationsState, onConversationCreate, isAssistantEnabled, + refetchPrompts, }) => { const showAnonymizedValuesChecked = useMemo( () => @@ -164,6 +169,7 @@ export const AssistantHeaderFlyout: React.FC = ({ conversationsLoaded={conversationsLoaded} refetchConversationsState={refetchConversationsState} isFlyoutMode={true} + refetchPrompts={refetchPrompts} /> diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_header/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_header/index.test.tsx index 2301078d57ba1..f806f5d1ef7c6 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_header/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_header/index.test.tsx @@ -38,6 +38,7 @@ const testProps = { refetchConversationsState: jest.fn(), anonymizationFields: { total: 0, page: 1, perPage: 1000, data: [] }, refetchAnonymizationFieldsResults: jest.fn(), + allPrompts: [], }; jest.mock('../../connectorland/use_load_connectors', () => ({ diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_header/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_header/index.tsx index ac7ca235b36ee..7507c14648614 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_header/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/assistant_header/index.tsx @@ -14,9 +14,11 @@ import { EuiSwitch, EuiToolTip, } from '@elastic/eui'; +import { QueryObserverResult, RefetchOptions, RefetchQueryFilters } from '@tanstack/react-query'; import { css } from '@emotion/react'; import { DocLinksStart } from '@kbn/core-doc-links-browser'; import { isEmpty } from 'lodash'; +import { PromptResponse } from '@kbn/elastic-assistant-common'; import { AIConnector } from '../../connectorland/connector_selector'; import { Conversation } from '../../..'; import { AssistantTitle } from '../assistant_title'; @@ -40,6 +42,10 @@ interface OwnProps { conversations: Record; conversationsLoaded: boolean; refetchConversationsState: () => Promise; + allPrompts: PromptResponse[]; + refetchPrompts?: ( + options?: RefetchOptions & RefetchQueryFilters + ) => Promise>; } type Props = OwnProps; @@ -64,6 +70,8 @@ export const AssistantHeader: React.FC = ({ conversations, conversationsLoaded, refetchConversationsState, + allPrompts, + refetchPrompts, }) => { const showAnonymizedValuesChecked = useMemo( () => @@ -122,6 +130,7 @@ export const AssistantHeader: React.FC = ({ isDisabled={isDisabled} conversations={conversations} onConversationDeleted={onConversationDeleted} + allPrompts={allPrompts} /> <> @@ -156,6 +165,7 @@ export const AssistantHeader: React.FC = ({ conversationsLoaded={conversationsLoaded} refetchConversationsState={refetchConversationsState} isFlyoutMode={false} + refetchPrompts={refetchPrompts} /> diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/use_chat_send.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/use_chat_send.tsx index f42fe17242d86..9d5e822fcdf55 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/use_chat_send.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/chat_send/use_chat_send.tsx @@ -8,18 +8,18 @@ import React, { useCallback } from 'react'; import { HttpSetup } from '@kbn/core-http-browser'; import { i18n } from '@kbn/i18n'; -import { Replacements } from '@kbn/elastic-assistant-common'; +import { PromptResponse, Replacements } from '@kbn/elastic-assistant-common'; import type { ClientMessage } from '../../assistant_context/types'; import { SelectedPromptContext } from '../prompt_context/types'; import { useSendMessage } from '../use_send_message'; import { useConversation } from '../use_conversation'; import { getCombinedMessage } from '../prompt/helpers'; -import { Conversation, Prompt, useAssistantContext } from '../../..'; +import { Conversation, useAssistantContext } from '../../..'; import { getMessageFromRawResponse } from '../helpers'; import { getDefaultSystemPrompt } from '../use_conversation/helpers'; export interface UseChatSendProps { - allSystemPrompts: Prompt[]; + allSystemPrompts: PromptResponse[]; currentConversation?: Conversation; editingSystemPromptId: string | undefined; http: HttpSetup; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector/index.test.tsx index 6c2ae3b6af211..613163db196ae 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector/index.test.tsx @@ -50,6 +50,7 @@ const defaultProps = { defaultProvider: OpenAiProviderType.OpenAi, conversations: mockConversations, onConversationDeleted, + allPrompts: [], }; describe('Conversation selector', () => { beforeAll(() => { diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector/index.tsx index c55540b55b6c0..fd9cddc39dbbe 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_selector/index.tsx @@ -18,10 +18,13 @@ import { import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { css } from '@emotion/react'; +import { + PromptResponse, + PromptTypeEnum, +} from '@kbn/elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen'; import { getGenAiConfig } from '../../../connectorland/helpers'; import { AIConnector } from '../../../connectorland/connector_selector'; import { Conversation } from '../../../..'; -import { useAssistantContext } from '../../../assistant_context'; import * as i18n from './translations'; import { DEFAULT_CONVERSATION_TITLE } from '../../use_conversation/translations'; import { useConversation } from '../../use_conversation'; @@ -35,6 +38,7 @@ interface Props { shouldDisableKeyboardShortcut?: () => boolean; isDisabled?: boolean; conversations: Record; + allPrompts: PromptResponse[]; } const getPreviousConversationId = (conversationIds: string[], selectedConversationId: string) => { @@ -64,10 +68,13 @@ export const ConversationSelector: React.FC = React.memo( shouldDisableKeyboardShortcut = () => false, isDisabled = false, conversations, + allPrompts, }) => { - const { allSystemPrompts } = useAssistantContext(); - const { createConversation } = useConversation(); + const allSystemPrompts = useMemo( + () => allPrompts.filter((p) => p.promptType === PromptTypeEnum.system), + [allPrompts] + ); const conversationIds = useMemo(() => Object.keys(conversations), [conversations]); const conversationOptions = useMemo(() => { return Object.values(conversations).map((conversation) => ({ diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings/conversation_settings.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings/conversation_settings.tsx index adf2e012c0b8f..cba17030e1577 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings/conversation_settings.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings/conversation_settings.tsx @@ -18,7 +18,8 @@ import React, { useMemo } from 'react'; import { HttpSetup } from '@kbn/core-http-browser'; import { ActionTypeRegistryContract } from '@kbn/triggers-actions-ui-plugin/public'; -import { Conversation, Prompt } from '../../../..'; +import { PromptResponse } from '@kbn/elastic-assistant-common'; +import { Conversation } from '../../../..'; import * as i18n from './translations'; import { AIConnector } from '../../../connectorland/connector_selector'; @@ -33,7 +34,7 @@ import { getConversationApiConfig } from '../../use_conversation/helpers'; export interface ConversationSettingsProps { actionTypeRegistry: ActionTypeRegistryContract; - allSystemPrompts: Prompt[]; + allSystemPrompts: PromptResponse[]; connectors?: AIConnector[]; conversationSettings: Record; conversationsSettingsBulkActions: ConversationsBulkActions; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings/conversation_settings_editor.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings/conversation_settings_editor.tsx index a0ddd33b34d05..41da376d21b73 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings/conversation_settings_editor.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings/conversation_settings_editor.tsx @@ -12,7 +12,8 @@ import { HttpSetup } from '@kbn/core-http-browser'; import { FormattedMessage } from '@kbn/i18n-react'; import { OpenAiProviderType } from '@kbn/stack-connectors-plugin/public/common'; import { noop } from 'lodash/fp'; -import { Conversation, Prompt } from '../../../..'; +import { PromptResponse } from '@kbn/elastic-assistant-common'; +import { Conversation } from '../../../..'; import * as i18n from './translations'; import * as i18nModel from '../../../connectorland/models/model_selector/translations'; @@ -25,7 +26,7 @@ import { ConversationsBulkActions } from '../../api'; import { getDefaultSystemPrompt } from '../../use_conversation/helpers'; export interface ConversationSettingsEditorProps { - allSystemPrompts: Prompt[]; + allSystemPrompts: PromptResponse[]; conversationSettings: Record; conversationsSettingsBulkActions: ConversationsBulkActions; http: HttpSetup; @@ -268,7 +269,7 @@ export const ConversationSettingsEditor: React.FC ; conversationsSettingsBulkActions: ConversationsBulkActions; defaultConnector?: AIConnector; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings_management/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings_management/index.tsx index c4b2f834ecec5..485f89358f57a 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings_management/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings_management/index.tsx @@ -8,13 +8,13 @@ import { EuiPanel, EuiSpacer, EuiConfirmModal, EuiInMemoryTable } from '@elastic/eui'; import React, { useCallback, useMemo, useState } from 'react'; +import { PromptResponse } from '@kbn/elastic-assistant-common'; import { Conversation } from '../../../assistant_context/types'; import { ConversationTableItem, useConversationsTable } from './use_conversations_table'; import { ConversationStreamingSwitch } from '../conversation_settings/conversation_streaming_switch'; import { AIConnector } from '../../../connectorland/connector_selector'; import * as i18n from './translations'; -import { Prompt } from '../../types'; import { ConversationsBulkActions } from '../../api'; import { useAssistantContext } from '../../../assistant_context'; import { useConversationDeleted } from '../conversation_settings/use_conversation_deleted'; @@ -27,7 +27,7 @@ import { CONVERSATION_TABLE_SESSION_STORAGE_KEY } from '../../../assistant_conte import { useSessionPagination } from '../../common/components/assistant_settings_management/pagination/use_session_pagination'; import { DEFAULT_PAGE_SIZE } from '../../settings/const'; interface Props { - allSystemPrompts: Prompt[]; + allSystemPrompts: PromptResponse[]; assistantStreamingEnabled: boolean; connectors: AIConnector[] | undefined; conversationSettings: Record; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings_management/use_conversations_table.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings_management/use_conversations_table.tsx index fb705db6bb33c..446fb33ebb9e9 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings_management/use_conversations_table.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings_management/use_conversations_table.tsx @@ -11,10 +11,10 @@ import { ActionTypeRegistryContract } from '@kbn/triggers-actions-ui-plugin/publ import { EuiBadge, EuiBasicTableColumn, EuiLink } from '@elastic/eui'; import { FormattedDate } from '@kbn/i18n-react'; +import { PromptResponse } from '@kbn/elastic-assistant-common'; import { Conversation } from '../../../assistant_context/types'; import { AIConnector } from '../../../connectorland/connector_selector'; import { getConnectorTypeTitle } from '../../../connectorland/helpers'; -import { Prompt } from '../../../..'; import { getConversationApiConfig, getInitialDefaultSystemPrompt, @@ -25,7 +25,7 @@ import { RowActions } from '../../common/components/assistant_settings_managemen const emptyConversations = {}; export interface GetConversationsListParams { - allSystemPrompts: Prompt[]; + allSystemPrompts: PromptResponse[]; actionTypeRegistry: ActionTypeRegistryContract; connectors: AIConnector[] | undefined; conversations: Record; @@ -126,7 +126,7 @@ export const useConversationsTable = () => { ); const connectorTypeTitle = getConnectorTypeTitle(connector, actionTypeRegistry); - const systemPrompt: Prompt | undefined = allSystemPrompts.find( + const systemPrompt: PromptResponse | undefined = allSystemPrompts.find( ({ id }) => id === conversation.apiConfig?.defaultSystemPromptId ); const defaultSystemPrompt = getInitialDefaultSystemPrompt({ @@ -135,10 +135,10 @@ export const useConversationsTable = () => { }); const systemPromptTitle = - systemPrompt?.label || systemPrompt?.name || - defaultSystemPrompt?.label || - defaultSystemPrompt?.name; + systemPrompt?.id || + defaultSystemPrompt?.name || + defaultSystemPrompt?.id; return { ...conversation, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.tsx index 907e4d70accd5..6892fdcaf48bd 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.tsx @@ -39,6 +39,7 @@ import deepEqual from 'fast-deep-equal'; import { find, isEmpty, uniqBy } from 'lodash'; import { useMutation, useQueryClient } from '@tanstack/react-query'; +import { PromptTypeEnum } from '@kbn/elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen'; import { useChatSend } from './chat_send/use_chat_send'; import { ChatSend } from './chat_send'; import { BlockBotCallToAction } from './block_bot/cta'; @@ -91,6 +92,7 @@ import { getGenAiConfig } from '../connectorland/helpers'; import { AssistantAnimatedIcon } from './assistant_animated_icon'; import { useFetchAnonymizationFields } from './api/anonymization_fields/use_fetch_anonymization_fields'; import { InstallKnowledgeBaseButton } from '../knowledge_base/install_knowledge_base_button'; +import { useFetchPrompts } from './api/prompts/use_fetch_prompts'; export interface Props { conversationTitle?: string; @@ -135,7 +137,6 @@ const AssistantComponent: React.FC = ({ setLastConversationId, getLastConversationId, title, - allSystemPrompts, baseConversations, } = useAssistantContext(); @@ -182,6 +183,19 @@ const AssistantComponent: React.FC = ({ isFetched: isFetchedAnonymizationFields, } = useFetchAnonymizationFields(); + const { + data: { data: allPrompts }, + refetch: refetchPrompts, + isLoading: isLoadingPrompts, + } = useFetchPrompts(); + + const allSystemPrompts = useMemo(() => { + if (!isLoadingPrompts) { + return allPrompts.filter((p) => p.promptType === PromptTypeEnum.system); + } + return []; + }, [allPrompts, isLoadingPrompts]); + // Connector details const { data: connectors, isFetchedAfterMount: areConnectorsFetched } = useLoadConnectors({ http, @@ -397,7 +411,11 @@ const AssistantComponent: React.FC = ({ // End Scrolling const selectedSystemPrompt = useMemo( - () => getDefaultSystemPrompt({ allSystemPrompts, conversation: currentConversation }), + () => + getDefaultSystemPrompt({ + allSystemPrompts, + conversation: currentConversation, + }), [allSystemPrompts, currentConversation] ); @@ -409,20 +427,21 @@ const AssistantComponent: React.FC = ({ async ({ cId, cTitle }: { cId: string; cTitle: string }) => { const updatedConv = await refetchResults(); + let selectedConversation; if (cId === '') { setCurrentConversationId(cTitle); - setEditingSystemPromptId( - getDefaultSystemPrompt({ allSystemPrompts, conversation: updatedConv?.data?.[cTitle] }) - ?.id - ); + selectedConversation = updatedConv?.data?.[cTitle]; setCurrentConversationId(cTitle); } else { - const refetchedConversation = await refetchCurrentConversation({ cId }); - setEditingSystemPromptId( - getDefaultSystemPrompt({ allSystemPrompts, conversation: refetchedConversation })?.id - ); + selectedConversation = await refetchCurrentConversation({ cId }); setCurrentConversationId(cId); } + setEditingSystemPromptId( + getDefaultSystemPrompt({ + allSystemPrompts, + conversation: selectedConversation, + })?.id + ); }, [allSystemPrompts, refetchCurrentConversation, refetchResults] ); @@ -639,18 +658,18 @@ const AssistantComponent: React.FC = ({ setIsSettingsModalVisible={setIsSettingsModalVisible} setSelectedPromptContexts={setSelectedPromptContexts} isFlyoutMode={isFlyoutMode} + allSystemPrompts={allSystemPrompts} /> )} ), [ + getComments, abortStream, - refetchCurrentConversation, currentConversation, - editingSystemPromptId, - getComments, showAnonymizedValues, + refetchCurrentConversation, handleRegenerateResponse, isEnabledKnowledgeBase, isEnabledRAGAlerts, @@ -658,12 +677,14 @@ const AssistantComponent: React.FC = ({ currentUserAvatar, isFlyoutMode, selectedPromptContextsCount, + editingSystemPromptId, isNewConversation, isSettingsModalVisible, promptContexts, promptTextPreview, handleOnSystemPromptSelectionChange, selectedPromptContexts, + allSystemPrompts, ] ); @@ -859,6 +880,7 @@ const AssistantComponent: React.FC = ({ isSettingsModalVisible={isSettingsModalVisible} setIsSettingsModalVisible={setIsSettingsModalVisible} isFlyoutMode + allSystemPrompts={allSystemPrompts} /> @@ -882,6 +904,7 @@ const AssistantComponent: React.FC = ({ ); }, [ + allSystemPrompts, comments, connectorPrompt, currentConversation, @@ -948,6 +971,7 @@ const AssistantComponent: React.FC = ({ refetchConversationsState={refetchConversationsState} onConversationCreate={handleCreateConversation} isAssistantEnabled={isAssistantEnabled} + refetchPrompts={refetchPrompts} /> {/* Create portals for each EuiCodeBlock to add the `Investigate in Timeline` action */} @@ -1080,6 +1104,7 @@ const AssistantComponent: React.FC = ({ setIsSettingsModalVisible={setIsSettingsModalVisible} trackPrompt={trackPrompt} isFlyoutMode={isFlyoutMode} + allPrompts={allPrompts} /> )} @@ -1116,6 +1141,8 @@ const AssistantComponent: React.FC = ({ conversationsLoaded={conversationsLoaded} onConversationDeleted={handleOnConversationDeleted} refetchConversationsState={refetchConversationsState} + allPrompts={allPrompts} + refetchPrompts={refetchPrompts} /> )} @@ -1194,6 +1221,7 @@ const AssistantComponent: React.FC = ({ setIsSettingsModalVisible={setIsSettingsModalVisible} trackPrompt={trackPrompt} isFlyoutMode={isFlyoutMode} + allPrompts={allPrompts} /> )} diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt/helpers.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt/helpers.ts index bd00058b4bbd3..4868eff04b4e7 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt/helpers.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt/helpers.ts @@ -5,11 +5,10 @@ * 2.0. */ -import { Replacements, transformRawData } from '@kbn/elastic-assistant-common'; +import { Replacements, transformRawData, PromptResponse } from '@kbn/elastic-assistant-common'; import type { ClientMessage } from '../../assistant_context/types'; import { getAnonymizedValue as defaultGetAnonymizedValue } from '../get_anonymized_value'; import type { SelectedPromptContext } from '../prompt_context/types'; -import type { Prompt } from '../types'; import { SYSTEM_PROMPT_CONTEXT_NON_I18N } from '../../content/prompts/system/translations'; export const getSystemMessages = ({ @@ -17,7 +16,7 @@ export const getSystemMessages = ({ selectedSystemPrompt, }: { isNewChat: boolean; - selectedSystemPrompt: Prompt | undefined; + selectedSystemPrompt: PromptResponse | undefined; }): ClientMessage[] => { if (!isNewChat || selectedSystemPrompt == null) { return []; @@ -53,7 +52,7 @@ export function getCombinedMessage({ isNewChat: boolean; promptText: string; selectedPromptContexts: Record; - selectedSystemPrompt: Prompt | undefined; + selectedSystemPrompt: PromptResponse | undefined; }): ClientMessageWithReplacements { let replacements: Replacements = currentReplacements ?? {}; const onNewReplacements = (newReplacements: Replacements) => { diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/helpers.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/helpers.test.tsx index c055d9bd6bb95..2171b13273a28 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/helpers.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/helpers.test.tsx @@ -7,11 +7,11 @@ import { getPromptById } from './helpers'; import { mockSystemPrompt, mockSuperheroSystemPrompt } from '../../mock/system_prompt'; -import type { Prompt } from '../types'; +import { PromptResponse } from '@kbn/elastic-assistant-common'; describe('helpers', () => { describe('getPromptById', () => { - const prompts: Prompt[] = [mockSystemPrompt, mockSuperheroSystemPrompt]; + const prompts: PromptResponse[] = [mockSystemPrompt, mockSuperheroSystemPrompt]; it('returns the correct prompt by id', () => { const result = getPromptById({ prompts, id: mockSuperheroSystemPrompt.id }); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/helpers.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/helpers.tsx index 7b3e91147635f..f11d2e0af641a 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/helpers.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/helpers.tsx @@ -5,12 +5,12 @@ * 2.0. */ -import type { Prompt } from '../types'; +import { PromptResponse } from '@kbn/elastic-assistant-common'; export const getPromptById = ({ prompts, id, }: { - prompts: Prompt[]; + prompts: PromptResponse[]; id: string; -}): Prompt | undefined => prompts.find((p) => p.id === id); +}): PromptResponse | undefined => prompts.find((p) => p.id === id); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/index.test.tsx index 6a18b9794c597..6d421b649a380 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/index.test.tsx @@ -40,6 +40,7 @@ const defaultProps: Props = { setIsSettingsModalVisible: jest.fn(), setSelectedPromptContexts: jest.fn(), isFlyoutMode: false, + allSystemPrompts: [], }; describe('PromptEditorComponent', () => { diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/index.tsx index b2f5c1a3a2e33..1528435764acd 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/index.tsx @@ -10,6 +10,7 @@ import React, { useMemo } from 'react'; // eslint-disable-next-line @kbn/eslint/module_migration import styled from 'styled-components'; +import { PromptResponse } from '@kbn/elastic-assistant-common'; import { Conversation } from '../../..'; import type { PromptContext, SelectedPromptContext } from '../prompt_context/types'; import { SystemPrompt } from './system_prompt'; @@ -31,6 +32,7 @@ export interface Props { React.SetStateAction> >; isFlyoutMode: boolean; + allSystemPrompts: PromptResponse[]; } const PreviewText = styled(EuiText)` @@ -49,12 +51,14 @@ const PromptEditorComponent: React.FC = ({ setIsSettingsModalVisible, setSelectedPromptContexts, isFlyoutMode, + allSystemPrompts, }) => { const commentBody = useMemo( () => ( <> {isNewConversation && ( = ({ ), [ + isNewConversation, + allSystemPrompts, conversation, editingSystemPromptId, - isNewConversation, - isSettingsModalVisible, onSystemPromptSelectionChange, + isSettingsModalVisible, + setIsSettingsModalVisible, + isFlyoutMode, promptContexts, - promptTextPreview, selectedPromptContexts, - setIsSettingsModalVisible, setSelectedPromptContexts, - isFlyoutMode, + promptTextPreview, ] ); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/helpers.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/helpers.test.tsx index 4a26b22b0b2d3..82b04c60a569c 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/helpers.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/helpers.test.tsx @@ -16,13 +16,13 @@ import { getOptions, getOptionFromPrompt } from './helpers'; describe('helpers', () => { describe('getOptionFromPrompt', () => { it('returns an EuiSuperSelectOption with the correct value', () => { - const option = getOptionFromPrompt(mockSystemPrompt); + const option = getOptionFromPrompt({ ...mockSystemPrompt, isFlyoutMode: true }); expect(option.value).toBe(mockSystemPrompt.id); }); it('returns an EuiSuperSelectOption with the correct inputDisplay', () => { - const option = getOptionFromPrompt(mockSystemPrompt); + const option = getOptionFromPrompt({ ...mockSystemPrompt, isFlyoutMode: false }); render(<>{option.inputDisplay}); @@ -30,7 +30,7 @@ describe('helpers', () => { }); it('shows the expected name in the dropdownDisplay', () => { - const option = getOptionFromPrompt(mockSystemPrompt); + const option = getOptionFromPrompt({ ...mockSystemPrompt, isFlyoutMode: true }); render({option.dropdownDisplay}); @@ -38,7 +38,7 @@ describe('helpers', () => { }); it('shows the expected prompt content in the dropdownDisplay', () => { - const option = getOptionFromPrompt(mockSystemPrompt); + const option = getOptionFromPrompt({ ...mockSystemPrompt, isFlyoutMode: true }); render({option.dropdownDisplay}); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/helpers.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/helpers.tsx index a52ed303d4a63..bd217bb54e9f6 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/helpers.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/helpers.tsx @@ -13,7 +13,7 @@ import styled from 'styled-components'; import { css } from '@emotion/react'; import { isEmpty } from 'lodash/fp'; -import type { Prompt } from '../../types'; +import { PromptResponse } from '@kbn/elastic-assistant-common'; import { EMPTY_PROMPT } from './translations'; const Strong = styled.strong` @@ -26,7 +26,10 @@ export const getOptionFromPrompt = ({ name, showTitles = false, isFlyoutMode, -}: Prompt & { showTitles?: boolean }): EuiSuperSelectOption => ({ +}: PromptResponse & { + showTitles?: boolean; + isFlyoutMode: boolean; +}): EuiSuperSelectOption => ({ value: id, inputDisplay: isFlyoutMode ? ( name @@ -60,13 +63,13 @@ export const getOptionFromPrompt = ({ }); interface GetOptionsProps { - prompts: Prompt[] | undefined; + prompts: PromptResponse[] | undefined; showTitles?: boolean; isFlyoutMode: boolean; } export const getOptions = ({ prompts, showTitles = false, - isFlyoutMode = false, + isFlyoutMode, }: GetOptionsProps): Array> => prompts?.map((p) => getOptionFromPrompt({ ...p, showTitles, isFlyoutMode })) ?? []; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/index.test.tsx index e0fed34795dfc..34d40852ba505 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/index.test.tsx @@ -13,11 +13,11 @@ import { mockSystemPrompt } from '../../../mock/system_prompt'; import { SystemPrompt } from '.'; import { Conversation } from '../../../..'; import { DEFAULT_CONVERSATION_TITLE } from '../../use_conversation/translations'; -import { Prompt } from '../../types'; import { TestProviders } from '../../../mock/test_providers/test_providers'; import { TEST_IDS } from '../../constants'; import { useAssistantContext } from '../../../assistant_context'; import { WELCOME_CONVERSATION } from '../../use_conversation/sample_conversations'; +import { PromptResponse } from '@kbn/elastic-assistant-common'; const BASE_CONVERSATION: Conversation = { ...WELCOME_CONVERSATION, @@ -32,7 +32,7 @@ const mockConversations = { [DEFAULT_CONVERSATION_TITLE]: BASE_CONVERSATION, }; -const mockSystemPrompts: Prompt[] = [mockSystemPrompt]; +const mockSystemPrompts: PromptResponse[] = [mockSystemPrompt]; const mockUseAssistantContext = { conversations: mockConversations, @@ -91,6 +91,7 @@ describe('SystemPrompt', () => { onSystemPromptSelectionChange={onSystemPromptSelectionChange} setIsSettingsModalVisible={setIsSettingsModalVisible} isFlyoutMode={false} + allSystemPrompts={mockSystemPrompts} /> ); }); @@ -117,11 +118,12 @@ describe('SystemPrompt', () => { render( ); }); @@ -157,6 +159,7 @@ describe('SystemPrompt', () => { onSystemPromptSelectionChange={onSystemPromptSelectionChange} setIsSettingsModalVisible={setIsSettingsModalVisible} isFlyoutMode={false} + allSystemPrompts={mockSystemPrompts} /> ); @@ -204,6 +207,7 @@ describe('SystemPrompt', () => { onSystemPromptSelectionChange={onSystemPromptSelectionChange} setIsSettingsModalVisible={setIsSettingsModalVisible} isFlyoutMode={false} + allSystemPrompts={mockSystemPrompts} /> ); @@ -265,6 +269,7 @@ describe('SystemPrompt', () => { onSystemPromptSelectionChange={onSystemPromptSelectionChange} setIsSettingsModalVisible={setIsSettingsModalVisible} isFlyoutMode={false} + allSystemPrompts={mockSystemPrompts} /> ); @@ -333,6 +338,7 @@ describe('SystemPrompt', () => { onSystemPromptSelectionChange={onSystemPromptSelectionChange} setIsSettingsModalVisible={setIsSettingsModalVisible} isFlyoutMode={false} + allSystemPrompts={mockSystemPrompts} /> ); @@ -416,6 +422,7 @@ describe('SystemPrompt', () => { onSystemPromptSelectionChange={onSystemPromptSelectionChange} setIsSettingsModalVisible={setIsSettingsModalVisible} isFlyoutMode={false} + allSystemPrompts={mockSystemPrompts} /> ); @@ -481,11 +488,12 @@ describe('SystemPrompt', () => { ); @@ -500,11 +508,12 @@ describe('SystemPrompt', () => { ); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/index.tsx index d6a507b6deeed..f2808c3e204f1 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/index.tsx @@ -10,7 +10,7 @@ import React, { useCallback, useMemo } from 'react'; import { css } from '@emotion/react'; import { isEmpty } from 'lodash/fp'; -import { useAssistantContext } from '../../../assistant_context'; +import { PromptResponse } from '@kbn/elastic-assistant-common'; import { Conversation } from '../../../..'; import * as i18n from './translations'; import { SelectSystemPrompt } from './select_system_prompt'; @@ -22,6 +22,7 @@ interface Props { onSystemPromptSelectionChange: (systemPromptId: string | undefined) => void; setIsSettingsModalVisible: React.Dispatch>; isFlyoutMode: boolean; + allSystemPrompts: PromptResponse[]; } const SystemPromptComponent: React.FC = ({ @@ -31,17 +32,13 @@ const SystemPromptComponent: React.FC = ({ onSystemPromptSelectionChange, setIsSettingsModalVisible, isFlyoutMode, + allSystemPrompts, }) => { - const { allSystemPrompts } = useAssistantContext(); - const selectedPrompt = useMemo(() => { if (editingSystemPromptId !== undefined) { - return ( - allSystemPrompts?.find((p) => p.id === editingSystemPromptId) ?? - allSystemPrompts?.find((p) => p.id === conversation?.apiConfig?.defaultSystemPromptId) - ); + return allSystemPrompts.find((p) => p.id === editingSystemPromptId); } else { - return undefined; + return allSystemPrompts.find((p) => p.id === conversation?.apiConfig?.defaultSystemPromptId); } }, [allSystemPrompts, conversation?.apiConfig?.defaultSystemPromptId, editingSystemPromptId]); @@ -58,7 +55,7 @@ const SystemPromptComponent: React.FC = ({ if (isFlyoutMode) { return ( = ({
{selectedPrompt == null || isEditing ? ( ); const props: Props = { - allSystemPrompts: [ + allPrompts: [ { id: 'default-system-prompt', content: 'default', @@ -31,6 +54,8 @@ const props: Props = { }; const mockUseAssistantContext = { + http, + assistantAvailability: { isAssistantEnabled: true }, allSystemPrompts: [ { id: 'default-system-prompt', diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/select_system_prompt/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/select_system_prompt/index.tsx index 2cbbdf68b307c..0296fa3e636ca 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/select_system_prompt/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/select_system_prompt/index.tsx @@ -18,10 +18,13 @@ import { import React, { useCallback, useMemo, useState } from 'react'; import { euiThemeVars } from '@kbn/ui-theme'; +import { + PromptResponse, + PromptTypeEnum, +} from '@kbn/elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen'; import { Conversation } from '../../../../..'; import { getOptions } from '../helpers'; import * as i18n from '../translations'; -import type { Prompt } from '../../../types'; import { useAssistantContext } from '../../../../assistant_context'; import { useConversation } from '../../../use_conversation'; import { TEST_IDS } from '../../../constants'; @@ -29,10 +32,10 @@ import { PROMPT_CONTEXT_SELECTOR_PREFIX } from '../../../quick_prompts/prompt_co import { SYSTEM_PROMPTS_TAB } from '../../../settings/const'; export interface Props { - allSystemPrompts: Prompt[]; + allPrompts: PromptResponse[]; compressed?: boolean; conversation?: Conversation; - selectedPrompt: Prompt | undefined; + selectedPrompt: PromptResponse | undefined; clearSelectedSystemPrompt?: () => void; isClearable?: boolean; isEditing?: boolean; @@ -49,7 +52,7 @@ export interface Props { const ADD_NEW_SYSTEM_PROMPT = 'ADD_NEW_SYSTEM_PROMPT'; const SelectSystemPromptComponent: React.FC = ({ - allSystemPrompts, + allPrompts, compressed = false, conversation, selectedPrompt, @@ -68,21 +71,24 @@ const SelectSystemPromptComponent: React.FC = ({ const { setSelectedSettingsTab } = useAssistantContext(); const { setApiConfig } = useConversation(); - const [isOpenLocal, setIsOpenLocal] = useState(isOpen); - const [valueOfSelected, setValueOfSelected] = useState( - selectedPrompt?.id ?? allSystemPrompts?.[0]?.id + const allSystemPrompts = useMemo( + () => allPrompts.filter((p) => p.promptType === PromptTypeEnum.system), + [allPrompts] ); + + const [isOpenLocal, setIsOpenLocal] = useState(isOpen); const handleOnBlur = useCallback(() => setIsOpenLocal(false), []); + const valueOfSelected = useMemo(() => selectedPrompt?.id, [selectedPrompt?.id]); // Write the selected system prompt to the conversation config const setSelectedSystemPrompt = useCallback( - (prompt: Prompt | undefined) => { + (promptId?: string) => { if (conversation && conversation.apiConfig) { setApiConfig({ conversation, apiConfig: { ...conversation.apiConfig, - defaultSystemPromptId: prompt?.id, + defaultSystemPromptId: promptId, }, }); } @@ -126,14 +132,11 @@ const SelectSystemPromptComponent: React.FC = ({ // Note: if callback is provided, this component does not persist. Extract to separate component if (onSystemPromptSelectionChange != null) { onSystemPromptSelectionChange(selectedSystemPromptId); - } else { - setSelectedSystemPrompt(allSystemPrompts.find((sp) => sp.id === selectedSystemPromptId)); } - setValueOfSelected(selectedSystemPromptId); + setSelectedSystemPrompt(selectedSystemPromptId); setIsEditing?.(false); }, [ - allSystemPrompts, onSystemPromptSelectionChange, setIsEditing, setIsSettingsModalVisible, @@ -146,7 +149,6 @@ const SelectSystemPromptComponent: React.FC = ({ setSelectedSystemPrompt(undefined); setIsEditing?.(false); clearSelectedSystemPrompt?.(); - setValueOfSelected(undefined); }, [clearSelectedSystemPrompt, setIsEditing, setSelectedSystemPrompt]); const onShowSelectSystemPrompt = useCallback(() => { diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/system_prompt_editor.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/system_prompt_editor.tsx index 3fd7dfeb00e73..fecb2ed401a4b 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/system_prompt_editor.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/system_prompt_editor.tsx @@ -18,9 +18,13 @@ import { import { keyBy } from 'lodash/fp'; import { css } from '@emotion/react'; +import { + PromptResponse, + PerformBulkActionRequestBody as PromptsPerformBulkActionRequestBody, +} from '@kbn/elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen'; import { ApiConfig } from '@kbn/elastic-assistant-common'; import { AIConnector } from '../../../../connectorland/connector_selector'; -import { Conversation, Prompt } from '../../../../..'; +import { Conversation } from '../../../../..'; import * as i18n from './translations'; import { ConversationMultiSelector } from './conversation_multi_selector/conversation_multi_selector'; import { SystemPromptSelector } from './system_prompt_selector/system_prompt_selector'; @@ -34,16 +38,18 @@ interface Props { connectors: AIConnector[] | undefined; conversationSettings: Record; conversationsSettingsBulkActions: ConversationsBulkActions; - onSelectedSystemPromptChange: (systemPrompt?: Prompt) => void; - selectedSystemPrompt: Prompt | undefined; - setUpdatedSystemPromptSettings: React.Dispatch>; + onSelectedSystemPromptChange: (systemPrompt?: PromptResponse) => void; + selectedSystemPrompt: PromptResponse | undefined; + setUpdatedSystemPromptSettings: React.Dispatch>; setConversationSettings: React.Dispatch>>; - systemPromptSettings: Prompt[]; + systemPromptSettings: PromptResponse[]; setConversationsSettingsBulkActions: React.Dispatch< React.SetStateAction >; defaultConnector?: AIConnector; resetSettings?: () => void; + promptsBulkActions: PromptsPerformBulkActionRequestBody; + setPromptsBulkActions: React.Dispatch>; } /** @@ -61,6 +67,8 @@ export const SystemPromptEditorComponent: React.FC = ({ setConversationsSettingsBulkActions, defaultConnector, resetSettings, + promptsBulkActions, + setPromptsBulkActions, }) => { // Prompt const promptContent = useMemo( @@ -72,11 +80,11 @@ export const SystemPromptEditorComponent: React.FC = ({ const handlePromptContentChange = useCallback( (e: React.ChangeEvent) => { if (selectedSystemPrompt != null) { - setUpdatedSystemPromptSettings((prev): Prompt[] => { + setUpdatedSystemPromptSettings((prev): PromptResponse[] => { const alreadyExists = prev.some((sp) => sp.id === selectedSystemPrompt.id); if (alreadyExists) { - return prev.map((sp): Prompt => { + return prev.map((sp): PromptResponse => { if (sp.id === selectedSystemPrompt.id) { return { ...sp, @@ -89,9 +97,44 @@ export const SystemPromptEditorComponent: React.FC = ({ return prev; }); + const existingPrompt = systemPromptSettings.find((sp) => sp.id === selectedSystemPrompt.id); + if (existingPrompt) { + setPromptsBulkActions({ + ...promptsBulkActions, + ...(selectedSystemPrompt.name !== selectedSystemPrompt.id + ? { + update: [ + ...(promptsBulkActions.update ?? []).filter( + (p) => p.id !== selectedSystemPrompt.id + ), + { + ...selectedSystemPrompt, + content: e.target.value, + }, + ], + } + : { + create: [ + ...(promptsBulkActions.create ?? []).filter( + (p) => p.name !== selectedSystemPrompt.name + ), + { + ...selectedSystemPrompt, + content: e.target.value, + }, + ], + }), + }); + } } }, - [selectedSystemPrompt, setUpdatedSystemPromptSettings] + [ + promptsBulkActions, + selectedSystemPrompt, + setPromptsBulkActions, + setUpdatedSystemPromptSettings, + systemPromptSettings, + ] ); const conversationsWithApiConfig = Object.entries(conversationSettings).reduce< @@ -258,14 +301,47 @@ export const SystemPromptEditorComponent: React.FC = ({ }; }); }); + setPromptsBulkActions({ + ...promptsBulkActions, + ...(selectedSystemPrompt.name !== selectedSystemPrompt.id + ? { + update: [ + ...(promptsBulkActions.update ?? []).filter( + (p) => p.id !== selectedSystemPrompt.id + ), + { + ...selectedSystemPrompt, + isNewConversationDefault: isChecked, + }, + ], + } + : { + create: [ + ...(promptsBulkActions.create ?? []).filter( + (p) => p.name !== selectedSystemPrompt.name + ), + { + ...selectedSystemPrompt, + isNewConversationDefault: isChecked, + }, + ], + }), + }); } }, - [selectedSystemPrompt, setUpdatedSystemPromptSettings] + [ + promptsBulkActions, + selectedSystemPrompt, + setPromptsBulkActions, + setUpdatedSystemPromptSettings, + ] ); const { onSystemPromptSelectionChange, onSystemPromptDeleted } = useSystemPromptEditor({ setUpdatedSystemPromptSettings, onSelectedSystemPromptChange, + promptsBulkActions, + setPromptsBulkActions, }); return ( diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/system_prompt_selector/system_prompt_selector.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/system_prompt_selector/system_prompt_selector.test.tsx index 45f320528ec64..cbf5efe79213f 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/system_prompt_selector/system_prompt_selector.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/system_prompt_selector/system_prompt_selector.test.tsx @@ -35,7 +35,7 @@ describe('SystemPromptSelector', () => { fireEvent.click(getByTestId('comboBoxToggleListButton')); // there is only one delete system prompt because there is only one custom option fireEvent.click(getAllByTestId('delete-prompt')[1]); - expect(onSystemPromptDeleted).toHaveBeenCalledWith(mockSystemPrompts[1].name); + expect(onSystemPromptDeleted).toHaveBeenCalledWith(mockSystemPrompts[1].id); expect(onSystemPromptSelectionChange).not.toHaveBeenCalled(); }); it('Deletes a system prompt that is selected', () => { @@ -43,7 +43,7 @@ describe('SystemPromptSelector', () => { fireEvent.click(getByTestId('comboBoxToggleListButton')); // there is only one delete system prompt because there is only one custom option fireEvent.click(getAllByTestId('delete-prompt')[0]); - expect(onSystemPromptDeleted).toHaveBeenCalledWith(mockSystemPrompts[0].name); + expect(onSystemPromptDeleted).toHaveBeenCalledWith(mockSystemPrompts[0].id); expect(onSystemPromptSelectionChange).toHaveBeenCalledWith(undefined); }); it('Selects existing system prompt from the search input', () => { diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/system_prompt_selector/system_prompt_selector.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/system_prompt_selector/system_prompt_selector.tsx index 53b6414d05b53..2c4826940a7ca 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/system_prompt_selector/system_prompt_selector.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/system_prompt_selector/system_prompt_selector.tsx @@ -18,8 +18,8 @@ import { } from '@elastic/eui'; import { css } from '@emotion/react'; +import { PromptResponse } from '@kbn/elastic-assistant-common'; import { TEST_IDS } from '../../../../constants'; -import { Prompt } from '../../../../../..'; import * as i18n from './translations'; import { SYSTEM_PROMPT_DEFAULT_NEW_CONVERSATION } from '../translations'; @@ -28,10 +28,10 @@ export const SYSTEM_PROMPT_SELECTOR_CLASSNAME = 'systemPromptSelector'; interface Props { autoFocus?: boolean; onSystemPromptDeleted: (systemPromptTitle: string) => void; - onSystemPromptSelectionChange: (systemPrompt?: Prompt | string) => void; + onSystemPromptSelectionChange: (systemPrompt?: PromptResponse | string) => void; + systemPrompts: PromptResponse[]; + selectedSystemPrompt?: PromptResponse; resetSettings?: () => void; - selectedSystemPrompt?: Prompt; - systemPrompts: Prompt[]; } export type SystemPromptSelectorOption = EuiComboBoxOptionOption<{ @@ -59,6 +59,7 @@ export const SystemPromptSelector: React.FC = React.memo( isNewConversationDefault: sp.isNewConversationDefault ?? false, }, label: sp.name, + id: sp.id, 'data-test-subj': `${TEST_IDS.SYSTEM_PROMPT_SELECTOR}-${sp.id}`, })) ); @@ -70,6 +71,7 @@ export const SystemPromptSelector: React.FC = React.memo( isDefault: selectedSystemPrompt.isDefault ?? false, isNewConversationDefault: selectedSystemPrompt.isNewConversationDefault ?? false, }, + id: selectedSystemPrompt.id, label: selectedSystemPrompt.name, }, ] @@ -106,6 +108,7 @@ export const SystemPromptSelector: React.FC = React.memo( const newOption = { value: searchValue, + id: searchValue, label: searchValue, }; @@ -132,11 +135,12 @@ export const SystemPromptSelector: React.FC = React.memo( // Callback for when user deletes a quick prompt const onDelete = useCallback( (label: string) => { + const deleteId = options.find((o) => o.label === label)?.id; setOptions(options.filter((o) => o.label !== label)); if (selectedOptions?.[0]?.label === label) { handleSelectionChange([]); } - onSystemPromptDeleted(label); + onSystemPromptDeleted(deleteId ?? label); }, [handleSelectionChange, onSystemPromptDeleted, options, selectedOptions] ); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/system_prompt_settings.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/system_prompt_settings.test.tsx index be9e33f615e4b..5116da2a56207 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/system_prompt_settings.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/system_prompt_settings.test.tsx @@ -36,6 +36,8 @@ const testProps = { systemPromptSettings: mockSystemPrompts, conversationsSettingsBulkActions: {}, setConversationsSettingsBulkActions: jest.fn(), + promptsBulkActions: {}, + setPromptsBulkActions: jest.fn(), }; jest.mock('./system_prompt_selector/system_prompt_selector', () => ({ @@ -96,6 +98,7 @@ describe('SystemPromptSettings', () => { ); fireEvent.click(getByTestId('change-sp-custom')); const customOption = { + consumer: 'test', content: '', id: 'sooper custom prompt', name: 'sooper custom prompt', diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/system_prompt_settings.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/system_prompt_settings.tsx index b7f66acba85c7..7b8e451449884 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/system_prompt_settings.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/system_prompt_settings.tsx @@ -26,7 +26,9 @@ export const SystemPromptSettings: React.FC = React.m systemPromptSettings, conversationsSettingsBulkActions, setConversationsSettingsBulkActions, + promptsBulkActions, defaultConnector, + setPromptsBulkActions, }) => { return ( <> @@ -48,6 +50,8 @@ export const SystemPromptSettings: React.FC = React.m conversationsSettingsBulkActions={conversationsSettingsBulkActions} setConversationsSettingsBulkActions={setConversationsSettingsBulkActions} defaultConnector={defaultConnector} + setPromptsBulkActions={setPromptsBulkActions} + promptsBulkActions={promptsBulkActions} /> ); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/types.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/types.ts index 63025566c9400..e92961cb1763f 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/types.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/types.ts @@ -4,21 +4,27 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ +import { + PromptResponse, + PerformBulkActionRequestBody as PromptsPerformBulkActionRequestBody, +} from '@kbn/elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen'; import { AIConnector } from '../../../../connectorland/connector_selector'; -import { Conversation, Prompt } from '../../../../..'; +import { Conversation } from '../../../../..'; import { ConversationsBulkActions } from '../../../api'; export interface SystemPromptSettingsProps { connectors: AIConnector[] | undefined; conversationSettings: Record; conversationsSettingsBulkActions: ConversationsBulkActions; - onSelectedSystemPromptChange: (systemPrompt?: Prompt) => void; - selectedSystemPrompt: Prompt | undefined; - setUpdatedSystemPromptSettings: React.Dispatch>; + onSelectedSystemPromptChange: (systemPrompt?: PromptResponse) => void; + selectedSystemPrompt: PromptResponse | undefined; + setUpdatedSystemPromptSettings: React.Dispatch>; setConversationSettings: React.Dispatch>>; - systemPromptSettings: Prompt[]; + systemPromptSettings: PromptResponse[]; setConversationsSettingsBulkActions: React.Dispatch< React.SetStateAction >; defaultConnector?: AIConnector; + promptsBulkActions: PromptsPerformBulkActionRequestBody; + setPromptsBulkActions: React.Dispatch>; } diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/use_system_prompt_editor.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/use_system_prompt_editor.test.tsx index 85efe99979650..009ee6c5a83cd 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/use_system_prompt_editor.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/use_system_prompt_editor.test.tsx @@ -6,21 +6,27 @@ */ import { renderHook, act } from '@testing-library/react-hooks'; import { useSystemPromptEditor } from './use_system_prompt_editor'; -import { Prompt } from '../../../types'; import { mockSystemPrompt, mockSuperheroSystemPrompt, mockSystemPrompts, } from '../../../../mock/system_prompt'; +import { PromptResponse } from '@kbn/elastic-assistant-common'; +import { useAssistantContext } from '../../../../assistant_context'; +jest.mock('../../../../assistant_context'); // Mock functions for the tests const mockOnSelectedSystemPromptChange = jest.fn(); const mockSetUpdatedSystemPromptSettings = jest.fn(); +const mockSetPromptsBulkActions = jest.fn(); const mockPreviousSystemPrompts = [...mockSystemPrompts]; describe('useSystemPromptEditor', () => { beforeEach(() => { jest.clearAllMocks(); + (useAssistantContext as jest.Mock).mockReturnValue({ + currentAppId: 'securitySolutionUI', + }); }); test('should delete a system prompt by id', () => { @@ -28,6 +34,8 @@ describe('useSystemPromptEditor', () => { useSystemPromptEditor({ onSelectedSystemPromptChange: mockOnSelectedSystemPromptChange, setUpdatedSystemPromptSettings: mockSetUpdatedSystemPromptSettings, + setPromptsBulkActions: mockSetPromptsBulkActions, + promptsBulkActions: {}, }) ); @@ -41,11 +49,13 @@ describe('useSystemPromptEditor', () => { }); test('should handle selection of an existing system prompt', () => { - const existingPrompt: Prompt = mockSystemPrompt; + const existingPrompt: PromptResponse = mockSystemPrompt; const { result } = renderHook(() => useSystemPromptEditor({ onSelectedSystemPromptChange: mockOnSelectedSystemPromptChange, setUpdatedSystemPromptSettings: mockSetUpdatedSystemPromptSettings, + setPromptsBulkActions: mockSetPromptsBulkActions, + promptsBulkActions: {}, }) ); @@ -65,6 +75,8 @@ describe('useSystemPromptEditor', () => { useSystemPromptEditor({ onSelectedSystemPromptChange: mockOnSelectedSystemPromptChange, setUpdatedSystemPromptSettings: mockSetUpdatedSystemPromptSettings, + setPromptsBulkActions: mockSetPromptsBulkActions, + promptsBulkActions: {}, }) ); @@ -72,11 +84,12 @@ describe('useSystemPromptEditor', () => { result.current.onSystemPromptSelectionChange(newPromptId); }); - const newPrompt: Prompt = { + const newPrompt: PromptResponse = { id: newPromptId, content: '', name: newPromptId, promptType: 'system', + consumer: 'securitySolutionUI', }; expect(mockOnSelectedSystemPromptChange).toHaveBeenCalledWith(newPrompt); @@ -90,10 +103,12 @@ describe('useSystemPromptEditor', () => { useSystemPromptEditor({ onSelectedSystemPromptChange: mockOnSelectedSystemPromptChange, setUpdatedSystemPromptSettings: mockSetUpdatedSystemPromptSettings, + setPromptsBulkActions: mockSetPromptsBulkActions, + promptsBulkActions: {}, }) ); - const expectedPrompt: Prompt = mockSuperheroSystemPrompt; + const expectedPrompt: PromptResponse = mockSuperheroSystemPrompt; act(() => { result.current.onSystemPromptSelectionChange(expectedPrompt); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/use_system_prompt_editor.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/use_system_prompt_editor.tsx index 87e284d6dcf25..ec77de113b5d9 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/use_system_prompt_editor.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_modal/use_system_prompt_editor.tsx @@ -5,28 +5,38 @@ * 2.0. */ +import { + PromptResponse, + PerformBulkActionRequestBody as PromptsPerformBulkActionRequestBody, +} from '@kbn/elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen'; import { useCallback } from 'react'; -import { Prompt } from '../../../types'; +import { useAssistantContext } from '../../../../..'; interface Props { - setUpdatedSystemPromptSettings: React.Dispatch>; - onSelectedSystemPromptChange: (systemPrompt?: Prompt) => void; + setUpdatedSystemPromptSettings: React.Dispatch>; + onSelectedSystemPromptChange: (systemPrompt?: PromptResponse) => void; + promptsBulkActions: PromptsPerformBulkActionRequestBody; + setPromptsBulkActions: React.Dispatch>; } export const useSystemPromptEditor = ({ setUpdatedSystemPromptSettings, onSelectedSystemPromptChange, + promptsBulkActions, + setPromptsBulkActions, }: Props) => { + const { currentAppId } = useAssistantContext(); // When top level system prompt selection changes const onSystemPromptSelectionChange = useCallback( - (systemPrompt?: Prompt | string) => { + (systemPrompt?: PromptResponse | string) => { const isNew = typeof systemPrompt === 'string'; - const newSelectedSystemPrompt: Prompt | undefined = isNew + const newSelectedSystemPrompt: PromptResponse | undefined = isNew ? { id: systemPrompt ?? '', content: '', name: systemPrompt ?? '', promptType: 'system', + consumer: currentAppId, } : systemPrompt; @@ -40,18 +50,42 @@ export const useSystemPromptEditor = ({ return prev; }); + + if (isNew) { + setPromptsBulkActions({ + ...promptsBulkActions, + create: [ + ...(promptsBulkActions.create ?? []), + { + ...newSelectedSystemPrompt, + }, + ], + }); + } } onSelectedSystemPromptChange(newSelectedSystemPrompt); }, - [onSelectedSystemPromptChange, setUpdatedSystemPromptSettings] + [ + currentAppId, + onSelectedSystemPromptChange, + promptsBulkActions, + setPromptsBulkActions, + setUpdatedSystemPromptSettings, + ] ); const onSystemPromptDeleted = useCallback( (id: string) => { setUpdatedSystemPromptSettings((prev) => prev.filter((sp) => sp.id !== id)); + setPromptsBulkActions({ + ...promptsBulkActions, + delete: { + ids: [...(promptsBulkActions.delete?.ids ?? []), id], + }, + }); }, - [setUpdatedSystemPromptSettings] + [promptsBulkActions, setPromptsBulkActions, setUpdatedSystemPromptSettings] ); return { onSystemPromptSelectionChange, onSystemPromptDeleted }; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_settings_management/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_settings_management/index.tsx index e0f27f3fa8c7d..14b6ecb868ead 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_settings_management/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_settings_management/index.tsx @@ -16,6 +16,10 @@ import { } from '@elastic/eui'; import React, { useCallback, useMemo, useState } from 'react'; +import { + PromptResponse, + PerformBulkActionRequestBody as PromptsPerformBulkActionRequestBody, +} from '@kbn/elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen'; import { Conversation, ConversationsBulkActions, useAssistantContext } from '../../../../..'; import { SYSTEM_PROMPT_TABLE_SESSION_STORAGE_KEY } from '../../../../assistant_context/constants'; import { AIConnector } from '../../../../connectorland/connector_selector'; @@ -26,7 +30,6 @@ import { useSessionPagination, } from '../../../common/components/assistant_settings_management/pagination/use_session_pagination'; import { CANCEL, DELETE } from '../../../settings/translations'; -import { Prompt } from '../../../types'; import { SystemPromptEditor } from '../system_prompt_modal/system_prompt_editor'; import { SETTINGS_TITLE } from '../system_prompt_modal/translations'; import { useSystemPromptEditor } from '../system_prompt_modal/use_system_prompt_editor'; @@ -37,11 +40,11 @@ interface Props { connectors: AIConnector[] | undefined; conversationSettings: Record; conversationsSettingsBulkActions: ConversationsBulkActions; - onSelectedSystemPromptChange: (systemPrompt?: Prompt) => void; - selectedSystemPrompt: Prompt | undefined; - setUpdatedSystemPromptSettings: React.Dispatch>; + onSelectedSystemPromptChange: (systemPrompt?: PromptResponse) => void; + selectedSystemPrompt: PromptResponse | undefined; + setUpdatedSystemPromptSettings: React.Dispatch>; setConversationSettings: React.Dispatch>>; - systemPromptSettings: Prompt[]; + systemPromptSettings: PromptResponse[]; setConversationsSettingsBulkActions: React.Dispatch< React.SetStateAction >; @@ -49,6 +52,8 @@ interface Props { handleSave: (shouldRefetchConversation?: boolean) => void; onCancelClick: () => void; resetSettings: () => void; + promptsBulkActions: PromptsPerformBulkActionRequestBody; + setPromptsBulkActions: React.Dispatch>; } const SystemPromptSettingsManagementComponent = ({ @@ -65,6 +70,8 @@ const SystemPromptSettingsManagementComponent = ({ handleSave, onCancelClick, resetSettings, + promptsBulkActions, + setPromptsBulkActions, }: Props) => { const { nameSpace } = useAssistantContext(); const { isFlyoutOpen: editFlyoutVisible, openFlyout, closeFlyout } = useFlyoutModalVisibility(); @@ -73,7 +80,7 @@ const SystemPromptSettingsManagementComponent = ({ openFlyout: openConfirmModal, closeFlyout: closeConfirmModal, } = useFlyoutModalVisibility(); - const [deletedPrompt, setDeletedPrompt] = useState(); + const [deletedPrompt, setDeletedPrompt] = useState(); const onCreate = useCallback(() => { onSelectedSystemPromptChange({ @@ -88,10 +95,12 @@ const SystemPromptSettingsManagementComponent = ({ const { onSystemPromptSelectionChange, onSystemPromptDeleted } = useSystemPromptEditor({ setUpdatedSystemPromptSettings, onSelectedSystemPromptChange, + promptsBulkActions, + setPromptsBulkActions, }); const onEditActionClicked = useCallback( - (prompt: Prompt) => { + (prompt: PromptResponse) => { onSystemPromptSelectionChange(prompt); openFlyout(); }, @@ -99,7 +108,7 @@ const SystemPromptSettingsManagementComponent = ({ ); const onDeleteActionClicked = useCallback( - (prompt: Prompt) => { + (prompt: PromptResponse) => { setDeletedPrompt(prompt); onSystemPromptDeleted(prompt.id); openConfirmModal(); @@ -200,6 +209,8 @@ const SystemPromptSettingsManagementComponent = ({ setConversationsSettingsBulkActions={setConversationsSettingsBulkActions} defaultConnector={defaultConnector} resetSettings={resetSettings} + promptsBulkActions={promptsBulkActions} + setPromptsBulkActions={setPromptsBulkActions} /> {deleteConfirmModalVisibility && deletedPrompt?.name && ( diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_settings_management/use_system_prompt_table.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_settings_management/use_system_prompt_table.test.tsx index 90cea2319714d..48d3232f0ae38 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_settings_management/use_system_prompt_table.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_settings_management/use_system_prompt_table.test.tsx @@ -7,26 +7,25 @@ import { renderHook } from '@testing-library/react-hooks'; import { useSystemPromptTable } from './use_system_prompt_table'; -import { Prompt } from '../../../types'; import { Conversation } from '../../../../assistant_context/types'; import { AIConnector } from '../../../../connectorland/connector_selector'; import { customConvo, welcomeConvo } from '../../../../mock/conversation'; import { mockConnectors } from '../../../../mock/connectors'; -import { ApiConfig } from '@kbn/elastic-assistant-common'; +import { ApiConfig, PromptResponse } from '@kbn/elastic-assistant-common'; // Mock data for tests -const mockSystemPrompts: Prompt[] = [ +const mockSystemPrompts: PromptResponse[] = [ { id: 'prompt-1', content: 'Prompt 1', name: 'Prompt 1', - promptType: 'user', + promptType: 'quick', }, { id: 'prompt-2', content: 'Prompt 2', name: 'Prompt 2', - promptType: 'user', + promptType: 'quick', isNewConversationDefault: true, }, ]; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_settings_management/use_system_prompt_table.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_settings_management/use_system_prompt_table.tsx index 7cf907bb7adf5..46e082b86f2c0 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_settings_management/use_system_prompt_table.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_settings_management/use_system_prompt_table.tsx @@ -6,11 +6,11 @@ */ import { EuiBasicTableColumn, EuiIcon, EuiLink } from '@elastic/eui'; import React, { useCallback } from 'react'; +import { PromptResponse } from '@kbn/elastic-assistant-common'; import { Conversation } from '../../../../assistant_context/types'; import { AIConnector } from '../../../../connectorland/connector_selector'; import { BadgesColumn } from '../../../common/components/assistant_settings_management/badges'; import { RowActions } from '../../../common/components/assistant_settings_management/row_actions'; -import { Prompt } from '../../../types'; import { getConversationApiConfig, getInitialDefaultSystemPrompt, @@ -21,10 +21,10 @@ import { getSelectedConversations } from './utils'; type ConversationsWithSystemPrompt = Record< string, - Conversation & { systemPrompt: Prompt | undefined } + Conversation & { systemPrompt: PromptResponse | undefined } >; -type SystemPromptTableItem = Prompt & { defaultConversations: string[] }; +type SystemPromptTableItem = PromptResponse & { defaultConversations: string[] }; export const useSystemPromptTable = () => { const getColumns = useCallback( @@ -97,7 +97,7 @@ export const useSystemPromptTable = () => { connectors: AIConnector[] | undefined; conversationSettings: Record; defaultConnector: AIConnector | undefined; - systemPromptSettings: Prompt[]; + systemPromptSettings: PromptResponse[]; }): SystemPromptTableItem[] => { const conversationsWithApiConfig = Object.entries( conversationSettings diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_settings_management/utils.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_settings_management/utils.test.tsx index 5f10e3bb59c65..9fbfb3a8782e0 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_settings_management/utils.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_settings_management/utils.test.tsx @@ -6,8 +6,8 @@ */ import { ProviderEnum } from '@kbn/elastic-assistant-common'; import { mockSystemPrompts } from '../../../../mock/system_prompt'; -import { PromptType } from '../../../types'; import { getSelectedConversations } from './utils'; +import { PromptTypeEnum } from '@kbn/elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen'; describe('getSelectedConversations', () => { const allSystemPrompts = [...mockSystemPrompts]; const conversationSettings = { @@ -39,7 +39,7 @@ describe('getSelectedConversations', () => { content: 'You are a helpful, expert assistant who answers questions about Elastic Security. Do not answer questions unrelated to Elastic Security.\nProvide the most detailed and relevant answer possible, as if you were relaying this information back to a cyber security expert.\nIf you answer a question related to KQL, EQL, or ES|QL, it should be immediately usable within an Elastic Security timeline; please always format the output correctly with back ticks. Any answer provided for Query DSL should also be usable in a security timeline. This means you should only ever include the "filter" portion of the query. xxx', name: 'Enhanced system prompt', - promptType: 'system' as PromptType, + promptType: PromptTypeEnum.system, isDefault: true, isNewConversationDefault: true, }, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_settings_management/utils.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_settings_management/utils.tsx index 5fde200db9b17..fd01b8eb318a6 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_settings_management/utils.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/system_prompt_settings_management/utils.tsx @@ -5,11 +5,11 @@ * 2.0. */ +import { PromptResponse } from '@kbn/elastic-assistant-common'; import { Conversation } from '../../../../assistant_context/types'; -import { Prompt } from '../../../types'; export const getSelectedConversations = ( - allSystemPrompts: Prompt[], + allSystemPrompts: PromptResponse[], conversationSettings: Record, systemPromptId: string ) => { diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_selector/quick_prompt_selector.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_selector/quick_prompt_selector.test.tsx index 04ccd478e3bc5..941b442ce4d48 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_selector/quick_prompt_selector.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_selector/quick_prompt_selector.test.tsx @@ -25,9 +25,9 @@ describe('QuickPromptSelector', () => { }); it('Selects an existing quick prompt', () => { const { getByTestId } = render(); - expect(getByTestId('euiComboBoxPill')).toHaveTextContent(MOCK_QUICK_PROMPTS[0].title); + expect(getByTestId('euiComboBoxPill')).toHaveTextContent(MOCK_QUICK_PROMPTS[0].name); fireEvent.click(getByTestId('comboBoxToggleListButton')); - fireEvent.click(getByTestId(MOCK_QUICK_PROMPTS[1].title)); + fireEvent.click(getByTestId(MOCK_QUICK_PROMPTS[1].name)); expect(onQuickPromptSelectionChange).toHaveBeenCalledWith(MOCK_QUICK_PROMPTS[1]); }); it('Only custom option can be deleted', () => { @@ -49,8 +49,10 @@ describe('QuickPromptSelector', () => { expect(onQuickPromptSelectionChange).toHaveBeenCalledWith({ categories: [], color: '#D36086', - prompt: 'quickly prompt please', - title: 'A_CUSTOM_OPTION', + content: 'quickly prompt please', + id: 'A_CUSTOM_OPTION', + name: 'A_CUSTOM_OPTION', + promptType: 'quick', }); }); it('Reset settings every time before selecting an system prompt from the input if resetSettings is provided', () => { @@ -60,7 +62,7 @@ describe('QuickPromptSelector', () => { ); // changing the selection fireEvent.change(getByTestId('comboBoxSearchInput'), { - target: { value: MOCK_QUICK_PROMPTS[1].title }, + target: { value: MOCK_QUICK_PROMPTS[1].name }, }); fireEvent.keyDown(getByTestId('comboBoxSearchInput'), { key: 'Enter', diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_selector/quick_prompt_selector.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_selector/quick_prompt_selector.tsx index 3fb0ba17cf4bf..d29887e8c4f6a 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_selector/quick_prompt_selector.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_selector/quick_prompt_selector.tsx @@ -18,16 +18,16 @@ import { } from '@elastic/eui'; import { css } from '@emotion/react'; +import { PromptResponse } from '@kbn/elastic-assistant-common'; import * as i18n from './translations'; -import { QuickPrompt } from '../types'; interface Props { isDisabled?: boolean; onQuickPromptDeleted: (quickPromptTitle: string) => void; - onQuickPromptSelectionChange: (quickPrompt?: QuickPrompt | string) => void; - quickPrompts: QuickPrompt[]; + onQuickPromptSelectionChange: (quickPrompt?: PromptResponse | string) => void; + quickPrompts: PromptResponse[]; + selectedQuickPrompt?: PromptResponse; resetSettings?: () => void; - selectedQuickPrompt?: QuickPrompt; } export type QuickPromptSelectorOption = EuiComboBoxOptionOption<{ isDefault: boolean }>; @@ -50,8 +50,9 @@ export const QuickPromptSelector: React.FC = React.memo( value: { isDefault: qp.isDefault ?? false, }, - label: qp.title, - 'data-test-subj': qp.title, + label: qp.name, + 'data-test-subj': qp.name, + id: qp.id, color: qp.color, })) ); @@ -62,7 +63,8 @@ export const QuickPromptSelector: React.FC = React.memo( value: { isDefault: true, }, - label: selectedQuickPrompt.title, + label: selectedQuickPrompt.name, + id: selectedQuickPrompt.id, color: selectedQuickPrompt.color, }, ] @@ -76,7 +78,7 @@ export const QuickPromptSelector: React.FC = React.memo( const newQuickPrompt = quickPromptSelectorOption.length === 0 ? undefined - : quickPrompts.find((qp) => qp.title === quickPromptSelectorOption[0]?.label) ?? + : quickPrompts.find((qp) => qp.name === quickPromptSelectorOption[0]?.label) ?? quickPromptSelectorOption[0]?.label; onQuickPromptSelectionChange(newQuickPrompt); }, @@ -100,6 +102,7 @@ export const QuickPromptSelector: React.FC = React.memo( const newOption = { value: searchValue, label: searchValue, + id: searchValue, }; if (!optionExists) { @@ -125,11 +128,12 @@ export const QuickPromptSelector: React.FC = React.memo( // Callback for when user deletes a quick prompt const onDelete = useCallback( (label: string) => { + const deleteId = options.find((o) => o.label === label)?.id; setOptions(options.filter((o) => o.label !== label)); if (selectedOptions?.[0]?.label === label) { handleSelectionChange([]); } - onQuickPromptDeleted(label); + onQuickPromptDeleted(deleteId ?? label); }, [handleSelectionChange, onQuickPromptDeleted, options, selectedOptions] ); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_settings/quick_prompt_editor.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_settings/quick_prompt_editor.tsx index 4300e53525b33..01ffe00d11100 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_settings/quick_prompt_editor.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_settings/quick_prompt_editor.tsx @@ -10,9 +10,12 @@ import { EuiFormRow, EuiColorPicker, EuiTextArea } from '@elastic/eui'; import { EuiSetColorMethod } from '@elastic/eui/src/services/color_picker/color_picker'; import { css } from '@emotion/react'; +import { + PromptResponse, + PerformBulkActionRequestBody as PromptsPerformBulkActionRequestBody, +} from '@kbn/elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen'; import { PromptContextTemplate } from '../../../..'; import * as i18n from './translations'; -import { QuickPrompt } from '../types'; import { QuickPromptSelector } from '../quick_prompt_selector/quick_prompt_selector'; import { PromptContextSelector } from '../prompt_context_selector/prompt_context_selector'; import { useAssistantContext } from '../../../assistant_context'; @@ -21,11 +24,13 @@ import { useQuickPromptEditor } from './use_quick_prompt_editor'; const DEFAULT_COLOR = '#D36086'; interface Props { - onSelectedQuickPromptChange: (quickPrompt?: QuickPrompt) => void; - quickPromptSettings: QuickPrompt[]; + onSelectedQuickPromptChange: (quickPrompt?: PromptResponse) => void; + quickPromptSettings: PromptResponse[]; resetSettings?: () => void; - selectedQuickPrompt: QuickPrompt | undefined; - setUpdatedQuickPromptSettings: React.Dispatch>; + selectedQuickPrompt: PromptResponse | undefined; + setUpdatedQuickPromptSettings: React.Dispatch>; + promptsBulkActions: PromptsPerformBulkActionRequestBody; + setPromptsBulkActions: React.Dispatch>; } const QuickPromptSettingsEditorComponent = ({ @@ -34,28 +39,30 @@ const QuickPromptSettingsEditorComponent = ({ resetSettings, selectedQuickPrompt, setUpdatedQuickPromptSettings, + promptsBulkActions, + setPromptsBulkActions, }: Props) => { const { basePromptContexts } = useAssistantContext(); // Prompt - const prompt = useMemo( + const promptContent = useMemo( // Fixing Cursor Jump in text area - () => quickPromptSettings.find((p) => p.title === selectedQuickPrompt?.title)?.prompt ?? '', - [selectedQuickPrompt?.title, quickPromptSettings] + () => quickPromptSettings.find((p) => p.id === selectedQuickPrompt?.id)?.content ?? '', + [selectedQuickPrompt?.id, quickPromptSettings] ); const handlePromptChange = useCallback( (e: React.ChangeEvent) => { if (selectedQuickPrompt != null) { - setUpdatedQuickPromptSettings((prev) => { - const alreadyExists = prev.some((qp) => qp.title === selectedQuickPrompt.title); + setUpdatedQuickPromptSettings((prev): PromptResponse[] => { + const alreadyExists = prev.some((qp) => qp.id === selectedQuickPrompt.id); if (alreadyExists) { return prev.map((qp) => { - if (qp.title === selectedQuickPrompt.title) { + if (qp.id === selectedQuickPrompt.id) { return { ...qp, - prompt: e.target.value, + content: e.target.value, }; } return qp; @@ -64,9 +71,45 @@ const QuickPromptSettingsEditorComponent = ({ return prev; }); + + const existingPrompt = quickPromptSettings.find((sp) => sp.id === selectedQuickPrompt.id); + if (existingPrompt) { + setPromptsBulkActions({ + ...promptsBulkActions, + ...(selectedQuickPrompt.name !== selectedQuickPrompt.id + ? { + update: [ + ...(promptsBulkActions.update ?? []).filter( + (p) => p.id !== selectedQuickPrompt.id + ), + { + ...selectedQuickPrompt, + content: e.target.value, + }, + ], + } + : { + create: [ + ...(promptsBulkActions.create ?? []).filter( + (p) => p.name !== selectedQuickPrompt.name + ), + { + ...selectedQuickPrompt, + content: e.target.value, + }, + ], + }), + }); + } } }, - [selectedQuickPrompt, setUpdatedQuickPromptSettings] + [ + promptsBulkActions, + quickPromptSettings, + selectedQuickPrompt, + setPromptsBulkActions, + setUpdatedQuickPromptSettings, + ] ); // Color @@ -79,11 +122,11 @@ const QuickPromptSettingsEditorComponent = ({ (color, { hex, isValid }) => { if (selectedQuickPrompt != null) { setUpdatedQuickPromptSettings((prev) => { - const alreadyExists = prev.some((qp) => qp.title === selectedQuickPrompt.title); + const alreadyExists = prev.some((qp) => qp.name === selectedQuickPrompt.name); if (alreadyExists) { return prev.map((qp) => { - if (qp.title === selectedQuickPrompt.title) { + if (qp.name === selectedQuickPrompt.name) { return { ...qp, color, @@ -94,9 +137,44 @@ const QuickPromptSettingsEditorComponent = ({ } return prev; }); + const existingPrompt = quickPromptSettings.find((sp) => sp.id === selectedQuickPrompt.id); + if (existingPrompt) { + setPromptsBulkActions({ + ...promptsBulkActions, + ...(selectedQuickPrompt.name !== selectedQuickPrompt.id + ? { + update: [ + ...(promptsBulkActions.update ?? []).filter( + (p) => p.id !== selectedQuickPrompt.id + ), + { + ...selectedQuickPrompt, + color, + }, + ], + } + : { + create: [ + ...(promptsBulkActions.create ?? []).filter( + (p) => p.name !== selectedQuickPrompt.name + ), + { + ...selectedQuickPrompt, + color, + }, + ], + }), + }); + } } }, - [selectedQuickPrompt, setUpdatedQuickPromptSettings] + [ + promptsBulkActions, + quickPromptSettings, + selectedQuickPrompt, + setPromptsBulkActions, + setUpdatedQuickPromptSettings, + ] ); // Prompt Contexts @@ -112,11 +190,11 @@ const QuickPromptSettingsEditorComponent = ({ (pc: PromptContextTemplate[]) => { if (selectedQuickPrompt != null) { setUpdatedQuickPromptSettings((prev) => { - const alreadyExists = prev.some((qp) => qp.title === selectedQuickPrompt.title); + const alreadyExists = prev.some((qp) => qp.name === selectedQuickPrompt.name); if (alreadyExists) { return prev.map((qp) => { - if (qp.title === selectedQuickPrompt.title) { + if (qp.name === selectedQuickPrompt.name) { return { ...qp, categories: pc.map((p) => p.category), @@ -127,15 +205,53 @@ const QuickPromptSettingsEditorComponent = ({ } return prev; }); + + const existingPrompt = quickPromptSettings.find((sp) => sp.id === selectedQuickPrompt.id); + if (existingPrompt) { + setPromptsBulkActions({ + ...promptsBulkActions, + ...(selectedQuickPrompt.name !== selectedQuickPrompt.id + ? { + update: [ + ...(promptsBulkActions.update ?? []).filter( + (p) => p.id !== selectedQuickPrompt.id + ), + { + ...selectedQuickPrompt, + categories: pc.map((p) => p.category), + }, + ], + } + : { + create: [ + ...(promptsBulkActions.create ?? []).filter( + (p) => p.name !== selectedQuickPrompt.name + ), + { + ...selectedQuickPrompt, + categories: pc.map((p) => p.category), + }, + ], + }), + }); + } } }, - [selectedQuickPrompt, setUpdatedQuickPromptSettings] + [ + promptsBulkActions, + quickPromptSettings, + selectedQuickPrompt, + setPromptsBulkActions, + setUpdatedQuickPromptSettings, + ] ); // When top level quick prompt selection changes const { onQuickPromptDeleted, onQuickPromptSelectionChange } = useQuickPromptEditor({ onSelectedQuickPromptChange, setUpdatedQuickPromptSettings, + promptsBulkActions, + setPromptsBulkActions, }); return ( @@ -158,7 +274,7 @@ const QuickPromptSettingsEditorComponent = ({ data-test-subj="quick-prompt-prompt" onChange={handlePromptChange} placeholder={i18n.QUICK_PROMPT_PROMPT_PLACEHOLDER} - value={prompt} + value={promptContent} css={css` min-height: 150px; `} diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_settings/quick_prompt_settings.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_settings/quick_prompt_settings.test.tsx index 6aa939934d585..eb8cc2cb2569c 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_settings/quick_prompt_settings.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_settings/quick_prompt_settings.test.tsx @@ -13,6 +13,7 @@ import { MOCK_QUICK_PROMPTS } from '../../../mock/quick_prompt'; import { mockPromptContexts } from '../../../mock/prompt_context'; const onSelectedQuickPromptChange = jest.fn(); +const setPromptsBulkActions = jest.fn(); const setUpdatedQuickPromptSettings = jest.fn().mockImplementation((fn) => { return fn(MOCK_QUICK_PROMPTS); }); @@ -22,6 +23,8 @@ const testProps = { quickPromptSettings: MOCK_QUICK_PROMPTS, selectedQuickPrompt: MOCK_QUICK_PROMPTS[0], setUpdatedQuickPromptSettings, + promptsBulkActions: {}, + setPromptsBulkActions, }; const mockContext = { basePromptContexts: MOCK_QUICK_PROMPTS, @@ -91,8 +94,11 @@ describe('QuickPromptSettings', () => { const customOption = { categories: [], color: '#D36086', - prompt: '', - title: 'sooper custom prompt', + consumer: undefined, + content: '', + id: 'sooper custom prompt', + name: 'sooper custom prompt', + promptType: 'quick', }; expect(setUpdatedQuickPromptSettings).toHaveReturnedWith([...MOCK_QUICK_PROMPTS, customOption]); expect(onSelectedQuickPromptChange).toHaveBeenCalledWith(customOption); @@ -130,7 +136,7 @@ describe('QuickPromptSettings', () => { const previousFirstElementOfTheArray = mutatableQuickPrompts.shift(); expect(setUpdatedQuickPromptSettings).toHaveReturnedWith([ - { ...previousFirstElementOfTheArray, prompt: 'what does this do' }, + { ...previousFirstElementOfTheArray, content: 'what does this do' }, ...mutatableQuickPrompts, ]); }); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_settings/quick_prompt_settings.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_settings/quick_prompt_settings.tsx index 4b8b6a8f8039d..61496c64fd73a 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_settings/quick_prompt_settings.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_settings/quick_prompt_settings.tsx @@ -8,15 +8,20 @@ import React from 'react'; import { EuiTitle, EuiText, EuiHorizontalRule, EuiSpacer } from '@elastic/eui'; +import { + PromptResponse, + PerformBulkActionRequestBody as PromptsPerformBulkActionRequestBody, +} from '@kbn/elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen'; import * as i18n from './translations'; -import { QuickPrompt } from '../types'; import { QuickPromptSettingsEditor } from './quick_prompt_editor'; interface Props { - onSelectedQuickPromptChange: (quickPrompt?: QuickPrompt) => void; - quickPromptSettings: QuickPrompt[]; - selectedQuickPrompt: QuickPrompt | undefined; - setUpdatedQuickPromptSettings: React.Dispatch>; + onSelectedQuickPromptChange: (quickPrompt?: PromptResponse) => void; + quickPromptSettings: PromptResponse[]; + selectedQuickPrompt: PromptResponse | undefined; + setUpdatedQuickPromptSettings: React.Dispatch>; + promptsBulkActions: PromptsPerformBulkActionRequestBody; + setPromptsBulkActions: React.Dispatch>; } /** @@ -28,6 +33,8 @@ export const QuickPromptSettings: React.FC = React.memo( quickPromptSettings, selectedQuickPrompt, setUpdatedQuickPromptSettings, + promptsBulkActions, + setPromptsBulkActions, }) => { return ( <> @@ -43,6 +50,8 @@ export const QuickPromptSettings: React.FC = React.memo( quickPromptSettings={quickPromptSettings} selectedQuickPrompt={selectedQuickPrompt} setUpdatedQuickPromptSettings={setUpdatedQuickPromptSettings} + promptsBulkActions={promptsBulkActions} + setPromptsBulkActions={setPromptsBulkActions} /> ); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_settings/use_quick_prompt_editor.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_settings/use_quick_prompt_editor.test.tsx index ec3a0256716ae..509db5991455f 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_settings/use_quick_prompt_editor.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_settings/use_quick_prompt_editor.test.tsx @@ -7,18 +7,24 @@ import { renderHook, act } from '@testing-library/react-hooks'; import { useQuickPromptEditor, DEFAULT_COLOR } from './use_quick_prompt_editor'; -import { QuickPrompt } from '../types'; import { mockAlertPromptContext } from '../../../mock/prompt_context'; import { MOCK_QUICK_PROMPTS } from '../../../mock/quick_prompt'; +import { PromptResponse } from '@kbn/elastic-assistant-common'; +import { useAssistantContext } from '../../../assistant_context'; +jest.mock('../../../assistant_context'); // Mock functions for the tests const mockOnSelectedQuickPromptChange = jest.fn(); const mockSetUpdatedQuickPromptSettings = jest.fn(); const mockPreviousQuickPrompts = [...MOCK_QUICK_PROMPTS]; +const setPromptsBulkActions = jest.fn(); describe('useQuickPromptEditor', () => { beforeEach(() => { jest.clearAllMocks(); + (useAssistantContext as jest.Mock).mockReturnValue({ + currentAppId: 'securitySolutionUI', + }); }); test('should delete a quick prompt by title', () => { @@ -26,6 +32,8 @@ describe('useQuickPromptEditor', () => { useQuickPromptEditor({ onSelectedQuickPromptChange: mockOnSelectedQuickPromptChange, setUpdatedQuickPromptSettings: mockSetUpdatedQuickPromptSettings, + setPromptsBulkActions, + promptsBulkActions: {}, }) ); @@ -34,7 +42,7 @@ describe('useQuickPromptEditor', () => { }); expect(mockSetUpdatedQuickPromptSettings.mock.calls[0][0]?.(mockPreviousQuickPrompts)).toEqual( - MOCK_QUICK_PROMPTS.filter((qp) => qp.title !== 'ALERT_SUMMARIZATION_TITLE') + MOCK_QUICK_PROMPTS.filter((qp) => qp.name !== 'ALERT_SUMMARIZATION_TITLE') ); }); @@ -44,6 +52,8 @@ describe('useQuickPromptEditor', () => { useQuickPromptEditor({ onSelectedQuickPromptChange: mockOnSelectedQuickPromptChange, setUpdatedQuickPromptSettings: mockSetUpdatedQuickPromptSettings, + setPromptsBulkActions, + promptsBulkActions: {}, }) ); @@ -51,11 +61,14 @@ describe('useQuickPromptEditor', () => { result.current.onQuickPromptSelectionChange(newPromptTitle); }); - const newPrompt: QuickPrompt = { - title: newPromptTitle, - prompt: '', + const newPrompt: PromptResponse = { + name: newPromptTitle, + content: '', color: DEFAULT_COLOR, categories: [], + id: newPromptTitle, + promptType: 'quick', + consumer: 'securitySolutionUI', }; expect(mockOnSelectedQuickPromptChange).toHaveBeenCalledWith(newPrompt); @@ -70,17 +83,21 @@ describe('useQuickPromptEditor', () => { useQuickPromptEditor({ onSelectedQuickPromptChange: mockOnSelectedQuickPromptChange, setUpdatedQuickPromptSettings: mockSetUpdatedQuickPromptSettings, + setPromptsBulkActions, + promptsBulkActions: {}, }) ); const alertData = await mockAlertPromptContext.getPromptContext(); - const expectedPrompt: QuickPrompt = { - title: mockAlertPromptContext.description, - prompt: alertData, + const expectedPrompt: PromptResponse = { + name: mockAlertPromptContext.description, + content: JSON.stringify(alertData ?? {}), color: DEFAULT_COLOR, categories: [mockAlertPromptContext.category], - } as QuickPrompt; + id: '', + promptType: 'quick', + }; act(() => { result.current.onQuickPromptSelectionChange(expectedPrompt); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_settings/use_quick_prompt_editor.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_settings/use_quick_prompt_editor.tsx index 716298afb21da..d96c4fca716d1 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_settings/use_quick_prompt_editor.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_settings/use_quick_prompt_editor.tsx @@ -5,41 +5,60 @@ * 2.0. */ +import { + PromptResponse, + PromptTypeEnum, + PerformBulkActionRequestBody as PromptsPerformBulkActionRequestBody, +} from '@kbn/elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen'; import { useCallback } from 'react'; -import { QuickPrompt } from '../types'; +import { useAssistantContext } from '../../../..'; export const DEFAULT_COLOR = '#D36086'; export const useQuickPromptEditor = ({ onSelectedQuickPromptChange, setUpdatedQuickPromptSettings, + promptsBulkActions, + setPromptsBulkActions, }: { - onSelectedQuickPromptChange: (quickPrompt?: QuickPrompt) => void; - setUpdatedQuickPromptSettings: React.Dispatch>; + onSelectedQuickPromptChange: (quickPrompt?: PromptResponse) => void; + setUpdatedQuickPromptSettings: React.Dispatch>; + promptsBulkActions: PromptsPerformBulkActionRequestBody; + setPromptsBulkActions: React.Dispatch>; }) => { + const { currentAppId } = useAssistantContext(); const onQuickPromptDeleted = useCallback( - (title: string) => { - setUpdatedQuickPromptSettings((prev) => prev.filter((qp) => qp.title !== title)); + (id: string) => { + setUpdatedQuickPromptSettings((prev) => prev.filter((qp) => qp.id !== id)); + setPromptsBulkActions({ + ...promptsBulkActions, + delete: { + ids: [...(promptsBulkActions.delete?.ids ?? []), id], + }, + }); }, - [setUpdatedQuickPromptSettings] + [promptsBulkActions, setPromptsBulkActions, setUpdatedQuickPromptSettings] ); // When top level quick prompt selection changes const onQuickPromptSelectionChange = useCallback( - (quickPrompt?: QuickPrompt | string) => { + (quickPrompt?: PromptResponse | string) => { const isNew = typeof quickPrompt === 'string'; - const newSelectedQuickPrompt: QuickPrompt | undefined = isNew + const newSelectedQuickPrompt: PromptResponse | undefined = isNew ? { - title: quickPrompt ?? '', - prompt: '', + name: quickPrompt, + id: quickPrompt, + content: '', color: DEFAULT_COLOR, categories: [], + promptType: PromptTypeEnum.quick, + consumer: currentAppId, } : quickPrompt; if (newSelectedQuickPrompt != null) { setUpdatedQuickPromptSettings((prev) => { - const alreadyExists = prev.some((qp) => qp.title === newSelectedQuickPrompt.title); + const alreadyExists = prev.some((qp) => qp.name === newSelectedQuickPrompt.name); if (!alreadyExists) { return [...prev, newSelectedQuickPrompt]; @@ -47,11 +66,29 @@ export const useQuickPromptEditor = ({ return prev; }); + + if (isNew) { + setPromptsBulkActions({ + ...promptsBulkActions, + create: [ + ...(promptsBulkActions.create ?? []), + { + ...newSelectedQuickPrompt, + }, + ], + }); + } } onSelectedQuickPromptChange(newSelectedQuickPrompt); }, - [onSelectedQuickPromptChange, setUpdatedQuickPromptSettings] + [ + currentAppId, + onSelectedQuickPromptChange, + promptsBulkActions, + setPromptsBulkActions, + setUpdatedQuickPromptSettings, + ] ); return { onQuickPromptDeleted, onQuickPromptSelectionChange }; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_settings_management/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_settings_management/index.tsx index e8362db441719..ac93161d35c17 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_settings_management/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_settings_management/index.tsx @@ -14,7 +14,10 @@ import { EuiPanel, EuiSpacer, } from '@elastic/eui'; -import { QuickPrompt } from '../types'; +import { + PromptResponse, + PerformBulkActionRequestBody as PromptsPerformBulkActionRequestBody, +} from '@kbn/elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen'; import { QuickPromptSettingsEditor } from '../quick_prompt_settings/quick_prompt_editor'; import * as i18n from './translations'; import { useFlyoutModalVisibility } from '../../common/components/assistant_settings_management/flyout/use_flyout_modal_visibility'; @@ -32,11 +35,13 @@ import { useAssistantContext } from '../../../assistant_context'; interface Props { handleSave: (shouldRefetchConversation?: boolean) => void; onCancelClick: () => void; - onSelectedQuickPromptChange: (quickPrompt?: QuickPrompt) => void; - quickPromptSettings: QuickPrompt[]; + onSelectedQuickPromptChange: (quickPrompt?: PromptResponse) => void; + quickPromptSettings: PromptResponse[]; resetSettings?: () => void; - selectedQuickPrompt: QuickPrompt | undefined; - setUpdatedQuickPromptSettings: React.Dispatch>; + selectedQuickPrompt: PromptResponse | undefined; + setUpdatedQuickPromptSettings: React.Dispatch>; + promptsBulkActions: PromptsPerformBulkActionRequestBody; + setPromptsBulkActions: React.Dispatch>; } const QuickPromptSettingsManagementComponent = ({ @@ -47,11 +52,13 @@ const QuickPromptSettingsManagementComponent = ({ resetSettings, selectedQuickPrompt, setUpdatedQuickPromptSettings, + promptsBulkActions, + setPromptsBulkActions, }: Props) => { const { nameSpace, basePromptContexts } = useAssistantContext(); const { isFlyoutOpen: editFlyoutVisible, openFlyout, closeFlyout } = useFlyoutModalVisibility(); - const [deletedQuickPrompt, setDeletedQuickPrompt] = useState(); + const [deletedQuickPrompt, setDeletedQuickPrompt] = useState(); const { isFlyoutOpen: deleteConfirmModalVisibility, openFlyout: openConfirmModal, @@ -61,10 +68,12 @@ const QuickPromptSettingsManagementComponent = ({ const { onQuickPromptDeleted, onQuickPromptSelectionChange } = useQuickPromptEditor({ onSelectedQuickPromptChange, setUpdatedQuickPromptSettings, + promptsBulkActions, + setPromptsBulkActions, }); const onEditActionClicked = useCallback( - (prompt: QuickPrompt) => { + (prompt: PromptResponse) => { onQuickPromptSelectionChange(prompt); openFlyout(); }, @@ -72,9 +81,9 @@ const QuickPromptSettingsManagementComponent = ({ ); const onDeleteActionClicked = useCallback( - (prompt: QuickPrompt) => { + (prompt: PromptResponse) => { setDeletedQuickPrompt(prompt); - onQuickPromptDeleted(prompt.title); + onQuickPromptDeleted(prompt.id); openConfirmModal(); }, [onQuickPromptDeleted, openConfirmModal] @@ -123,10 +132,10 @@ const QuickPromptSettingsManagementComponent = ({ const confirmationTitle = useMemo( () => - deletedQuickPrompt?.title - ? i18n.DELETE_QUICK_PROMPT_MODAL_TITLE(deletedQuickPrompt.title) + deletedQuickPrompt?.name + ? i18n.DELETE_QUICK_PROMPT_MODAL_TITLE(deletedQuickPrompt.name) : i18n.DELETE_QUICK_PROMPT_MODAL_DEFAULT_TITLE, - [deletedQuickPrompt?.title] + [deletedQuickPrompt?.name] ); return ( @@ -161,6 +170,8 @@ const QuickPromptSettingsManagementComponent = ({ resetSettings={resetSettings} selectedQuickPrompt={selectedQuickPrompt} setUpdatedQuickPromptSettings={setUpdatedQuickPromptSettings} + promptsBulkActions={promptsBulkActions} + setPromptsBulkActions={setPromptsBulkActions} /> {deleteConfirmModalVisibility && deletedQuickPrompt && ( diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_settings_management/use_quick_prompt_table.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_settings_management/use_quick_prompt_table.test.tsx index 316b43f6cfb3d..ca647dc530265 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_settings_management/use_quick_prompt_table.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_settings_management/use_quick_prompt_table.test.tsx @@ -8,9 +8,9 @@ import { renderHook } from '@testing-library/react-hooks'; import { useQuickPromptTable } from './use_quick_prompt_table'; import { EuiTableComputedColumnType } from '@elastic/eui'; -import { QuickPrompt } from '../types'; import { MOCK_QUICK_PROMPTS } from '../../../mock/quick_prompt'; import { mockPromptContexts } from '../../../mock/prompt_context'; +import { PromptResponse } from '@kbn/elastic-assistant-common'; const mockOnEditActionClicked = jest.fn(); const mockOnDeleteActionClicked = jest.fn(); @@ -43,7 +43,7 @@ describe('useQuickPromptTable', () => { }); const mockQuickPrompt = { ...MOCK_QUICK_PROMPTS[0], categories: ['alert'] }; - const mockBadgesColumn = (columns[1] as EuiTableComputedColumnType).render( + const mockBadgesColumn = (columns[1] as EuiTableComputedColumnType).render( mockQuickPrompt ); const selectedPromptContexts = mockPromptContexts @@ -51,7 +51,7 @@ describe('useQuickPromptTable', () => { .map((bpc) => bpc.description); expect(mockBadgesColumn).toHaveProperty('props', { items: selectedPromptContexts, - prefix: MOCK_QUICK_PROMPTS[0].title, + prefix: MOCK_QUICK_PROMPTS[0].name, }); }); @@ -62,7 +62,7 @@ describe('useQuickPromptTable', () => { onDeleteActionClicked: mockOnDeleteActionClicked, }); - const mockRowActions = (columns[2] as EuiTableComputedColumnType).render( + const mockRowActions = (columns[2] as EuiTableComputedColumnType).render( MOCK_QUICK_PROMPTS[0] ); @@ -83,7 +83,7 @@ describe('useQuickPromptTable', () => { const nonDefaultPrompt = MOCK_QUICK_PROMPTS.find((qp) => !qp.isDefault); if (nonDefaultPrompt) { - const mockRowActions = (columns[2] as EuiTableComputedColumnType).render( + const mockRowActions = (columns[2] as EuiTableComputedColumnType).render( nonDefaultPrompt ); expect(mockRowActions).toHaveProperty('props', { diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_settings_management/use_quick_prompt_table.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_settings_management/use_quick_prompt_table.tsx index 9ec334f817340..1899905db0ea1 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_settings_management/use_quick_prompt_table.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompt_settings_management/use_quick_prompt_table.tsx @@ -7,10 +7,10 @@ import { EuiBasicTableColumn, EuiLink } from '@elastic/eui'; import React, { useCallback } from 'react'; +import { PromptResponse } from '@kbn/elastic-assistant-common'; import { BadgesColumn } from '../../common/components/assistant_settings_management/badges'; import { RowActions } from '../../common/components/assistant_settings_management/row_actions'; import { PromptContextTemplate } from '../../prompt_context/types'; -import { QuickPrompt } from '../types'; import * as i18n from './translations'; export const useQuickPromptTable = () => { @@ -21,29 +21,29 @@ export const useQuickPromptTable = () => { onDeleteActionClicked, }: { basePromptContexts: PromptContextTemplate[]; - onEditActionClicked: (prompt: QuickPrompt) => void; - onDeleteActionClicked: (prompt: QuickPrompt) => void; - }): Array> => [ + onEditActionClicked: (prompt: PromptResponse) => void; + onDeleteActionClicked: (prompt: PromptResponse) => void; + }): Array> => [ { align: 'left', name: i18n.QUICK_PROMPTS_TABLE_COLUMN_NAME, - render: (prompt: QuickPrompt) => - prompt?.title ? ( - onEditActionClicked(prompt)}>{prompt?.title} + render: (prompt: PromptResponse) => + prompt?.name ? ( + onEditActionClicked(prompt)}>{prompt?.name} ) : null, - sortable: ({ title }: QuickPrompt) => title, + sortable: ({ name }: PromptResponse) => name, }, { align: 'left', name: i18n.QUICK_PROMPTS_TABLE_COLUMN_CONTEXTS, - render: (prompt: QuickPrompt) => { + render: (prompt: PromptResponse) => { const selectedPromptContexts = ( basePromptContexts.filter((bpc) => prompt?.categories?.some((cat) => bpc?.category === cat) ) ?? [] ).map((bpc) => bpc?.description); return selectedPromptContexts ? ( - + ) : null; }, }, @@ -58,13 +58,13 @@ export const useQuickPromptTable = () => { align: 'center', name: i18n.QUICK_PROMPTS_TABLE_COLUMN_ACTIONS, width: '120px', - render: (prompt: QuickPrompt) => { + render: (prompt: PromptResponse) => { if (!prompt) { return null; } const isDeletable = !prompt.isDefault; return ( - + rowItem={prompt} onDelete={isDeletable ? onDeleteActionClicked : undefined} onEdit={onEditActionClicked} diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompts.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompts.test.tsx index 7fb2c9760fc7b..6e5172dc0c2ad 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompts.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompts.test.tsx @@ -7,10 +7,10 @@ import React from 'react'; import { fireEvent, render } from '@testing-library/react'; -import { QuickPrompts } from './quick_prompts'; import { TestProviders } from '../../mock/test_providers/test_providers'; import { MOCK_QUICK_PROMPTS } from '../../mock/quick_prompt'; import { QUICK_PROMPTS_TAB } from '../settings/const'; +import { QuickPrompts } from './quick_prompts'; const setInput = jest.fn(); const setIsSettingsModalVisible = jest.fn(); @@ -20,6 +20,7 @@ const testProps = { setIsSettingsModalVisible, trackPrompt, isFlyoutMode: false, + allPrompts: MOCK_QUICK_PROMPTS, }; const setSelectedSettingsTab = jest.fn(); const mockUseAssistantContext = { diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompts.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompts.tsx index 7d08d20f432b9..c578a58be728d 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompts.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/quick_prompts.tsx @@ -17,7 +17,10 @@ import { import { useMeasure } from 'react-use'; import { css } from '@emotion/react'; -import { QuickPrompt } from '../../..'; +import { + PromptResponse, + PromptTypeEnum, +} from '@kbn/elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen'; import * as i18n from './translations'; import { useAssistantContext } from '../../assistant_context'; import { QUICK_PROMPTS_TAB } from '../settings/const'; @@ -30,6 +33,7 @@ interface QuickPromptsProps { setIsSettingsModalVisible: React.Dispatch>; trackPrompt: (prompt: string) => void; isFlyoutMode: boolean; + allPrompts: PromptResponse[]; } /** @@ -38,11 +42,10 @@ interface QuickPromptsProps { * and localstorage for storing new and edited prompts. */ export const QuickPrompts: React.FC = React.memo( - ({ setInput, setIsSettingsModalVisible, trackPrompt, isFlyoutMode }) => { + ({ setInput, setIsSettingsModalVisible, trackPrompt, isFlyoutMode, allPrompts }) => { const [quickPromptsContainerRef, { width }] = useMeasure(); - const { allQuickPrompts, knowledgeBase, promptContexts, setSelectedSettingsTab } = - useAssistantContext(); + const { knowledgeBase, promptContexts, setSelectedSettingsTab } = useAssistantContext(); const contextFilteredQuickPrompts = useMemo(() => { const registeredPromptContextTitles = Object.values(promptContexts).map((pc) => pc.category); @@ -50,17 +53,21 @@ export const QuickPrompts: React.FC = React.memo( if (knowledgeBase.isEnabledKnowledgeBase) { registeredPromptContextTitles.push(KNOWLEDGE_BASE_CATEGORY); } - return allQuickPrompts.filter((quickPrompt) => { + return allPrompts.filter((prompt) => { + // only quick prompts + if (prompt.promptType !== PromptTypeEnum.quick) { + return false; + } // Return quick prompt as match if it has no categories, otherwise ensure category exists in registered prompt contexts - if (quickPrompt.categories == null || quickPrompt.categories.length === 0) { + if (!prompt.categories || prompt.categories.length === 0) { return true; } else { - return quickPrompt.categories.some((category) => { + return prompt.categories?.some((category) => { return registeredPromptContextTitles.includes(category); }); } }); - }, [allQuickPrompts, knowledgeBase.isEnabledKnowledgeBase, promptContexts]); + }, [allPrompts, knowledgeBase.isEnabledKnowledgeBase, promptContexts]); // Overflow state const [isOverflowPopoverOpen, setIsOverflowPopoverOpen] = useState(false); @@ -71,10 +78,10 @@ export const QuickPrompts: React.FC = React.memo( const closeOverflowPopover = useCallback(() => setIsOverflowPopoverOpen(false), []); const onClickAddQuickPrompt = useCallback( - (badge: QuickPrompt) => { - setInput(badge.prompt); + (badge: PromptResponse) => { + setInput(badge.content); if (badge.isDefault) { - trackPrompt(badge.title); + trackPrompt(badge.name); } else { trackPrompt('Custom'); } @@ -83,7 +90,7 @@ export const QuickPrompts: React.FC = React.memo( ); const onClickOverflowQuickPrompt = useCallback( - (badge: QuickPrompt) => { + (badge: PromptResponse) => { onClickAddQuickPrompt(badge); closeOverflowPopover(); }, @@ -137,9 +144,9 @@ export const QuickPrompts: React.FC = React.memo( onClickAddQuickPrompt(badge)} - onClickAriaLabel={badge.title} + onClickAriaLabel={badge.name} > - {badge.title} + {badge.name} ))} @@ -172,9 +179,9 @@ export const QuickPrompts: React.FC = React.memo( onClickOverflowQuickPrompt(badge)} - onClickAriaLabel={badge.title} + onClickAriaLabel={badge.name} > - {badge.title} + {badge.name} ))} diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/types.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/types.tsx deleted file mode 100644 index c0688f432e7dd..0000000000000 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/quick_prompts/types.tsx +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { PromptContext } from '../../..'; - -/** - * A QuickPrompt is a badge that is displayed below the Assistant's input field. They provide - * a quick way for users to insert prompts as templates into the Assistant's input field. If no - * categories are provided they will always display with the assistant, however categories can be - * supplied to only display the QuickPrompt when the Assistant is registered with corresponding - * PromptContext's containing the same category. - * - * isDefault: If true, this QuickPrompt cannot be deleted by the user - */ -export interface QuickPrompt { - title: string; - prompt: string; - color: string; - categories?: Array; - isDefault?: boolean; -} diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings.tsx index 68a8049b825b3..d5bbefe304208 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings.tsx @@ -23,8 +23,9 @@ import { // eslint-disable-next-line @kbn/eslint/module_migration import styled from 'styled-components'; import { css } from '@emotion/react'; +import { PromptResponse } from '@kbn/elastic-assistant-common'; import { AIConnector } from '../../connectorland/connector_selector'; -import { Conversation, Prompt, QuickPrompt, useLoadConnectors } from '../../..'; +import { Conversation, useLoadConnectors } from '../../..'; import * as i18n from './translations'; import { useAssistantContext } from '../../assistant_context'; import { TEST_IDS } from '../constants'; @@ -46,6 +47,7 @@ import { QUICK_PROMPTS_TAB, SYSTEM_PROMPTS_TAB, } from './const'; +import { useFetchPrompts } from '../api/prompts/use_fetch_prompts'; const StyledEuiModal = styled(EuiModal)` width: 800px; @@ -97,6 +99,7 @@ export const AssistantSettings: React.FC = React.memo( const { data: anonymizationFields, refetch: refetchAnonymizationFieldsResults } = useFetchAnonymizationFields(); + const { data: allPrompts } = useFetchPrompts(); const { data: connectors } = useLoadConnectors({ http, @@ -112,7 +115,7 @@ export const AssistantSettings: React.FC = React.memo( setUpdatedAssistantStreamingEnabled, setUpdatedKnowledgeBaseSettings, setUpdatedQuickPromptSettings, - setUpdatedSystemPromptSettings, + promptsBulkActions, saveSettings, conversationsSettingsBulkActions, updatedAnonymizationData, @@ -120,7 +123,9 @@ export const AssistantSettings: React.FC = React.memo( anonymizationFieldsBulkActions, setAnonymizationFieldsBulkActions, setUpdatedAnonymizationData, - } = useSettingsUpdater(conversations, conversationsLoaded, anonymizationFields); + setPromptsBulkActions, + setUpdatedSystemPromptSettings, + } = useSettingsUpdater(conversations, allPrompts, conversationsLoaded, anonymizationFields); // Local state for saving previously selected items so tab switching is friendlier // Conversation Selection State @@ -137,21 +142,21 @@ export const AssistantSettings: React.FC = React.memo( ); // Quick Prompt Selection State - const [selectedQuickPrompt, setSelectedQuickPrompt] = useState(); - const onHandleSelectedQuickPromptChange = useCallback((quickPrompt?: QuickPrompt) => { + const [selectedQuickPrompt, setSelectedQuickPrompt] = useState(); + const onHandleSelectedQuickPromptChange = useCallback((quickPrompt?: PromptResponse) => { setSelectedQuickPrompt(quickPrompt); }, []); useEffect(() => { if (selectedQuickPrompt != null) { setSelectedQuickPrompt( - quickPromptSettings.find((q) => q.title === selectedQuickPrompt.title) + quickPromptSettings.find((q) => q.name === selectedQuickPrompt.name) ); } }, [quickPromptSettings, selectedQuickPrompt]); // System Prompt Selection State - const [selectedSystemPrompt, setSelectedSystemPrompt] = useState(); - const onHandleSelectedSystemPromptChange = useCallback((systemPrompt?: Prompt) => { + const [selectedSystemPrompt, setSelectedSystemPrompt] = useState(); + const onHandleSelectedSystemPromptChange = useCallback((systemPrompt?: PromptResponse) => { setSelectedSystemPrompt(systemPrompt); }, []); useEffect(() => { @@ -342,6 +347,8 @@ export const AssistantSettings: React.FC = React.memo( onSelectedQuickPromptChange={onHandleSelectedQuickPromptChange} selectedQuickPrompt={selectedQuickPrompt} setUpdatedQuickPromptSettings={setUpdatedQuickPromptSettings} + setPromptsBulkActions={setPromptsBulkActions} + promptsBulkActions={promptsBulkActions} /> )} {selectedSettingsTab === SYSTEM_PROMPTS_TAB && ( @@ -356,6 +363,8 @@ export const AssistantSettings: React.FC = React.memo( setConversationsSettingsBulkActions={setConversationsSettingsBulkActions} conversationsSettingsBulkActions={conversationsSettingsBulkActions} setUpdatedSystemPromptSettings={setUpdatedSystemPromptSettings} + setPromptsBulkActions={setPromptsBulkActions} + promptsBulkActions={promptsBulkActions} /> )} {selectedSettingsTab === ANONYMIZATION_TAB && ( diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_button.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_button.tsx index 432730194d1a3..30f141f219476 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_button.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_button.tsx @@ -8,6 +8,7 @@ import React, { useCallback } from 'react'; import { EuiButtonIcon, EuiToolTip } from '@elastic/eui'; +import { QueryObserverResult, RefetchOptions, RefetchQueryFilters } from '@tanstack/react-query'; import { AIConnector } from '../../connectorland/connector_selector'; import { Conversation } from '../../..'; import { AssistantSettings } from './assistant_settings'; @@ -26,6 +27,9 @@ interface Props { conversations: Record; conversationsLoaded: boolean; refetchConversationsState: () => Promise; + refetchPrompts?: ( + options?: RefetchOptions & RefetchQueryFilters + ) => Promise>; } /** @@ -43,6 +47,7 @@ export const AssistantSettingsButton: React.FC = React.memo( conversations, conversationsLoaded, refetchConversationsState, + refetchPrompts, }) => { const { toasts, setSelectedSettingsTab } = useAssistantContext(); @@ -59,6 +64,9 @@ export const AssistantSettingsButton: React.FC = React.memo( async (success: boolean) => { cleanupAndCloseModal(); await refetchConversationsState(); + if (refetchPrompts) { + await refetchPrompts(); + } if (success) { toasts?.addSuccess({ iconType: 'check', @@ -66,7 +74,7 @@ export const AssistantSettingsButton: React.FC = React.memo( }); } }, - [cleanupAndCloseModal, refetchConversationsState, toasts] + [cleanupAndCloseModal, refetchConversationsState, refetchPrompts, toasts] ); const handleShowConversationSettings = useCallback(() => { diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_management.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_management.test.tsx index 3b34b3467aa84..15fb05ca1c807 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_management.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_management.test.tsx @@ -23,6 +23,7 @@ import { QUICK_PROMPTS_TAB, SYSTEM_PROMPTS_TAB, } from './const'; +import { mockSystemPrompts } from '../../mock/system_prompt'; const mockConversations = { [alertConvo.title]: alertConvo, @@ -33,6 +34,8 @@ const saveSettings = jest.fn(); const mockValues = { conversationSettings: mockConversations, saveSettings, + systemPromptSettings: mockSystemPrompts, + quickPromptSettings: [], }; const setSelectedSettingsTab = jest.fn(); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_management.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_management.tsx index 4e89bb3bba4fc..3f9be4972fe7e 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_management.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_management.tsx @@ -19,7 +19,8 @@ import { } from '@elastic/eui'; import { css } from '@emotion/react'; -import { Conversation, Prompt, QuickPrompt } from '../../..'; +import { PromptResponse, PromptTypeEnum } from '@kbn/elastic-assistant-common'; +import { Conversation } from '../../..'; import * as i18n from './translations'; import { useAssistantContext } from '../../assistant_context'; import { useSettingsUpdater } from './use_settings_updater/use_settings_updater'; @@ -42,6 +43,7 @@ import { QUICK_PROMPTS_TAB, SYSTEM_PROMPTS_TAB, } from './const'; +import { useFetchPrompts } from '../api/prompts/use_fetch_prompts'; interface Props { conversations: Record; @@ -73,6 +75,9 @@ export const AssistantSettingsManagement: React.FC = React.memo( const { data: anonymizationFields } = useFetchAnonymizationFields(); + const { data: allPrompts } = useFetchPrompts(); + + // Connector details const { data: connectors } = useLoadConnectors({ http, }); @@ -92,7 +97,7 @@ export const AssistantSettingsManagement: React.FC = React.memo( setUpdatedAssistantStreamingEnabled, setUpdatedKnowledgeBaseSettings, setUpdatedQuickPromptSettings, - setUpdatedSystemPromptSettings, + setPromptsBulkActions, saveSettings, conversationsSettingsBulkActions, updatedAnonymizationData, @@ -100,13 +105,32 @@ export const AssistantSettingsManagement: React.FC = React.memo( anonymizationFieldsBulkActions, setAnonymizationFieldsBulkActions, setUpdatedAnonymizationData, + setUpdatedSystemPromptSettings, + promptsBulkActions, resetSettings, } = useSettingsUpdater( conversations, + allPrompts, conversationsLoaded, anonymizationFields ?? { page: 0, perPage: 0, total: 0, data: [] } ); + const quickPrompts = useMemo( + () => + quickPromptSettings.length === 0 + ? allPrompts.data.filter((p) => p.promptType === PromptTypeEnum.quick) + : quickPromptSettings, + [allPrompts.data, quickPromptSettings] + ); + + const systemPrompts = useMemo( + () => + systemPromptSettings.length === 0 + ? allPrompts.data.filter((p) => p.promptType === PromptTypeEnum.system) + : systemPromptSettings, + [allPrompts.data, systemPromptSettings] + ); + // Local state for saving previously selected items so tab switching is friendlier // Conversation Selection State const [selectedConversation, setSelectedConversation] = useState( @@ -136,21 +160,21 @@ export const AssistantSettingsManagement: React.FC = React.memo( }, [selectedSettingsTab, setSelectedSettingsTab]); // Quick Prompt Selection State - const [selectedQuickPrompt, setSelectedQuickPrompt] = useState(); - const onHandleSelectedQuickPromptChange = useCallback((quickPrompt?: QuickPrompt) => { + const [selectedQuickPrompt, setSelectedQuickPrompt] = useState(); + const onHandleSelectedQuickPromptChange = useCallback((quickPrompt?: PromptResponse) => { setSelectedQuickPrompt(quickPrompt); }, []); useEffect(() => { if (selectedQuickPrompt != null) { setSelectedQuickPrompt( - quickPromptSettings.find((q) => q.title === selectedQuickPrompt.title) + quickPromptSettings.find((q) => q.name === selectedQuickPrompt.name) ); } }, [quickPromptSettings, selectedQuickPrompt]); // System Prompt Selection State - const [selectedSystemPrompt, setSelectedSystemPrompt] = useState(); - const onHandleSelectedSystemPromptChange = useCallback((systemPrompt?: Prompt) => { + const [selectedSystemPrompt, setSelectedSystemPrompt] = useState(); + const onHandleSelectedSystemPromptChange = useCallback((systemPrompt?: PromptResponse) => { setSelectedSystemPrompt(systemPrompt); }, []); useEffect(() => { @@ -303,7 +327,9 @@ export const AssistantSettingsManagement: React.FC = React.memo( setConversationSettings={setConversationSettings} setConversationsSettingsBulkActions={setConversationsSettingsBulkActions} setUpdatedSystemPromptSettings={setUpdatedSystemPromptSettings} - systemPromptSettings={systemPromptSettings} + systemPromptSettings={systemPrompts} + promptsBulkActions={promptsBulkActions} + setPromptsBulkActions={setPromptsBulkActions} /> )} {selectedSettingsTab === QUICK_PROMPTS_TAB && ( @@ -311,10 +337,12 @@ export const AssistantSettingsManagement: React.FC = React.memo( handleSave={handleSave} onCancelClick={onCancelClick} onSelectedQuickPromptChange={onHandleSelectedQuickPromptChange} - quickPromptSettings={quickPromptSettings} + quickPromptSettings={quickPrompts} resetSettings={resetSettings} selectedQuickPrompt={selectedQuickPrompt} setUpdatedQuickPromptSettings={setUpdatedQuickPromptSettings} + promptsBulkActions={promptsBulkActions} + setPromptsBulkActions={setPromptsBulkActions} /> )} {selectedSettingsTab === ANONYMIZATION_TAB && ( diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/use_settings_updater/use_settings_updater.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/use_settings_updater/use_settings_updater.test.tsx index 20e5c86ddd251..0a2c72ba80ac4 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/use_settings_updater/use_settings_updater.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/use_settings_updater/use_settings_updater.test.tsx @@ -9,13 +9,9 @@ import { act, renderHook } from '@testing-library/react-hooks'; import { DEFAULT_LATEST_ALERTS } from '../../../assistant_context/constants'; import { alertConvo, welcomeConvo } from '../../../mock/conversation'; import { useSettingsUpdater } from './use_settings_updater'; -import { Prompt } from '../../../..'; -import { - defaultSystemPrompt, - mockSuperheroSystemPrompt, - mockSystemPrompt, -} from '../../../mock/system_prompt'; +import { defaultQuickPrompt, mockSystemPrompt } from '../../../mock/system_prompt'; import { HttpSetup } from '@kbn/core/public'; +import { PromptResponse } from '@kbn/elastic-assistant-common'; const mockConversations = { [alertConvo.title]: alertConvo, @@ -27,8 +23,8 @@ const mockHttp = { fetch: jest.fn(), } as unknown as HttpSetup; -const mockSystemPrompts: Prompt[] = [mockSystemPrompt]; -const mockQuickPrompts: Prompt[] = [defaultSystemPrompt]; +const mockSystemPrompts: PromptResponse[] = [mockSystemPrompt]; +const mockQuickPrompts: PromptResponse[] = [defaultQuickPrompt]; const anonymizationFields = { total: 2, @@ -40,8 +36,6 @@ const anonymizationFields = { ], }; -const setAllQuickPromptsMock = jest.fn(); -const setAllSystemPromptsMock = jest.fn(); const setAssistantStreamingEnabled = jest.fn(); const setKnowledgeBaseMock = jest.fn(); const reportAssistantSettingToggled = jest.fn(); @@ -58,8 +52,6 @@ const mockValues = { latestAlerts: DEFAULT_LATEST_ALERTS, }, baseConversations: {}, - setAllQuickPrompts: setAllQuickPromptsMock, - setAllSystemPrompts: setAllSystemPromptsMock, setKnowledgeBase: setKnowledgeBaseMock, http: mockHttp, anonymizationFieldsBulkActions: {}, @@ -67,8 +59,18 @@ const mockValues = { const updatedValues = { conversations: { ...mockConversations }, - allSystemPrompts: [mockSuperheroSystemPrompt], - allQuickPrompts: [{ title: 'Prompt 2', prompt: 'Prompt 2', color: 'red' }], + allSystemPrompts: [mockSystemPrompt], + allQuickPrompts: [ + { + consumer: 'securitySolutionUI', + content: + 'You are a helpful, expert assistant who answers questions about Elastic Security. Do not answer questions unrelated to Elastic Security.\nIf you answer a question related to KQL or EQL, it should be immediately usable within an Elastic Security timeline; please always format the output correctly with back ticks. Any answer provided for Query DSL should also be usable in a security timeline. This means you should only ever include the "filter" portion of the query.\nUse the following context to answer questions:', + id: 'default-system-prompt', + name: 'Default system prompt', + promptType: 'quick', + color: 'red', + }, + ], updatedAnonymizationData: { total: 2, page: 1, @@ -101,23 +103,31 @@ describe('useSettingsUpdater', () => { it('should set all state variables to their initial values when resetSettings is called', async () => { await act(async () => { const { result, waitForNextUpdate } = renderHook(() => - useSettingsUpdater(mockConversations, conversationsLoaded, anonymizationFields) + useSettingsUpdater( + mockConversations, + { + data: [...mockSystemPrompts, ...mockQuickPrompts], + page: 1, + perPage: 100, + total: 10, + }, + conversationsLoaded, + anonymizationFields + ) ); await waitForNextUpdate(); const { setConversationSettings, setConversationsSettingsBulkActions, - setUpdatedQuickPromptSettings, - setUpdatedSystemPromptSettings, setUpdatedKnowledgeBaseSettings, setUpdatedAssistantStreamingEnabled, resetSettings, + setPromptsBulkActions, } = result.current; setConversationSettings(updatedValues.conversations); setConversationsSettingsBulkActions({}); - setUpdatedQuickPromptSettings(updatedValues.allQuickPrompts); - setUpdatedSystemPromptSettings(updatedValues.allSystemPrompts); + setPromptsBulkActions({}); setUpdatedAnonymizationData(updatedValues.updatedAnonymizationData); setUpdatedKnowledgeBaseSettings(updatedValues.knowledgeBase); setUpdatedAssistantStreamingEnabled(updatedValues.assistantStreamingEnabled); @@ -149,23 +159,31 @@ describe('useSettingsUpdater', () => { it('should update all state variables to their updated values when saveSettings is called', async () => { await act(async () => { const { result, waitForNextUpdate } = renderHook(() => - useSettingsUpdater(mockConversations, conversationsLoaded, anonymizationFields) + useSettingsUpdater( + mockConversations, + { + data: mockSystemPrompts, + page: 1, + perPage: 100, + total: 10, + }, + conversationsLoaded, + anonymizationFields + ) ); await waitForNextUpdate(); const { setConversationSettings, setConversationsSettingsBulkActions, - setUpdatedQuickPromptSettings, - setUpdatedSystemPromptSettings, setAnonymizationFieldsBulkActions, setUpdatedKnowledgeBaseSettings, + setPromptsBulkActions, } = result.current; setConversationSettings(updatedValues.conversations); setConversationsSettingsBulkActions({ delete: { ids: ['1'] } }); setAnonymizationFieldsBulkActions({ delete: { ids: ['1'] } }); - setUpdatedQuickPromptSettings(updatedValues.allQuickPrompts); - setUpdatedSystemPromptSettings(updatedValues.allSystemPrompts); + setPromptsBulkActions({}); setUpdatedAnonymizationData(updatedValues.updatedAnonymizationData); setUpdatedKnowledgeBaseSettings(updatedValues.knowledgeBase); @@ -179,8 +197,6 @@ describe('useSettingsUpdater', () => { body: '{"delete":{"ids":["1"]}}', } ); - expect(setAllQuickPromptsMock).toHaveBeenCalledWith(updatedValues.allQuickPrompts); - expect(setAllSystemPromptsMock).toHaveBeenCalledWith(updatedValues.allSystemPrompts); expect(setUpdatedAnonymizationData).toHaveBeenCalledWith( updatedValues.updatedAnonymizationData ); @@ -190,7 +206,17 @@ describe('useSettingsUpdater', () => { it('should track which toggles have been updated when saveSettings is called', async () => { await act(async () => { const { result, waitForNextUpdate } = renderHook(() => - useSettingsUpdater(mockConversations, conversationsLoaded, anonymizationFields) + useSettingsUpdater( + mockConversations, + { + data: mockSystemPrompts, + page: 1, + perPage: 100, + total: 10, + }, + conversationsLoaded, + anonymizationFields + ) ); await waitForNextUpdate(); const { setUpdatedKnowledgeBaseSettings } = result.current; @@ -207,7 +233,17 @@ describe('useSettingsUpdater', () => { it('should track only toggles that updated', async () => { await act(async () => { const { result, waitForNextUpdate } = renderHook(() => - useSettingsUpdater(mockConversations, conversationsLoaded, anonymizationFields) + useSettingsUpdater( + mockConversations, + { + data: mockSystemPrompts, + page: 1, + perPage: 100, + total: 10, + }, + conversationsLoaded, + anonymizationFields + ) ); await waitForNextUpdate(); const { setUpdatedKnowledgeBaseSettings } = result.current; @@ -225,7 +261,17 @@ describe('useSettingsUpdater', () => { it('if no toggles update, do not track anything', async () => { await act(async () => { const { result, waitForNextUpdate } = renderHook(() => - useSettingsUpdater(mockConversations, conversationsLoaded, anonymizationFields) + useSettingsUpdater( + mockConversations, + { + data: mockSystemPrompts, + page: 1, + perPage: 100, + total: 10, + }, + conversationsLoaded, + anonymizationFields + ) ); await waitForNextUpdate(); const { setUpdatedKnowledgeBaseSettings } = result.current; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/use_settings_updater/use_settings_updater.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/use_settings_updater/use_settings_updater.tsx index c6cf81c4bf949..1ae1c9e5b1b73 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/use_settings_updater/use_settings_updater.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/use_settings_updater/use_settings_updater.tsx @@ -8,7 +8,13 @@ import React, { useCallback, useEffect, useState } from 'react'; import { FindAnonymizationFieldsResponse } from '@kbn/elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.gen'; import { PerformBulkActionRequestBody } from '@kbn/elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.gen'; -import { Conversation, Prompt, QuickPrompt } from '../../../..'; +import { + PerformBulkActionRequestBody as PromptsPerformBulkActionRequestBody, + PromptResponse, + PromptTypeEnum, +} from '@kbn/elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen'; +import { FindPromptsResponse } from '@kbn/elastic-assistant-common/impl/schemas/prompts/find_prompts_route.gen'; +import { Conversation } from '../../../..'; import { useAssistantContext } from '../../../assistant_context'; import type { KnowledgeBaseConfig } from '../../types'; import { @@ -16,6 +22,7 @@ import { bulkUpdateConversations, } from '../../api/conversations/bulk_update_actions_conversations'; import { bulkUpdateAnonymizationFields } from '../../api/anonymization_fields/bulk_update_anonymization_fields'; +import { bulkUpdatePrompts } from '../../api/prompts/bulk_update_prompts'; interface UseSettingsUpdater { assistantStreamingEnabled: boolean; @@ -23,9 +30,9 @@ interface UseSettingsUpdater { conversationsSettingsBulkActions: ConversationsBulkActions; updatedAnonymizationData: FindAnonymizationFieldsResponse; knowledgeBase: KnowledgeBaseConfig; - quickPromptSettings: QuickPrompt[]; + quickPromptSettings: PromptResponse[]; resetSettings: () => void; - systemPromptSettings: Prompt[]; + systemPromptSettings: PromptResponse[]; setUpdatedAnonymizationData: React.Dispatch< React.SetStateAction >; @@ -37,26 +44,25 @@ interface UseSettingsUpdater { setAnonymizationFieldsBulkActions: React.Dispatch< React.SetStateAction >; + promptsBulkActions: PromptsPerformBulkActionRequestBody; + setPromptsBulkActions: React.Dispatch>; setUpdatedKnowledgeBaseSettings: React.Dispatch>; - setUpdatedQuickPromptSettings: React.Dispatch>; - setUpdatedSystemPromptSettings: React.Dispatch>; + setUpdatedQuickPromptSettings: React.Dispatch>; + setUpdatedSystemPromptSettings: React.Dispatch>; setUpdatedAssistantStreamingEnabled: React.Dispatch>; saveSettings: () => Promise; } export const useSettingsUpdater = ( conversations: Record, + allPrompts: FindPromptsResponse, conversationsLoaded: boolean, anonymizationFields: FindAnonymizationFieldsResponse ): UseSettingsUpdater => { // Initial state from assistant context const { - allQuickPrompts, - allSystemPrompts, assistantTelemetry, knowledgeBase, - setAllQuickPrompts, - setAllSystemPrompts, assistantStreamingEnabled, setAssistantStreamingEnabled, setKnowledgeBase, @@ -73,14 +79,20 @@ export const useSettingsUpdater = ( const [conversationsSettingsBulkActions, setConversationsSettingsBulkActions] = useState({}); // Quick Prompts - const [updatedQuickPromptSettings, setUpdatedQuickPromptSettings] = - useState(allQuickPrompts); + const [quickPromptSettings, setUpdatedQuickPromptSettings] = useState( + allPrompts.data.filter((p) => p.promptType === PromptTypeEnum.quick) + ); // System Prompts - const [updatedSystemPromptSettings, setUpdatedSystemPromptSettings] = - useState(allSystemPrompts); + const [systemPromptSettings, setUpdatedSystemPromptSettings] = useState( + allPrompts.data.filter((p) => p.promptType === PromptTypeEnum.system) + ); // Anonymization const [anonymizationFieldsBulkActions, setAnonymizationFieldsBulkActions] = useState({}); + // Prompts + const [promptsBulkActions, setPromptsBulkActions] = useState( + {} + ); const [updatedAnonymizationData, setUpdatedAnonymizationData] = useState(anonymizationFields); const [updatedAssistantStreamingEnabled, setUpdatedAssistantStreamingEnabled] = @@ -95,31 +107,57 @@ export const useSettingsUpdater = ( const resetSettings = useCallback((): void => { setConversationSettings(conversations); setConversationsSettingsBulkActions({}); - setUpdatedQuickPromptSettings(allQuickPrompts); + setUpdatedQuickPromptSettings( + allPrompts.data.filter((p) => p.promptType === PromptTypeEnum.quick) + ); setUpdatedKnowledgeBaseSettings(knowledgeBase); setUpdatedAssistantStreamingEnabled(assistantStreamingEnabled); - setUpdatedSystemPromptSettings(allSystemPrompts); + setUpdatedSystemPromptSettings( + allPrompts.data.filter((p) => p.promptType === PromptTypeEnum.system) + ); setUpdatedAnonymizationData(anonymizationFields); - }, [ - allQuickPrompts, - allSystemPrompts, - anonymizationFields, - assistantStreamingEnabled, - conversations, - knowledgeBase, - ]); + }, [allPrompts, anonymizationFields, assistantStreamingEnabled, conversations, knowledgeBase]); + + const hasBulkConversations = + conversationsSettingsBulkActions.create || + conversationsSettingsBulkActions.update || + conversationsSettingsBulkActions.delete; + + const hasBulkAnonymizationFields = + anonymizationFieldsBulkActions.create || + anonymizationFieldsBulkActions.update || + anonymizationFieldsBulkActions.delete; + const hasBulkPrompts = + promptsBulkActions.create || promptsBulkActions.update || promptsBulkActions.delete; /** * Save all pending settings */ const saveSettings = useCallback(async (): Promise => { - setAllQuickPrompts(updatedQuickPromptSettings); - setAllSystemPrompts(updatedSystemPromptSettings); + const bulkPromptsResult = hasBulkPrompts + ? await bulkUpdatePrompts(http, promptsBulkActions, toasts) + : undefined; + + // replace conversation references for created + if (bulkPromptsResult) { + bulkPromptsResult.attributes.results.created.forEach((p) => { + if (conversationsSettingsBulkActions.create) { + Object.values(conversationsSettingsBulkActions.create).forEach((c) => { + if (c.apiConfig?.defaultSystemPromptId === p.name) { + c.apiConfig.defaultSystemPromptId = p.id; + } + }); + } + if (conversationsSettingsBulkActions.update) { + Object.values(conversationsSettingsBulkActions.update).forEach((c) => { + if (c.apiConfig?.defaultSystemPromptId === p.name) { + c.apiConfig.defaultSystemPromptId = p.id; + } + }); + } + }); + } - const hasBulkConversations = - conversationsSettingsBulkActions.create || - conversationsSettingsBulkActions.update || - conversationsSettingsBulkActions.delete; const bulkResult = hasBulkConversations ? await bulkUpdateConversations(http, conversationsSettingsBulkActions, toasts) : undefined; @@ -145,21 +183,20 @@ export const useSettingsUpdater = ( } setAssistantStreamingEnabled(updatedAssistantStreamingEnabled); setKnowledgeBase(updatedKnowledgeBaseSettings); - const hasBulkAnonymizationFields = - anonymizationFieldsBulkActions.create || - anonymizationFieldsBulkActions.update || - anonymizationFieldsBulkActions.delete; + const bulkAnonymizationFieldsResult = hasBulkAnonymizationFields ? await bulkUpdateAnonymizationFields(http, anonymizationFieldsBulkActions, toasts) : undefined; - return (bulkResult?.success ?? true) && (bulkAnonymizationFieldsResult?.success ?? true); + + return ( + (bulkResult?.success ?? true) && + (bulkAnonymizationFieldsResult?.success ?? true) && + (bulkPromptsResult?.success ?? true) + ); }, [ - setAllQuickPrompts, - updatedQuickPromptSettings, - setAllSystemPrompts, - updatedSystemPromptSettings, - conversationsSettingsBulkActions, + hasBulkConversations, http, + conversationsSettingsBulkActions, toasts, knowledgeBase.isEnabledKnowledgeBase, knowledgeBase.isEnabledRAGAlerts, @@ -168,7 +205,10 @@ export const useSettingsUpdater = ( updatedAssistantStreamingEnabled, setAssistantStreamingEnabled, setKnowledgeBase, + hasBulkAnonymizationFields, anonymizationFieldsBulkActions, + hasBulkPrompts, + promptsBulkActions, assistantTelemetry, ]); @@ -200,9 +240,9 @@ export const useSettingsUpdater = ( conversationsSettingsBulkActions, knowledgeBase: updatedKnowledgeBaseSettings, assistantStreamingEnabled: updatedAssistantStreamingEnabled, - quickPromptSettings: updatedQuickPromptSettings, + quickPromptSettings, resetSettings, - systemPromptSettings: updatedSystemPromptSettings, + systemPromptSettings, saveSettings, updatedAnonymizationData, setUpdatedAnonymizationData, @@ -214,5 +254,7 @@ export const useSettingsUpdater = ( setUpdatedSystemPromptSettings, setConversationSettings, setConversationsSettingsBulkActions, + promptsBulkActions, + setPromptsBulkActions, }; }; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/types.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/types.ts index 91ee3468a12d9..587be76910c3e 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/types.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/types.ts @@ -5,19 +5,6 @@ * 2.0. */ -export type PromptType = 'system' | 'user'; - -export interface Prompt { - id: string; - content: string; - name: string; - promptType: PromptType; - isDefault?: boolean; // TODO: Should be renamed to isImmutable as this flag is used to prevent users from deleting prompts - isNewConversationDefault?: boolean; - isFlyoutMode?: boolean; - label?: string; -} - export interface KnowledgeBaseConfig { isEnabledRAGAlerts: boolean; isEnabledKnowledgeBase: boolean; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/helpers.test.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/helpers.test.ts index c8c8ab5ff7727..3e997fef5d573 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/helpers.test.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/helpers.test.ts @@ -13,7 +13,8 @@ import { getDefaultSystemPrompt, } from './helpers'; import { AIConnector } from '../../connectorland/connector_selector'; -import { Conversation, Prompt } from '../../..'; +import { Conversation } from '../../..'; +import { PromptResponse } from '@kbn/elastic-assistant-common'; const tilde = '`'; const codeDelimiter = '```'; @@ -61,28 +62,28 @@ ${codeDelimiter} This query will filter the events based on the condition that the ${tilde}user.name${tilde} field should exactly match the value \"9dcc9960-78cf-4ef6-9a2e-dbd5816daa60\".`; describe('useConversation helpers', () => { - const allSystemPrompts: Prompt[] = [ + const allSystemPrompts: PromptResponse[] = [ { id: '1', content: 'Prompt 1', name: 'Prompt 1', - promptType: 'user', + promptType: 'quick', }, { id: '2', content: 'Prompt 2', name: 'Prompt 2', - promptType: 'user', + promptType: 'quick', isNewConversationDefault: true, }, { id: '3', content: 'Prompt 3', name: 'Prompt 3', - promptType: 'user', + promptType: 'quick', }, ]; - const allSystemPromptsNoDefault: Prompt[] = allSystemPrompts.filter( + const allSystemPromptsNoDefault: PromptResponse[] = allSystemPrompts.filter( ({ isNewConversationDefault }) => isNewConversationDefault !== true ); @@ -237,25 +238,25 @@ describe('useConversation helpers', () => { }); describe('getConversationApiConfig', () => { - const allSystemPrompts: Prompt[] = [ + const allSystemPrompts: PromptResponse[] = [ { id: '1', content: 'Prompt 1', name: 'Prompt 1', - promptType: 'user', + promptType: 'quick', }, { id: '2', content: 'Prompt 2', name: 'Prompt 2', - promptType: 'user', + promptType: 'quick', isNewConversationDefault: true, }, { id: '3', content: 'Prompt 3', name: 'Prompt 3', - promptType: 'user', + promptType: 'quick', }, ]; @@ -390,7 +391,7 @@ describe('getConversationApiConfig', () => { }); test('should return the first system prompt if both conversation system prompt and default new system prompt do not exist', () => { - const allSystemPromptsNoDefault: Prompt[] = allSystemPrompts.filter( + const allSystemPromptsNoDefault: PromptResponse[] = allSystemPrompts.filter( ({ isNewConversationDefault }) => isNewConversationDefault !== true ); @@ -418,7 +419,7 @@ describe('getConversationApiConfig', () => { }); test('should return the first system prompt if conversation system prompt does not exist within all system prompts', () => { - const allSystemPromptsNoDefault: Prompt[] = allSystemPrompts.filter( + const allSystemPromptsNoDefault: PromptResponse[] = allSystemPrompts.filter( ({ isNewConversationDefault }) => isNewConversationDefault !== true ); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/helpers.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/helpers.ts index 2d6c4075fba0e..fde1c1d3d943c 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/helpers.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/helpers.ts @@ -6,7 +6,7 @@ */ import React from 'react'; -import { Prompt } from '../types'; +import { PromptResponse } from '@kbn/elastic-assistant-common'; import { Conversation } from '../../assistant_context/types'; import { AIConnector } from '../../connectorland/connector_selector'; import { getGenAiConfig } from '../../connectorland/helpers'; @@ -75,7 +75,7 @@ export const analyzeMarkdown = (markdown: string): CodeBlockDetails[] => { * * @param allSystemPrompts All available System Prompts */ -export const getDefaultNewSystemPrompt = (allSystemPrompts: Prompt[]) => +export const getDefaultNewSystemPrompt = (allSystemPrompts: PromptResponse[]) => allSystemPrompts.find((prompt) => prompt.isNewConversationDefault) ?? allSystemPrompts?.[0]; /** @@ -88,15 +88,15 @@ export const getDefaultSystemPrompt = ({ allSystemPrompts, conversation, }: { - allSystemPrompts: Prompt[]; + allSystemPrompts: PromptResponse[]; conversation: Conversation | undefined; -}): Prompt | undefined => { +}): PromptResponse | undefined => { const conversationSystemPrompt = allSystemPrompts.find( (prompt) => prompt.id === conversation?.apiConfig?.defaultSystemPromptId ); const defaultNewSystemPrompt = getDefaultNewSystemPrompt(allSystemPrompts); - return conversationSystemPrompt ?? defaultNewSystemPrompt; + return conversationSystemPrompt?.id ? conversationSystemPrompt : defaultNewSystemPrompt; }; /** @@ -109,9 +109,9 @@ export const getInitialDefaultSystemPrompt = ({ allSystemPrompts, conversation, }: { - allSystemPrompts: Prompt[]; + allSystemPrompts: PromptResponse[]; conversation: Conversation | undefined; -}): Prompt | undefined => { +}): PromptResponse | undefined => { const conversationSystemPrompt = allSystemPrompts.find( (prompt) => prompt.id === conversation?.apiConfig?.defaultSystemPromptId ); @@ -133,7 +133,7 @@ export const getConversationApiConfig = ({ connectors, defaultConnector, }: { - allSystemPrompts: Prompt[]; + allSystemPrompts: PromptResponse[]; conversation: Conversation; connectors?: AIConnector[]; defaultConnector?: AIConnector; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/index.tsx index 84fa21417ae70..a276aea3ff4ab 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/index.tsx @@ -18,6 +18,7 @@ import { updateConversation, } from '../api/conversations'; import { WELCOME_CONVERSATION } from './sample_conversations'; +import { useFetchPrompts } from '../api/prompts/use_fetch_prompts'; export const DEFAULT_CONVERSATION_STATE: Conversation = { id: '', @@ -63,7 +64,10 @@ interface UseConversation { } export const useConversation = (): UseConversation => { - const { allSystemPrompts, http, toasts } = useAssistantContext(); + const { http, toasts } = useAssistantContext(); + const { + data: { data: allPrompts }, + } = useFetchPrompts(); const getConversation = useCallback( async (conversationId: string, silent?: boolean) => { @@ -101,7 +105,7 @@ export const useConversation = (): UseConversation => { async (conversation: Conversation) => { if (conversation.apiConfig) { const defaultSystemPromptId = getDefaultSystemPrompt({ - allSystemPrompts, + allSystemPrompts: allPrompts, conversation, })?.id; @@ -115,7 +119,7 @@ export const useConversation = (): UseConversation => { }); } }, - [allSystemPrompts, http, toasts] + [allPrompts, http, toasts] ); /** diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant_context/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant_context/index.tsx index ffafb4f704a17..78336f8a8b03d 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant_context/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant_context/index.tsx @@ -25,17 +25,13 @@ import type { Conversation } from './types'; import { DEFAULT_ASSISTANT_TITLE } from '../assistant/translations'; import { CodeBlockDetails } from '../assistant/use_conversation/helpers'; import { PromptContextTemplate } from '../assistant/prompt_context/types'; -import { QuickPrompt } from '../assistant/quick_prompts/types'; -import { KnowledgeBaseConfig, Prompt, TraceOptions } from '../assistant/types'; -import { BASE_SYSTEM_PROMPTS } from '../content/prompts/system'; +import { KnowledgeBaseConfig, TraceOptions } from '../assistant/types'; import { DEFAULT_ASSISTANT_NAMESPACE, DEFAULT_KNOWLEDGE_BASE_SETTINGS, KNOWLEDGE_BASE_LOCAL_STORAGE_KEY, LAST_CONVERSATION_ID_LOCAL_STORAGE_KEY, - QUICK_PROMPT_LOCAL_STORAGE_KEY, STREAMING_LOCAL_STORAGE_KEY, - SYSTEM_PROMPT_LOCAL_STORAGE_KEY, TRACE_OPTIONS_SESSION_STORAGE_KEY, } from './constants'; import { AssistantAvailability, AssistantTelemetry } from './types'; @@ -65,8 +61,6 @@ export interface AssistantProviderProps { ) => CodeBlockDetails[][]; basePath: string; basePromptContexts?: PromptContextTemplate[]; - baseQuickPrompts?: QuickPrompt[]; - baseSystemPrompts?: Prompt[]; docLinks: Omit; children: React.ReactNode; getComments: (commentArgs: { @@ -87,6 +81,7 @@ export interface AssistantProviderProps { navigateToApp: (appId: string, options?: NavigateToAppOptions | undefined) => Promise; title?: string; toasts?: IToasts; + currentAppId: string; } export interface UserAvatar { @@ -106,13 +101,8 @@ export interface UseAssistantContext { currentConversation: Conversation, showAnonymizedValues: boolean ) => CodeBlockDetails[][]; - allQuickPrompts: QuickPrompt[]; - allSystemPrompts: Prompt[]; docLinks: Omit; basePath: string; - basePromptContexts: PromptContextTemplate[]; - baseQuickPrompts: QuickPrompt[]; - baseSystemPrompts: Prompt[]; baseConversations: Record; getComments: (commentArgs: { abortStream: () => void; @@ -134,8 +124,6 @@ export interface UseAssistantContext { nameSpace: string; registerPromptContext: RegisterPromptContext; selectedSettingsTab: SettingsTabs | null; - setAllQuickPrompts: React.Dispatch>; - setAllSystemPrompts: React.Dispatch>; setAssistantStreamingEnabled: React.Dispatch>; setKnowledgeBase: React.Dispatch>; setLastConversationId: React.Dispatch>; @@ -150,7 +138,9 @@ export interface UseAssistantContext { title: string; toasts: IToasts | undefined; traceOptions: TraceOptions; + basePromptContexts: PromptContextTemplate[]; unRegisterPromptContext: UnRegisterPromptContext; + currentAppId: string; } const AssistantContext = React.createContext(undefined); @@ -164,8 +154,6 @@ export const AssistantProvider: React.FC = ({ docLinks, basePath, basePromptContexts = [], - baseQuickPrompts = [], - baseSystemPrompts = BASE_SYSTEM_PROMPTS, children, getComments, http, @@ -174,6 +162,7 @@ export const AssistantProvider: React.FC = ({ nameSpace = DEFAULT_ASSISTANT_NAMESPACE, title = DEFAULT_ASSISTANT_TITLE, toasts, + currentAppId, }) => { /** * Session storage for traceOptions, including APM URL and LangSmith Project/API Key @@ -189,22 +178,6 @@ export const AssistantProvider: React.FC = ({ defaultTraceOptions ); - /** - * Local storage for all quick prompts, prefixed by assistant nameSpace - */ - const [localStorageQuickPrompts, setLocalStorageQuickPrompts] = useLocalStorage( - `${nameSpace}.${QUICK_PROMPT_LOCAL_STORAGE_KEY}`, - baseQuickPrompts - ); - - /** - * Local storage for all system prompts, prefixed by assistant nameSpace - */ - const [localStorageSystemPrompts, setLocalStorageSystemPrompts] = useLocalStorage( - `${nameSpace}.${SYSTEM_PROMPT_LOCAL_STORAGE_KEY}`, - baseSystemPrompts - ); - const [localStorageLastConversationId, setLocalStorageLastConversationId] = useLocalStorage(`${nameSpace}.${LAST_CONVERSATION_ID_LOCAL_STORAGE_KEY}`); @@ -290,12 +263,8 @@ export const AssistantProvider: React.FC = ({ assistantFeatures: assistantFeatures ?? defaultAssistantFeatures, assistantTelemetry, augmentMessageCodeBlocks, - allQuickPrompts: localStorageQuickPrompts ?? [], - allSystemPrompts: localStorageSystemPrompts ?? [], basePath, basePromptContexts, - baseQuickPrompts, - baseSystemPrompts, docLinks, getComments, http, @@ -308,8 +277,6 @@ export const AssistantProvider: React.FC = ({ // can be undefined from localStorage, if not defined, default to true assistantStreamingEnabled: localStorageStreaming ?? true, setAssistantStreamingEnabled: setLocalStorageStreaming, - setAllQuickPrompts: setLocalStorageQuickPrompts, - setAllSystemPrompts: setLocalStorageSystemPrompts, setKnowledgeBase: setLocalStorageKnowledgeBase, setSelectedSettingsTab, setShowAssistantOverlay, @@ -322,6 +289,7 @@ export const AssistantProvider: React.FC = ({ getLastConversationId, setLastConversationId: setLocalStorageLastConversationId, baseConversations, + currentAppId, }), [ actionTypeRegistry, @@ -330,12 +298,8 @@ export const AssistantProvider: React.FC = ({ assistantFeatures, assistantTelemetry, augmentMessageCodeBlocks, - localStorageQuickPrompts, - localStorageSystemPrompts, basePath, basePromptContexts, - baseQuickPrompts, - baseSystemPrompts, docLinks, getComments, http, @@ -347,8 +311,6 @@ export const AssistantProvider: React.FC = ({ selectedSettingsTab, localStorageStreaming, setLocalStorageStreaming, - setLocalStorageQuickPrompts, - setLocalStorageSystemPrompts, setLocalStorageKnowledgeBase, setSessionStorageTraceOptions, showAssistantOverlay, @@ -359,6 +321,7 @@ export const AssistantProvider: React.FC = ({ getLastConversationId, setLocalStorageLastConversationId, baseConversations, + currentAppId, ] ); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/content/prompts/system/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/content/prompts/system/index.tsx deleted file mode 100644 index a73fbf4854ef1..0000000000000 --- a/x-pack/packages/kbn-elastic-assistant/impl/content/prompts/system/index.tsx +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { Prompt } from '../../../..'; -import { - DEFAULT_SYSTEM_PROMPT_LABEL, - DEFAULT_SYSTEM_PROMPT_NAME, - DEFAULT_SYSTEM_PROMPT_NON_I18N, - SUPERHERO_SYSTEM_PROMPT_LABEL, - SUPERHERO_SYSTEM_PROMPT_NAME, - SUPERHERO_SYSTEM_PROMPT_NON_I18N, -} from './translations'; - -/** - * Base System Prompts for Elastic AI Assistant (if not overridden on initialization). - */ -export const BASE_SYSTEM_PROMPTS: Prompt[] = [ - { - id: 'default-system-prompt', - content: DEFAULT_SYSTEM_PROMPT_NON_I18N, - name: DEFAULT_SYSTEM_PROMPT_NAME, - promptType: 'system', - label: DEFAULT_SYSTEM_PROMPT_LABEL, - }, - { - id: 'CB9FA555-B59F-4F71-AFF9-8A891AC5BC28', - content: SUPERHERO_SYSTEM_PROMPT_NON_I18N, - name: SUPERHERO_SYSTEM_PROMPT_NAME, - promptType: 'system', - label: SUPERHERO_SYSTEM_PROMPT_LABEL, - }, -]; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/content/prompts/user/translations.ts b/x-pack/packages/kbn-elastic-assistant/impl/content/prompts/user/translations.ts deleted file mode 100644 index 28cda1f9414a8..0000000000000 --- a/x-pack/packages/kbn-elastic-assistant/impl/content/prompts/user/translations.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { i18n } from '@kbn/i18n'; - -export const THEN_SUMMARIZE_SUGGESTED_KQL_AND_EQL_QUERIES = i18n.translate( - 'xpack.elasticAssistant.assistant.content.prompts.user.thenSummarizeSuggestedKqlAndEqlQueries', - { - defaultMessage: - 'Evaluate the event from the context above and format your output neatly in markdown syntax for my Elastic Security case.', - } -); - -export const FINALLY_SUGGEST_INVESTIGATION_GUIDE_AND_FORMAT_AS_MARKDOWN = i18n.translate( - 'xpack.elasticAssistant.assistant.content.prompts.user.finallySuggestInvestigationGuideAndFormatAsMarkdown', - { - defaultMessage: `Add your description, recommended actions and bulleted triage steps. Use the MITRE ATT&CK data provided to add more context and recommendations from MITRE, and hyperlink to the relevant pages on MITRE\'s website. Be sure to include the user and host risk score data from the context. Your response should include steps that point to Elastic Security specific features, including endpoint response actions, the Elastic Agent OSQuery manager integration (with example osquery queries), timelines and entity analytics and link to all the relevant Elastic Security documentation.`, - } -); - -export const EXPLAIN_THEN_SUMMARIZE_SUGGEST_INVESTIGATION_GUIDE_NON_I18N = `${THEN_SUMMARIZE_SUGGESTED_KQL_AND_EQL_QUERIES} -${FINALLY_SUGGEST_INVESTIGATION_GUIDE_AND_FORMAT_AS_MARKDOWN}`; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/mock/quick_prompt.ts b/x-pack/packages/kbn-elastic-assistant/impl/mock/quick_prompt.ts index 14318f4b1b534..31fa9bb6508b8 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/mock/quick_prompt.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/mock/quick_prompt.ts @@ -5,52 +5,69 @@ * 2.0. */ -import { QuickPrompt } from '../..'; +import { + PromptResponse, + PromptTypeEnum, +} from '@kbn/elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen'; -export const MOCK_QUICK_PROMPTS: QuickPrompt[] = [ +export const MOCK_QUICK_PROMPTS: PromptResponse[] = [ { - title: 'ALERT_SUMMARIZATION_TITLE', - prompt: 'ALERT_SUMMARIZATION_PROMPT', + name: 'ALERT_SUMMARIZATION_TITLE', + content: 'ALERT_SUMMARIZATION_PROMPT', color: '#F68FBE', categories: ['PROMPT_CONTEXT_ALERT_CATEGORY'], isDefault: true, + id: 'ALERT_SUMMARIZATION_TITLE', + promptType: PromptTypeEnum.quick, }, { - title: 'RULE_CREATION_TITLE', - prompt: 'RULE_CREATION_PROMPT', + name: 'RULE_CREATION_TITLE', + content: 'RULE_CREATION_PROMPT', categories: ['PROMPT_CONTEXT_DETECTION_RULES_CATEGORY'], color: '#7DDED8', isDefault: true, + id: 'RULE_CREATION_TITLE', + promptType: PromptTypeEnum.quick, }, { - title: 'WORKFLOW_ANALYSIS_TITLE', - prompt: 'WORKFLOW_ANALYSIS_PROMPT', + name: 'WORKFLOW_ANALYSIS_TITLE', + content: 'WORKFLOW_ANALYSIS_PROMPT', color: '#36A2EF', isDefault: true, + id: 'WORKFLOW_ANALYSIS_TITLE', + promptType: PromptTypeEnum.quick, }, { - title: 'THREAT_INVESTIGATION_GUIDES_TITLE', - prompt: 'THREAT_INVESTIGATION_GUIDES_PROMPT', + name: 'THREAT_INVESTIGATION_GUIDES_TITLE', + content: 'THREAT_INVESTIGATION_GUIDES_PROMPT', categories: ['PROMPT_CONTEXT_EVENT_CATEGORY'], color: '#F3D371', isDefault: true, + id: 'THREAT_INVESTIGATION_GUIDES_TITLE', + promptType: PromptTypeEnum.quick, }, { - title: 'SPL_QUERY_CONVERSION_TITLE', - prompt: 'SPL_QUERY_CONVERSION_PROMPT', + name: 'SPL_QUERY_CONVERSION_TITLE', + content: 'SPL_QUERY_CONVERSION_PROMPT', color: '#BADA55', isDefault: true, + id: 'SPL_QUERY_CONVERSION_TITLE', + promptType: PromptTypeEnum.quick, }, { - title: 'AUTOMATION_TITLE', - prompt: 'AUTOMATION_PROMPT', + name: 'AUTOMATION_TITLE', + content: 'AUTOMATION_PROMPT', color: '#FFA500', isDefault: true, + id: 'AUTOMATION_TITLE', + promptType: PromptTypeEnum.quick, }, { - title: 'A_CUSTOM_OPTION', - prompt: 'quickly prompt please', + name: 'A_CUSTOM_OPTION', + content: 'quickly prompt please', color: '#D36086', categories: [], + id: 'A_CUSTOM_OPTION', + promptType: PromptTypeEnum.quick, }, ]; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/mock/system_prompt/index.ts b/x-pack/packages/kbn-elastic-assistant/impl/mock/system_prompt/index.ts index de23052d15564..04b027cbfe578 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/mock/system_prompt/index.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/mock/system_prompt/index.ts @@ -5,35 +5,47 @@ * 2.0. */ -import { Prompt } from '../../assistant/types'; +import { PromptResponse } from '@kbn/elastic-assistant-common'; -export const mockSystemPrompt: Prompt = { +export const mockSystemPrompt: PromptResponse = { id: 'mock-system-prompt-1', content: 'You are a helpful, expert assistant who answers questions about Elastic Security.', name: 'Mock system prompt', + consumer: 'securitySolutionUI', promptType: 'system', - isFlyoutMode: false, }; -export const mockSuperheroSystemPrompt: Prompt = { +export const mockSuperheroSystemPrompt: PromptResponse = { id: 'mock-superhero-system-prompt-1', content: `You are a helpful, expert assistant who answers questions about Elastic Security. You have the personality of a mutant superhero who says "bub" a lot.`, name: 'Mock superhero system prompt', + consumer: 'securitySolutionUI', promptType: 'system', }; -export const defaultSystemPrompt: Prompt = { +export const defaultSystemPrompt: PromptResponse = { id: 'default-system-prompt', content: 'You are a helpful, expert assistant who answers questions about Elastic Security. Do not answer questions unrelated to Elastic Security.\nIf you answer a question related to KQL or EQL, it should be immediately usable within an Elastic Security timeline; please always format the output correctly with back ticks. Any answer provided for Query DSL should also be usable in a security timeline. This means you should only ever include the "filter" portion of the query.\nUse the following context to answer questions:', name: 'Default system prompt', promptType: 'system', + consumer: 'securitySolutionUI', isDefault: true, isNewConversationDefault: true, }; -export const mockSystemPrompts: Prompt[] = [ +export const defaultQuickPrompt: PromptResponse = { + id: 'default-system-prompt', + content: + 'You are a helpful, expert assistant who answers questions about Elastic Security. Do not answer questions unrelated to Elastic Security.\nIf you answer a question related to KQL or EQL, it should be immediately usable within an Elastic Security timeline; please always format the output correctly with back ticks. Any answer provided for Query DSL should also be usable in a security timeline. This means you should only ever include the "filter" portion of the query.\nUse the following context to answer questions:', + name: 'Default system prompt', + promptType: 'quick', + consumer: 'securitySolutionUI', + color: 'red', +}; + +export const mockSystemPrompts: PromptResponse[] = [ mockSystemPrompt, mockSuperheroSystemPrompt, defaultSystemPrompt, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/mock/test_providers/test_providers.tsx b/x-pack/packages/kbn-elastic-assistant/impl/mock/test_providers/test_providers.tsx index 17e977fdbf80f..13e543a02b3b2 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/mock/test_providers/test_providers.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/mock/test_providers/test_providers.tsx @@ -81,6 +81,7 @@ export const TestProvidersComponent: React.FC = ({ baseConversations={{}} navigateToApp={mockNavigateToApp} {...providerContext} + currentAppId={'test'} > {children} diff --git a/x-pack/packages/kbn-elastic-assistant/impl/mock/user_prompt/index.ts b/x-pack/packages/kbn-elastic-assistant/impl/mock/user_prompt/index.ts index 5bc23b0d680e3..1f7c96126bc10 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/mock/user_prompt/index.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/mock/user_prompt/index.ts @@ -5,12 +5,12 @@ * 2.0. */ -import { Prompt } from '../../assistant/types'; +import { PromptResponse } from '@kbn/elastic-assistant-common'; -export const mockUserPrompt: Prompt = { +export const mockUserPrompt: PromptResponse = { id: 'mock-user-prompt-1', content: `Explain the meaning from the context above, then summarize a list of suggested Elasticsearch KQL and EQL queries. Finally, suggest an investigation guide, and format it as markdown.`, name: 'Mock user prompt', - promptType: 'user', + promptType: 'quick', }; diff --git a/x-pack/packages/kbn-elastic-assistant/index.ts b/x-pack/packages/kbn-elastic-assistant/index.ts index df0ba1e8db0f9..7cd882cd633b8 100644 --- a/x-pack/packages/kbn-elastic-assistant/index.ts +++ b/x-pack/packages/kbn-elastic-assistant/index.ts @@ -90,12 +90,6 @@ export { WELCOME_CONVERSATION_TITLE, } from './impl/assistant/use_conversation/translations'; -/** i18n translations of system prompts */ -export * as SYSTEM_PROMPTS from './impl/content/prompts/system/translations'; - -/** i18n translations of user prompts */ -export * as USER_PROMPTS from './impl/content/prompts/user/translations'; - export type { /** for rendering results in a code block */ CodeBlockDetails, @@ -114,9 +108,6 @@ export type { ClientMessage, } from './impl/assistant_context/types'; -/** Interface for defining system/user prompts */ -export type { Prompt } from './impl/assistant/types'; - /** * This interface is used to pass context to the assistant, * for the purpose of building prompts. Examples of context include: @@ -139,12 +130,6 @@ export type { PromptContext } from './impl/assistant/prompt_context/types'; */ export type { PromptContextTemplate } from './impl/assistant/prompt_context/types'; -/** - * This interface is used to pass a default or base set of Quick Prompts to the Elastic Assistant that - * can be displayed when corresponding PromptContext's are registered. - */ -export type { QuickPrompt } from './impl/assistant/quick_prompts/types'; - export { useFetchCurrentUserConversations } from './impl/assistant/api/conversations/use_fetch_current_user_conversations'; export * from './impl/assistant/api/conversations/bulk_update_actions_conversations'; export { getConversationById } from './impl/assistant/api/conversations/conversations'; @@ -152,4 +137,4 @@ export { getConversationById } from './impl/assistant/api/conversations/conversa export { mergeBaseWithPersistedConversations } from './impl/assistant/helpers'; export { UpgradeButtons } from './impl/upgrade/upgrade_buttons'; -export { getUserConversations } from './impl/assistant/api'; +export { getUserConversations, getPrompts, bulkUpdatePrompts } from './impl/assistant/api'; diff --git a/x-pack/packages/kbn-entities-schema/src/schema/common.ts b/x-pack/packages/kbn-entities-schema/src/schema/common.ts index b2df63e93d71a..b0d4b7247d12c 100644 --- a/x-pack/packages/kbn-entities-schema/src/schema/common.ts +++ b/x-pack/packages/kbn-entities-schema/src/schema/common.ts @@ -8,17 +8,8 @@ import { z } from 'zod'; import moment from 'moment'; -export enum EntityType { - service = 'service', - host = 'host', - pod = 'pod', - node = 'node', -} - export const arrayOfStringsSchema = z.array(z.string()); -export const entityTypeSchema = z.nativeEnum(EntityType); - export enum BasicAggregations { avg = 'avg', max = 'max', diff --git a/x-pack/packages/kbn-entities-schema/src/schema/entity.ts b/x-pack/packages/kbn-entities-schema/src/schema/entity.ts index 8e5c411c2489e..58a9c011091b4 100644 --- a/x-pack/packages/kbn-entities-schema/src/schema/entity.ts +++ b/x-pack/packages/kbn-entities-schema/src/schema/entity.ts @@ -13,7 +13,6 @@ const entitySchema = z.object({ id: z.string(), identityFields: arrayOfStringsSchema, displayName: z.string(), - spaceId: z.string(), metrics: z.record(z.string(), z.number()), }), }); diff --git a/x-pack/packages/kbn-entities-schema/src/schema/entity_definition.ts b/x-pack/packages/kbn-entities-schema/src/schema/entity_definition.ts index 3ccc9a1ba2eea..15f3e98582c97 100644 --- a/x-pack/packages/kbn-entities-schema/src/schema/entity_definition.ts +++ b/x-pack/packages/kbn-entities-schema/src/schema/entity_definition.ts @@ -8,7 +8,6 @@ import { z } from 'zod'; import { arrayOfStringsSchema, - entityTypeSchema, keyMetricSchema, metadataSchema, filterSchema, @@ -20,7 +19,7 @@ export const entityDefinitionSchema = z.object({ id: z.string().regex(/^[\w-]+$/), name: z.string(), description: z.optional(z.string()), - type: entityTypeSchema, + type: z.string(), filter: filterSchema, indexPatterns: arrayOfStringsSchema, identityFields: z.array(identityFieldsSchema), diff --git a/x-pack/packages/security-solution/data_table/components/data_table/column_headers/helpers.test.tsx b/x-pack/packages/security-solution/data_table/components/data_table/column_headers/helpers.test.tsx index c68dd56b4b00e..cf2f39da52651 100644 --- a/x-pack/packages/security-solution/data_table/components/data_table/column_headers/helpers.test.tsx +++ b/x-pack/packages/security-solution/data_table/components/data_table/column_headers/helpers.test.tsx @@ -231,7 +231,6 @@ describe('helpers', () => { esTypes: ['date'], format: '', id: '@timestamp', - indexes: ['auditbeat', 'filebeat', 'packetbeat'], isSortable, name: '@timestamp', readFromDocValues: true, @@ -248,7 +247,6 @@ describe('helpers', () => { esTypes: ['ip'], format: '', id: 'source.ip', - indexes: ['auditbeat', 'filebeat', 'packetbeat'], isSortable, name: 'source.ip', schema: undefined, @@ -264,7 +262,6 @@ describe('helpers', () => { esTypes: ['ip'], format: '', id: 'destination.ip', - indexes: ['auditbeat', 'filebeat', 'packetbeat'], isSortable, name: 'destination.ip', schema: undefined, @@ -290,7 +287,6 @@ describe('helpers', () => { esTypes: ['date'], format: '', id: '@timestamp', - indexes: ['auditbeat', 'filebeat', 'packetbeat'], isSortable, name: '@timestamp', readFromDocValues: true, diff --git a/x-pack/packages/security-solution/data_table/mock/mock_source.ts b/x-pack/packages/security-solution/data_table/mock/mock_source.ts index 822922f52754d..eebf9f0979d57 100644 --- a/x-pack/packages/security-solution/data_table/mock/mock_source.ts +++ b/x-pack/packages/security-solution/data_table/mock/mock_source.ts @@ -8,25 +8,12 @@ import type { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { BrowserFields } from '@kbn/timelines-plugin/common'; -const DEFAULT_INDEX_PATTERN = [ - 'apm-*-transaction*', - 'auditbeat-*', - 'endgame-*', - 'filebeat-*', - 'logs-*', - 'packetbeat-*', - 'traces-apm*', - 'winlogbeat-*', - '-*elastic-cloud-logs-*', -]; - export const mockBrowserFields: BrowserFields = { agent: { fields: { 'agent.ephemeral_id': { aggregatable: true, format: '', - indexes: ['auditbeat', 'filebeat', 'packetbeat'], name: 'agent.ephemeral_id', searchable: true, type: 'string', @@ -35,7 +22,6 @@ export const mockBrowserFields: BrowserFields = { 'agent.hostname': { aggregatable: true, format: '', - indexes: ['auditbeat', 'filebeat', 'packetbeat'], name: 'agent.hostname', searchable: true, type: 'string', @@ -44,7 +30,6 @@ export const mockBrowserFields: BrowserFields = { 'agent.id': { aggregatable: true, format: '', - indexes: ['auditbeat', 'filebeat', 'packetbeat'], name: 'agent.id', searchable: true, type: 'string', @@ -53,7 +38,6 @@ export const mockBrowserFields: BrowserFields = { 'agent.name': { aggregatable: true, format: '', - indexes: ['auditbeat', 'filebeat', 'packetbeat'], name: 'agent.name', searchable: true, type: 'string', @@ -66,7 +50,6 @@ export const mockBrowserFields: BrowserFields = { 'auditd.data.a0': { aggregatable: true, format: '', - indexes: ['auditbeat'], name: 'auditd.data.a0', searchable: true, type: 'string', @@ -75,7 +58,6 @@ export const mockBrowserFields: BrowserFields = { 'auditd.data.a1': { aggregatable: true, format: '', - indexes: ['auditbeat'], name: 'auditd.data.a1', searchable: true, type: 'string', @@ -84,7 +66,6 @@ export const mockBrowserFields: BrowserFields = { 'auditd.data.a2': { aggregatable: true, format: '', - indexes: ['auditbeat'], name: 'auditd.data.a2', searchable: true, type: 'string', @@ -97,7 +78,6 @@ export const mockBrowserFields: BrowserFields = { '@timestamp': { aggregatable: true, format: '', - indexes: ['auditbeat', 'filebeat', 'packetbeat'], name: '@timestamp', searchable: true, type: 'date', @@ -110,7 +90,6 @@ export const mockBrowserFields: BrowserFields = { esTypes: [], searchable: true, aggregatable: false, - indexes: ['auditbeat', 'filebeat', 'packetbeat'], }, message: { name: 'message', @@ -119,7 +98,6 @@ export const mockBrowserFields: BrowserFields = { searchable: true, aggregatable: false, format: 'string', - indexes: ['auditbeat', 'filebeat', 'packetbeat'], }, }, }, @@ -128,7 +106,6 @@ export const mockBrowserFields: BrowserFields = { 'client.address': { aggregatable: true, format: '', - indexes: ['auditbeat', 'filebeat', 'packetbeat'], name: 'client.address', searchable: true, type: 'string', @@ -137,7 +114,6 @@ export const mockBrowserFields: BrowserFields = { 'client.bytes': { aggregatable: true, format: '', - indexes: ['auditbeat', 'filebeat', 'packetbeat'], name: 'client.bytes', searchable: true, type: 'number', @@ -146,7 +122,6 @@ export const mockBrowserFields: BrowserFields = { 'client.domain': { aggregatable: true, format: '', - indexes: ['auditbeat', 'filebeat', 'packetbeat'], name: 'client.domain', searchable: true, type: 'string', @@ -155,7 +130,6 @@ export const mockBrowserFields: BrowserFields = { 'client.geo.country_iso_code': { aggregatable: true, format: '', - indexes: ['auditbeat', 'filebeat', 'packetbeat'], name: 'client.geo.country_iso_code', searchable: true, type: 'string', @@ -168,7 +142,6 @@ export const mockBrowserFields: BrowserFields = { 'cloud.account.id': { aggregatable: true, format: '', - indexes: ['auditbeat', 'filebeat', 'packetbeat'], name: 'cloud.account.id', searchable: true, type: 'string', @@ -177,7 +150,6 @@ export const mockBrowserFields: BrowserFields = { 'cloud.availability_zone': { aggregatable: true, format: '', - indexes: ['auditbeat', 'filebeat', 'packetbeat'], name: 'cloud.availability_zone', searchable: true, type: 'string', @@ -190,7 +162,6 @@ export const mockBrowserFields: BrowserFields = { 'container.id': { aggregatable: true, format: '', - indexes: ['auditbeat', 'filebeat', 'packetbeat'], name: 'container.id', searchable: true, type: 'string', @@ -199,7 +170,6 @@ export const mockBrowserFields: BrowserFields = { 'container.image.name': { aggregatable: true, format: '', - indexes: ['auditbeat', 'filebeat', 'packetbeat'], name: 'container.image.name', searchable: true, type: 'string', @@ -208,7 +178,6 @@ export const mockBrowserFields: BrowserFields = { 'container.image.tag': { aggregatable: true, format: '', - indexes: ['auditbeat', 'filebeat', 'packetbeat'], name: 'container.image.tag', searchable: true, type: 'string', @@ -221,7 +190,6 @@ export const mockBrowserFields: BrowserFields = { 'destination.address': { aggregatable: true, format: '', - indexes: ['auditbeat', 'filebeat', 'packetbeat'], name: 'destination.address', searchable: true, type: 'string', @@ -230,7 +198,6 @@ export const mockBrowserFields: BrowserFields = { 'destination.bytes': { aggregatable: true, format: '', - indexes: ['auditbeat', 'filebeat', 'packetbeat'], name: 'destination.bytes', searchable: true, type: 'number', @@ -239,7 +206,6 @@ export const mockBrowserFields: BrowserFields = { 'destination.domain': { aggregatable: true, format: '', - indexes: ['auditbeat', 'filebeat', 'packetbeat'], name: 'destination.domain', searchable: true, type: 'string', @@ -248,7 +214,6 @@ export const mockBrowserFields: BrowserFields = { 'destination.ip': { aggregatable: true, format: '', - indexes: ['auditbeat', 'filebeat', 'packetbeat'], name: 'destination.ip', searchable: true, type: 'ip', @@ -257,7 +222,6 @@ export const mockBrowserFields: BrowserFields = { 'destination.port': { aggregatable: true, format: '', - indexes: ['auditbeat', 'filebeat', 'packetbeat'], name: 'destination.port', searchable: true, type: 'number', @@ -269,7 +233,6 @@ export const mockBrowserFields: BrowserFields = { fields: { 'event.end': { format: '', - indexes: DEFAULT_INDEX_PATTERN, name: 'event.end', searchable: true, type: 'date', @@ -283,7 +246,6 @@ export const mockBrowserFields: BrowserFields = { searchable: true, aggregatable: true, format: 'string', - indexes: DEFAULT_INDEX_PATTERN, }, 'event.category': { name: 'event.category', @@ -292,7 +254,6 @@ export const mockBrowserFields: BrowserFields = { searchable: true, aggregatable: true, format: 'string', - indexes: DEFAULT_INDEX_PATTERN, }, 'event.severity': { name: 'event.severity', @@ -301,7 +262,6 @@ export const mockBrowserFields: BrowserFields = { format: 'number', searchable: true, aggregatable: true, - indexes: DEFAULT_INDEX_PATTERN, }, }, }, @@ -314,7 +274,6 @@ export const mockBrowserFields: BrowserFields = { searchable: true, aggregatable: true, format: 'string', - indexes: DEFAULT_INDEX_PATTERN, }, }, }, @@ -323,7 +282,6 @@ export const mockBrowserFields: BrowserFields = { 'source.ip': { aggregatable: true, format: '', - indexes: ['auditbeat', 'filebeat', 'packetbeat'], name: 'source.ip', searchable: true, type: 'ip', @@ -332,7 +290,6 @@ export const mockBrowserFields: BrowserFields = { 'source.port': { aggregatable: true, format: '', - indexes: ['auditbeat', 'filebeat', 'packetbeat'], name: 'source.port', searchable: true, type: 'number', @@ -349,7 +306,6 @@ export const mockBrowserFields: BrowserFields = { searchable: true, aggregatable: true, format: 'string', - indexes: ['auditbeat', 'filebeat', 'packetbeat'], }, }, }, @@ -358,7 +314,6 @@ export const mockBrowserFields: BrowserFields = { 'nestedField.firstAttributes': { aggregatable: false, format: '', - indexes: ['auditbeat', 'filebeat', 'packetbeat'], name: 'nestedField.firstAttributes', searchable: true, type: 'string', @@ -371,7 +326,6 @@ export const mockBrowserFields: BrowserFields = { 'nestedField.secondAttributes': { aggregatable: false, format: '', - indexes: ['auditbeat', 'filebeat', 'packetbeat'], name: 'nestedField.secondAttributes', searchable: true, type: 'string', @@ -384,7 +338,6 @@ export const mockBrowserFields: BrowserFields = { 'nestedField.thirdAttributes': { aggregatable: false, format: '', - indexes: ['auditbeat', 'filebeat', 'packetbeat'], name: 'nestedField.thirdAttributes', searchable: true, type: 'date', diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/test_providers/test_providers.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/test_providers/test_providers.tsx index a4e6d39e720ec..b4579dd4bd50c 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/test_providers/test_providers.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/mock/test_providers/test_providers.tsx @@ -73,6 +73,7 @@ export const TestProvidersComponent: React.FC = ({ children, isILMAvailab http={mockHttp} baseConversations={{}} navigateToApp={mockNavigateToApp} + currentAppId={'securitySolutionUI'} > = ({ dataView, savedSearch, appDependencies, + showContextualInsights = false, showFrozenDataTierChoice = true, }) => { if (!dataView) return null; @@ -69,7 +72,7 @@ export const LogRateAnalysisAppState: FC = ({ - + diff --git a/x-pack/plugins/aiops/public/components/log_rate_analysis/log_rate_analysis_page.tsx b/x-pack/plugins/aiops/public/components/log_rate_analysis/log_rate_analysis_page.tsx index fcb5fa7e3a87b..acaa2fb27d998 100644 --- a/x-pack/plugins/aiops/public/components/log_rate_analysis/log_rate_analysis_page.tsx +++ b/x-pack/plugins/aiops/public/components/log_rate_analysis/log_rate_analysis_page.tsx @@ -6,12 +6,14 @@ */ import type { FC } from 'react'; -import React, { useCallback, useEffect, useState } from 'react'; -import { isEqual } from 'lodash'; +import React, { useCallback, useEffect, useMemo, useState } from 'react'; +import { isEqual, orderBy } from 'lodash'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { EuiFlexGroup, EuiFlexItem, EuiPageBody, EuiPageSection, EuiSpacer } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import type { Message } from '@kbn/observability-ai-assistant-plugin/public'; import type { Filter, Query } from '@kbn/es-query'; import { FilterStateStore } from '@kbn/es-query'; import { useUrlState, usePageUrlState } from '@kbn/ml-url-state'; @@ -25,6 +27,10 @@ import { setInitialAnalysisStart, setDocumentCountChartData, } from '@kbn/aiops-log-rate-analysis/state'; +import { + LOG_RATE_ANALYSIS_TYPE, + type LogRateAnalysisType, +} from '@kbn/aiops-log-rate-analysis/log_rate_analysis_type'; import { useDataSource } from '../../hooks/use_data_source'; import { useAiopsAppContext } from '../../hooks/use_aiops_app_context'; @@ -40,10 +46,26 @@ import { import { SearchPanel } from '../search_panel'; import { PageHeader } from '../page_header'; +import type { LogRateAnalysisResultsData } from './log_rate_analysis_results'; + import { LogRateAnalysisContent } from './log_rate_analysis_content/log_rate_analysis_content'; -export const LogRateAnalysisPage: FC = () => { - const { data: dataService } = useAiopsAppContext(); +interface SignificantFieldValue { + field: string; + value: string | number; + docCount: number; + pValue: number | null; +} + +interface LogRateAnalysisPageProps { + showContextualInsights?: boolean; +} + +export const LogRateAnalysisPage: FC = ({ + showContextualInsights = false, +}) => { + const aiopsAppContext = useAiopsAppContext(); + const { data: dataService, observabilityAIAssistant } = aiopsAppContext; const { dataView, savedSearch } = useDataSource(); const currentSelectedGroup = useCurrentSelectedGroup(); @@ -58,6 +80,15 @@ export const LogRateAnalysisPage: FC = () => { const [selectedSavedSearch, setSelectedSavedSearch] = useState(savedSearch); + // Used to store analysis results to be passed on to the AI Assistant. + const [logRateAnalysisParams, setLogRateAnalysisParams] = useState< + | { + logRateAnalysisType: LogRateAnalysisType; + significantFieldValues: SignificantFieldValue[]; + } + | undefined + >(); + useEffect(() => { if (savedSearch) { setSelectedSavedSearch(savedSearch); @@ -182,6 +213,88 @@ export const LogRateAnalysisPage: FC = () => { } }; + const onAnalysisCompleted = (analysisResults: LogRateAnalysisResultsData | undefined) => { + const significantFieldValues = orderBy( + analysisResults?.significantItems?.map((item) => ({ + field: item.fieldName, + value: item.fieldValue, + docCount: item.doc_count, + pValue: item.pValue, + })), + ['pValue', 'docCount'], + ['asc', 'asc'] + ).slice(0, 50); + + const logRateAnalysisType = analysisResults?.analysisType; + setLogRateAnalysisParams( + significantFieldValues && logRateAnalysisType + ? { logRateAnalysisType, significantFieldValues } + : undefined + ); + }; + + const messages = useMemo(() => { + const hasLogRateAnalysisParams = + logRateAnalysisParams && logRateAnalysisParams.significantFieldValues?.length > 0; + + if (!hasLogRateAnalysisParams || !observabilityAIAssistant) { + return undefined; + } + + const { logRateAnalysisType } = logRateAnalysisParams; + + const header = 'Field name,Field value,Doc count,p-value'; + const rows = logRateAnalysisParams.significantFieldValues + .map((item) => Object.values(item).join(',')) + .join('\n'); + + return observabilityAIAssistant.getContextualInsightMessages({ + message: + 'Can you identify possible causes and remediations for these log rate analysis results', + instructions: `You are an AIOps expert using Elastic's Kibana on call being consulted about a log rate change that got triggered by a ${logRateAnalysisType} in log messages. Your job is to take immediate action and proceed with both urgency and precision. + "Log Rate Analysis" is an AIOps feature that uses advanced statistical methods to identify reasons for increases and decreases in log rates. It makes it easy to find and investigate causes of unusual spikes or dips by using the analysis workflow view. + You are using "Log Rate Analysis" and ran the statistical analysis on the log messages which occured during the alert. + You received the following analysis results from "Log Rate Analysis" which list statistically significant co-occuring field/value combinations sorted from most significant (lower p-values) to least significant (higher p-values) that ${ + logRateAnalysisType === LOG_RATE_ANALYSIS_TYPE.SPIKE + ? 'contribute to the log rate spike' + : 'are less or not present in the log rate dip' + }: + + ${ + logRateAnalysisType === LOG_RATE_ANALYSIS_TYPE.SPIKE + ? 'The median log rate in the selected deviation time range is higher than the baseline. Therefore, the results shows statistically significant items within the deviation time range that are contributors to the spike. The "doc count" column refers to the amount of documents in the deviation time range.' + : 'The median log rate in the selected deviation time range is lower than the baseline. Therefore, the analysis results table shows statistically significant items within the baseline time range that are less in number or missing within the deviation time range. The "doc count" column refers to the amount of documents in the baseline time range.' + } + + ${header} + ${rows} + + Based on the above analysis results and your observability expert knowledge, output the following: + Analyse the type of these logs and explain their usual purpose (1 paragraph). + ${ + logRateAnalysisType === LOG_RATE_ANALYSIS_TYPE.SPIKE + ? 'Based on the type of these logs do a root cause analysis on why the field and value combinations from the analysis results are causing this log rate spike (2 parapraphs)' + : 'Based on the type of these logs explain why the statistically significant field and value combinations are less in number or missing from the log rate dip with concrete examples based on the analysis results data which contains items that are present in the baseline time range and are missing or less in number in the deviation time range (2 paragraphs)' + }. + ${ + logRateAnalysisType === LOG_RATE_ANALYSIS_TYPE.SPIKE + ? 'Recommend concrete remediations to resolve the root cause (3 bullet points).' + : '' + } + + Do not mention individual p-values from the analysis results. + Do not repeat the full list of field names and field values back to the user. + Do not repeat the given instructions in your output.`, + }); + }, [logRateAnalysisParams, observabilityAIAssistant]); + + const logRateAnalysisTitle = i18n.translate( + 'xpack.aiops.observabilityAIAssistantContextualInsight.logRateAnalysisTitle', + { + defaultMessage: 'Possible causes and remediations', + } + ); + return ( @@ -196,11 +309,24 @@ export const LogRateAnalysisPage: FC = () => { setSearchParams={setSearchParams} /> - + + + + {showContextualInsights && + observabilityAIAssistant?.ObservabilityAIAssistantContextualInsight && + messages ? ( + + + + ) : null} diff --git a/x-pack/plugins/aiops/public/hooks/use_aiops_app_context.ts b/x-pack/plugins/aiops/public/hooks/use_aiops_app_context.ts index ae803d312e59e..b263457c11d05 100644 --- a/x-pack/plugins/aiops/public/hooks/use_aiops_app_context.ts +++ b/x-pack/plugins/aiops/public/hooks/use_aiops_app_context.ts @@ -7,6 +7,7 @@ import { createContext, type FC, type PropsWithChildren, useContext } from 'react'; +import type { ObservabilityAIAssistantPublicStart } from '@kbn/observability-ai-assistant-plugin/public'; import type { IStorageWrapper } from '@kbn/kibana-utils-plugin/public'; import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public'; @@ -134,6 +135,8 @@ export interface AiopsAppDependencies { isServerless?: boolean; /** Identifier to indicate the plugin utilizing the component */ embeddingOrigin?: string; + /** Observability AI Assistant */ + observabilityAIAssistant?: ObservabilityAIAssistantPublicStart; } /** diff --git a/x-pack/plugins/aiops/public/types/index.ts b/x-pack/plugins/aiops/public/types/index.ts index 5c71a63bba354..9150c9b983f84 100644 --- a/x-pack/plugins/aiops/public/types/index.ts +++ b/x-pack/plugins/aiops/public/types/index.ts @@ -5,6 +5,7 @@ * 2.0. */ +import type { ObservabilityAIAssistantPublicStart } from '@kbn/observability-ai-assistant-plugin/public'; import type { ChartsPluginStart } from '@kbn/charts-plugin/public'; import type { ExecutionContextStart } from '@kbn/core-execution-context-browser'; import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; @@ -43,6 +44,7 @@ export interface AiopsPluginStartDeps { licensing: LicensingPluginStart; executionContext: ExecutionContextStart; embeddable: EmbeddableStart; + observabilityAIAssistant?: ObservabilityAIAssistantPublicStart; usageCollection: UsageCollectionSetup; } diff --git a/x-pack/plugins/aiops/tsconfig.json b/x-pack/plugins/aiops/tsconfig.json index c4e7af826c0c3..dde05c2b6ef93 100644 --- a/x-pack/plugins/aiops/tsconfig.json +++ b/x-pack/plugins/aiops/tsconfig.json @@ -77,6 +77,7 @@ "@kbn/unified-search-plugin", "@kbn/usage-collection-plugin", "@kbn/utility-types", + "@kbn/observability-ai-assistant-plugin", ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/alerting/common/index.ts b/x-pack/plugins/alerting/common/index.ts index 6c072654cf3bd..e0c5d7fee528e 100644 --- a/x-pack/plugins/alerting/common/index.ts +++ b/x-pack/plugins/alerting/common/index.ts @@ -23,6 +23,7 @@ export type { RuleTaskState, RuleTaskParams, } from '@kbn/alerting-state-types'; +export type { AlertingFrameworkHealth } from '@kbn/alerting-types'; export * from './alert_summary'; export * from './builtin_action_groups'; export * from './bulk_edit'; diff --git a/x-pack/plugins/alerting/common/rule.ts b/x-pack/plugins/alerting/common/rule.ts index d7f2c6920f4f4..4981fc6dea263 100644 --- a/x-pack/plugins/alerting/common/rule.ts +++ b/x-pack/plugins/alerting/common/rule.ts @@ -52,6 +52,7 @@ export { RuleLastRunOutcomeValues, RuleExecutionStatusErrorReasons, RuleExecutionStatusWarningReasons, + HealthStatus, } from '@kbn/alerting-types'; export type RuleTypeState = Record; diff --git a/x-pack/plugins/alerting/common/rule_circuit_breaker_error_message.ts b/x-pack/plugins/alerting/common/rule_circuit_breaker_error_message.ts index 01d12cd90332d..7779b1a5dd60b 100644 --- a/x-pack/plugins/alerting/common/rule_circuit_breaker_error_message.ts +++ b/x-pack/plugins/alerting/common/rule_circuit_breaker_error_message.ts @@ -6,8 +6,7 @@ */ import { i18n } from '@kbn/i18n'; - -const errorMessageHeader = 'Error validating circuit breaker'; +import { errorMessageHeader } from '@kbn/alerting-types'; const getCreateRuleErrorSummary = (name: string) => { return i18n.translate('xpack.alerting.ruleCircuitBreaker.error.createSummary', { diff --git a/x-pack/plugins/cases/public/components/all_cases/all_cases_list.test.tsx b/x-pack/plugins/cases/public/components/all_cases/all_cases_list.test.tsx index 56fc3a68f4877..242fc3260b7e2 100644 --- a/x-pack/plugins/cases/public/components/all_cases/all_cases_list.test.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/all_cases_list.test.tsx @@ -816,7 +816,8 @@ describe('AllCasesListGeneric', () => { }); }); - describe('Row actions', () => { + // FLAKY: https://github.com/elastic/kibana/issues/148095 + describe.skip('Row actions', () => { const statusTests = [ [CaseStatuses.open], [CaseStatuses['in-progress']], diff --git a/x-pack/plugins/cases/public/components/case_form_fields/title.test.tsx b/x-pack/plugins/cases/public/components/case_form_fields/title.test.tsx index 73e6c19f90118..3caf90433f8fb 100644 --- a/x-pack/plugins/cases/public/components/case_form_fields/title.test.tsx +++ b/x-pack/plugins/cases/public/components/case_form_fields/title.test.tsx @@ -16,7 +16,8 @@ import { Title } from './title'; import { schema } from '../create/schema'; import type { CaseFormFieldsSchemaProps } from './schema'; -describe('Title', () => { +// FLAKY: https://github.com/elastic/kibana/issues/187364 +describe.skip('Title', () => { let globalForm: FormHook; const MockHookWrapperComponent: FC> = ({ children }) => { diff --git a/x-pack/plugins/cases/public/components/connector_selector/form.test.tsx b/x-pack/plugins/cases/public/components/connector_selector/form.test.tsx index 9cf77466a225b..70e91af618854 100644 --- a/x-pack/plugins/cases/public/components/connector_selector/form.test.tsx +++ b/x-pack/plugins/cases/public/components/connector_selector/form.test.tsx @@ -6,48 +6,90 @@ */ import React from 'react'; -import { mount } from 'enzyme'; -import type { FormHook } from '@kbn/es-ui-shared-plugin/static/forms/hook_form_lib'; -import { UseField, Form, useForm } from '@kbn/es-ui-shared-plugin/static/forms/hook_form_lib'; +import { screen } from '@testing-library/react'; import { ConnectorSelector } from './form'; -import { connectorsMock } from '../../containers/mock'; -import { getFormMock } from '../__mock__/form'; import { useKibana } from '../../common/lib/kibana'; +import type { AppMockRenderer } from '../../common/mock'; +import { createAppMockRenderer } from '../../common/mock'; +import { UseField } from '@kbn/es-ui-shared-plugin/static/forms/hook_form_lib'; +import { FormTestComponent } from '../../common/test_utils'; +import { connectorsMock } from '../../containers/mock'; -jest.mock('@kbn/es-ui-shared-plugin/static/forms/hook_form_lib/hooks/use_form'); jest.mock('../../common/lib/kibana'); const useKibanaMock = useKibana as jest.Mocked; -const useFormMock = useForm as jest.Mock; describe('ConnectorSelector', () => { - const formHookMock = getFormMock({ connectorId: connectorsMock[0].id }); + const handleChange = jest.fn(); + const defaultProps = { + connectors: [], + handleChange, + dataTestSubj: 'connectors', + disabled: false, + idAria: 'connectors', + isLoading: false, + }; + + let appMock: AppMockRenderer; + + beforeEach(() => { + appMock = createAppMockRenderer(); + jest.clearAllMocks(); + }); beforeEach(() => { - useFormMock.mockImplementation(() => ({ form: formHookMock })); useKibanaMock().services.triggersActionsUi.actionTypeRegistry.get = jest.fn().mockReturnValue({ actionTypeTitle: 'test', iconClass: 'logoSecurity', }); }); - it('it should render', async () => { - const wrapper = mount( -
+ it('should render', async () => { + appMock.render( + + + + ); + + expect(await screen.findByTestId(defaultProps.dataTestSubj)); + }); + + it('should set the selected connector to none if the connector is not available', async () => { + appMock.render( + + + + ); + + expect(await screen.findByText('No connector selected')); + }); + + it('should set the selected connector correctly', async () => { + appMock.render( + - +
); - expect(wrapper.find(`[data-test-subj="caseConnectors"]`).exists()).toBeTruthy(); + expect(await screen.findByText(connectorsMock[0].name)); }); }); diff --git a/x-pack/plugins/cases/public/components/connector_selector/form.tsx b/x-pack/plugins/cases/public/components/connector_selector/form.tsx index 37221edf9048a..fa991bc5b9871 100644 --- a/x-pack/plugins/cases/public/components/connector_selector/form.tsx +++ b/x-pack/plugins/cases/public/components/connector_selector/form.tsx @@ -45,6 +45,10 @@ export const ConnectorSelector = ({ [handleChange, field] ); + const isConnectorAvailable = Boolean( + connectors.find((connector) => connector.id === field.value) + ); + return ( ); 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 885e25e959ac9..c93ffbd4cff77 100644 --- a/x-pack/plugins/cases/public/components/create/form.test.tsx +++ b/x-pack/plugins/cases/public/components/create/form.test.tsx @@ -24,7 +24,7 @@ import { useAvailableCasesOwners } from '../app/use_available_owners'; import type { AppMockRenderer } from '../../common/mock'; import { createAppMockRenderer } from '../../common/mock'; import userEvent from '@testing-library/user-event'; -import { CustomFieldTypes } from '../../../common/types/domain'; +import { ConnectorTypes, CustomFieldTypes } from '../../../common/types/domain'; import { useSuggestUserProfiles } from '../../containers/user_profiles/use_suggest_user_profiles'; import { useGetCurrentUserProfile } from '../../containers/user_profiles/use_get_current_user_profile'; import { userProfiles } from '../../containers/user_profiles/api.mock'; @@ -334,5 +334,73 @@ describe('CreateCaseForm', () => { expect(await screen.findByText('No connector selected')).toBeInTheDocument(); }); + + it('selects the placeholder empty template correctly', async () => { + useGetAllCaseConfigurationsMock.mockReturnValue({ + ...useGetAllCaseConfigurationsResponse, + data: [ + { + ...useGetAllCaseConfigurationsResponse.data[0], + customFields: [ + { + key: 'first_custom_field_key', + type: CustomFieldTypes.TEXT, + required: false, + label: 'My test label 1', + defaultValue: 'custom field default value', + }, + ], + templates: templatesConfigurationMock, + connector: { + id: 'servicenow-1', + name: 'My SN connector', + type: ConnectorTypes.serviceNowITSM, + fields: null, + }, + }, + ], + }); + + const license = licensingMock.createLicense({ + license: { type: 'platinum' }, + }); + const firstTemplate = templatesConfigurationMock[4]; + + appMockRenderer = createAppMockRenderer({ license }); + appMockRenderer.render(); + + userEvent.selectOptions( + await screen.findByTestId('create-case-template-select'), + firstTemplate.name + ); + + const title = within(await screen.findByTestId('caseTitle')).getByTestId('input'); + const description = within(await screen.findByTestId('caseDescription')).getByRole('textbox'); + const tags = within(await screen.findByTestId('caseTags')).getByTestId('comboBoxInput'); + const category = within(await screen.findByTestId('caseCategory')).getByTestId( + 'comboBoxSearchInput' + ); + const assignees = within(await screen.findByTestId('caseAssignees')).getByTestId( + 'comboBoxSearchInput' + ); + const severity = await screen.findByTestId('case-severity-selection'); + const customField = await screen.findByTestId( + 'first_custom_field_key-text-create-custom-field' + ); + + userEvent.selectOptions( + await screen.findByTestId('create-case-template-select'), + 'No template selected' + ); + + expect(title).not.toHaveValue(); + expect(description).not.toHaveValue(); + expect(tags).not.toHaveValue(); + expect(category).not.toHaveValue(); + expect(severity).toHaveTextContent('Low'); + expect(assignees).not.toHaveValue(); + expect(customField).toHaveValue('custom field default value'); + expect(await screen.findByText('My SN connector')).toBeInTheDocument(); + }); }); }); diff --git a/x-pack/plugins/cases/public/components/create/form_fields.tsx b/x-pack/plugins/cases/public/components/create/form_fields.tsx index 26189e33b7f12..e20384a3b4950 100644 --- a/x-pack/plugins/cases/public/components/create/form_fields.tsx +++ b/x-pack/plugins/cases/public/components/create/form_fields.tsx @@ -45,6 +45,8 @@ const transformTemplateCaseFieldsToCaseFormFields = ( return getInitialCaseValue({ owner, ...caseFields }); }; +const DEFAULT_EMPTY_TEMPLATE_KEY = 'defaultEmptyTemplateKey'; + export const CreateCaseFormFields: React.FC = React.memo( ({ configuration, connectors, isLoading, withSteps, draftStorageKey }) => { const { reset, updateFieldValues, isSubmitting, setFieldValue } = useFormContext(); @@ -61,6 +63,18 @@ export const CreateCaseFormFields: React.FC = React.m setFieldValue('connectorId', configuration.connector.id); }, [configuration.connector.id, setFieldValue]); + const defaultTemplate = useMemo( + () => ({ + key: DEFAULT_EMPTY_TEMPLATE_KEY, + name: i18n.DEFAULT_EMPTY_TEMPLATE_NAME, + caseFields: getInitialCaseValue({ + owner: configurationOwner, + connector: configuration.connector, + }), + }), + [configurationOwner, configuration.connector] + ); + const onTemplateChange = useCallback( (caseFields: CasesConfigurationUITemplate['caseFields']) => { const caseFormFields = transformTemplateCaseFieldsToCaseFormFields( @@ -83,12 +97,12 @@ export const CreateCaseFormFields: React.FC = React.m children: ( ), }), - [configuration.templates, isLoading, isSubmitting, onTemplateChange] + [configuration.templates, defaultTemplate, isLoading, isSubmitting, onTemplateChange] ); const secondStep = useMemo( diff --git a/x-pack/plugins/cases/public/components/create/templates.tsx b/x-pack/plugins/cases/public/components/create/templates.tsx index 612a7d8a24a70..3df1504ccf14f 100644 --- a/x-pack/plugins/cases/public/components/create/templates.tsx +++ b/x-pack/plugins/cases/public/components/create/templates.tsx @@ -57,7 +57,6 @@ export const TemplateSelectorComponent: React.FC = ({ isLoading={isLoading} data-test-subj="create-case-template-select" fullWidth - hasNoInitialSelection value={selectedTemplate} /> diff --git a/x-pack/plugins/cases/public/components/create/translations.ts b/x-pack/plugins/cases/public/components/create/translations.ts index aef9c7c525acd..56f937b715398 100644 --- a/x-pack/plugins/cases/public/components/create/translations.ts +++ b/x-pack/plugins/cases/public/components/create/translations.ts @@ -61,3 +61,10 @@ export const TEMPLATE_HELP_TEXT = i18n.translate('xpack.cases.create.templateHel export const SOLUTION_SELECTOR_LABEL = i18n.translate('xpack.cases.create.solutionSelectorLabel', { defaultMessage: 'Create case under:', }); + +export const DEFAULT_EMPTY_TEMPLATE_NAME = i18n.translate( + 'xpack.cases.create.defaultEmptyTemplateName', + { + defaultMessage: 'No template selected', + } +); diff --git a/x-pack/plugins/cases/public/components/custom_fields/form.test.tsx b/x-pack/plugins/cases/public/components/custom_fields/form.test.tsx index 89fdca73fefbf..125a5ada01e5f 100644 --- a/x-pack/plugins/cases/public/components/custom_fields/form.test.tsx +++ b/x-pack/plugins/cases/public/components/custom_fields/form.test.tsx @@ -18,7 +18,8 @@ import userEvent from '@testing-library/user-event'; import { customFieldsConfigurationMock } from '../../containers/mock'; import type { FormState } from '../configure_cases/flyout'; -describe('CustomFieldsForm ', () => { +// FLAKY: https://github.com/elastic/kibana/issues/187554 +describe.skip('CustomFieldsForm ', () => { let appMockRender: AppMockRenderer; const onChange = jest.fn(); diff --git a/x-pack/plugins/cases/public/components/templates/form_fields.test.tsx b/x-pack/plugins/cases/public/components/templates/form_fields.test.tsx index 814ba13efe6ed..cdd9ca2814f0a 100644 --- a/x-pack/plugins/cases/public/components/templates/form_fields.test.tsx +++ b/x-pack/plugins/cases/public/components/templates/form_fields.test.tsx @@ -17,6 +17,7 @@ import { useGetChoicesResponse } from '../create/mock'; import { connectorsMock, customFieldsConfigurationMock } from '../../containers/mock'; import { TEMPLATE_FIELDS, CASE_FIELDS, CONNECTOR_FIELDS, CASE_SETTINGS } from './translations'; import { FormFields } from './form_fields'; +import { waitForEuiPopoverOpen } from '@elastic/eui/lib/test/rtl'; jest.mock('../connectors/servicenow/use_get_choices'); @@ -395,4 +396,47 @@ describe('form fields', () => { ); }); }); + + it('does not render duplicate template tags', async () => { + const newProps = { + ...defaultProps, + currentConfiguration: { + ...defaultProps.currentConfiguration, + templates: [ + { + key: 'test_template_1', + name: 'Test', + tags: ['one', 'two'], + caseFields: {}, + }, + { + key: 'test_template_2', + name: 'Test 2', + tags: ['one', 'three'], + caseFields: {}, + }, + ], + }, + }; + + appMockRenderer.render( + + + + ); + + const caseTags = await screen.findByTestId('template-tags'); + + userEvent.click(within(caseTags).getByTestId('comboBoxToggleListButton')); + await waitForEuiPopoverOpen(); + + /** + * RTL will throw an error if there are more that one + * element matching the text. This ensures that duplicated + * tags are removed. Docs: https://testing-library.com/docs/queries/about + */ + expect(await screen.findByText('one')); + expect(await screen.findByText('two')); + expect(await screen.findByText('three')); + }); }); diff --git a/x-pack/plugins/cases/public/components/templates/form_fields.tsx b/x-pack/plugins/cases/public/components/templates/form_fields.tsx index 9f28f7b7179b4..9a69d1c4590dc 100644 --- a/x-pack/plugins/cases/public/components/templates/form_fields.tsx +++ b/x-pack/plugins/cases/public/components/templates/form_fields.tsx @@ -9,6 +9,7 @@ import React, { memo, useMemo } from 'react'; import { UseField } from '@kbn/es-ui-shared-plugin/static/forms/hook_form_lib'; import { HiddenField } from '@kbn/es-ui-shared-plugin/static/forms/components'; import { EuiSteps } from '@elastic/eui'; +import { uniq } from 'lodash'; import { CaseFormFields } from '../case_form_fields'; import * as i18n from './translations'; import type { ActionConnector } from '../../containers/configure/types'; @@ -33,9 +34,7 @@ const FormFieldsComponent: React.FC = ({ }) => { const { isSyncAlertsEnabled } = useCasesFeatures(); const { customFields: configurationCustomFields, templates } = currentConfiguration; - const configurationTemplateTags = templates - .map((template) => (template?.tags?.length ? template.tags : [])) - .flat(); + const configurationTemplateTags = getTemplateTags(templates); const firstStep = useMemo( () => ({ @@ -103,3 +102,6 @@ const FormFieldsComponent: React.FC = ({ FormFieldsComponent.displayName = 'FormFields'; export const FormFields = memo(FormFieldsComponent); + +const getTemplateTags = (templates: CasesConfigurationUI['templates']) => + uniq(templates.map((template) => (template?.tags?.length ? template.tags : [])).flat()); diff --git a/x-pack/plugins/cloud_security_posture/public/common/hooks/use_cloud_posture_data_table/use_cloud_posture_data_table.ts b/x-pack/plugins/cloud_security_posture/public/common/hooks/use_cloud_posture_data_table/use_cloud_posture_data_table.ts index 03517383ecc3f..ae8ddb48488c1 100644 --- a/x-pack/plugins/cloud_security_posture/public/common/hooks/use_cloud_posture_data_table/use_cloud_posture_data_table.ts +++ b/x-pack/plugins/cloud_security_posture/public/common/hooks/use_cloud_posture_data_table/use_cloud_posture_data_table.ts @@ -137,7 +137,7 @@ export const useCloudPostureDataTable = ({ return { setUrlQuery, sort: urlQuery.sort, - filters: urlQuery.filters, + filters: urlQuery.filters || [], query: baseEsQuery.query ? baseEsQuery.query : { diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/aws_credentials_form/aws_input_var_fields.tsx b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/aws_credentials_form/aws_input_var_fields.tsx index a66bff8bd3506..f4c7fd1b8d501 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/aws_credentials_form/aws_input_var_fields.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/aws_credentials_form/aws_input_var_fields.tsx @@ -30,8 +30,8 @@ export const AwsInputVarFields = ({ }) => { return (
- {fields.map((field) => ( - <> + {fields.map((field, index) => ( +
{field.type === 'password' && field.isSecret === true && ( <> @@ -85,7 +85,7 @@ export const AwsInputVarFields = ({ /> )} - +
))}
); diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/azure_credentials_form/azure_credentials_form.tsx b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/azure_credentials_form/azure_credentials_form.tsx index 0f3b9916cef1a..02aa0eb679a66 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/azure_credentials_form/azure_credentials_form.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/azure_credentials_form/azure_credentials_form.tsx @@ -279,8 +279,8 @@ export const AzureInputVarFields = ({ }) => { return (
- {fields.map((field) => ( - <> + {fields.map((field, index) => ( +
{field.type === 'password' && field.isSecret === true && ( <> @@ -332,7 +332,7 @@ export const AzureInputVarFields = ({ /> )} - +
))}
); diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/mocks.ts b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/mocks.ts index 38e6d5d632cea..d495cee7431fd 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/mocks.ts +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/mocks.ts @@ -6,7 +6,7 @@ */ import type { NewPackagePolicy } from '@kbn/fleet-plugin/public'; import type { PackageInfo, PackagePolicyConfigRecord } from '@kbn/fleet-plugin/common'; -import { createNewPackagePolicyMock, createAgentPolicyMock } from '@kbn/fleet-plugin/common/mocks'; +import { createNewPackagePolicyMock } from '@kbn/fleet-plugin/common/mocks'; import { RegistryRelease, RegistryVarType } from '@kbn/fleet-plugin/common/types'; import { CLOUDBEAT_GCP, @@ -29,9 +29,6 @@ export const getMockPolicyEKS = (vars?: PackagePolicyConfigRecord) => getPolicyMock(CLOUDBEAT_EKS, 'kspm', 'eks', vars); export const getMockPolicyVulnMgmtAWS = () => getPolicyMock(CLOUDBEAT_VULN_MGMT_AWS, 'vuln_mgmt', 'aws'); -export const getMockAgentlessAgentPolicy = () => { - return createAgentPolicyMock({ id: 'agentless' }); -}; export const getMockPackageInfo = () => getPackageInfoMock(); export const getMockPackageInfoVulnMgmtAWS = () => { diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_form.test.tsx b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_form.test.tsx index d228edf845552..f3aafc11c9334 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_form.test.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_form.test.tsx @@ -16,7 +16,6 @@ import { } from './policy_template_form'; import { TestProvider } from '../../test/test_provider'; import { - getMockAgentlessAgentPolicy, getMockPackageInfo, getMockPackageInfoCspmAWS, getMockPackageInfoCspmAzure, @@ -30,12 +29,7 @@ import { getMockPolicyVulnMgmtAWS, getPackageInfoMock, } from './mocks'; -import type { - AgentPolicy, - NewPackagePolicy, - PackageInfo, - PackagePolicy, -} from '@kbn/fleet-plugin/common'; +import type { NewPackagePolicy, PackageInfo, PackagePolicy } from '@kbn/fleet-plugin/common'; import { getPosturePolicy } from './utils'; import { CLOUDBEAT_AWS, @@ -114,16 +108,14 @@ describe('', () => { const WrappedComponent = ({ newPolicy, edit = false, - agentPolicies, packageInfo = {} as PackageInfo, - agentlessPolicy, + isAgentlessEnabled, }: { edit?: boolean; newPolicy: NewPackagePolicy; - agentPolicies?: AgentPolicy[]; packageInfo?: PackageInfo; onChange?: jest.Mock; - agentlessPolicy?: AgentPolicy; + isAgentlessEnabled?: boolean; }) => { const { AppWrapper: FleetAppWrapper } = createFleetTestRendererMock(); return ( @@ -136,8 +128,7 @@ describe('', () => { onChange={onChange} packageInfo={packageInfo} isEditPage={true} - agentPolicies={agentPolicies} - agentlessPolicy={agentlessPolicy} + isAgentlessEnabled={isAgentlessEnabled} /> )} {!edit && ( @@ -146,8 +137,7 @@ describe('', () => { onChange={onChange} packageInfo={packageInfo} isEditPage={false} - agentPolicies={agentPolicies} - agentlessPolicy={agentlessPolicy} + isAgentlessEnabled={isAgentlessEnabled} /> )} @@ -1500,12 +1490,23 @@ describe('', () => { }); describe('Agentless', () => { + it('should not render setup technology selector if agentless is not available and CSPM integration supports agentless', async () => { + const newPackagePolicy = getMockPolicyAWS(); + + const { queryByTestId } = render( + + ); + + const setupTechnologySelector = queryByTestId(SETUP_TECHNOLOGY_SELECTOR_TEST_SUBJ); + // default state + expect(setupTechnologySelector).not.toBeInTheDocument(); + }); + it('should render setup technology selector for AWS and allow to select agent-based', async () => { - const agentlessPolicy = getMockAgentlessAgentPolicy(); const newPackagePolicy = getMockPolicyAWS(); const { getByTestId, getByRole } = render( - + ); const setupTechnologySelectorAccordion = getByTestId( @@ -1541,13 +1542,12 @@ describe('', () => { }); it('should render setup technology selector for GCP for organisation account type', async () => { - const agentlessPolicy = getMockAgentlessAgentPolicy(); const newPackagePolicy = getMockPolicyGCP(); const { getByTestId, queryByTestId, getByRole } = render( ); @@ -1594,7 +1594,6 @@ describe('', () => { }); it('should render setup technology selector for GCP for single-account', async () => { - const agentlessPolicy = getMockAgentlessAgentPolicy(); const newPackagePolicy = getMockPolicyGCP({ 'gcp.account_type': { value: GCP_SINGLE_ACCOUNT, type: 'text' }, }); @@ -1602,7 +1601,7 @@ describe('', () => { const { getByTestId, queryByTestId } = render( ); @@ -1639,13 +1638,12 @@ describe('', () => { }); it('should render setup technology selector for Azure for Organisation type', async () => { - const agentlessPolicy = getMockAgentlessAgentPolicy(); const newPackagePolicy = getMockPolicyAzure(); const { getByTestId, queryByTestId, getByRole } = render( ); @@ -1686,7 +1684,6 @@ describe('', () => { }); it('should render setup technology selector for Azure for Single Subscription type', async () => { - const agentlessPolicy = getMockAgentlessAgentPolicy(); const newPackagePolicy = getMockPolicyAzure({ 'azure.account_type': { value: 'single-account', type: 'text' }, }); @@ -1694,7 +1691,7 @@ describe('', () => { const { getByTestId, queryByTestId } = render( ); @@ -1725,11 +1722,10 @@ describe('', () => { }); it('should not render setup technology selector for KSPM', () => { - const agentlessPolicy = getMockAgentlessAgentPolicy(); const newPackagePolicy = getMockPolicyEKS(); const { queryByTestId } = render( - + ); const setupTechnologySelectorAccordion = queryByTestId( @@ -1740,11 +1736,10 @@ describe('', () => { }); it('should not render setup technology selector for CNVM', () => { - const agentlessPolicy = getMockAgentlessAgentPolicy(); const newPackagePolicy = getMockPolicyVulnMgmtAWS(); const { queryByTestId } = render( - + ); const setupTechnologySelectorAccordion = queryByTestId( diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_form.tsx b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_form.tsx index cd49d80ae7281..a5096e5d29ef7 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_form.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_form.tsx @@ -533,14 +533,13 @@ const IntegrationSettings = ({ onChange, fields }: IntegrationInfoFieldsProps) = export const CspPolicyTemplateForm = memo( ({ - agentPolicies, newPolicy, onChange, validationResults, isEditPage, packageInfo, handleSetupTechnologyChange, - agentlessPolicy, + isAgentlessEnabled, }) => { const integrationParam = useParams<{ integration: CloudSecurityPolicyTemplate }>().integration; const integration = SUPPORTED_POLICY_TEMPLATES.includes(integrationParam) @@ -551,8 +550,7 @@ export const CspPolicyTemplateForm = memo { }); it('sets to AGENTLESS when agentless is available and AWS cloud', () => { - const agentlessPolicy = { id: 'agentlessPolicyId' } as AgentPolicy; const input = { type: CLOUDBEAT_AWS } as NewPackagePolicyInput; const { result } = renderHook(() => - useSetupTechnology({ input, agentlessPolicy, isEditPage }) + useSetupTechnology({ input, isAgentlessEnabled: true, isEditPage }) ); expect(result.current.isAgentlessAvailable).toBeTruthy(); expect(result.current.setupTechnology).toBe(SetupTechnology.AGENTLESS); }); it('sets to AGENTLESS when agentless is available and GCP cloud', () => { - const agentlessPolicy = { id: 'agentlessPolicyId' } as AgentPolicy; const input = { type: CLOUDBEAT_GCP } as NewPackagePolicyInput; const { result } = renderHook(() => - useSetupTechnology({ input, agentlessPolicy, isEditPage }) + useSetupTechnology({ input, isAgentlessEnabled: true, isEditPage }) ); expect(result.current.isAgentlessAvailable).toBeTruthy(); expect(result.current.setupTechnology).toBe(SetupTechnology.AGENTLESS); }); it('sets to AGENTLESS when agentless is available and Azure cloud', () => { - const agentlessPolicy = { id: 'agentlessPolicyId' } as AgentPolicy; const input = { type: CLOUDBEAT_AZURE } as NewPackagePolicyInput; const { result } = renderHook(() => - useSetupTechnology({ input, agentlessPolicy, isEditPage }) + useSetupTechnology({ input, isAgentlessEnabled: true, isEditPage }) ); expect(result.current.isAgentlessAvailable).toBeTruthy(); expect(result.current.setupTechnology).toBe(SetupTechnology.AGENTLESS); }); it('sets to AGENT_BASED when agentless is available but input is not supported for agentless', () => { - const agentlessPolicy = { id: 'agentlessPolicyId' } as AgentPolicy; const input = { type: CLOUDBEAT_EKS } as NewPackagePolicyInput; const { result } = renderHook(() => - useSetupTechnology({ input, agentlessPolicy, isEditPage }) + useSetupTechnology({ input, isAgentlessEnabled: true, isEditPage }) ); expect(result.current.isAgentlessAvailable).toBeFalsy(); expect(result.current.setupTechnology).toBe(SetupTechnology.AGENT_BASED); }); - it('sets to AGENT_BASED when agentPolicyId differs from agentlessPolicyId', () => { + it('sets to AGENT_BASED when isAgentlessEnabled is false', () => { const input = { type: CLOUDBEAT_AWS } as NewPackagePolicyInput; - const agentPolicies = [{ id: 'agentPolicyId' } as AgentPolicy]; - const agentlessPolicy = { id: 'agentlessPolicyId' } as AgentPolicy; const { result } = renderHook(() => - useSetupTechnology({ input, agentPolicies, agentlessPolicy, isEditPage }) + useSetupTechnology({ input, isAgentlessEnabled: false, isEditPage }) ); expect(result.current.setupTechnology).toBe(SetupTechnology.AGENT_BASED); }); @@ -113,13 +107,12 @@ describe('useSetupTechnology', () => { expect(result.current.setupTechnology).toBe(SetupTechnology.AGENT_BASED); }); - it('initializes with AGENTLESS technology if the agent policy id is "agentless"', () => { + it('initializes with AGENTLESS technology if isAgentlessEnable is true', () => { const input = { type: CLOUDBEAT_AWS } as NewPackagePolicyInput; - const agentPolicies = [{ id: 'agentless' } as AgentPolicy]; const { result } = renderHook(() => useSetupTechnology({ input, - agentPolicies, + isAgentlessEnabled: true, isEditPage, }) ); diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/setup_technology_selector/use_setup_technology.ts b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/setup_technology_selector/use_setup_technology.ts index 20c104fc071c9..77b99d42d6411 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/setup_technology_selector/use_setup_technology.ts +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/setup_technology_selector/use_setup_technology.ts @@ -6,20 +6,18 @@ */ import { useEffect, useState } from 'react'; -import { AgentPolicy, NewPackagePolicyInput } from '@kbn/fleet-plugin/common'; +import { NewPackagePolicyInput } from '@kbn/fleet-plugin/common'; import { SetupTechnology } from '@kbn/fleet-plugin/public'; import { CLOUDBEAT_AWS, CLOUDBEAT_GCP, CLOUDBEAT_AZURE } from '../../../../common/constants'; export const useSetupTechnology = ({ input, - agentPolicies, - agentlessPolicy, + isAgentlessEnabled, handleSetupTechnologyChange, isEditPage, }: { input: NewPackagePolicyInput; - agentPolicies?: AgentPolicy[]; - agentlessPolicy?: AgentPolicy; + isAgentlessEnabled?: boolean; handleSetupTechnologyChange?: (value: SetupTechnology) => void; isEditPage: boolean; }) => { @@ -27,11 +25,9 @@ export const useSetupTechnology = ({ const isCspmGcp = input.type === CLOUDBEAT_GCP; const isCspmAzure = input.type === CLOUDBEAT_AZURE; const isAgentlessSupportedForCloudProvider = isCspmAws || isCspmGcp || isCspmAzure; - const isAgentlessAvailable = Boolean(isAgentlessSupportedForCloudProvider && agentlessPolicy); - const agentPolicyIds = (agentPolicies || []).map((policy: AgentPolicy) => policy.id); - const agentlessPolicyId = agentlessPolicy?.id; + const isAgentlessAvailable = isAgentlessSupportedForCloudProvider && isAgentlessEnabled; const [setupTechnology, setSetupTechnology] = useState(() => { - if (isEditPage && agentPolicyIds.includes(SetupTechnology.AGENTLESS)) { + if (isEditPage && isAgentlessAvailable) { return SetupTechnology.AGENTLESS; } @@ -50,26 +46,16 @@ export const useSetupTechnology = ({ return; } - const hasAgentPolicies = agentPolicyIds.length > 0; - const agentlessPolicyIsAbsent = - !agentlessPolicyId || !agentPolicyIds.includes(agentlessPolicyId); - - if (hasAgentPolicies && agentlessPolicyIsAbsent) { - /* - handle case when agent policy is coming from outside, - e.g. from the get param or when coming to integration from a specific agent policy - */ + if (!isAgentlessAvailable) { setSetupTechnology(SetupTechnology.AGENT_BASED); - } else if (isAgentlessAvailable) { + } else { /* preselecting agentless when available and resetting to agent-based when switching to another integration type, which doesn't support agentless */ setSetupTechnology(SetupTechnology.AGENTLESS); - } else { - setSetupTechnology(SetupTechnology.AGENT_BASED); } - }, [agentPolicyIds, agentlessPolicyId, isAgentlessAvailable, isDirty, isEditPage]); + }, [isAgentlessAvailable, isDirty, isEditPage]); useEffect(() => { if (isEditPage) { diff --git a/x-pack/plugins/cloud_security_posture/public/pages/configurations/configurations.handlers.mock.ts b/x-pack/plugins/cloud_security_posture/public/pages/configurations/configurations.handlers.mock.ts index 38e4edf46f77a..c5fb197583dd9 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/configurations/configurations.handlers.mock.ts +++ b/x-pack/plugins/cloud_security_posture/public/pages/configurations/configurations.handlers.mock.ts @@ -11,6 +11,15 @@ import { isArray } from 'lodash'; import { http, HttpResponse } from 'msw'; import { v4 as uuidV4 } from 'uuid'; +export const generateMultipleCspFindings = ( + option: { count: number; failedCount?: number } = { count: 1, failedCount: 0 } +) => { + const failedCount = option.failedCount || 0; + return Array.from({ length: option?.count }, (_, i) => { + return generateCspFinding(i.toString(), i < failedCount ? 'failed' : 'passed'); + }); +}; + export const generateCspFinding = ( id: string, evaluation: 'failed' | 'passed' = 'passed' @@ -211,25 +220,36 @@ export const bsearchFindingsHandler = (findings: CspFinding[]) => filter[0]?.bool?.should?.[0]?.term?.['rule.section']?.value !== undefined; if (hasRuleSectionQuerySearchTerm) { - const filteredFindingJson = findings.filter((finding) => { + const filteredFindings = findings.filter((finding) => { const termValue = (filter[0].bool?.should as estypes.QueryDslQueryContainer[])?.[0]?.term?.[ 'rule.section' ]?.value; return finding.rule.section === termValue; }); - return HttpResponse.json(getFindingsBsearchResponse(filteredFindingJson)); + return HttpResponse.json(getFindingsBsearchResponse(filteredFindings)); } const hasRuleSectionFilter = isArray(filter) && filter?.[0]?.match_phrase?.['rule.section'] !== undefined; if (hasRuleSectionFilter) { - const filteredFindingJson = findings.filter((finding) => { + const filteredFindings = findings.filter((finding) => { return finding.rule.section === filter?.[0]?.match_phrase?.['rule.section']; }); - return HttpResponse.json(getFindingsBsearchResponse(filteredFindingJson)); + return HttpResponse.json(getFindingsBsearchResponse(filteredFindings)); + } + + const hasResultEvaluationFilter = + isArray(filter) && filter?.[0]?.match_phrase?.['result.evaluation'] !== undefined; + + if (hasResultEvaluationFilter) { + const filteredFindings = findings.filter((finding) => { + return finding.result.evaluation === filter?.[0]?.match_phrase?.['result.evaluation']; + }); + + return HttpResponse.json(getFindingsBsearchResponse(filteredFindings)); } return HttpResponse.json(getFindingsBsearchResponse(findings)); diff --git a/x-pack/plugins/cloud_security_posture/public/pages/configurations/configurations.test.tsx b/x-pack/plugins/cloud_security_posture/public/pages/configurations/configurations.test.tsx index 324eddd1fd8fc..9ff1b40d49c70 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/configurations/configurations.test.tsx +++ b/x-pack/plugins/cloud_security_posture/public/pages/configurations/configurations.test.tsx @@ -22,6 +22,7 @@ import * as statusHandlers from '../../../server/routes/status/status.handlers.m import { bsearchFindingsHandler, generateCspFinding, + generateMultipleCspFindings, rulesGetStatesHandler, } from './configurations.handlers.mock'; @@ -247,4 +248,109 @@ describe('', () => { expect(screen.getByText(finding2.resource.name)).toBeInTheDocument(); }); }); + + describe('DistributionBar', () => { + it('renders the distribution bar', async () => { + server.use(statusHandlers.indexedHandler); + server.use( + bsearchFindingsHandler( + generateMultipleCspFindings({ + count: 10, + failedCount: 3, + }) + ) + ); + + renderFindingsPage(); + + // Loading while checking the status API + expect(screen.getByText(/loading/i)).toBeInTheDocument(); + + await waitFor(() => expect(screen.getByText(/10 findings/i)).toBeInTheDocument()); + + screen.getByRole('button', { + name: /passed findings: 7/i, + }); + screen.getByRole('button', { + name: /failed findings: 3/i, + }); + + // Assert that the distribution bar has the correct percentages rendered + expect(screen.getByTestId('distribution_bar_passed')).toHaveStyle('flex: 7'); + expect(screen.getByTestId('distribution_bar_failed')).toHaveStyle('flex: 3'); + }); + + it('filters by passed findings when clicking on the passed findings button', async () => { + server.use(statusHandlers.indexedHandler); + server.use( + bsearchFindingsHandler( + generateMultipleCspFindings({ + count: 2, + failedCount: 1, + }) + ) + ); + + renderFindingsPage(); + + // Loading while checking the status API + expect(screen.getByText(/loading/i)).toBeInTheDocument(); + + await waitFor(() => expect(screen.getByText(/2 findings/i)).toBeInTheDocument()); + + const passedFindingsButton = screen.getByRole('button', { + name: /passed findings: 1/i, + }); + userEvent.click(passedFindingsButton); + + await waitFor(() => expect(screen.getByText(/1 findings/i)).toBeInTheDocument()); + + screen.getByRole('button', { + name: /passed findings: 1/i, + }); + screen.getByRole('button', { + name: /failed findings: 0/i, + }); + + // Assert that the distribution bar has the correct percentages rendered + expect(screen.getByTestId('distribution_bar_passed')).toHaveStyle('flex: 1'); + expect(screen.getByTestId('distribution_bar_failed')).toHaveStyle('flex: 0'); + }, 10000); + it('filters by failed findings when clicking on the failed findings button', async () => { + server.use(statusHandlers.indexedHandler); + server.use( + bsearchFindingsHandler( + generateMultipleCspFindings({ + count: 2, + failedCount: 1, + }) + ) + ); + + renderFindingsPage(); + + // Loading while checking the status API + expect(screen.getByText(/loading/i)).toBeInTheDocument(); + + await waitFor(() => expect(screen.getByText(/2 findings/i)).toBeInTheDocument()); + + const failedFindingsButton = screen.getByRole('button', { + name: /failed findings: 1/i, + }); + userEvent.click(failedFindingsButton); + + await waitFor(() => expect(screen.getByText(/1 findings/i)).toBeInTheDocument()); + + screen.getByRole('button', { + name: /passed findings: 0/i, + }); + screen.getByRole('button', { + name: /failed findings: 1/i, + }); + + // Assert that the distribution bar has the correct percentages rendered + expect(screen.getByTestId('distribution_bar_passed')).toHaveStyle('flex: 0'); + expect(screen.getByTestId('distribution_bar_failed')).toHaveStyle('flex: 1'); + }, 10000); + }); }); diff --git a/x-pack/plugins/cloud_security_posture/public/pages/configurations/layout/findings_distribution_bar.tsx b/x-pack/plugins/cloud_security_posture/public/pages/configurations/layout/findings_distribution_bar.tsx index 35f6fd008d4b9..56ca9687551d8 100644 --- a/x-pack/plugins/cloud_security_posture/public/pages/configurations/layout/findings_distribution_bar.tsx +++ b/x-pack/plugins/cloud_security_posture/public/pages/configurations/layout/findings_distribution_bar.tsx @@ -11,7 +11,6 @@ import { EuiBadge, EuiSpacer, EuiFlexGroup, - EuiFlexItem, useEuiTheme, EuiTextColor, } from '@elastic/eui'; @@ -28,6 +27,14 @@ interface Props { distributionOnClick: (evaluation: Evaluation) => void; } +const I18N_PASSED_FINDINGS = i18n.translate('xpack.csp.findings.distributionBar.totalPassedLabel', { + defaultMessage: 'Passed Findings', +}); + +const I18N_FAILED_FINDINGS = i18n.translate('xpack.csp.findings.distributionBar.totalFailedLabel', { + defaultMessage: 'Failed Findings', +}); + export const CurrentPageOfTotal = ({ pageEnd, pageStart, @@ -60,42 +67,21 @@ export const FindingsDistributionBar = (props: Props) => (
); - -const Counters = (props: Props) => ( - - - - - - - -); - -const PassedFailedCounters = ({ passed, failed }: Pick) => { +const Counters = ({ passed, failed }: Pick) => { const { euiTheme } = useEuiTheme(); + return ( -
- - -
+ {I18N_PASSED_FINDINGS} + {getAbbreviatedNumber(passed)} + {I18N_FAILED_FINDINGS} + {getAbbreviatedNumber(failed)} + ); }; @@ -121,6 +107,7 @@ const DistributionBar: React.FC> = ({ distributionOnClick(RULE_PASSED); }} data-test-subj="distribution_bar_passed" + aria-label={`${I18N_PASSED_FINDINGS}: ${passed}`} /> > = ({ distributionOnClick(RULE_FAILED); }} data-test-subj="distribution_bar_failed" + aria-label={`${I18N_FAILED_FINDINGS}: ${failed}`} /> ); @@ -144,25 +132,18 @@ const DistributionBarPart = ({ color: string; distributionOnClick: () => void; ['data-test-subj']: string; + ['aria-label']: string; }) => (
diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/types.ts b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/types.ts index 21e663f511b97..2393ff9c16a64 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/types.ts +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_summary_widget/types.ts @@ -7,6 +7,7 @@ import type { BrushEndListener, PartialTheme, SettingsProps, Theme } from '@elastic/charts'; import { estypes } from '@elastic/elasticsearch'; +import { IUiSettingsClient } from '@kbn/core-ui-settings-browser'; import { AlertStatus, ValidFeatureId } from '@kbn/rule-data-utils'; import { ChartsPluginStart } from '@kbn/charts-plugin/public'; @@ -37,6 +38,7 @@ interface AlertsCount { export interface AlertSummaryWidgetDependencies { dependencies: { charts: ChartsPluginStart; + uiSettings: IUiSettingsClient; }; } diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_form.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_form.tsx index 6319d75c5eaf7..7feff24143835 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_form.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_form.tsx @@ -794,7 +794,7 @@ export const RuleForm = ({ data-test-subj="intervalFormRow" display="rowCompressed" helpText={getHelpTextForInterval()} - isInvalid={errors['schedule.interval'].length > 0} + isInvalid={!!errors['schedule.interval'].length} error={errors['schedule.interval']} > @@ -803,7 +803,7 @@ export const RuleForm = ({ prepend={labelForRuleChecked} fullWidth min={1} - isInvalid={errors['schedule.interval'].length > 0} + isInvalid={!!errors['schedule.interval'].length} value={ruleInterval || ''} name="interval" data-test-subj="intervalInput" diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/show_request_modal.test.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/show_request_modal.test.tsx index 0ddee15a050dd..1fb7ebaca3de2 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/show_request_modal.test.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/show_request_modal.test.tsx @@ -107,7 +107,7 @@ const ShowRequestModalWithProviders: React.FunctionComponent ); -describe('rules_settings_modal', () => { +describe('showRequestModal', () => { afterEach(() => { jest.clearAllMocks(); cleanup(); diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/show_request_modal.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/show_request_modal.tsx index f987243b436db..ab21a5a1b7a1f 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/show_request_modal.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/show_request_modal.tsx @@ -20,7 +20,7 @@ import { } from '@elastic/eui'; import { transformUpdateRuleBody as rewriteUpdateBodyRequest, - UPDATE_FIELDS, + UPDATE_FIELDS_WITH_ACTIONS, } from '@kbn/alerts-ui-shared/src/common/apis/update_rule'; import { transformCreateRuleBody as rewriteCreateBodyRequest } from '@kbn/alerts-ui-shared/src/common/apis/create_rule'; import * as i18n from '../translations'; @@ -30,7 +30,7 @@ import { BASE_ALERTING_API_PATH } from '../../constants'; const stringify = (rule: RuleUpdates, edit: boolean): string => { try { const request = edit - ? rewriteUpdateBodyRequest(pick(rule, UPDATE_FIELDS)) + ? rewriteUpdateBodyRequest(pick(rule, UPDATE_FIELDS_WITH_ACTIONS)) : rewriteCreateBodyRequest(rule); return JSON.stringify(request, null, 2); } catch { diff --git a/x-pack/plugins/triggers_actions_ui/public/mocks.ts b/x-pack/plugins/triggers_actions_ui/public/mocks.ts index e6d98240d2c5f..7fccc65a2b6b6 100644 --- a/x-pack/plugins/triggers_actions_ui/public/mocks.ts +++ b/x-pack/plugins/triggers_actions_ui/public/mocks.ts @@ -8,6 +8,7 @@ import { RuleAction } from '@kbn/alerting-plugin/common'; import { chartPluginMock } from '@kbn/charts-plugin/public/mocks'; import { TypeRegistry } from '@kbn/alerts-ui-shared/src/common/type_registry'; +import { uiSettingsServiceMock } from '@kbn/core/public/mocks'; import { getAlertsTableDefaultAlertActionsLazy } from './common/get_alerts_table_default_row_actions'; import type { TriggersAndActionsUIPublicPluginStart } from './plugin'; @@ -146,6 +147,7 @@ function createStartMock(): TriggersAndActionsUIPublicPluginStart { getAlertSummaryWidget: (props) => { const dependencies: AlertSummaryWidgetDependencies['dependencies'] = { charts: chartPluginMock.createStartContract(), + uiSettings: uiSettingsServiceMock.createStartContract(), }; return getAlertSummaryWidgetLazy({ ...props, dependencies }); }, diff --git a/x-pack/plugins/triggers_actions_ui/public/plugin.ts b/x-pack/plugins/triggers_actions_ui/public/plugin.ts index f3fd01e66856f..514f77310bb0a 100644 --- a/x-pack/plugins/triggers_actions_ui/public/plugin.ts +++ b/x-pack/plugins/triggers_actions_ui/public/plugin.ts @@ -448,7 +448,7 @@ export class Plugin }; } - public start(_: CoreStart, plugins: PluginsStart): TriggersAndActionsUIPublicPluginStart { + public start(core: CoreStart, plugins: PluginsStart): TriggersAndActionsUIPublicPluginStart { import('./application/sections/alerts_table/configuration').then( ({ createGenericAlertsTableConfigurations }) => { createGenericAlertsTableConfigurations(plugins.fieldFormats).forEach((c) => @@ -562,6 +562,7 @@ export class Plugin getAlertSummaryWidget: (props: AlertSummaryWidgetProps) => { const dependencies: AlertSummaryWidgetDependencies['dependencies'] = { charts: plugins.charts, + uiSettings: core.uiSettings, }; return getAlertSummaryWidgetLazy({ ...props, dependencies }); }, diff --git a/x-pack/plugins/triggers_actions_ui/tsconfig.json b/x-pack/plugins/triggers_actions_ui/tsconfig.json index 363c6bc1b2312..abcf5c1e5bf87 100644 --- a/x-pack/plugins/triggers_actions_ui/tsconfig.json +++ b/x-pack/plugins/triggers_actions_ui/tsconfig.json @@ -68,7 +68,9 @@ "@kbn/controls-plugin", "@kbn/search-types", "@kbn/alerting-comparators", - "@kbn/alerting-types" + "@kbn/alerting-types", + "@kbn/visualization-utils", + "@kbn/core-ui-settings-browser" ], "exclude": ["target/**/*"] } diff --git a/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/default/flyout.tsx b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/default/flyout.tsx index 6ec05b0c4fc99..01cda109cad12 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/default/flyout.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/components/es_deprecations/deprecation_types/default/flyout.tsx @@ -72,9 +72,11 @@ export const DefaultDeprecationFlyout = ({

{details}

-

- -

+ {url && ( +

+ +

+ )}
diff --git a/x-pack/plugins/upgrade_assistant/server/lib/__fixtures__/health_indicators.ts b/x-pack/plugins/upgrade_assistant/server/lib/__fixtures__/health_indicators.ts index 00a3cba013334..cad6e73a092a1 100644 --- a/x-pack/plugins/upgrade_assistant/server/lib/__fixtures__/health_indicators.ts +++ b/x-pack/plugins/upgrade_assistant/server/lib/__fixtures__/health_indicators.ts @@ -19,6 +19,11 @@ export const diskIndicatorGreen: estypes.HealthReportDiskIndicator = { }, }; +export const diskIndicatorUnknown: estypes.HealthReportDiskIndicator = { + status: 'unknown', + symptom: 'No disk usage data.', +}; + export const diskIndicatorRed: estypes.HealthReportDiskIndicator = { status: 'red', symptom: 'The cluster does not have enough available disk space.', diff --git a/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status.test.ts b/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status.test.ts index 7b4bb04641648..3a373cbffbfe7 100644 --- a/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status.test.ts +++ b/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status.test.ts @@ -36,6 +36,24 @@ describe('getHealthIndicators', () => { expect(result).toEqual([]); }); + it('returns unknown indicators', async () => { + esClient.asCurrentUser.healthReport.mockResponse({ + cluster_name: 'mock', + indicators: { + disk: healthIndicatorsMock.diskIndicatorUnknown, + // @ts-ignore + shards_capacity: healthIndicatorsMock.shardCapacityIndicatorGreen, + }, + }); + + const result = await getHealthIndicators(esClient); + expect(result[0]).toEqual( + expect.objectContaining({ + details: 'No disk usage data.', + }) + ); + }); + it('returns unhealthy shards_capacity indicator', async () => { esClient.asCurrentUser.healthReport.mockResponse({ cluster_name: 'mock', diff --git a/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status.ts b/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status.ts index d343aca07f9f6..05fc4f666f7ba 100644 --- a/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status.ts +++ b/x-pack/plugins/upgrade_assistant/server/lib/es_deprecations_status.ts @@ -22,6 +22,18 @@ export function getShardCapacityDeprecationInfo({ details: any; symptom: any; }) { + // When we dont have a details field for our indicator, we can only report + // the symptom to the user given that's the only information about the deprecation + // we have. + if (!details) { + return { + details: symptom, + message: symptom, + url: null, + resolveDuringUpgrade: false, + }; + } + const causes = []; if (details.indices_with_readonly_block > 0) { causes.push( diff --git a/x-pack/test/accessibility/apps/group3/ml_embeddables_in_dashboard.ts b/x-pack/test/accessibility/apps/group3/ml_embeddables_in_dashboard.ts index 69a95822be3af..998fe73a98403 100644 --- a/x-pack/test/accessibility/apps/group3/ml_embeddables_in_dashboard.ts +++ b/x-pack/test/accessibility/apps/group3/ml_embeddables_in_dashboard.ts @@ -81,8 +81,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); for (const testData of testDataList) { - // FLAKY: https://github.com/elastic/kibana/issues/183196 - describe.skip(testData.suiteSuffix, function () { + describe(testData.suiteSuffix, function () { before(async () => { await ml.api.createAndRunAnomalyDetectionLookbackJob( testData.jobConfig, @@ -98,6 +97,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('can open job selection flyout', async () => { await PageObjects.dashboard.clickCreateDashboardPrompt(); await ml.dashboardEmbeddables.assertDashboardIsEmpty(); + // FIXME remove sleep when https://github.com/elastic/kibana/issues/187587 if fixed + await PageObjects.common.sleep(3000); await ml.dashboardEmbeddables.openAnomalyJobSelectionFlyout('ml_anomaly_charts'); await a11y.testAppSnapshot(); }); diff --git a/x-pack/test/api_integration/apis/metrics_ui/metrics_process_list.ts b/x-pack/test/api_integration/apis/metrics_ui/metrics_process_list.ts index 87e736c0bc822..5cee23beba8d8 100644 --- a/x-pack/test/api_integration/apis/metrics_ui/metrics_process_list.ts +++ b/x-pack/test/api_integration/apis/metrics_ui/metrics_process_list.ts @@ -34,7 +34,7 @@ export default function ({ getService }: FtrProviderContext) { hostTerm: { 'host.name': 'gke-observability-8--observability-8--bc1afd95-nhhw', }, - indexPattern: 'metrics-*,metricbeat-*', + sourceId: 'default', to: 1564432800000, sortBy: { name: 'cpu', diff --git a/x-pack/test/api_integration/apis/ml/datafeeds/index.ts b/x-pack/test/api_integration/apis/ml/datafeeds/index.ts index 449a9b2622b8b..e7cd57640f28e 100644 --- a/x-pack/test/api_integration/apis/ml/datafeeds/index.ts +++ b/x-pack/test/api_integration/apis/ml/datafeeds/index.ts @@ -12,5 +12,6 @@ export default function ({ loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./get_with_spaces')); loadTestFile(require.resolve('./get_stats_with_spaces')); loadTestFile(require.resolve('./update')); + loadTestFile(require.resolve('./preview')); }); } diff --git a/x-pack/test/api_integration/apis/ml/datafeeds/preview.ts b/x-pack/test/api_integration/apis/ml/datafeeds/preview.ts new file mode 100644 index 0000000000000..8fd305fb5b0d5 --- /dev/null +++ b/x-pack/test/api_integration/apis/ml/datafeeds/preview.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 expect from '@kbn/expect'; +import { FtrProviderContext } from '../../../ftr_provider_context'; +import { USER } from '../../../../functional/services/ml/security_common'; +import { getCommonRequestHeader } from '../../../../functional/services/ml/common_api'; + +export default ({ getService }: FtrProviderContext) => { + const ml = getService('ml'); + const esArchiver = getService('esArchiver'); + const spacesService = getService('spaces'); + const supertest = getService('supertestWithoutAuth'); + + const jobIdSpace1 = 'fq_single_space1'; + const datafeedIdSpace1 = `datafeed-${jobIdSpace1}`; + const idSpace1 = 'space1'; + const idSpace2 = 'space2'; + + async function getDatafeedPreview( + datafeedId: string, + expectedStatusCode: number, + space?: string + ) { + const { body, status } = await supertest + .get(`${space ? `/s/${space}` : ''}/internal/ml/datafeeds/${datafeedId}/_preview`) + .auth( + USER.ML_POWERUSER_ALL_SPACES, + ml.securityCommon.getPasswordForUser(USER.ML_POWERUSER_ALL_SPACES) + ) + .set(getCommonRequestHeader('1')); + ml.api.assertResponseStatusCode(expectedStatusCode, status, body); + + return body; + } + + describe('GET datafeed preview', () => { + before(async () => { + await spacesService.create({ id: idSpace1, name: 'space_one', disabledFeatures: [] }); + await spacesService.create({ id: idSpace2, name: 'space_two', disabledFeatures: [] }); + await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/ml/farequote'); + + const jobConfig = ml.commonConfig.getADFqSingleMetricJobConfig(jobIdSpace1); + await ml.api.createAnomalyDetectionJob(jobConfig, idSpace1); + const datafeedConfig = ml.commonConfig.getADFqDatafeedConfig(jobIdSpace1); + await ml.api.createDatafeed(datafeedConfig, idSpace1); + + await ml.testResources.setKibanaTimeZoneToUTC(); + }); + + after(async () => { + await spacesService.delete(idSpace1); + await spacesService.delete(idSpace2); + await ml.api.cleanMlIndices(); + await ml.testResources.cleanMLSavedObjects(); + }); + + it('should fail with non-existing datafeed', async () => { + await getDatafeedPreview('non-existing-datafeed', 404); + }); + + it('should return datafeed preview with datafeed id from correct space', async () => { + const body = await getDatafeedPreview(datafeedIdSpace1, 200, idSpace1); + expect(body.length).to.eql(1000, `response length should be 1000 (got ${body.length})`); + }); + + it('should fail with datafeed from different space', async () => { + await getDatafeedPreview(datafeedIdSpace1, 404, idSpace2); + }); + }); +}; diff --git a/x-pack/test/api_integration/apis/ml/system/index.ts b/x-pack/test/api_integration/apis/ml/system/index.ts index 8b9aef9b813c9..0ddd4b80a0ee5 100644 --- a/x-pack/test/api_integration/apis/ml/system/index.ts +++ b/x-pack/test/api_integration/apis/ml/system/index.ts @@ -12,5 +12,7 @@ export default function ({ loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./capabilities')); loadTestFile(require.resolve('./space_capabilities')); loadTestFile(require.resolve('./index_exists')); + loadTestFile(require.resolve('./info')); + loadTestFile(require.resolve('./node_count')); }); } diff --git a/x-pack/test/api_integration/apis/ml/system/info.ts b/x-pack/test/api_integration/apis/ml/system/info.ts new file mode 100644 index 0000000000000..28d681ad12584 --- /dev/null +++ b/x-pack/test/api_integration/apis/ml/system/info.ts @@ -0,0 +1,135 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import expect from '@kbn/expect'; + +import { FtrProviderContext } from '../../../ftr_provider_context'; +import { USER } from '../../../../functional/services/ml/security_common'; +import { getCommonRequestHeader } from '../../../../functional/services/ml/common_api'; + +export default ({ getService }: FtrProviderContext) => { + const supertest = getService('supertestWithoutAuth'); + const ml = getService('ml'); + + const expectedDefaults = { + anomaly_detectors: { + model_memory_limit: '1gb', + categorization_examples_limit: 4, + model_snapshot_retention_days: 10, + daily_model_snapshot_retention_after_days: 1, + categorization_analyzer: { + char_filter: ['first_line_with_letters'], + tokenizer: 'ml_standard', + filter: [ + { + type: 'stop', + stopwords: [ + 'Monday', + 'Tuesday', + 'Wednesday', + 'Thursday', + 'Friday', + 'Saturday', + 'Sunday', + 'Mon', + 'Tue', + 'Wed', + 'Thu', + 'Fri', + 'Sat', + 'Sun', + 'January', + 'February', + 'March', + 'April', + 'May', + 'June', + 'July', + 'August', + 'September', + 'October', + 'November', + 'December', + 'Jan', + 'Feb', + 'Mar', + 'Apr', + 'May', + 'Jun', + 'Jul', + 'Aug', + 'Sep', + 'Oct', + 'Nov', + 'Dec', + 'GMT', + 'UTC', + ], + }, + { + type: 'limit', + max_token_count: '100', + }, + ], + }, + }, + datafeeds: { + scroll_size: 1000, + }, + }; + + async function runRequest(user: USER) { + const { body, status } = await supertest + .get(`/internal/ml/info`) + .auth(user, ml.securityCommon.getPasswordForUser(user)) + .set(getCommonRequestHeader('1')); + ml.api.assertResponseStatusCode(200, status, body); + + return body; + } + + describe('GET ml/info', function () { + it('should match expected values', async () => { + const resp = await runRequest(USER.ML_POWERUSER); + + expect(resp.upgrade_mode).to.eql(false, 'upgrade_mode should be false'); + + // defaults should always be the same + expect(resp.defaults).to.eql(expectedDefaults, 'defaults should match expected values'); + + // native code should always be present but values depend on the build + expect(resp.native_code).to.not.eql(undefined, 'native_code should be present'); + expect(resp.native_code.version).to.not.eql( + undefined, + 'native_code.version should be present' + ); + expect(resp.native_code.build_hash).to.not.eql( + undefined, + 'native_code.build_hash should be present' + ); + + // limits should always be present but values depend on hardware + expect(resp.limits).to.not.eql(undefined, 'limits should be present'); + expect(resp.limits.total_ml_memory).to.not.eql( + undefined, + 'total_ml_memory should be present' + ); + expect(resp.limits.total_ml_processors).to.not.eql( + undefined, + 'total_ml_processors should be present' + ); + expect(resp.limits.effective_max_model_memory_limit).to.not.eql( + undefined, + 'effective_max_model_memory_limit should be present' + ); + expect(resp.limits.max_single_ml_node_processors).to.not.eql( + undefined, + 'max_single_ml_node_processors should be present' + ); + }); + }); +}; diff --git a/x-pack/test/api_integration/apis/ml/system/node_count.ts b/x-pack/test/api_integration/apis/ml/system/node_count.ts new file mode 100644 index 0000000000000..08fa7abe482ee --- /dev/null +++ b/x-pack/test/api_integration/apis/ml/system/node_count.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 expect from '@kbn/expect'; + +import { FtrProviderContext } from '../../../ftr_provider_context'; +import { USER } from '../../../../functional/services/ml/security_common'; +import { getCommonRequestHeader } from '../../../../functional/services/ml/common_api'; + +export default ({ getService }: FtrProviderContext) => { + const supertest = getService('supertestWithoutAuth'); + const ml = getService('ml'); + + async function runRequest(user: USER, expectedStatusCode: number) { + const { body, status } = await supertest + .get(`/internal/ml/ml_node_count`) + .auth(user, ml.securityCommon.getPasswordForUser(user)) + .set(getCommonRequestHeader('1')); + ml.api.assertResponseStatusCode(expectedStatusCode, status, body); + + return body; + } + + describe('GET ml/ml_node_count', function () { + describe('get ml node count', () => { + it('should match expected values', async () => { + const resp = await runRequest(USER.ML_POWERUSER, 200); + expect(resp.count).to.be.greaterThan(0, 'count should be greater than 0'); + expect(resp.lazyNodeCount).to.be.greaterThan( + -1, + 'lazyNodeCount should be greater or equal to 0' + ); + }); + + it('should should fail for a unauthorized user', async () => { + await runRequest(USER.ML_UNAUTHORIZED, 403); + }); + }); + }); +}; diff --git a/x-pack/test/api_integration/services/security_solution_api.gen.ts b/x-pack/test/api_integration/services/security_solution_api.gen.ts index 9f6d717ea9dff..7a3ef5cc1f849 100644 --- a/x-pack/test/api_integration/services/security_solution_api.gen.ts +++ b/x-pack/test/api_integration/services/security_solution_api.gen.ts @@ -26,7 +26,13 @@ import { BulkPatchRulesRequestBodyInput } from '@kbn/security-solution-plugin/co import { BulkUpdateRulesRequestBodyInput } from '@kbn/security-solution-plugin/common/api/detection_engine/rule_management/bulk_crud/bulk_update_rules/bulk_update_rules_route.gen'; import { CreateAlertsMigrationRequestBodyInput } from '@kbn/security-solution-plugin/common/api/detection_engine/signals_migration/create_signals_migration/create_signals_migration.gen'; import { CreateRuleRequestBodyInput } from '@kbn/security-solution-plugin/common/api/detection_engine/rule_management/crud/create_rule/create_rule_route.gen'; +import { + CreateUpdateProtectionUpdatesNoteRequestParamsInput, + CreateUpdateProtectionUpdatesNoteRequestBodyInput, +} from '@kbn/security-solution-plugin/common/api/endpoint/protection_updates_note/protection_updates_note.gen'; import { DeleteRuleRequestQueryInput } from '@kbn/security-solution-plugin/common/api/detection_engine/rule_management/crud/delete_rule/delete_rule_route.gen'; +import { EndpointIsolateRedirectRequestBodyInput } from '@kbn/security-solution-plugin/common/api/endpoint/actions/isolate_route.gen'; +import { EndpointUnisolateRedirectRequestBodyInput } from '@kbn/security-solution-plugin/common/api/endpoint/actions/unisolate_route.gen'; import { ExportRulesRequestQueryInput, ExportRulesRequestBodyInput, @@ -40,6 +46,7 @@ import { GetEndpointSuggestionsRequestBodyInput, } from '@kbn/security-solution-plugin/common/api/endpoint/suggestions/get_suggestions.gen'; import { GetPolicyResponseRequestQueryInput } from '@kbn/security-solution-plugin/common/api/endpoint/policy/policy.gen'; +import { GetProtectionUpdatesNoteRequestParamsInput } from '@kbn/security-solution-plugin/common/api/endpoint/protection_updates_note/protection_updates_note.gen'; import { GetRuleExecutionEventsRequestQueryInput, GetRuleExecutionEventsRequestParamsInput, @@ -153,6 +160,16 @@ after 30 days. It also deletes other artifacts specific to the migration impleme .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') .send(props.body as object); }, + createUpdateProtectionUpdatesNote(props: CreateUpdateProtectionUpdatesNoteProps) { + return supertest + .post( + replaceParams('/api/endpoint/protection_updates_note/{package_policy_id}', props.params) + ) + .set('kbn-xsrf', 'true') + .set(ELASTIC_HTTP_VERSION_HEADER, '2023-10-31') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') + .send(props.body as object); + }, deleteAlertsIndex() { return supertest .delete('/api/detection_engine/index') @@ -171,6 +188,22 @@ after 30 days. It also deletes other artifacts specific to the migration impleme .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') .query(props.query); }, + endpointIsolateRedirect(props: EndpointIsolateRedirectProps) { + return supertest + .post('/api/endpoint/isolate') + .set('kbn-xsrf', 'true') + .set(ELASTIC_HTTP_VERSION_HEADER, '2023-10-31') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') + .send(props.body as object); + }, + endpointUnisolateRedirect(props: EndpointUnisolateRedirectProps) { + return supertest + .post('/api/endpoint/unisolate') + .set('kbn-xsrf', 'true') + .set(ELASTIC_HTTP_VERSION_HEADER, '2023-10-31') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') + .send(props.body as object); + }, /** * Exports rules to an `.ndjson` file. The following configuration items are also included in the `.ndjson` file - Actions, Exception lists. Prebuilt rules cannot be exported. */ @@ -254,6 +287,15 @@ finalize it. .set(ELASTIC_HTTP_VERSION_HEADER, '2023-10-31') .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana'); }, + getProtectionUpdatesNote(props: GetProtectionUpdatesNoteProps) { + return supertest + .get( + replaceParams('/api/endpoint/protection_updates_note/{package_policy_id}', props.params) + ) + .set('kbn-xsrf', 'true') + .set(ELASTIC_HTTP_VERSION_HEADER, '2023-10-31') + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana'); + }, getRuleExecutionEvents(props: GetRuleExecutionEventsProps) { return supertest .put( @@ -414,9 +456,19 @@ export interface CreateAlertsMigrationProps { export interface CreateRuleProps { body: CreateRuleRequestBodyInput; } +export interface CreateUpdateProtectionUpdatesNoteProps { + params: CreateUpdateProtectionUpdatesNoteRequestParamsInput; + body: CreateUpdateProtectionUpdatesNoteRequestBodyInput; +} export interface DeleteRuleProps { query: DeleteRuleRequestQueryInput; } +export interface EndpointIsolateRedirectProps { + body: EndpointIsolateRedirectRequestBodyInput; +} +export interface EndpointUnisolateRedirectProps { + body: EndpointUnisolateRedirectRequestBodyInput; +} export interface ExportRulesProps { query: ExportRulesRequestQueryInput; body: ExportRulesRequestBodyInput; @@ -440,6 +492,9 @@ export interface GetEndpointSuggestionsProps { export interface GetPolicyResponseProps { query: GetPolicyResponseRequestQueryInput; } +export interface GetProtectionUpdatesNoteProps { + params: GetProtectionUpdatesNoteRequestParamsInput; +} export interface GetRuleExecutionEventsProps { query: GetRuleExecutionEventsRequestQueryInput; params: GetRuleExecutionEventsRequestParamsInput; diff --git a/x-pack/test/apm_api_integration/tests/correlations/failed_transactions.spec.ts b/x-pack/test/apm_api_integration/tests/correlations/failed_transactions.spec.ts index 37424562ecc83..13754f6c7eb5a 100644 --- a/x-pack/test/apm_api_integration/tests/correlations/failed_transactions.spec.ts +++ b/x-pack/test/apm_api_integration/tests/correlations/failed_transactions.spec.ts @@ -5,8 +5,8 @@ * 2.0. */ +import { orderBy } from 'lodash'; import expect from '@kbn/expect'; - import type { FailedTransactionsCorrelationsResponse } from '@kbn/apm-plugin/common/correlations/failed_transactions_correlations/types'; import { EVENT_OUTCOME } from '@kbn/apm-plugin/common/es_fields/apm'; import { EventOutcome } from '@kbn/apm-plugin/common/event_outcome'; @@ -27,7 +27,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { kuery: '', }); - registry.when.skip('failed transactions without data', { config: 'trial', archives: [] }, () => { + registry.when('failed transactions without data', { config: 'trial', archives: [] }, () => { it('handles the empty state', async () => { const overallDistributionResponse = await apmApiClient.readUser({ endpoint: 'POST /internal/apm/latency/overall_distribution/transactions', @@ -104,127 +104,120 @@ export default function ApiTest({ getService }: FtrProviderContext) { }); }); - // FLAKY: https://github.com/elastic/kibana/issues/176544 - registry.when.skip( - 'failed transactions with data', - { config: 'trial', archives: ['8.0.0'] }, - () => { - it('runs queries and returns results', async () => { - const overallDistributionResponse = await apmApiClient.readUser({ - endpoint: 'POST /internal/apm/latency/overall_distribution/transactions', - params: { - body: { - ...getOptions(), - percentileThreshold: 95, - chartType: LatencyDistributionChartType.failedTransactionsCorrelations, - }, + registry.when('failed transactions with data', { config: 'trial', archives: ['8.0.0'] }, () => { + it('runs queries and returns results', async () => { + const overallDistributionResponse = await apmApiClient.readUser({ + endpoint: 'POST /internal/apm/latency/overall_distribution/transactions', + params: { + body: { + ...getOptions(), + percentileThreshold: 95, + chartType: LatencyDistributionChartType.failedTransactionsCorrelations, }, - }); + }, + }); + + expect(overallDistributionResponse.status).to.eql( + 200, + `Expected status to be '200', got '${overallDistributionResponse.status}'` + ); - expect(overallDistributionResponse.status).to.eql( - 200, - `Expected status to be '200', got '${overallDistributionResponse.status}'` - ); - - const errorDistributionResponse = await apmApiClient.readUser({ - endpoint: 'POST /internal/apm/latency/overall_distribution/transactions', - params: { - body: { - ...getOptions(), - percentileThreshold: 95, - termFilters: [{ fieldName: EVENT_OUTCOME, fieldValue: EventOutcome.failure }], - chartType: LatencyDistributionChartType.failedTransactionsCorrelations, - }, + const errorDistributionResponse = await apmApiClient.readUser({ + endpoint: 'POST /internal/apm/latency/overall_distribution/transactions', + params: { + body: { + ...getOptions(), + percentileThreshold: 95, + termFilters: [{ fieldName: EVENT_OUTCOME, fieldValue: EventOutcome.failure }], + chartType: LatencyDistributionChartType.failedTransactionsCorrelations, }, - }); + }, + }); - expect(errorDistributionResponse.status).to.eql( - 200, - `Expected status to be '200', got '${errorDistributionResponse.status}'` - ); + expect(errorDistributionResponse.status).to.eql( + 200, + `Expected status to be '200', got '${errorDistributionResponse.status}'` + ); - const fieldCandidatesResponse = await apmApiClient.readUser({ - endpoint: 'GET /internal/apm/correlations/field_candidates/transactions', - params: { - query: getOptions(), - }, - }); + const fieldCandidatesResponse = await apmApiClient.readUser({ + endpoint: 'GET /internal/apm/correlations/field_candidates/transactions', + params: { + query: getOptions(), + }, + }); - expect(fieldCandidatesResponse.status).to.eql( - 200, - `Expected status to be '200', got '${fieldCandidatesResponse.status}'` - ); - - const fieldCandidates = fieldCandidatesResponse.body?.fieldCandidates.filter( - (t) => !(t === EVENT_OUTCOME) - ); - - // Identified 68 fieldCandidates. - expect(fieldCandidates.length).to.eql( - 68, - `Expected field candidates length to be '68', got '${fieldCandidates.length}'` - ); - - const failedTransactionsCorrelationsResponse = await apmApiClient.readUser({ - endpoint: 'POST /internal/apm/correlations/p_values/transactions', - params: { - body: { - ...getOptions(), - fieldCandidates, - }, + expect(fieldCandidatesResponse.status).to.eql( + 200, + `Expected status to be '200', got '${fieldCandidatesResponse.status}'` + ); + + const fieldCandidates = fieldCandidatesResponse.body?.fieldCandidates.filter( + (t) => !(t === EVENT_OUTCOME) + ); + + // Identified 80 fieldCandidates. + expect(fieldCandidates.length).to.eql( + 80, + `Expected field candidates length to be '80', got '${fieldCandidates.length}'` + ); + + const failedTransactionsCorrelationsResponse = await apmApiClient.readUser({ + endpoint: 'POST /internal/apm/correlations/p_values/transactions', + params: { + body: { + ...getOptions(), + fieldCandidates, }, + }, + }); + + expect(failedTransactionsCorrelationsResponse.status).to.eql( + 200, + `Expected status to be '200', got '${failedTransactionsCorrelationsResponse.status}'` + ); + + const fieldsToSample = new Set(); + if (failedTransactionsCorrelationsResponse.body?.failedTransactionsCorrelations.length > 0) { + failedTransactionsCorrelationsResponse.body?.failedTransactionsCorrelations.forEach((d) => { + fieldsToSample.add(d.fieldName); }); + } - expect(failedTransactionsCorrelationsResponse.status).to.eql( - 200, - `Expected status to be '200', got '${failedTransactionsCorrelationsResponse.status}'` - ); - - const fieldsToSample = new Set(); - if ( - failedTransactionsCorrelationsResponse.body?.failedTransactionsCorrelations.length > 0 - ) { - failedTransactionsCorrelationsResponse.body?.failedTransactionsCorrelations.forEach( - (d) => { - fieldsToSample.add(d.fieldName); - } - ); - } - - const finalRawResponse: FailedTransactionsCorrelationsResponse = { - ccsWarning: failedTransactionsCorrelationsResponse.body?.ccsWarning, - percentileThresholdValue: overallDistributionResponse.body?.percentileThresholdValue, - overallHistogram: overallDistributionResponse.body?.overallHistogram, - errorHistogram: errorDistributionResponse.body?.overallHistogram, - failedTransactionsCorrelations: - failedTransactionsCorrelationsResponse.body?.failedTransactionsCorrelations, - }; - - expect(finalRawResponse?.percentileThresholdValue).to.be(1309695.875); - expect(finalRawResponse?.errorHistogram?.length).to.be(101); - expect(finalRawResponse?.overallHistogram?.length).to.be(101); - - expect(finalRawResponse?.failedTransactionsCorrelations?.length).to.eql( - 30, - `Expected 30 identified correlations, got ${finalRawResponse?.failedTransactionsCorrelations?.length}.` - ); - - const sortedCorrelations = finalRawResponse?.failedTransactionsCorrelations?.sort( - (a, b) => b.score - a.score - ); - const correlation = sortedCorrelations?.[0]; - - expect(typeof correlation).to.be('object'); - expect(correlation?.doc_count).to.be(31); - expect(correlation?.score).to.be(83.70467673605746); - expect(correlation?.bg_count).to.be(31); - expect(correlation?.fieldName).to.be('http.response.status_code'); - expect(correlation?.fieldValue).to.be(500); - expect(typeof correlation?.pValue).to.be('number'); - expect(typeof correlation?.normalizedScore).to.be('number'); - expect(typeof correlation?.failurePercentage).to.be('number'); - expect(typeof correlation?.successPercentage).to.be('number'); - }); - } - ); + const finalRawResponse: FailedTransactionsCorrelationsResponse = { + ccsWarning: failedTransactionsCorrelationsResponse.body?.ccsWarning, + percentileThresholdValue: overallDistributionResponse.body?.percentileThresholdValue, + overallHistogram: overallDistributionResponse.body?.overallHistogram, + errorHistogram: errorDistributionResponse.body?.overallHistogram, + failedTransactionsCorrelations: + failedTransactionsCorrelationsResponse.body?.failedTransactionsCorrelations, + }; + + expect(finalRawResponse?.percentileThresholdValue).to.be(1309695.875); + expect(finalRawResponse?.errorHistogram?.length).to.be(101); + expect(finalRawResponse?.overallHistogram?.length).to.be(101); + + expect(finalRawResponse?.failedTransactionsCorrelations?.length).to.eql( + 29, + `Expected 29 identified correlations, got ${finalRawResponse?.failedTransactionsCorrelations?.length}.` + ); + + const sortedCorrelations = orderBy( + finalRawResponse?.failedTransactionsCorrelations, + ['score', 'fieldName', 'fieldValue'], + ['desc', 'asc', 'asc'] + ); + const correlation = sortedCorrelations?.[0]; + + expect(typeof correlation).to.be('object'); + expect(correlation?.doc_count).to.be(31); + expect(correlation?.score).to.be(83.70467673605746); + expect(correlation?.bg_count).to.be(31); + expect(correlation?.fieldName).to.be('transaction.result'); + expect(correlation?.fieldValue).to.be('HTTP 5xx'); + expect(typeof correlation?.pValue).to.be('number'); + expect(typeof correlation?.normalizedScore).to.be('number'); + expect(typeof correlation?.failurePercentage).to.be('number'); + expect(typeof correlation?.successPercentage).to.be('number'); + }); + }); } diff --git a/x-pack/test/apm_api_integration/tests/correlations/field_candidates.spec.ts b/x-pack/test/apm_api_integration/tests/correlations/field_candidates.spec.ts index 2fc54f5cb2659..4a5472cf5cb23 100644 --- a/x-pack/test/apm_api_integration/tests/correlations/field_candidates.spec.ts +++ b/x-pack/test/apm_api_integration/tests/correlations/field_candidates.spec.ts @@ -25,8 +25,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { }, }); - // FLAKY: https://github.com/elastic/kibana/issues/187421 - registry.when.skip('field candidates without data', { config: 'trial', archives: [] }, () => { + registry.when('field candidates without data', { config: 'trial', archives: [] }, () => { it('handles the empty state', async () => { const response = await apmApiClient.readUser({ endpoint, @@ -34,12 +33,13 @@ export default function ApiTest({ getService }: FtrProviderContext) { }); expect(response.status).to.be(200); - expect(response.body?.fieldCandidates.length).to.be(14); + // If the source indices are empty, there will be no field candidates + // because of the `include_empty_fields: false` option in the query. + expect(response.body?.fieldCandidates.length).to.be(0); }); }); - // FLAKY: https://github.com/elastic/kibana/issues/176119 - registry.when.skip( + registry.when( 'field candidates with data and default args', { config: 'trial', archives: ['8.0.0'] }, () => { @@ -50,7 +50,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { }); expect(response.status).to.eql(200); - expect(response.body?.fieldCandidates.length).to.be(69); + expect(response.body?.fieldCandidates.length).to.be(81); }); } ); diff --git a/x-pack/test/apm_api_integration/tests/correlations/field_value_pairs.spec.ts b/x-pack/test/apm_api_integration/tests/correlations/field_value_pairs.spec.ts index f2bb340cb9d60..4765e83342e52 100644 --- a/x-pack/test/apm_api_integration/tests/correlations/field_value_pairs.spec.ts +++ b/x-pack/test/apm_api_integration/tests/correlations/field_value_pairs.spec.ts @@ -53,8 +53,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { }); }); - // FLAKY: https://github.com/elastic/kibana/issues/176425 - registry.when.skip( + registry.when( 'field value pairs with data and default args', { config: 'trial', archives: ['8.0.0'] }, () => { diff --git a/x-pack/test/apm_api_integration/tests/correlations/latency.spec.ts b/x-pack/test/apm_api_integration/tests/correlations/latency.spec.ts index bceea736f553e..5326136976428 100644 --- a/x-pack/test/apm_api_integration/tests/correlations/latency.spec.ts +++ b/x-pack/test/apm_api_integration/tests/correlations/latency.spec.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { chunk } from 'lodash'; +import { chunk, orderBy } from 'lodash'; import expect from '@kbn/expect'; @@ -107,8 +107,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { } ); - // FLAKY: https://github.com/elastic/kibana/issues/175855 - registry.when.skip( + registry.when( 'correlations latency with data and opbeans-node args', { config: 'trial', archives: ['8.0.0'] }, () => { @@ -142,10 +141,10 @@ export default function ApiTest({ getService }: FtrProviderContext) { `Expected status to be '200', got '${fieldCandidatesResponse.status}'` ); - // Identified 69 fieldCandidates. + // Identified 81 fieldCandidates. expect(fieldCandidatesResponse.body?.fieldCandidates.length).to.eql( - 69, - `Expected field candidates length to be '69', got '${fieldCandidatesResponse.body?.fieldCandidates.length}'` + 81, + `Expected field candidates length to be '81', got '${fieldCandidatesResponse.body?.fieldCandidates.length}'` ); const fieldValuePairsResponse = await apmApiClient.readUser({ @@ -163,15 +162,15 @@ export default function ApiTest({ getService }: FtrProviderContext) { `Expected status to be '200', got '${fieldValuePairsResponse.status}'` ); - // Identified 379 fieldValuePairs. + // Identified 374 fieldValuePairs. expect(fieldValuePairsResponse.body?.fieldValuePairs.length).to.eql( - 379, - `Expected field value pairs length to be '379', got '${fieldValuePairsResponse.body?.fieldValuePairs.length}'` + 374, + `Expected field value pairs length to be '374', got '${fieldValuePairsResponse.body?.fieldValuePairs.length}'` ); // This replicates the code used in the `useLatencyCorrelations` hook to chunk requests for correlation analysis. // Tests turned out to be flaky and occasionally overload ES with a `search_phase_execution_exception` - // when all 379 field value pairs from above are queried in parallel. + // when all 374 field value pairs from above are queried in parallel. // The chunking sends 10 field value pairs with each request to the Kibana API endpoint. // Kibana itself will then run those 10 requests in parallel against ES. const latencyCorrelations: LatencyCorrelation[] = []; @@ -232,20 +231,23 @@ export default function ApiTest({ getService }: FtrProviderContext) { expect(finalRawResponse?.percentileThresholdValue).to.be(1309695.875); expect(finalRawResponse?.overallHistogram?.length).to.be(101); - // Identified 13 significant correlations out of 379 field/value pairs. + // Identified 13 significant correlations out of 374 field/value pairs. expect(finalRawResponse?.latencyCorrelations?.length).to.eql( 13, `Expected 13 identified correlations, got ${finalRawResponse?.latencyCorrelations?.length}.` ); - const correlation = finalRawResponse?.latencyCorrelations?.sort( - (a, b) => b.correlation - a.correlation - )[0]; + const sortedCorrelations = orderBy( + finalRawResponse?.latencyCorrelations, + ['score', 'fieldName', 'fieldValue'], + ['desc', 'asc', 'asc'] + ); + const correlation = sortedCorrelations?.[0]; expect(typeof correlation).to.be('object'); - expect(correlation?.fieldName).to.be('transaction.result'); - expect(correlation?.fieldValue).to.be('success'); - expect(correlation?.correlation).to.be(0.6275246559191225); - expect(correlation?.ksTest).to.be(4.806503252860024e-13); + expect(correlation?.fieldName).to.be('agent.hostname'); + expect(correlation?.fieldValue).to.be('rum-js'); + expect(correlation?.correlation).to.be(0.34798078715348596); + expect(correlation?.ksTest).to.be(1.9848961005439386e-12); expect(correlation?.histogram?.length).to.be(101); }); } diff --git a/x-pack/test/apm_api_integration/tests/correlations/p_values.spec.ts b/x-pack/test/apm_api_integration/tests/correlations/p_values.spec.ts index 466e166078d8a..42a9fdadbb480 100644 --- a/x-pack/test/apm_api_integration/tests/correlations/p_values.spec.ts +++ b/x-pack/test/apm_api_integration/tests/correlations/p_values.spec.ts @@ -53,8 +53,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { }); }); - // FLAKY: https://github.com/elastic/kibana/issues/175911 - registry.when.skip( + registry.when( 'p values with data and default args', { config: 'trial', archives: ['8.0.0'] }, () => { diff --git a/x-pack/test/apm_api_integration/tests/correlations/significant_correlations.spec.ts b/x-pack/test/apm_api_integration/tests/correlations/significant_correlations.spec.ts index 5ce0e74ad2465..d4450c192a029 100644 --- a/x-pack/test/apm_api_integration/tests/correlations/significant_correlations.spec.ts +++ b/x-pack/test/apm_api_integration/tests/correlations/significant_correlations.spec.ts @@ -77,8 +77,7 @@ export default function ApiTest({ getService }: FtrProviderContext) { }); }); - // FLAKY: https://github.com/elastic/kibana/issues/176780 - registry.when.skip( + registry.when( 'significant correlations with data and default args', { config: 'trial', archives: ['8.0.0'] }, () => { diff --git a/x-pack/test/apm_api_integration/tests/entities/logs/service_logs_error_rate_timeseries.spec.ts b/x-pack/test/apm_api_integration/tests/entities/logs/service_logs_error_rate_timeseries.spec.ts new file mode 100644 index 0000000000000..b880354e1a705 --- /dev/null +++ b/x-pack/test/apm_api_integration/tests/entities/logs/service_logs_error_rate_timeseries.spec.ts @@ -0,0 +1,175 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import expect from '@kbn/expect'; +import { log, timerange } from '@kbn/apm-synthtrace-client'; +import { first, last } from 'lodash'; +import { RecursivePartial } from '@kbn/apm-plugin/typings/common'; +import { APIClientRequestParamsOf } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; +import { FtrProviderContext } from '../../../common/ftr_provider_context'; + +export default function ApiTest({ getService }: FtrProviderContext) { + const registry = getService('registry'); + const apmApiClient = getService('apmApiClient'); + const logSynthtrace = getService('logSynthtraceEsClient'); + + const serviceName = 'synth-go'; + const start = new Date('2024-01-01T00:00:00.000Z').getTime(); + const end = new Date('2024-01-01T00:15:00.000Z').getTime() - 1; + + const hostName = 'synth-host'; + + async function getLogsErrorRateTimeseries( + overrides?: RecursivePartial< + APIClientRequestParamsOf<'GET /internal/apm/entities/services/{serviceName}/logs_error_rate_timeseries'>['params'] + > + ) { + const response = await apmApiClient.readUser({ + endpoint: 'GET /internal/apm/entities/services/{serviceName}/logs_error_rate_timeseries', + params: { + path: { + serviceName: 'synth-go', + ...overrides?.path, + }, + query: { + start: new Date(start).toISOString(), + end: new Date(end).toISOString(), + environment: 'ENVIRONMENT_ALL', + kuery: '', + ...overrides?.query, + }, + }, + }); + return response; + } + + registry.when( + 'Logs error rate timeseries when data is not loaded', + { config: 'basic', archives: [] }, + () => { + describe('Logs error rate api', () => { + it('handles the empty state', async () => { + const response = await getLogsErrorRateTimeseries(); + expect(response.status).to.be(200); + expect(response.body.currentPeriod).to.empty(); + }); + }); + } + ); + + registry.when( + 'Logs error rate timeseries when data loaded', + { config: 'basic', archives: [] }, + () => { + describe('Logs without log level field', () => { + before(async () => { + return logSynthtrace.index([ + timerange(start, end) + .interval('1m') + .rate(1) + .generator((timestamp) => + log.create().message('This is a log message').timestamp(timestamp).defaults({ + 'log.file.path': '/my-service.log', + 'service.name': serviceName, + 'host.name': hostName, + }) + ), + ]); + }); + after(async () => { + await logSynthtrace.clean(); + }); + + it('returns {} if log level is not available ', async () => { + const response = await getLogsErrorRateTimeseries(); + expect(response.status).to.be(200); + }); + }); + + describe('Logs with log.level=error', () => { + before(async () => { + return logSynthtrace.index([ + timerange(start, end) + .interval('1m') + .rate(1) + .generator((timestamp) => + log + .create() + .message('This is a log message') + .logLevel('error') + .timestamp(timestamp) + .defaults({ + 'log.file.path': '/my-service.log', + 'service.name': serviceName, + 'host.name': hostName, + 'service.environment': 'test', + }) + ), + timerange(start, end) + .interval('2m') + .rate(1) + .generator((timestamp) => + log + .create() + .message('This is an error log message') + .logLevel('error') + .timestamp(timestamp) + .defaults({ + 'log.file.path': '/my-service.log', + 'service.name': 'my-service', + 'host.name': hostName, + 'service.environment': 'production', + }) + ), + timerange(start, end) + .interval('5m') + .rate(1) + .generator((timestamp) => + log + .create() + .message('This is an info message') + .logLevel('info') + .timestamp(timestamp) + .defaults({ + 'log.file.path': '/my-service.log', + 'service.name': 'my-service', + 'host.name': hostName, + 'service.environment': 'production', + }) + ), + ]); + }); + after(async () => { + await logSynthtrace.clean(); + }); + + it('returns log error rate timeseries', async () => { + const response = await getLogsErrorRateTimeseries(); + expect(response.status).to.be(200); + expect(response.body.currentPeriod[serviceName].every(({ y }) => y === 1)).to.be(true); + }); + + it('handles environment filter', async () => { + const response = await getLogsErrorRateTimeseries({ query: { environment: 'foo' } }); + expect(response.status).to.be(200); + expect(response.body.currentPeriod).to.empty(); + }); + + describe('when my-service is selected', () => { + it('returns some data', async () => { + const response = await getLogsErrorRateTimeseries({ + path: { serviceName: 'my-service' }, + }); + + expect(response.status).to.be(200); + expect(first(response.body.currentPeriod?.['my-service'])?.y).to.be(0.5); + expect(last(response.body.currentPeriod?.['my-service'])?.y).to.be(1); + }); + }); + }); + } + ); +} diff --git a/x-pack/test/apm_api_integration/tests/entities/logs/service_logs_rate_timeseries.spec.ts b/x-pack/test/apm_api_integration/tests/entities/logs/service_logs_rate_timeseries.spec.ts new file mode 100644 index 0000000000000..d4717b25bba93 --- /dev/null +++ b/x-pack/test/apm_api_integration/tests/entities/logs/service_logs_rate_timeseries.spec.ts @@ -0,0 +1,173 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license 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 { log, timerange } from '@kbn/apm-synthtrace-client'; +import { RecursivePartial } from '@kbn/apm-plugin/typings/common'; +import { APIClientRequestParamsOf } from '@kbn/apm-plugin/public/services/rest/create_call_apm_api'; +import { first, last } from 'lodash'; +import { FtrProviderContext } from '../../../common/ftr_provider_context'; + +export default function ApiTest({ getService }: FtrProviderContext) { + const registry = getService('registry'); + const apmApiClient = getService('apmApiClient'); + const logSynthtrace = getService('logSynthtraceEsClient'); + + const serviceName = 'synth-go'; + const start = new Date('2024-01-01T00:00:00.000Z').getTime(); + const end = new Date('2024-01-01T00:15:00.000Z').getTime() - 1; + + const hostName = 'synth-host'; + + async function getLogsRateTimeseries( + overrides?: RecursivePartial< + APIClientRequestParamsOf<'GET /internal/apm/entities/services/{serviceName}/logs_rate_timeseries'>['params'] + > + ) { + const response = await apmApiClient.readUser({ + endpoint: 'GET /internal/apm/entities/services/{serviceName}/logs_rate_timeseries', + params: { + path: { + serviceName: 'synth-go', + ...overrides?.path, + }, + query: { + start: new Date(start).toISOString(), + end: new Date(end).toISOString(), + environment: 'ENVIRONMENT_ALL', + kuery: '', + ...overrides?.query, + }, + }, + }); + return response; + } + + registry.when( + 'Logs rate timeseries when data is not loaded', + { config: 'basic', archives: [] }, + () => { + describe('Logs rate api', () => { + it('handles the empty state', async () => { + const response = await getLogsRateTimeseries(); + expect(response.status).to.be(200); + expect(response.body.currentPeriod).to.empty(); + }); + }); + } + ); + + registry.when('Logs rate timeseries when data loaded', { config: 'basic', archives: [] }, () => { + describe('Logs without log level field', () => { + before(async () => { + return logSynthtrace.index([ + timerange(start, end) + .interval('1m') + .rate(1) + .generator((timestamp) => + log.create().message('This is a log message').timestamp(timestamp).defaults({ + 'log.file.path': '/my-service.log', + 'service.name': serviceName, + 'host.name': hostName, + }) + ), + ]); + }); + after(async () => { + await logSynthtrace.clean(); + }); + + it('returns {} if log level is not available ', async () => { + const response = await getLogsRateTimeseries(); + expect(response.status).to.be(200); + }); + }); + + describe('Logs with log.level=error', () => { + before(async () => { + return logSynthtrace.index([ + timerange(start, end) + .interval('1m') + .rate(1) + .generator((timestamp) => + log + .create() + .message('This is a log message') + .logLevel('error') + .timestamp(timestamp) + .defaults({ + 'log.file.path': '/my-service.log', + 'service.name': serviceName, + 'host.name': hostName, + 'service.environment': 'test', + }) + ), + timerange(start, end) + .interval('2m') + .rate(1) + .generator((timestamp) => + log + .create() + .message('This is an error log message') + .logLevel('error') + .timestamp(timestamp) + .defaults({ + 'log.file.path': '/my-service.log', + 'service.name': 'my-service', + 'host.name': hostName, + 'service.environment': 'production', + }) + ), + timerange(start, end) + .interval('5m') + .rate(1) + .generator((timestamp) => + log + .create() + .message('This is an info message') + .logLevel('info') + .timestamp(timestamp) + .defaults({ + 'log.file.path': '/my-service.log', + 'service.name': 'my-service', + 'host.name': hostName, + 'service.environment': 'production', + }) + ), + ]); + }); + after(async () => { + await logSynthtrace.clean(); + }); + + it('returns log rate timeseries', async () => { + const response = await getLogsRateTimeseries(); + expect(response.status).to.be(200); + expect( + response.body.currentPeriod[serviceName].every(({ y }) => y === 0.06666666666666667) + ).to.be(true); + }); + + it('handles environment filter', async () => { + const response = await getLogsRateTimeseries({ query: { environment: 'foo' } }); + expect(response.status).to.be(200); + expect(response.body.currentPeriod).to.empty(); + }); + + describe('when my-service is selected', () => { + it('returns some data', async () => { + const response = await getLogsRateTimeseries({ + path: { serviceName: 'my-service' }, + }); + + expect(response.status).to.be(200); + expect(first(response.body.currentPeriod?.['my-service'])?.y).to.be(0.18181818181818182); + expect(last(response.body.currentPeriod?.['my-service'])?.y).to.be(0.09090909090909091); + }); + }); + }); + }); +} diff --git a/x-pack/test/cloud_security_posture_api/routes/benchmarks.ts b/x-pack/test/cloud_security_posture_api/routes/benchmarks.ts index f8d6275655d36..65a3ec42fc37d 100644 --- a/x-pack/test/cloud_security_posture_api/routes/benchmarks.ts +++ b/x-pack/test/cloud_security_posture_api/routes/benchmarks.ts @@ -31,15 +31,20 @@ export default function (providerContext: FtrProviderContext) { const log = getService('log'); const getCspBenchmarkRules = async (benchmarkId: string): Promise => { - const cspBenchmarkRules = await kibanaServer.savedObjects.find({ - type: CSP_BENCHMARK_RULE_SAVED_OBJECT_TYPE, - }); - const requestedBenchmarkRules = cspBenchmarkRules.saved_objects.filter( - (cspBenchmarkRule) => cspBenchmarkRule.attributes.metadata.benchmark.id === benchmarkId - ); - expect(requestedBenchmarkRules.length).greaterThan(0); + let cspBenchmarkRules: CspBenchmarkRule[] = []; + await retry.try(async () => { + const cspBenchmarkRulesSavedObjects = await kibanaServer.savedObjects.find({ + type: CSP_BENCHMARK_RULE_SAVED_OBJECT_TYPE, + }); - return requestedBenchmarkRules.map((item) => item.attributes); + const requestedBenchmarkRules = cspBenchmarkRulesSavedObjects.saved_objects.filter( + (cspBenchmarkRule: any) => cspBenchmarkRule.attributes.metadata.benchmark.id === benchmarkId + ); + + expect(requestedBenchmarkRules.length).greaterThan(0); + cspBenchmarkRules = requestedBenchmarkRules.map((item) => item.attributes); + }); + return cspBenchmarkRules; }; const getMockFinding = (rule: CspBenchmarkRule, evaluation: string) => ({ @@ -143,8 +148,7 @@ export default function (providerContext: FtrProviderContext) { }, }; - // FLAKY: https://github.com/elastic/kibana/issues/179815 - describe.skip('GET /internal/cloud_security_posture/benchmarks', () => { + describe('GET /internal/cloud_security_posture/benchmarks', () => { describe('Get Benchmark API', async () => { beforeEach(async () => { await index.removeFindings(); @@ -158,10 +162,9 @@ export default function (providerContext: FtrProviderContext) { const benchmark = 'cis_aws'; const benchmarkRules = await getCspBenchmarkRules(benchmark); - const cspmFinding1 = getMockFinding(benchmarkRules[0], 'passed'); - const cspmFinding2 = getMockFinding(benchmarkRules[1], 'failed'); + const cspmFinding = getMockFinding(benchmarkRules[0], 'passed'); - await index.addFindings([cspmFinding1, cspmFinding2]); + await index.addFindings([cspmFinding]); const { body: benchmarksBeforeMute } = await supertest .get('/internal/cloud_security_posture/benchmarks') @@ -174,7 +177,7 @@ export default function (providerContext: FtrProviderContext) { (item: { id: string }) => item.id === benchmark ); - expect(scoreBeforeMute.score.postureScore).to.equal(50); + expect(scoreBeforeMute.score.postureScore).to.equal(100); await supertest .post(`/internal/cloud_security_posture/rules/_bulk_action`) @@ -185,10 +188,10 @@ export default function (providerContext: FtrProviderContext) { action: 'mute', rules: [ { - benchmark_id: cspmFinding2.rule.benchmark.id, - benchmark_version: cspmFinding2.rule.benchmark.version, - rule_number: cspmFinding2.rule.benchmark.rule_number || '', - rule_id: cspmFinding2.rule.id, + benchmark_id: cspmFinding.rule.benchmark.id, + benchmark_version: cspmFinding.rule.benchmark.version, + rule_number: cspmFinding.rule.benchmark.rule_number || '', + rule_id: cspmFinding.rule.id, }, ], }) @@ -205,17 +208,16 @@ export default function (providerContext: FtrProviderContext) { (item: { id: string }) => item.id === benchmark ); - expect(scoreAfterMute.score.postureScore).to.equal(100); + expect(scoreAfterMute.score.postureScore).to.equal(0); }); it('Verify kspm benchmark score is updated when muting rules', async () => { const benchmark = 'cis_k8s'; const benchmarkRules = await getCspBenchmarkRules(benchmark); - const kspmFinding1 = getMockFinding(benchmarkRules[0], 'passed'); - const kspmFinding2 = getMockFinding(benchmarkRules[1], 'failed'); + const kspmFinding = getMockFinding(benchmarkRules[0], 'passed'); - await index.addFindings([kspmFinding1, kspmFinding2]); + await index.addFindings([kspmFinding]); const { body: benchmarksBeforeMute } = await supertest .get('/internal/cloud_security_posture/benchmarks') .set(ELASTIC_HTTP_VERSION_HEADER, '2') @@ -227,7 +229,7 @@ export default function (providerContext: FtrProviderContext) { (item: { id: string }) => item.id === benchmark ); - expect(scoreBeforeMute.score.postureScore).to.equal(50); + expect(scoreBeforeMute.score.postureScore).to.equal(100); await supertest .post(`/internal/cloud_security_posture/rules/_bulk_action`) @@ -238,10 +240,10 @@ export default function (providerContext: FtrProviderContext) { action: 'mute', rules: [ { - benchmark_id: kspmFinding2.rule.benchmark.id, - benchmark_version: kspmFinding2.rule.benchmark.version, - rule_number: kspmFinding2.rule.benchmark.rule_number || '', - rule_id: kspmFinding2.rule.id, + benchmark_id: kspmFinding.rule.benchmark.id, + benchmark_version: kspmFinding.rule.benchmark.version, + rule_number: kspmFinding.rule.benchmark.rule_number || '', + rule_id: kspmFinding.rule.id, }, ], }) @@ -258,7 +260,7 @@ export default function (providerContext: FtrProviderContext) { (item: { id: string }) => item.id === benchmark ); - expect(scoreAfterMute.score.postureScore).to.equal(100); + expect(scoreAfterMute.score.postureScore).to.equal(0); }); }); }); diff --git a/x-pack/test/cloud_security_posture_functional/pages/findings.ts b/x-pack/test/cloud_security_posture_functional/pages/findings.ts index 76ea64f6e6195..16e63fac3491e 100644 --- a/x-pack/test/cloud_security_posture_functional/pages/findings.ts +++ b/x-pack/test/cloud_security_posture_functional/pages/findings.ts @@ -17,7 +17,6 @@ import type { FtrProviderContext } from '../ftr_provider_context'; // eslint-disable-next-line import/no-default-export export default function ({ getPageObjects, getService }: FtrProviderContext) { - const filterBar = getService('filterBar'); const testSubjects = getService('testSubjects'); const retry = getService('retry'); const supertest = getService('supertest'); @@ -189,19 +188,6 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); }); - describe('DistributionBar', () => { - (['passed', 'failed'] as const).forEach((type) => { - it(`filters by ${type} findings`, async () => { - await distributionBar.filterBy(type); - - const items = data.filter(({ result }) => result.evaluation === type); - expect(await latestFindingsTable.getFindingsCount(type)).to.eql(items.length); - - await filterBar.removeFilter('result.evaluation'); - }); - }); - }); - describe('Findings - Fields selector', () => { const CSP_FIELDS_SELECTOR_MODAL = 'cloudSecurityFieldsSelectorModal'; const CSP_FIELDS_SELECTOR_OPEN_BUTTON = 'cloudSecurityFieldsSelectorOpenButton'; diff --git a/x-pack/test/dataset_quality_api_integration/common/config.ts b/x-pack/test/dataset_quality_api_integration/common/config.ts index e5a45b72d7f06..e297d8eaf0354 100644 --- a/x-pack/test/dataset_quality_api_integration/common/config.ts +++ b/x-pack/test/dataset_quality_api_integration/common/config.ts @@ -22,6 +22,7 @@ import { import { createDatasetQualityApiClient } from './dataset_quality_api_supertest'; import { RegistryProvider } from './registry'; import { DatasetQualityFtrConfigName } from '../configs'; +import { PackageService } from './package_service'; export interface DatasetQualityFtrConfig { name: DatasetQualityFtrConfigName; @@ -70,6 +71,7 @@ export interface CreateTest { context: InheritedFtrProviderContext ) => Promise; datasetQualityApiClient: (context: InheritedFtrProviderContext) => DatasetQualityApiClient; + packageService: ({ getService }: FtrProviderContext) => ReturnType; }; junit: { reportName: string }; esTestCluster: any; @@ -98,6 +100,7 @@ export function createTestConfig( servicesRequiredForTestAnalysis: ['datasetQualityFtrConfig', 'registry'], services: { ...services, + packageService: PackageService, datasetQualityFtrConfig: () => config, registry: RegistryProvider, logSynthtraceEsClient: (context: InheritedFtrProviderContext) => diff --git a/x-pack/test/dataset_quality_api_integration/common/ftr_provider_context.ts b/x-pack/test/dataset_quality_api_integration/common/ftr_provider_context.ts index 69de63c48402c..f48da8f57c18f 100644 --- a/x-pack/test/dataset_quality_api_integration/common/ftr_provider_context.ts +++ b/x-pack/test/dataset_quality_api_integration/common/ftr_provider_context.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { GenericFtrProviderContext } from '@kbn/test'; +import { GenericFtrProviderContext, GenericFtrService } from '@kbn/test'; import { FtrProviderContext as InheritedFtrProviderContext } from '../../api_integration/ftr_provider_context'; import { DatasetQualityServices } from './config'; @@ -18,3 +18,4 @@ export type InheritedServices = InheritedFtrProviderContext extends GenericFtrPr export type { InheritedFtrProviderContext }; export type FtrProviderContext = GenericFtrProviderContext; +export class FtrService extends GenericFtrService {} diff --git a/x-pack/test/dataset_quality_api_integration/common/package_service.ts b/x-pack/test/dataset_quality_api_integration/common/package_service.ts new file mode 100644 index 0000000000000..0449fd9f921dd --- /dev/null +++ b/x-pack/test/dataset_quality_api_integration/common/package_service.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 { FtrProviderContext } from './ftr_provider_context'; + +interface IntegrationPackage { + name: string; + version: string; +} + +export function PackageService({ getService }: FtrProviderContext) { + const supertest = getService('supertest'); + + function uninstallPackage({ name, version }: IntegrationPackage) { + return supertest.delete(`/api/fleet/epm/packages/${name}/${version}`).set('kbn-xsrf', 'xxxx'); + } + + function installPackage({ name, version }: IntegrationPackage) { + return supertest + .post(`/api/fleet/epm/packages/${name}/${version}`) + .set('kbn-xsrf', 'xxxx') + .send({ force: true }); + } + + return { uninstallPackage, installPackage }; +} diff --git a/x-pack/test/dataset_quality_api_integration/tests/data_streams/data_stream_settings.spec.ts b/x-pack/test/dataset_quality_api_integration/tests/data_streams/data_stream_settings.spec.ts index e6f75d53b6c77..e5b38d2463cb0 100644 --- a/x-pack/test/dataset_quality_api_integration/tests/data_streams/data_stream_settings.spec.ts +++ b/x-pack/test/dataset_quality_api_integration/tests/data_streams/data_stream_settings.spec.ts @@ -21,13 +21,19 @@ export default function ApiTest({ getService }: FtrProviderContext) { const synthtrace = getService('logSynthtraceEsClient'); const esClient = getService('es'); const datasetQualityApiClient = getService('datasetQualityApiClient'); + const pkgService = getService('packageService'); const start = '2023-12-11T18:00:00.000Z'; const end = '2023-12-11T18:01:00.000Z'; const type = 'logs'; - const dataset = 'nginx.access'; + const dataset = 'synth.1'; + const integrationDataset = 'apache.access'; const namespace = 'default'; const serviceName = 'my-service'; const hostName = 'synth-host'; + const pkg = { + name: 'apache', + version: '1.14.0', + }; async function callApiAs(user: DatasetQualityApiClientKey, dataStream: string) { return await datasetQualityApiClient[user]({ @@ -43,6 +49,27 @@ export default function ApiTest({ getService }: FtrProviderContext) { registry.when('DataStream Settings', { config: 'basic' }, () => { describe('gets the data stream settings', () => { before(async () => { + // Install Integration and ingest logs for it + await pkgService.installPackage(pkg); + await synthtrace.index([ + timerange(start, end) + .interval('1m') + .rate(1) + .generator((timestamp) => + log + .create() + .message('This is a log message') + .timestamp(timestamp) + .dataset(integrationDataset) + .namespace(namespace) + .defaults({ + 'log.file.path': '/my-service.log', + 'service.name': serviceName, + 'host.name': hostName, + }) + ), + ]); + // Ingest basic logs await synthtrace.index([ timerange(start, end) .interval('1m') @@ -98,8 +125,22 @@ export default function ApiTest({ getService }: FtrProviderContext) { expect(resp.body.createdOn).to.be(Number(dataStreamSettings?.index?.creation_date)); }); + it('returns "createdOn" and "integration" correctly when available', async () => { + const dataStreamSettings = await getDataStreamSettingsOfEarliestIndex( + esClient, + `${type}-${integrationDataset}-${namespace}` + ); + const resp = await callApiAs( + 'datasetQualityLogsUser', + `${type}-${integrationDataset}-${namespace}` + ); + expect(resp.body.createdOn).to.be(Number(dataStreamSettings?.index?.creation_date)); + expect(resp.body.integration).to.be('apache'); + }); + after(async () => { await synthtrace.clean(); + await pkgService.uninstallPackage(pkg); }); }); }); diff --git a/x-pack/test/fleet_api_integration/apis/integrations/inputs_with_standalone_docker_agent.ts b/x-pack/test/fleet_api_integration/apis/integrations/inputs_with_standalone_docker_agent.ts index ca1d8c0c3f312..daf1df78521d8 100644 --- a/x-pack/test/fleet_api_integration/apis/integrations/inputs_with_standalone_docker_agent.ts +++ b/x-pack/test/fleet_api_integration/apis/integrations/inputs_with_standalone_docker_agent.ts @@ -25,7 +25,8 @@ export default function (providerContext: FtrProviderContext) { const config = getService('config'); const log = getService('log'); - describe('inputs_with_standalone_docker_agent', () => { + // Failing: See https://github.com/elastic/kibana/issues/184681 + describe.skip('inputs_with_standalone_docker_agent', () => { skipIfNoDockerRegistry(providerContext); let apiKey: string; let agent: AgentProcess; diff --git a/x-pack/test/functional/apps/dataset_quality/dataset_quality_flyout.ts b/x-pack/test/functional/apps/dataset_quality/dataset_quality_flyout.ts index 6aa16cf806fe5..6b96291734bcf 100644 --- a/x-pack/test/functional/apps/dataset_quality/dataset_quality_flyout.ts +++ b/x-pack/test/functional/apps/dataset_quality/dataset_quality_flyout.ts @@ -50,7 +50,8 @@ export default function ({ getService, getPageObjects }: DatasetQualityFtrProvid const degradedDatasetName = datasetNames[2]; - describe('Flyout', () => { + // Failing: See https://github.com/elastic/kibana/issues/187589 + describe.skip('Flyout', () => { before(async () => { // Install Apache Integration and ingest logs for it await PageObjects.observabilityLogsExplorer.installPackage(apachePkg); diff --git a/x-pack/test/functional/apps/ml/short_tests/model_management/model_list.ts b/x-pack/test/functional/apps/ml/short_tests/model_management/model_list.ts index b7180fcefdc31..315b8590a80d1 100644 --- a/x-pack/test/functional/apps/ml/short_tests/model_management/model_list.ts +++ b/x-pack/test/functional/apps/ml/short_tests/model_management/model_list.ts @@ -477,7 +477,8 @@ export default function ({ getService }: FtrProviderContext) { await ml.navigation.navigateToTrainedModels(); }); - describe('with imported models', function () { + // FLAKY: https://github.com/elastic/kibana/issues/175443 + describe.skip('with imported models', function () { before(async () => { await ml.navigation.navigateToTrainedModels(); }); diff --git a/x-pack/test/functional/es_archives/security_solution/ecs_non_compliant/mappings.json b/x-pack/test/functional/es_archives/security_solution/ecs_non_compliant/mappings.json index ea4f271af0ffc..7a76d0da64667 100644 --- a/x-pack/test/functional/es_archives/security_solution/ecs_non_compliant/mappings.json +++ b/x-pack/test/functional/es_archives/security_solution/ecs_non_compliant/mappings.json @@ -42,6 +42,15 @@ "properties": { "created": { "type": "keyword" + }, + "action": { + "type": "text", + "fields": { + "keyword": { + "type": "keyword", + "ignore_above": 256 + } + } } } }, diff --git a/x-pack/test/functional/page_objects/dataset_quality.ts b/x-pack/test/functional/page_objects/dataset_quality.ts index dc580d2951c6a..7cb633a8113b6 100644 --- a/x-pack/test/functional/page_objects/dataset_quality.ts +++ b/x-pack/test/functional/page_objects/dataset_quality.ts @@ -96,6 +96,7 @@ export function DatasetQualityPageObject({ getPageObjects, getService }: FtrProv datasetQualityFlyoutFieldValue: 'datasetQualityFlyoutFieldValue', datasetQualityFlyoutFieldsListIntegrationDetails: 'datasetQualityFlyoutFieldsList-integration_details', + datasetQualityFlyoutIntegrationLoading: 'datasetQualityFlyoutIntegrationLoading', datasetQualityFlyoutIntegrationActionsButton: 'datasetQualityFlyoutIntegrationActionsButton', datasetQualityFlyoutIntegrationAction: (action: string) => `datasetQualityFlyoutIntegrationAction${action}`, @@ -163,6 +164,13 @@ export function DatasetQualityPageObject({ getPageObjects, getService }: FtrProv await find.waitForDeletedByCssSelector('.euiFlyoutBody .euiBasicTable-loading', 20 * 1000); }, + async waitUntilIntegrationsInFlyoutLoaded() { + await find.waitForDeletedByCssSelector( + '.euiSkeletonTitle .datasetQualityFlyoutIntegrationLoading', + 10 * 1000 + ); + }, + async waitUntilSummaryPanelLoaded(isStateful: boolean = true) { await testSubjects.missingOrFail(`datasetQuality-${texts.activeDatasets}-loading`); if (isStateful) { @@ -321,6 +329,8 @@ export function DatasetQualityPageObject({ getPageObjects, getService }: FtrProv if (isCollapsed) { await datasetExpandButton.click(); } + + await this.waitUntilIntegrationsInFlyoutLoaded(); }, async closeFlyout() { diff --git a/x-pack/test/security_solution_api_integration/README.md b/x-pack/test/security_solution_api_integration/README.md index 450558737b1e9..cc547b20469c6 100644 --- a/x-pack/test/security_solution_api_integration/README.md +++ b/x-pack/test/security_solution_api_integration/README.md @@ -22,7 +22,7 @@ we have introduced the `detection_response` directory to consolidate all the int * `@serverless`: Runs in the first quality gate and in the periodic pipeline. - * `@serverlessQA`: Runs in the second quality gate. + * `@serverlessQA`: Runs in the Kibana QA quality gate. * `@skipInEss`: Skipped for ESS environment. diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/rule_execution_logic/trial_license_complete_tier/execution_logic/esql.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/rule_execution_logic/trial_license_complete_tier/execution_logic/esql.ts index cbc7f43cfe6cc..69795e04cd351 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/rule_execution_logic/trial_license_complete_tier/execution_logic/esql.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/rule_execution_logic/trial_license_complete_tier/execution_logic/esql.ts @@ -1103,6 +1103,40 @@ export default ({ getService }: FtrProviderContext) => { 'random non-ecs field' ); }); + + it('creates alert if `event.action` ECS field has non-ECS sub-field', async () => { + // The issue was found by customer and reported in + // https://github.com/elastic/sdh-security-team/issues/1015 + const id = uuidv4(); + const interval: [string, string] = [ + '2020-10-28T06:00:00.000Z', + '2020-10-28T06:10:00.000Z', + ]; + const doc1 = { + 'event.action': 'process', + }; + + const rule: EsqlRuleCreateProps = { + ...getCreateEsqlRulesSchemaMock('rule-1', true), + query: `from ecs_non_compliant metadata _id ${internalIdPipe(id)}`, + from: 'now-1h', + interval: '1h', + }; + + await indexEnhancedDocumentsToNonEcs({ + documents: [doc1], + interval, + id, + }); + + const { logs } = await previewRule({ + supertest, + rule, + timeframeEnd: new Date('2020-10-28T06:30:00.000Z'), + }); + + expect(logs[0].errors.length).toEqual(0); + }); }); }); }); diff --git a/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/rule_execution_logic/trial_license_complete_tier/execution_logic/machine_learning_alert_suppression.ts b/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/rule_execution_logic/trial_license_complete_tier/execution_logic/machine_learning_alert_suppression.ts index b29ce8abbb8ef..1bb962485f100 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/rule_execution_logic/trial_license_complete_tier/execution_logic/machine_learning_alert_suppression.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/detections_response/detection_engine/rule_execution_logic/trial_license_complete_tier/execution_logic/machine_learning_alert_suppression.ts @@ -112,7 +112,8 @@ export default ({ getService }: FtrProviderContext) => { await deleteAllAnomalies(log, es); }); - describe('with per-execution suppression duration', () => { + // FLAKY: https://github.com/elastic/kibana/issues/187478 + describe.skip('with per-execution suppression duration', () => { beforeEach(() => { ruleProps = { ...baseRuleProps, diff --git a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/asset_criticality.ts b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/asset_criticality.ts index fa3f3e0e67f38..1464f8089c55c 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/asset_criticality.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/asset_criticality.ts @@ -7,6 +7,8 @@ import expect from '@kbn/expect'; import { omit } from 'lodash'; +import { AssetCriticalityRecord } from '@kbn/security-solution-plugin/common/api/entity_analytics'; +import _ from 'lodash'; import { CreateAssetCriticalityRecord } from '@kbn/security-solution-plugin/common/api/entity_analytics'; import { cleanRiskEngine, @@ -16,6 +18,7 @@ import { getAssetCriticalityIndex, enableAssetCriticalityAdvancedSetting, disableAssetCriticalityAdvancedSetting, + createAssetCriticalityRecords, } from '../../utils'; import { FtrProviderContext } from '../../../../ftr_provider_context'; @@ -146,7 +149,7 @@ export default ({ getService }: FtrProviderContext) => { }); }); - describe('read', () => { + describe('get', () => { it('should correctly get asset criticality', async () => { const assetCriticality = { id_field: 'host.name', @@ -179,6 +182,132 @@ export default ({ getService }: FtrProviderContext) => { }); }); + describe('list', () => { + const TEST_DATA_LENGTH = 40; + const LEVELS = ['low_impact', 'medium_impact', 'high_impact', 'extreme_impact'] as const; + const startTime = Date.now() - 1000 * TEST_DATA_LENGTH; + const records: AssetCriticalityRecord[] = Array.from( + { length: TEST_DATA_LENGTH }, + (__, i) => ({ + id_field: 'host.name', + id_value: `host-${i}`, + criticality_level: LEVELS[Math.floor(i / 10)], + '@timestamp': new Date(startTime + i * 1000).toISOString(), + }) + ); + + const createRecords = () => createAssetCriticalityRecords(records, es); + + before(async () => { + enableAssetCriticalityAdvancedSetting(kibanaServer, log); + }); + + it('should return the first 10 asset criticality records if no args provided', async () => { + await createRecords(); + + const { body } = await assetCriticalityRoutes.list(); + + expect(omit(body, 'records')).to.eql({ + total: TEST_DATA_LENGTH, + page: 1, + per_page: 10, + }); + + expect(body.records.map((record: AssetCriticalityRecord) => record.id_value)).to.eql( + records.slice(0, 10).map((record) => record.id_value) + ); + }); + + it('should return the last 10 asset criticality records if sorting by timestamp desc', async () => { + await createRecords(); + + const { body } = await assetCriticalityRoutes.list({ + sort_field: '@timestamp', + sort_direction: 'desc', + }); + + expect(omit(body, 'records')).to.eql({ + total: TEST_DATA_LENGTH, + page: 1, + per_page: 10, + }); + + expect(body.records.map((record: AssetCriticalityRecord) => record.id_value)).to.eql( + _.reverse(records.slice(-10)).map((record) => record.id_value) + ); + }); + + it('should only return 1 asset criticality record if per_page=1', async () => { + await createRecords(); + + const { body } = await assetCriticalityRoutes.list({ per_page: 1 }); + + expect(omit(body, 'records')).to.eql({ + total: TEST_DATA_LENGTH, + page: 1, + per_page: 1, + }); + + expect(body.records[0].id_value).to.eql(records[0].id_value); + }); + + it('should return the next 10 asset criticality records if page=2', async () => { + await createRecords(); + + const { body } = await assetCriticalityRoutes.list({ page: 2 }); + + expect(omit(body, 'records')).to.eql({ + total: TEST_DATA_LENGTH, + page: 2, + per_page: 10, + }); + + expect(body.records.map((record: AssetCriticalityRecord) => record.id_value)).to.eql( + records.slice(10, 20).map((record) => record.id_value) + ); + }); + + it('should return 20 records if filtering by criticality_level low_impact and medium_impact', async () => { + await createRecords(); + + const { body } = await assetCriticalityRoutes.list({ + kuery: 'criticality_level:low_impact OR criticality_level:medium_impact', + }); + + expect(omit(body, 'records')).to.eql({ + total: 20, + page: 1, + per_page: 10, + }); + }); + + it('should return all records if filtering by id_field = host.name', async () => { + await createRecords(); + + const { body } = await assetCriticalityRoutes.list({ + kuery: 'id_field:host.name', + }); + + expect(omit(body, 'records')).to.eql({ + total: TEST_DATA_LENGTH, + page: 1, + per_page: 10, + }); + }); + + it('should return a 400 if page is 0', async () => { + await assetCriticalityRoutes.list({ page: 0 }, { expectStatusCode: 400 }); + }); + + it('should return a 400 if per_page is 0', async () => { + await assetCriticalityRoutes.list({ per_page: 0 }, { expectStatusCode: 400 }); + }); + + it('should return a 400 if per_page is greater than 10000', async () => { + await assetCriticalityRoutes.list({ per_page: 10001 }, { expectStatusCode: 400 }); + }); + }); + describe('update', () => { it('should correctly update asset criticality', async () => { const assetCriticality = { @@ -261,7 +390,6 @@ export default ({ getService }: FtrProviderContext) => { id_value: 'host-1', criticality_level: 'high_impact', }; - const { body } = await assetCriticalityRoutes.bulkUpload([validRecord]); expect(body.errors).to.eql([]); expect(body.stats).to.eql({ @@ -274,11 +402,14 @@ export default ({ getService }: FtrProviderContext) => { }); it('should correctly upload valid records for multiple entities', async () => { - const validRecords: CreateAssetCriticalityRecord[] = Array.from({ length: 50 }, (_, i) => ({ - id_field: 'host.name', - id_value: `host-${i}`, - criticality_level: 'high_impact', - })); + const validRecords: CreateAssetCriticalityRecord[] = Array.from( + { length: 50 }, + (__, i) => ({ + id_field: 'host.name', + id_value: `host-${i}`, + criticality_level: 'high_impact', + }) + ); const { body } = await assetCriticalityRoutes.bulkUpload(validRecords); expect(body.errors).to.eql([]); diff --git a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/risk_score_entity_calculation.ts b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/risk_score_entity_calculation.ts index 2f7b7d44898c1..581af2aec6012 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/risk_score_entity_calculation.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/risk_engine/trial_license_complete_tier/risk_score_entity_calculation.ts @@ -76,7 +76,7 @@ export default ({ getService }: FtrProviderContext): void => { }); }; - describe('@ess @serverless Risk Scoring Entity Calculation API', () => { + describe('@ess @serverless @serverlessQA Risk Scoring Entity Calculation API', () => { before(async () => { enableAssetCriticalityAdvancedSetting(kibanaServer, log); }); diff --git a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/utils/asset_criticality.ts b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/utils/asset_criticality.ts index ac7dfd170e412..9ae70f540f897 100644 --- a/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/utils/asset_criticality.ts +++ b/x-pack/test/security_solution_api_integration/test_suites/entity_analytics/utils/asset_criticality.ts @@ -13,6 +13,7 @@ import { import { ASSET_CRITICALITY_PUBLIC_URL, ASSET_CRITICALITY_PUBLIC_CSV_UPLOAD_URL, + ASSET_CRITICALITY_PUBLIC_LIST_URL, ASSET_CRITICALITY_INTERNAL_STATUS_URL, ASSET_CRITICALITY_INTERNAL_PRIVILEGES_URL, ENABLE_ASSET_CRITICALITY_SETTING, @@ -22,6 +23,7 @@ import { import type { AssetCriticalityRecord, CreateAssetCriticalityRecord, + ListAssetCriticalityQueryParams, } from '@kbn/security-solution-plugin/common/api/entity_analytics'; import type { Client } from '@elastic/elasticsearch'; import type { ToolingLog } from '@kbn/tooling-log'; @@ -184,6 +186,19 @@ export const assetCriticalityRouteHelpersFactory = ( .attach('file', file, { filename: 'asset_criticality.csv' }) .expect(expectStatusCode); }, + list: async ( + opts: ListAssetCriticalityQueryParams = {}, + { expectStatusCode }: { expectStatusCode: number } = { expectStatusCode: 200 } + ) => { + const qs = querystring.stringify(opts); + const route = `${routeWithNamespace(ASSET_CRITICALITY_PUBLIC_LIST_URL, namespace)}?${qs}`; + return supertest + .get(route) + .set('kbn-xsrf', 'true') + .set(ELASTIC_HTTP_VERSION_HEADER, API_VERSIONS.public.v1) + .set(X_ELASTIC_INTERNAL_ORIGIN_REQUEST, 'kibana') + .expect(expectStatusCode); + }, }); export const assetCriticalityRouteHelpersFactoryNoAuth = ( @@ -219,6 +234,32 @@ export const readAssetCriticality = async ( return results.hits.hits.map((hit) => hit._source as AssetCriticalityRecord); }; +export const createAssetCriticalityRecords = async ( + records: CreateAssetCriticalityRecord[], + es: Client +) => { + const ops = records.flatMap((record) => [ + { + index: { + _index: getAssetCriticalityIndex(), + _id: `${record.id_field}:${record.id_value}`, + }, + }, + record, + ]); + + const res = await es.bulk({ + body: ops, + refresh: 'wait_for', + }); + + if (res.errors) { + throw new Error(`Error creating asset criticality: ${JSON.stringify(res)}`); + } + + return res; +}; + /** * Function to read asset criticality from ES and wait for them to be * present/readable. By default, it reads from the asset criticality index in the diff --git a/x-pack/test/security_solution_cypress/cypress/README.md b/x-pack/test/security_solution_cypress/cypress/README.md index e58ace3933690..bf153cb3be5e0 100644 --- a/x-pack/test/security_solution_cypress/cypress/README.md +++ b/x-pack/test/security_solution_cypress/cypress/README.md @@ -45,11 +45,11 @@ Please, before opening a PR with the new test, please make sure that the test fa Note that we use tags in order to select which tests we want to execute: - `@serverless` includes a test in the Serverless test suite for PRs (the so-called first quality gate) and QA environment for the periodic pipeline. You need to explicitly add this tag to any test you want to run in CI for serverless. -- `@serverlessQA` includes a test in the Serverless test suite for the Kibana release process of serverless. You need to explicitly add this tag to any test you want you run in CI for the second quality gate. These tests should be stable, otherwise they will be blocking the release pipeline. They should be also critical enough, so that when they fail, there's a high chance of an SDH or blocker issue to be reported. +- `@serverlessQA` includes a test in the Serverless test suite for the Kibana release process of serverless. You need to explicitly add this tag to any test you want you run in CI for the Kibana QA quality gate. These tests should be stable, otherwise they will be blocking the release pipeline. They should be also critical enough, so that when they fail, there's a high chance of an SDH or blocker issue to be reported. - `@ess` includes a test in the normal, non-Serverless test suite. You need to explicitly add this tag to any test you want to run against a non-Serverless environment. - `@skipInEss` excludes a test from the non-Serverless test suite. The test will not be executed as part for the PR process. All the skipped tests should have a link to a ticket describing the reason why the test got skipped. - `@skipInServerlessMKI` excludes a test from the execution on any MKI environment (even if it's tagged as `@serverless` or `@serverlessQA`). Could indicate many things, e.g. "the test is flaky in Serverless MKI", "the test has been temporarily excluded, see the comment above why". All the skipped tests should have a link to a ticket describing the reason why the test got skipped. -- `@skipInServerless` excludes a test from the Serverless test suite and Serverless QA environment for both, periodic pipeline and second quality gate (even if it's tagged as `@serverless`). Could indicate many things, e.g. "the test is flaky in Serverless", "the test is Flaky in any type of environment", "the test has been temporarily excluded, see the comment above why". All the skipped tests should have a link to a ticket describing the reason why the test got skipped. +- `@skipInServerless` excludes a test from the Serverless test suite and Serverless QA environment for both, periodic pipeline and Kibana QA quality gate (even if it's tagged as `@serverless`). Could indicate many things, e.g. "the test is flaky in Serverless", "the test is Flaky in any type of environment", "the test has been temporarily excluded, see the comment above why". All the skipped tests should have a link to a ticket describing the reason why the test got skipped. Please, before opening a PR with a new test, make sure that the test fails. If you never see your test fail you don’t know if your test is actually testing the right thing, or testing anything at all. @@ -304,7 +304,7 @@ Per the way we set the environment during the execution process on CI, the above For test developing or test debugging purposes, you need to modify the configuration but without committing and pushing the changes in `x-pack/test/security_solution_cypress/serverless_config.ts`. -### Running serverless tests locally pointing to a MKI project created in QA environment (Second Quality Gate) +### Running serverless tests locally pointing to a MKI project created in QA environment (Kibana QA quality gate) Note that when using any of the below scripts, the tests are going to be executed through an MKI project with the version that is currently available in QA. If you need to use a specific commit (i.e. debugging a failing tests on the periodic pipeline), check the section: `Running serverless tests locally pointing to a MKI project created in QA environment with an overridden image`. diff --git a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/export.cy.ts b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/export.cy.ts index 86a7010763436..c28f0ed90d8c5 100644 --- a/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/export.cy.ts +++ b/x-pack/test/security_solution_cypress/cypress/e2e/investigations/timelines/export.cy.ts @@ -22,7 +22,8 @@ import { createTimeline } from '../../../tasks/api_calls/timelines'; import { expectedExportedTimeline } from '../../../objects/timeline'; import { closeToast } from '../../../tasks/common/toast'; -describe('Export timelines', { tags: ['@ess', '@serverless'] }, () => { +// FLAKY: https://github.com/elastic/kibana/issues/187550 +describe.skip('Export timelines', { tags: ['@ess', '@serverless'] }, () => { beforeEach(() => { login(); deleteTimelines(); diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/infra/processes.ts b/x-pack/test_serverless/api_integration/test_suites/observability/infra/processes.ts index e6f490ec4bfae..a7f61d2a7ea19 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/infra/processes.ts +++ b/x-pack/test_serverless/api_integration/test_suites/observability/infra/processes.ts @@ -43,7 +43,7 @@ export default function ({ getService }: FtrProviderContext) { hostTerm: { 'host.name': 'serverless-host', }, - indexPattern: 'metrics-*,metricbeat-*', + sourceId: 'default', to: DATES.serverlessTestingHost.max, sortBy: { name: 'cpu', diff --git a/x-pack/test_serverless/api_integration/test_suites/search/cases/find_cases.ts b/x-pack/test_serverless/api_integration/test_suites/search/cases/find_cases.ts index b847833b30b46..c03cab368d5d8 100644 --- a/x-pack/test_serverless/api_integration/test_suites/search/cases/find_cases.ts +++ b/x-pack/test_serverless/api_integration/test_suites/search/cases/find_cases.ts @@ -6,17 +6,30 @@ */ import { CASES_URL } from '@kbn/cases-plugin/common/constants'; +import type { RoleCredentials } from '../../../../shared/services'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default ({ getService }: FtrProviderContext): void => { - const supertest = getService('supertest'); + const supertestWithoutAuth = getService('supertestWithoutAuth'); + const svlCommonApi = getService('svlCommonApi'); + const svlUserManager = getService('svlUserManager'); describe('find_cases', () => { + let roleAuthc: RoleCredentials; + + before(async () => { + roleAuthc = await svlUserManager.createApiKeyForRole('viewer'); + }); + + after(async () => { + await svlUserManager.invalidateApiKeyForRole(roleAuthc); + }); + it('403 when calling find cases API', async () => { - await supertest + await supertestWithoutAuth .get(`${CASES_URL}/_find`) - .set('kbn-xsrf', 'foo') - .set('x-elastic-internal-origin', 'foo') + .set(svlCommonApi.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader) .expect(403); }); }); diff --git a/x-pack/test_serverless/api_integration/test_suites/search/cases/post_case.ts b/x-pack/test_serverless/api_integration/test_suites/search/cases/post_case.ts index 4391fa29e0831..f6f596d6b0454 100644 --- a/x-pack/test_serverless/api_integration/test_suites/search/cases/post_case.ts +++ b/x-pack/test_serverless/api_integration/test_suites/search/cases/post_case.ts @@ -8,18 +8,31 @@ import { CASES_URL } from '@kbn/cases-plugin/common/constants'; import { CaseSeverity } from '@kbn/cases-plugin/common/types/domain'; import { ConnectorTypes } from '@kbn/cases-plugin/common/types/domain'; +import type { RoleCredentials } from '../../../../shared/services'; import { FtrProviderContext } from '../../../ftr_provider_context'; export default ({ getService }: FtrProviderContext): void => { - const supertest = getService('supertest'); + const supertestWithoutAuth = getService('supertestWithoutAuth'); + const svlCommonApi = getService('svlCommonApi'); + const svlUserManager = getService('svlUserManager'); describe('post_case', () => { + let roleAuthc: RoleCredentials; + + before(async () => { + roleAuthc = await svlUserManager.createApiKeyForRole('viewer'); + }); + + after(async () => { + await svlUserManager.invalidateApiKeyForRole(roleAuthc); + }); + it('403 when trying to create case', async () => { - await supertest + await supertestWithoutAuth .post(CASES_URL) - .set('kbn-xsrf', 'foo') - .set('x-elastic-internal-origin', 'foo') + .set(svlCommonApi.getInternalRequestHeader()) + .set(roleAuthc.apiKeyHeader) .send({ description: 'This is a brand new case of a bad meanie defacing data', title: 'Super Bad Observability Issue', diff --git a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_flyout.ts b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_flyout.ts index 9d20aefcebd28..67572c2e1f2fd 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_flyout.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/dataset_quality/dataset_quality_flyout.ts @@ -55,6 +55,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const degradedDatasetName = datasetNames[2]; describe('Flyout', function () { + // see details: https://github.com/elastic/kibana/issues/187624 + this.tags(['failsOnMKI']); before(async () => { // Install Apache Integration and ingest logs for it await PageObjects.observabilityLogsExplorer.installPackage(apachePkg);