diff --git a/.buildkite/ftr_configs.yml b/.buildkite/ftr_configs.yml index ee6bb5ca8ffc1..4bca3d4b02b04 100644 --- a/.buildkite/ftr_configs.yml +++ b/.buildkite/ftr_configs.yml @@ -122,7 +122,6 @@ enabled: - test/functional/apps/home/config.ts - test/functional/apps/kibana_overview/config.ts - test/functional/apps/management/config.ts - - test/functional/apps/navigation/config.ts - test/functional/apps/saved_objects_management/config.ts - test/functional/apps/sharing/config.ts - test/functional/apps/status_page/config.ts diff --git a/.buildkite/package-lock.json b/.buildkite/package-lock.json index 401f25347ebc0..b782b9c1d34eb 100644 --- a/.buildkite/package-lock.json +++ b/.buildkite/package-lock.json @@ -696,9 +696,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", - "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==", + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", "funding": [ { "type": "individual", @@ -2200,9 +2200,9 @@ "dev": true }, "follow-redirects": { - "version": "1.15.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz", - "integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==" + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==" }, "form-data": { "version": "4.0.0", diff --git a/.buildkite/pipeline-resource-definitions/kibana-es-serverless-snapshots.yml b/.buildkite/pipeline-resource-definitions/kibana-es-serverless-snapshots.yml new file mode 100644 index 0000000000000..0cbf4bad865d0 --- /dev/null +++ b/.buildkite/pipeline-resource-definitions/kibana-es-serverless-snapshots.yml @@ -0,0 +1,54 @@ +# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json +apiVersion: backstage.io/v1alpha1 +kind: Resource +metadata: + name: bk-kibana-elasticsearch-serverless-verify-and-promote + description: Verify & promote ElasticSearch Serverless images that pass Kibana's test suite + links: + - url: 'https://buildkite.com/elastic/kibana-elasticsearch-serverless-verify-and-promote' + title: Pipeline link +spec: + type: buildkite-pipeline + owner: 'group:kibana-operations' + system: buildkite + implementation: + apiVersion: buildkite.elastic.dev/v1 + kind: Pipeline + metadata: + name: kibana / elasticsearch serverless verify and promote + description: Verify & promote ElasticSearch Serverless images that pass Kibana's test suite + spec: + env: + SLACK_NOTIFICATIONS_CHANNEL: '#kibana-operations-alerts' + ES_SERVERLESS_IMAGE: latest + ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true' + allow_rebuilds: false + branch_configuration: main + default_branch: main + repository: elastic/kibana + pipeline_file: .buildkite/pipelines/es_serverless/verify_es_serverless_image.yml + skip_intermediate_builds: false + provider_settings: + build_branches: false + build_pull_requests: false + publish_commit_status: false + trigger_mode: none + build_tags: false + prefix_pull_request_fork_branch_names: false + skip_pull_request_builds_for_existing_commits: true + teams: + everyone: + access_level: BUILD_AND_READ + kibana-operations: + access_level: MANAGE_BUILD_AND_READ + appex-qa: + access_level: MANAGE_BUILD_AND_READ + kibana-tech-leads: + access_level: MANAGE_BUILD_AND_READ + schedules: + Daily build: + cronline: 0 9 * * * America/New_York + message: Daily build + env: + PUBLISH_DOCKER_TAG: 'true' + branch: main diff --git a/.buildkite/pipeline-resource-definitions/kibana-es-snapshots.yml b/.buildkite/pipeline-resource-definitions/kibana-es-snapshots.yml new file mode 100644 index 0000000000000..6691a460776ac --- /dev/null +++ b/.buildkite/pipeline-resource-definitions/kibana-es-snapshots.yml @@ -0,0 +1,153 @@ +# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json +apiVersion: backstage.io/v1alpha1 +kind: Resource +metadata: + name: bk-kibana-elasticsearch-snapshot-build + description: Build new Elasticsearch snapshots for use by kbn-es / FTR + links: + - url: 'https://buildkite.com/elastic/kibana-elasticsearch-snapshot-build' + title: Pipeline link +spec: + type: buildkite-pipeline + owner: 'group:kibana-operations' + system: buildkite + implementation: + apiVersion: buildkite.elastic.dev/v1 + kind: Pipeline + metadata: + name: kibana / elasticsearch snapshot build + description: Build new Elasticsearch snapshots for use by kbn-es / FTR + spec: + env: + SLACK_NOTIFICATIONS_CHANNEL: '#kibana-operations-alerts' + ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true' + allow_rebuilds: false + branch_configuration: main 8.13 7.17 + default_branch: main + repository: elastic/kibana + pipeline_file: .buildkite/pipelines/es_snapshots/build.yml + skip_intermediate_builds: false + provider_settings: + build_branches: false + build_pull_requests: false + publish_commit_status: false + trigger_mode: none + build_tags: false + prefix_pull_request_fork_branch_names: false + skip_pull_request_builds_for_existing_commits: true + teams: + everyone: + access_level: BUILD_AND_READ + kibana-operations: + access_level: MANAGE_BUILD_AND_READ + appex-qa: + access_level: MANAGE_BUILD_AND_READ + kibana-tech-leads: + access_level: MANAGE_BUILD_AND_READ + schedules: + Daily build (main): + cronline: 0 9 * * * America/New_York + message: Daily build + branch: main + Daily build (8.13): + cronline: 0 9 * * * America/New_York + message: Daily build + branch: '8.13' + Daily build (7.17): + cronline: 0 9 * * * America/New_York + message: Daily build + branch: '7.17' +--- +# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json +apiVersion: backstage.io/v1alpha1 +kind: Resource +metadata: + name: bk-kibana-elasticsearch-snapshot-promote + description: Promote Elasticsearch snapshots for use by kbn-es / FTR + links: + - url: 'https://buildkite.com/elastic/kibana-elasticsearch-snapshot-promote' + title: Pipeline link +spec: + type: buildkite-pipeline + owner: 'group:kibana-operations' + system: buildkite + implementation: + apiVersion: buildkite.elastic.dev/v1 + kind: Pipeline + metadata: + name: kibana / elasticsearch snapshot promote + description: Promote Elasticsearch snapshots for use by kbn-es / FTR + spec: + env: + SLACK_NOTIFICATIONS_CHANNEL: '#kibana-operations-alerts' + ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true' + allow_rebuilds: false + branch_configuration: main 8.13 7.17 + default_branch: main + repository: elastic/kibana + pipeline_file: .buildkite/pipelines/es_snapshots/promote.yml + skip_intermediate_builds: false + provider_settings: + build_branches: false + build_pull_requests: false + publish_commit_status: false + trigger_mode: none + build_tags: false + prefix_pull_request_fork_branch_names: false + skip_pull_request_builds_for_existing_commits: true + teams: + everyone: + access_level: BUILD_AND_READ + kibana-operations: + access_level: MANAGE_BUILD_AND_READ + appex-qa: + access_level: MANAGE_BUILD_AND_READ + kibana-tech-leads: + access_level: MANAGE_BUILD_AND_READ +--- +# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json +apiVersion: backstage.io/v1alpha1 +kind: Resource +metadata: + name: bk-kibana-elasticsearch-snapshot-verify + description: Verify Elasticsearch snapshots for use by kbn-es / FTR + links: + - url: 'https://buildkite.com/elastic/kibana-elasticsearch-snapshot-verify' + title: Pipeline link +spec: + type: buildkite-pipeline + owner: 'group:kibana-operations' + system: buildkite + implementation: + apiVersion: buildkite.elastic.dev/v1 + kind: Pipeline + metadata: + name: kibana / elasticsearch snapshot verify + description: Verify Elasticsearch snapshots for use by kbn-es / FTR + spec: + env: + SLACK_NOTIFICATIONS_CHANNEL: '#kibana-operations-alerts' + ELASTIC_SLACK_NOTIFICATIONS_ENABLED: 'true' + allow_rebuilds: false + branch_configuration: main 8.13 7.17 + default_branch: main + repository: elastic/kibana + pipeline_file: .buildkite/pipelines/es_snapshots/verify.yml + skip_intermediate_builds: false + provider_settings: + build_branches: false + build_pull_requests: false + publish_commit_status: false + trigger_mode: none + build_tags: false + prefix_pull_request_fork_branch_names: false + skip_pull_request_builds_for_existing_commits: true + teams: + everyone: + access_level: BUILD_AND_READ + kibana-operations: + access_level: MANAGE_BUILD_AND_READ + appex-qa: + access_level: MANAGE_BUILD_AND_READ + kibana-tech-leads: + access_level: MANAGE_BUILD_AND_READ diff --git a/.buildkite/pipeline-resource-definitions/locations.yml b/.buildkite/pipeline-resource-definitions/locations.yml index f0632ef2c0f26..eae8124dfa28b 100644 --- a/.buildkite/pipeline-resource-definitions/locations.yml +++ b/.buildkite/pipeline-resource-definitions/locations.yml @@ -6,16 +6,18 @@ metadata: spec: type: url targets: - - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-coverage-daily.yml - - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-esql-grammar-sync.yml - - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-migration-staging.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-release.yml - - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-ess/security-solution-ess.yml - - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-defend-workflows.yml - - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-detection-engine.yml - - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-entity-analytics.yml - - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-explore.yml - - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-gen-ai.yml - - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-investigations.yml - - https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-rule-management.yml + - 'https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-coverage-daily.yml' + - 'https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-es-serverless-snapshots.yml' + - 'https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-es-snapshots.yml' + - 'https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-esql-grammar-sync.yml' + - 'https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-migration-staging.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-release.yml' + - 'https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-ess/security-solution-ess.yml' + - 'https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-defend-workflows.yml' + - 'https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-detection-engine.yml' + - 'https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-entity-analytics.yml' + - 'https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-explore.yml' + - 'https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-gen-ai.yml' + - 'https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-investigations.yml' + - 'https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-rule-management.yml' diff --git a/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml b/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml index eca77dc9f57f5..99f5c98a06c35 100644 --- a/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml +++ b/.buildkite/pipelines/es_serverless/verify_es_serverless_image.yml @@ -2,7 +2,6 @@ ### Parameters for this job: # PUBLISH_DOCKER_TAG: if set to 1/true, passing runs will promote the tested ES Serverless tag to latest-verified. -# PUBLISH_MANIFEST: if set to 1/true, passing runs will upload the manifest attesting what (kibana + es) combination was used in the test # SKIP_VERIFICATION: if set to 1/true, it will skip running all tests # SKIP_CYPRESS: if set to 1/true, it will skip running the cypress tests # FTR_EXTRA_ARGS: a string argument, if passed, it will be forwarded verbatim to the FTR run script @@ -10,7 +9,10 @@ # BUILDKITE_COMMIT: the commit hash of the kibana branch to test agents: - queue: kibana-default + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-2 steps: - label: "Annotate runtime parameters" @@ -26,12 +28,18 @@ steps: key: pre-build timeout_in_minutes: 10 agents: - queue: kibana-default + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-2 - label: "Build Kibana Distribution and Plugins" command: .buildkite/scripts/steps/build_kibana.sh agents: - queue: n2-16-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-16 key: build depends_on: pre-build timeout_in_minutes: 60 @@ -40,17 +48,16 @@ steps: - exit_status: '-1' limit: 3 - - label: "Pick Test Group Run Order" + - label: "Pick Test Group Run Order (FTR + Integration)" command: .buildkite/scripts/steps/test/pick_test_group_run_order.sh - agents: - queue: kibana-default depends_on: build timeout_in_minutes: 10 env: FTR_CONFIGS_SCRIPT: 'TEST_ES_SERVERLESS_IMAGE=$ES_SERVERLESS_IMAGE .buildkite/scripts/steps/test/ftr_configs.sh' + JEST_INTEGRATION_SCRIPT: 'TEST_ES_SERVERLESS_IMAGE=$ES_SERVERLESS_IMAGE .buildkite/scripts/steps/test/jest_integration.sh' FTR_CONFIG_PATTERNS: '**/test_serverless/**' FTR_EXTRA_ARGS: '$FTR_EXTRA_ARGS' - LIMIT_CONFIG_TYPE: 'functional' + LIMIT_CONFIG_TYPE: 'functional,integration' retry: automatic: - exit_status: '*' @@ -60,7 +67,11 @@ steps: label: 'Serverless Entity Analytics - Security Solution Cypress Tests' if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'" agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true depends_on: build timeout_in_minutes: 60 parallelism: 2 @@ -73,7 +84,11 @@ steps: label: 'Serverless Explore - Security Solution Cypress Tests' if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'" agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true depends_on: build timeout_in_minutes: 60 parallelism: 4 @@ -86,7 +101,11 @@ steps: label: 'Serverless Investigations - Security Solution Cypress Tests' if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'" agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true depends_on: build timeout_in_minutes: 60 parallelism: 8 @@ -99,7 +118,11 @@ steps: label: 'Serverless Rule Management - Security Solution Cypress Tests' if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'" agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true depends_on: build timeout_in_minutes: 60 parallelism: 5 @@ -112,7 +135,11 @@ steps: label: 'Serverless Rule Management - Prebuilt Rules - Security Solution Cypress Tests' if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'" agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true depends_on: build timeout_in_minutes: 60 parallelism: 2 @@ -125,7 +152,11 @@ steps: label: 'Serverless Detection Engine - Security Solution Cypress Tests' if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'" agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true depends_on: build timeout_in_minutes: 60 parallelism: 5 @@ -138,7 +169,11 @@ steps: label: 'Serverless Detection Engine - Exceptions - Security Solution Cypress Tests' if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'" agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true depends_on: build timeout_in_minutes: 60 parallelism: 2 @@ -151,7 +186,11 @@ steps: label: 'Serverless AI Assistant - Security Solution Cypress Tests' if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'" agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true depends_on: build timeout_in_minutes: 60 parallelism: 1 @@ -164,7 +203,13 @@ steps: label: 'Defend Workflows Cypress Tests on Serverless' if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'" agents: - queue: n2-4-virt + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + enableNestedVirtualization: true + localSsds: 1 + localSsdInterface: nvme + machineType: n2-standard-4 depends_on: build timeout_in_minutes: 60 parallelism: 12 @@ -177,7 +222,11 @@ steps: label: 'Serverless Osquery Cypress Tests' if: "build.env('SKIP_CYPRESS') != '1' && build.env('SKIP_CYPRESS') != 'true'" agents: - queue: n2-4-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-4 + preemptible: true depends_on: build timeout_in_minutes: 60 parallelism: 7 @@ -196,5 +245,3 @@ steps: - label: 'Post-Build' command: .buildkite/scripts/lifecycle/post_build.sh timeout_in_minutes: 10 - agents: - queue: kibana-default diff --git a/.buildkite/pipelines/es_snapshots/build.yml b/.buildkite/pipelines/es_snapshots/build.yml index ba4a15f41ba7f..5fcdae8dfc986 100644 --- a/.buildkite/pipelines/es_snapshots/build.yml +++ b/.buildkite/pipelines/es_snapshots/build.yml @@ -3,4 +3,9 @@ steps: label: Build ES Snapshot timeout_in_minutes: 30 agents: - queue: c2-8 + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + localSsds: 1 + localSsdInterface: nvme + machineType: c2-standard-8 diff --git a/.buildkite/pipelines/es_snapshots/promote.yml b/.buildkite/pipelines/es_snapshots/promote.yml index f2f7b423c94c2..70df536a1fd2b 100644 --- a/.buildkite/pipelines/es_snapshots/promote.yml +++ b/.buildkite/pipelines/es_snapshots/promote.yml @@ -11,4 +11,7 @@ steps: - label: Promote Snapshot command: .buildkite/scripts/steps/es_snapshots/promote.sh agents: - queue: kibana-default + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-2 diff --git a/.buildkite/pipelines/es_snapshots/verify.yml b/.buildkite/pipelines/es_snapshots/verify.yml index d48f3052c133b..5321e12b9442d 100755 --- a/.buildkite/pipelines/es_snapshots/verify.yml +++ b/.buildkite/pipelines/es_snapshots/verify.yml @@ -15,14 +15,21 @@ steps: label: Pre-Build timeout_in_minutes: 10 agents: - queue: kibana-default + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-2 - wait - command: .buildkite/scripts/steps/build_kibana.sh label: Build Kibana Distribution and Plugins agents: - queue: n2-16-spot + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-16 + preemptible: true key: build if: "build.env('KIBANA_BUILD_ID') == null || build.env('KIBANA_BUILD_ID') == ''" timeout_in_minutes: 60 @@ -34,7 +41,10 @@ steps: - command: .buildkite/scripts/steps/test/pick_test_group_run_order.sh label: 'Pick Test Group Run Order' agents: - queue: kibana-default + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-2 timeout_in_minutes: 10 env: JEST_UNIT_SCRIPT: '.buildkite/scripts/steps/test/jest.sh' @@ -50,7 +60,10 @@ steps: label: Trigger promotion timeout_in_minutes: 10 agents: - queue: kibana-default + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-2 depends_on: - ftr-configs - jest-integration @@ -62,4 +75,7 @@ steps: label: Post-Build timeout_in_minutes: 10 agents: - queue: kibana-default + image: family/kibana-ubuntu-2004 + imageProject: elastic-images-qa + provider: gcp + machineType: n2-standard-2 diff --git a/.buildkite/pipelines/on_merge.yml b/.buildkite/pipelines/on_merge.yml index 642c99aba729d..f8cba36ab85ee 100644 --- a/.buildkite/pipelines/on_merge.yml +++ b/.buildkite/pipelines/on_merge.yml @@ -39,6 +39,19 @@ steps: - exit_status: '*' limit: 1 + - command: .buildkite/scripts/steps/quick_checks.sh + label: 'Quick Checks' + agents: + queue: n2-2-spot + key: quick_checks + timeout_in_minutes: 60 + retry: + automatic: + - exit_status: '-1' + limit: 3 + + - wait + - command: .buildkite/scripts/steps/on_merge_api_docs.sh label: Check Public API Docs key: public-api-docs @@ -363,16 +376,6 @@ steps: - exit_status: '-1' limit: 3 - - command: .buildkite/scripts/steps/quick_checks.sh - label: 'Quick Checks' - agents: - queue: n2-2-spot - timeout_in_minutes: 60 - retry: - automatic: - - exit_status: '-1' - limit: 3 - - command: .buildkite/scripts/steps/checks.sh label: 'Checks' agents: diff --git a/.buildkite/pipelines/pull_request/base.yml b/.buildkite/pipelines/pull_request/base.yml index c9d755d5d94c8..d7697d757f97c 100644 --- a/.buildkite/pipelines/pull_request/base.yml +++ b/.buildkite/pipelines/pull_request/base.yml @@ -23,7 +23,6 @@ steps: label: 'Quick Checks' agents: queue: n2-2-spot - key: quick_checks timeout_in_minutes: 60 retry: automatic: diff --git a/.buildkite/pipelines/quality-gates/pipeline.tests-staging.yaml b/.buildkite/pipelines/quality-gates/pipeline.tests-staging.yaml index 2b74ee24165dc..837234fc51441 100644 --- a/.buildkite/pipelines/quality-gates/pipeline.tests-staging.yaml +++ b/.buildkite/pipelines/quality-gates/pipeline.tests-staging.yaml @@ -21,6 +21,19 @@ steps: EC_REGION: aws-us-east-1 RETRY_TESTS_ON_FAIL: "true" message: "${BUILDKITE_MESSAGE} (triggered by pipeline.tests-staging.yaml)" + + - label: ":rocket: Fleet synthetic monitor to check the long standing project" + trigger: "serverless-quality-gates" + build: + message: "${BUILDKITE_MESSAGE} (triggered by pipeline.tests-staging.yaml)" + env: + TARGET_ENV: staging + CHECK_SYNTHETICS: true + CHECK_SYNTHETICS_TAG: "fleet" + CHECK_SYNTHETICS_MINIMUM_RUNS: 3 + MAX_FAILURES: 2 + CHECK_SYNTHETIC_MAX_POLL: 50 + soft_fail: true - wait: ~ diff --git a/.buildkite/pipelines/upload_pipeline.yml b/.buildkite/pipelines/upload_pipeline.yml index a6fa136efb2ed..83daee197f9dd 100644 --- a/.buildkite/pipelines/upload_pipeline.yml +++ b/.buildkite/pipelines/upload_pipeline.yml @@ -2,4 +2,4 @@ steps: - label: Upload tested pipeline - command: buildkite-agent pipeline upload .buildkite/pipelines/pipeline_to_test.yml + command: buildkite-agent pipeline upload ${TESTED_PIPELINE_PATH:-.buildkite/pipelines/pipeline_to_test.yml} diff --git a/.buildkite/scripts/steps/code_coverage/ingest.sh b/.buildkite/scripts/steps/code_coverage/ingest.sh index 6940c413f0e93..d2a4bd55674cf 100755 --- a/.buildkite/scripts/steps/code_coverage/ingest.sh +++ b/.buildkite/scripts/steps/code_coverage/ingest.sh @@ -3,15 +3,16 @@ set -euo pipefail source .buildkite/scripts/common/util.sh +source .buildkite/scripts/common/vault_fns.sh source .buildkite/scripts/steps/code_coverage/util.sh export CODE_COVERAGE=1 -echo "--- Reading Kibana stats cluster creds from vault" -USER_FROM_VAULT="$(retry 5 5 vault read -field=username secret/kibana-issues/prod/coverage/elasticsearch)" +echo "--- Reading Kibana coverage creds from vault" +USER_FROM_VAULT="$(vault_get coverage/elasticsearch username)" export USER_FROM_VAULT -PASS_FROM_VAULT="$(retry 5 5 vault read -field=password secret/kibana-issues/prod/coverage/elasticsearch)" +PASS_FROM_VAULT="$(vault_get coverage/elasticsearch password)" export PASS_FROM_VAULT -HOST_FROM_VAULT="$(retry 5 5 vault read -field=host secret/kibana-issues/prod/coverage/elasticsearch)" +HOST_FROM_VAULT="$(vault_get coverage/elasticsearch host)" export HOST_FROM_VAULT TIME_STAMP=$(date +"%Y-%m-%dT%H:%M:00Z") export TIME_STAMP diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 9e6bca0b54433..70640a4502c6f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -478,6 +478,7 @@ src/plugins/image_embeddable @elastic/appex-sharedux packages/kbn-import-locator @elastic/kibana-operations packages/kbn-import-resolver @elastic/kibana-operations x-pack/plugins/index_lifecycle_management @elastic/kibana-management +x-pack/packages/index-management @elastic/kibana-management x-pack/plugins/index_management @elastic/kibana-management test/plugin_functional/plugins/index_patterns @elastic/kibana-data-discovery x-pack/packages/kbn-infra-forge @elastic/obs-ux-management-team @@ -588,9 +589,9 @@ test/common/plugins/newsfeed @elastic/kibana-core src/plugins/no_data_page @elastic/appex-sharedux x-pack/plugins/notifications @elastic/appex-sharedux packages/kbn-object-versioning @elastic/appex-sharedux -x-pack/plugins/observability_solution/observability_ai_assistant_app @elastic/obs-knowledge-team -x-pack/plugins/observability_solution/observability_ai_assistant_management @elastic/obs-knowledge-team -x-pack/plugins/observability_solution/observability_ai_assistant @elastic/obs-knowledge-team +x-pack/plugins/observability_solution/observability_ai_assistant_app @elastic/obs-ai-assistant +x-pack/plugins/observability_solution/observability_ai_assistant_management @elastic/obs-ai-assistant +x-pack/plugins/observability_solution/observability_ai_assistant @elastic/obs-ai-assistant x-pack/packages/observability/alert_details @elastic/obs-ux-management-team x-pack/packages/observability/alerting_test_data @elastic/obs-ux-management-team x-pack/test/cases_api_integration/common/plugins/observability @elastic/response-ops diff --git a/.node-version b/.node-version index bc78e9f2695ea..87834047a6fa6 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -20.12.1 +20.12.2 diff --git a/.nvmrc b/.nvmrc index bc78e9f2695ea..87834047a6fa6 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20.12.1 +20.12.2 diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel index b004b39853292..4be7fa6a9848e 100644 --- a/WORKSPACE.bazel +++ b/WORKSPACE.bazel @@ -22,13 +22,13 @@ load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories", "yarn_install # Setup the Node.js toolchain for the architectures we want to support node_repositories( node_repositories = { - "20.12.1-darwin_amd64": ("node-v20.12.1-darwin-x64.tar.gz", "node-v20.12.1-darwin-x64", "f5dc3c71c87c58c9b019d9f85302db3a6a6c47167c5a0480b697f153d02ac316"), - "20.12.1-darwin_arm64": ("node-v20.12.1-darwin-arm64.tar.gz", "node-v20.12.1-darwin-arm64", "65df8cb0724e3a58c7757b75a70cc1057e1f67ffc5e852bfe6241de0b37c70a0"), - "20.12.1-linux_arm64": ("node-v20.12.1-linux-arm64.tar.xz", "node-v20.12.1-linux-arm64", "903a0f94312ba819f16a133e9dc378db128804ff45ea69e11af7152c303e8a85"), - "20.12.1-linux_amd64": ("node-v20.12.1-linux-x64.tar.xz", "node-v20.12.1-linux-x64", "e43b54ecea97b4419a5526af57bcf4f22a3d5583e1b2cacf461da71b9ba2befe"), - "20.12.1-windows_amd64": ("node-v20.12.1-win-x64.zip", "node-v20.12.1-win-x64", "629e2619ef88c5a8ce9944201f00ca3124f079c43ceef7ab0826c6fd19e09d75"), + "20.12.2-darwin_amd64": ("node-v20.12.2-darwin-x64.tar.gz", "node-v20.12.2-darwin-x64", "cd5e9a80a38ccffc036a87b232a5402339c7bf8fa9a494ae0731a1a671687718"), + "20.12.2-darwin_arm64": ("node-v20.12.2-darwin-arm64.tar.gz", "node-v20.12.2-darwin-arm64", "98eb624b52efec2530079e1d11296ec0ac20771b94b087d21649250339cf5332"), + "20.12.2-linux_arm64": ("node-v20.12.2-linux-arm64.tar.xz", "node-v20.12.2-linux-arm64", "26f6dfac78a119e088458c1e6f2beb6c546a170d916060a23c92075718f92966"), + "20.12.2-linux_amd64": ("node-v20.12.2-linux-x64.tar.xz", "node-v20.12.2-linux-x64", "37756bc241b099e7435e20ba088dd9c13f39c6dc4235661c807cdd7b361371ef"), + "20.12.2-windows_amd64": ("node-v20.12.2-win-x64.zip", "node-v20.12.2-win-x64", "66dda1717cae30a13be6bb17ad96ee54b69f2c23c85acd9c3299b095fa26b452"), }, - node_version = "20.12.1", + node_version = "20.12.2", node_urls = [ "https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/dist/v{version}/{filename}", ], diff --git a/api_docs/actions.devdocs.json b/api_docs/actions.devdocs.json index 1def8581a7ef9..cc2d6d12496ab 100644 --- a/api_docs/actions.devdocs.json +++ b/api_docs/actions.devdocs.json @@ -5593,6 +5593,21 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "actions", + "id": "def-common.GenerativeAIForSearchPlaygroundConnectorFeatureId", + "type": "string", + "tags": [], + "label": "GenerativeAIForSearchPlaygroundConnectorFeatureId", + "description": [], + "signature": [ + "\"generativeAIForSearchPlayground\"" + ], + "path": "x-pack/plugins/actions/common/connector_feature_config.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "actions", "id": "def-common.GenerativeAIForSecurityConnectorFeatureId", @@ -5980,6 +5995,53 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "actions", + "id": "def-common.GenerativeAIForSearchPlaygroundFeature", + "type": "Object", + "tags": [], + "label": "GenerativeAIForSearchPlaygroundFeature", + "description": [], + "path": "x-pack/plugins/actions/common/connector_feature_config.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "actions", + "id": "def-common.GenerativeAIForSearchPlaygroundFeature.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "path": "x-pack/plugins/actions/common/connector_feature_config.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "actions", + "id": "def-common.GenerativeAIForSearchPlaygroundFeature.name", + "type": "string", + "tags": [], + "label": "name", + "description": [], + "path": "x-pack/plugins/actions/common/connector_feature_config.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "actions", + "id": "def-common.GenerativeAIForSearchPlaygroundFeature.compatibility", + "type": "string", + "tags": [], + "label": "compatibility", + "description": [], + "path": "x-pack/plugins/actions/common/connector_feature_config.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "actions", "id": "def-common.GenerativeAIForSecurityFeature", diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index 6bb5f4978d983..8675b4c2fd0a4 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions'] --- import actionsObj from './actions.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-o | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 291 | 0 | 285 | 32 | +| 296 | 0 | 290 | 32 | ## Client diff --git a/api_docs/advanced_settings.mdx b/api_docs/advanced_settings.mdx index 079c3bf8daea9..63767a6f4111e 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings'] --- import advancedSettingsObj from './advanced_settings.devdocs.json'; diff --git a/api_docs/ai_assistant_management_selection.devdocs.json b/api_docs/ai_assistant_management_selection.devdocs.json index c9cb8b734799e..c7233a2b94ecd 100644 --- a/api_docs/ai_assistant_management_selection.devdocs.json +++ b/api_docs/ai_assistant_management_selection.devdocs.json @@ -4,15 +4,28 @@ "classes": [], "functions": [], "interfaces": [], - "enums": [], + "enums": [ + { + "parentPluginId": "aiAssistantManagementSelection", + "id": "def-public.AIAssistantType", + "type": "Enum", + "tags": [], + "label": "AIAssistantType", + "description": [], + "path": "src/plugins/ai_assistant_management/selection/common/ai_assistant_type.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], "misc": [], "objects": [], "setup": { "parentPluginId": "aiAssistantManagementSelection", - "id": "def-public.AiAssistantManagementSelectionPluginSetup", + "id": "def-public.AIAssistantManagementSelectionPluginPublicSetup", "type": "Interface", "tags": [], - "label": "AiAssistantManagementSelectionPluginSetup", + "label": "AIAssistantManagementSelectionPluginPublicSetup", "description": [], "path": "src/plugins/ai_assistant_management/selection/public/plugin.ts", "deprecated": false, @@ -23,15 +36,33 @@ }, "start": { "parentPluginId": "aiAssistantManagementSelection", - "id": "def-public.AiAssistantManagementSelectionPluginStart", + "id": "def-public.AIAssistantManagementSelectionPluginPublicStart", "type": "Interface", "tags": [], - "label": "AiAssistantManagementSelectionPluginStart", + "label": "AIAssistantManagementSelectionPluginPublicStart", "description": [], "path": "src/plugins/ai_assistant_management/selection/public/plugin.ts", "deprecated": false, "trackAdoption": false, - "children": [], + "children": [ + { + "parentPluginId": "aiAssistantManagementSelection", + "id": "def-public.AIAssistantManagementSelectionPluginPublicStart.aiAssistantType$", + "type": "Object", + "tags": [], + "label": "aiAssistantType$", + "description": [], + "signature": [ + "Observable", + "<", + "AIAssistantType", + ">" + ], + "path": "src/plugins/ai_assistant_management/selection/public/plugin.ts", + "deprecated": false, + "trackAdoption": false + } + ], "lifecycle": "start", "initialIsOpen": true } diff --git a/api_docs/ai_assistant_management_selection.mdx b/api_docs/ai_assistant_management_selection.mdx index 576c59511ba37..a4748000e0f65 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiAssistantManagementSelection'] --- import aiAssistantManagementSelectionObj from './ai_assistant_management_selection.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs- | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 2 | 0 | 2 | 0 | +| 4 | 0 | 4 | 1 | ## Client @@ -31,3 +31,6 @@ Contact [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs- ### Start +### Enums + + diff --git a/api_docs/aiops.mdx b/api_docs/aiops.mdx index 050e803ed3235..ac232d59104a7 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops'] --- import aiopsObj from './aiops.devdocs.json'; diff --git a/api_docs/alerting.devdocs.json b/api_docs/alerting.devdocs.json index 0ce66f3483bd4..629f9c0721f7c 100644 --- a/api_docs/alerting.devdocs.json +++ b/api_docs/alerting.devdocs.json @@ -495,7 +495,7 @@ "label": "ensureAuthorized", "description": [], "signature": [ - "({ ruleTypeId, consumer: legacyConsumer, operation, entity, }: ", + "({ ruleTypeId, consumer: legacyConsumer, operation, entity, additionalPrivileges, }: ", "EnsureAuthorizedOpts", ") => Promise" ], @@ -508,7 +508,7 @@ "id": "def-server.AlertingAuthorization.ensureAuthorized.$1", "type": "Object", "tags": [], - "label": "{\n ruleTypeId,\n consumer: legacyConsumer,\n operation,\n entity,\n }", + "label": "{\n ruleTypeId,\n consumer: legacyConsumer,\n operation,\n entity,\n additionalPrivileges = [],\n }", "description": [], "signature": [ "EnsureAuthorizedOpts" @@ -1856,6 +1856,47 @@ } ], "returnComment": [] + }, + { + "parentPluginId": "alerting", + "id": "def-server.ConnectorAdapter.getKibanaPrivileges", + "type": "Function", + "tags": [], + "label": "getKibanaPrivileges", + "description": [], + "signature": [ + "(({ consumer }: { consumer: string; }) => string[]) | undefined" + ], + "path": "x-pack/plugins/alerting/server/connector_adapters/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "alerting", + "id": "def-server.ConnectorAdapter.getKibanaPrivileges.$1", + "type": "Object", + "tags": [], + "label": "{ consumer }", + "description": [], + "path": "x-pack/plugins/alerting/server/connector_adapters/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "alerting", + "id": "def-server.ConnectorAdapter.getKibanaPrivileges.$1.consumer", + "type": "string", + "tags": [], + "label": "consumer", + "description": [], + "path": "x-pack/plugins/alerting/server/connector_adapters/types.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [] } ], "initialIsOpen": false diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx index 6bbce5cae9a6a..4b98f15e20198 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-04-08 +date: 2024-04-11 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 | |-------------------|-----------|------------------------|-----------------| -| 854 | 1 | 822 | 54 | +| 857 | 1 | 825 | 54 | ## Client diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx index dfbf112cc4a7d..65654e6670ed5 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-04-08 +date: 2024-04-11 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 674b0f66756a3..d1ee48c43e583 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apmDataAccess'] --- import apmDataAccessObj from './apm_data_access.devdocs.json'; diff --git a/api_docs/asset_manager.mdx b/api_docs/asset_manager.mdx index 8246cb90cd40f..bf83804abc8be 100644 --- a/api_docs/asset_manager.mdx +++ b/api_docs/asset_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/assetManager title: "assetManager" image: https://source.unsplash.com/400x175/?github description: API docs for the assetManager plugin -date: 2024-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'assetManager'] --- import assetManagerObj from './asset_manager.devdocs.json'; diff --git a/api_docs/banners.mdx b/api_docs/banners.mdx index 6e28fd23d673a..dbdaec91758fb 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-04-08 +date: 2024-04-11 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 fe7fd4eb5ce81..9889d5a39bcff 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-04-08 +date: 2024-04-11 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 c97ca36b4f6c2..384286c7a32f1 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-04-08 +date: 2024-04-11 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 77b653ef585f2..3a57cfc4000f9 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cases'] --- import casesObj from './cases.devdocs.json'; diff --git a/api_docs/charts.devdocs.json b/api_docs/charts.devdocs.json index 220c4efcc4680..0026005ee11a3 100644 --- a/api_docs/charts.devdocs.json +++ b/api_docs/charts.devdocs.json @@ -2266,6 +2266,10 @@ "RecursivePartial", "<", "Theme", + ">; useSparklineOverrides: () => ", + "RecursivePartial", + "<", + "Theme", ">; useChartsBaseTheme: () => ", "Theme", "; }" diff --git a/api_docs/charts.mdx b/api_docs/charts.mdx index d60d8da13f177..70908d838fdc1 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-04-08 +date: 2024-04-11 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 813e6ff93e656..4d7643de00654 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-04-08 +date: 2024-04-11 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 921b05a38d81c..5d962f6324497 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDataMigration'] --- import cloudDataMigrationObj from './cloud_data_migration.devdocs.json'; diff --git a/api_docs/cloud_defend.mdx b/api_docs/cloud_defend.mdx index d1c27bf829825..25a43003f173e 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDefend'] --- import cloudDefendObj from './cloud_defend.devdocs.json'; diff --git a/api_docs/cloud_experiments.devdocs.json b/api_docs/cloud_experiments.devdocs.json index d39ee801654a7..d3c54f7c959d0 100644 --- a/api_docs/cloud_experiments.devdocs.json +++ b/api_docs/cloud_experiments.devdocs.json @@ -117,7 +117,7 @@ "\nFetch the configuration assigned to variation `configKey`. If nothing is found, fallback to `defaultValue`." ], "signature": [ - "(featureFlagName: \"security-solutions.add-integrations-url\" | \"security-solutions.guided-onboarding-content\" | \"cloud-chat.enabled\" | \"cloud-chat.chat-variant\", defaultValue: Data) => Promise" + "(featureFlagName: \"security-solutions.add-integrations-url\" | \"security-solutions.guided-onboarding-content\" | \"cloud-chat.enabled\" | \"cloud-chat.chat-variant\" | \"navigation.solutionNavEnabled\", defaultValue: Data) => Promise" ], "path": "x-pack/plugins/cloud_integrations/cloud_experiments/common/types.ts", "deprecated": false, @@ -133,7 +133,7 @@ "The name of the key to find the config variation. {@link CloudExperimentsFeatureFlagNames }." ], "signature": [ - "\"security-solutions.add-integrations-url\" | \"security-solutions.guided-onboarding-content\" | \"cloud-chat.enabled\" | \"cloud-chat.chat-variant\"" + "\"security-solutions.add-integrations-url\" | \"security-solutions.guided-onboarding-content\" | \"cloud-chat.enabled\" | \"cloud-chat.chat-variant\" | \"navigation.solutionNavEnabled\"" ], "path": "x-pack/plugins/cloud_integrations/cloud_experiments/common/types.ts", "deprecated": false, @@ -227,7 +227,7 @@ "\nThe names of the feature flags declared in Kibana.\nValid keys are defined in {@link FEATURE_FLAG_NAMES}. When using a new feature flag, add the name to the list.\n" ], "signature": [ - "\"security-solutions.add-integrations-url\" | \"security-solutions.guided-onboarding-content\" | \"cloud-chat.enabled\" | \"cloud-chat.chat-variant\"" + "\"security-solutions.add-integrations-url\" | \"security-solutions.guided-onboarding-content\" | \"cloud-chat.enabled\" | \"cloud-chat.chat-variant\" | \"navigation.solutionNavEnabled\"" ], "path": "x-pack/plugins/cloud_integrations/cloud_experiments/common/types.ts", "deprecated": false, diff --git a/api_docs/cloud_experiments.mdx b/api_docs/cloud_experiments.mdx index e914f318c2a83..42512a9662504 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-04-08 +date: 2024-04-11 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 85455b5cfe2c8..332a0b5554cc5 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-04-08 +date: 2024-04-11 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 df7e0a592c6f6..102d0c540f622 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-04-08 +date: 2024-04-11 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 119c37dab280b..d48f521fbfdee 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'contentManagement'] --- import contentManagementObj from './content_management.devdocs.json'; diff --git a/api_docs/controls.mdx b/api_docs/controls.mdx index 906a1d3519c23..9a292bb5b4b6b 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-04-08 +date: 2024-04-11 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 258e46e45f9bf..74459ae00eec2 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-04-08 +date: 2024-04-11 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 53934af395389..76bf953783ec7 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-04-08 +date: 2024-04-11 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 6c6ab5e3a2192..4894c3beee223 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-04-08 +date: 2024-04-11 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 20302a0f6002e..718cf4d53f331 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data'] --- import dataObj from './data.devdocs.json'; diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx index 2fca1d0ead034..c9768273b94e2 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.query'] --- import dataQueryObj from './data_query.devdocs.json'; diff --git a/api_docs/data_search.devdocs.json b/api_docs/data_search.devdocs.json index 6c23e455f0893..70a335f69dfac 100644 --- a/api_docs/data_search.devdocs.json +++ b/api_docs/data_search.devdocs.json @@ -2648,6 +2648,9 @@ "tags": [], "label": "completion_status", "description": [], + "signature": [ + "number | undefined" + ], "path": "src/plugins/data/server/search/strategies/ese_search/types.ts", "deprecated": false, "trackAdoption": false diff --git a/api_docs/data_search.mdx b/api_docs/data_search.mdx index 1f0455e0b450e..b467ffbd266ae 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-04-08 +date: 2024-04-11 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 a55d48767ccd5..90234c26323b8 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-04-08 +date: 2024-04-11 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 92324bd2ba599..31b68edeacb8c 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-04-08 +date: 2024-04-11 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 7546c5f20fa97..e03be8fe13beb 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewManagement'] --- import dataViewManagementObj from './data_view_management.devdocs.json'; diff --git a/api_docs/data_views.mdx b/api_docs/data_views.mdx index 8f4ee21449ee6..8c033ea4330e3 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-04-08 +date: 2024-04-11 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 25b8363b85315..27ac10a21f294 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataVisualizer'] --- import dataVisualizerObj from './data_visualizer.devdocs.json'; diff --git a/api_docs/dataset_quality.mdx b/api_docs/dataset_quality.mdx index 46b050a7c53a0..055703c5226ca 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-04-08 +date: 2024-04-11 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 da29a36e19c12..3d8dd7a7ed61c 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -17,7 +17,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Referencing plugin(s) | Remove By | | ---------------|-----------|-----------| | | ml, stackAlerts | - | -| | uiActions, guidedOnboarding, home, serverless, management, spaces, savedObjects, indexManagement, devTools, console, security, visualizations, savedObjectsTagging, expressionXY, lens, expressionMetricVis, expressionGauge, alerting, dashboard, triggersActionsUi, aiops, maps, expressionImage, expressionMetric, expressionError, expressionRevealImage, expressionRepeatImage, expressionShape, licenseManagement, dataVisualizer, ml, fleet, crossClusterReplication, graph, grokdebugger, indexLifecycleManagement, ingestPipelines, logstash, metricsDataAccess, exploratoryView, osquery, infra, monitoring, painlessLab, remoteClusters, rollup, searchprofiler, newsfeed, securitySolution, snapshotRestore, transform, upgradeAssistant, watcher, cloudDataMigration, profiling, apm, observabilityOnboarding, synthetics, uptime, ux, filesManagement, kibanaOverview, visDefaultEditor, expressionHeatmap, expressionLegacyMetricVis, expressionPartitionVis, expressionTagcloud, visTypeTable, visTypeTimelion, visTypeTimeseries, visTypeVega, visTypeVislib | - | +| | uiActions, guidedOnboarding, home, serverless, spaces, savedObjects, devTools, console, security, visualizations, savedObjectsTagging, expressionXY, lens, expressionMetricVis, expressionGauge, dashboard, aiops, maps, expressionImage, expressionMetric, expressionError, expressionRevealImage, expressionRepeatImage, expressionShape, licenseManagement, dataVisualizer, ml, fleet, indexManagement, crossClusterReplication, graph, grokdebugger, indexLifecycleManagement, ingestPipelines, logstash, metricsDataAccess, exploratoryView, osquery, infra, monitoring, painlessLab, remoteClusters, rollup, searchprofiler, newsfeed, securitySolution, snapshotRestore, transform, upgradeAssistant, watcher, cloudDataMigration, profiling, apm, observabilityOnboarding, synthetics, uptime, ux, filesManagement, kibanaOverview, visDefaultEditor, expressionHeatmap, expressionLegacyMetricVis, expressionPartitionVis, expressionTagcloud, visTypeTable, visTypeTimelion, visTypeTimeseries, visTypeVega, visTypeVislib | - | | | encryptedSavedObjects, actions, data, ml, logstash, securitySolution, cloudChat | - | | | actions, ml, savedObjectsTagging, enterpriseSearch | - | | | @kbn/core-saved-objects-browser-internal, @kbn/core, savedObjects, visualizations, aiops, ml, dataVisualizer, dashboardEnhanced, graph, lens, securitySolution, eventAnnotation, @kbn/core-saved-objects-browser-mocks | - | @@ -28,7 +28,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | dashboard, dataVisualizer, stackAlerts, expressionPartitionVis | - | | | stackAlerts, alerting, securitySolution, inputControlVis | - | | | triggersActionsUi | - | -| | inspector, data, savedObjects, console, runtimeFields, indexManagement, dataViewEditor, unifiedSearch, embeddable, licensing, security, visualizations, savedObjectsTagging, dataViewFieldEditor, lens, dashboard, triggersActionsUi, cases, observabilityShared, banners, maps, @kbn/reporting-public, reporting, timelines, fleet, telemetry, cloudSecurityPosture, dashboardEnhanced, imageEmbeddable, graph, exploratoryView, monitoring, securitySolution, synthetics, uptime, dataViewManagement, eventAnnotationListing, filesManagement, uiActions, visTypeVislib | - | +| | spaces, security, remoteClusters, savedObjectsTagging, triggersActionsUi, reporting, licenseManagement, indexManagement, crossClusterReplication, indexLifecycleManagement, ingestPipelines, logstash, rollup, snapshotRestore, upgradeAssistant, watcher, cloudDataMigration | - | | | @kbn/core, visualizations, triggersActionsUi | - | | | ruleRegistry, securitySolution, synthetics, uptime, slo | - | | | alerting, discover, securitySolution | - | @@ -36,6 +36,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | @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 | - | | | alerting, discover, securitySolution | - | | | securitySolution | - | +| | inspector, data, savedObjects, console, dataViewEditor, unifiedSearch, embeddable, licensing, security, visualizations, savedObjectsTagging, dataViewFieldEditor, lens, dashboard, observabilityShared, banners, maps, @kbn/reporting-public, reporting, timelines, fleet, telemetry, cloudSecurityPosture, runtimeFields, indexManagement, dashboardEnhanced, graph, exploratoryView, monitoring, securitySolution, synthetics, uptime, dataViewManagement, eventAnnotationListing, filesManagement, uiActions, visTypeVislib | - | | | @kbn/securitysolution-data-table, securitySolution | - | | | @kbn/securitysolution-data-table, securitySolution | - | | | securitySolution | - | diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index 9f1b92f2e5ea8..1ec7619022a60 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -328,7 +328,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [esql_theme.ts](https://github.com/elastic/kibana/tree/main/packages/kbn-monaco/src/esql/lib/esql_theme.ts#:~:text=darkMode), [esql_theme.ts](https://github.com/elastic/kibana/tree/main/packages/kbn-monaco/src/esql/lib/esql_theme.ts#:~:text=darkMode), [shared.ts](https://github.com/elastic/kibana/tree/main/packages/kbn-monaco/src/console/theme/shared.ts#:~:text=darkMode), [shared.ts](https://github.com/elastic/kibana/tree/main/packages/kbn-monaco/src/console/theme/shared.ts#:~:text=darkMode) | - | +| | [esql_theme.ts](https://github.com/elastic/kibana/tree/main/packages/kbn-monaco/src/esql/lib/esql_theme.ts#:~:text=darkMode), [esql_theme.ts](https://github.com/elastic/kibana/tree/main/packages/kbn-monaco/src/esql/lib/esql_theme.ts#:~:text=darkMode), [esql_theme.ts](https://github.com/elastic/kibana/tree/main/packages/kbn-monaco/src/esql/lib/esql_theme.ts#:~:text=darkMode), [esql_theme.ts](https://github.com/elastic/kibana/tree/main/packages/kbn-monaco/src/esql/lib/esql_theme.ts#:~:text=darkMode), [esql_theme.ts](https://github.com/elastic/kibana/tree/main/packages/kbn-monaco/src/esql/lib/esql_theme.ts#:~:text=darkMode), [shared.ts](https://github.com/elastic/kibana/tree/main/packages/kbn-monaco/src/console/theme/shared.ts#:~:text=darkMode), [shared.ts](https://github.com/elastic/kibana/tree/main/packages/kbn-monaco/src/console/theme/shared.ts#:~:text=darkMode) | - | @@ -422,7 +422,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [wrap_search_source_client.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/lib/wrap_search_source_client.ts#:~:text=create) | - | | | [wrap_search_source_client.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/lib/wrap_search_source_client.test.ts#:~:text=fetch), [wrap_search_source_client.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/lib/wrap_search_source_client.test.ts#:~:text=fetch), [wrap_search_source_client.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/lib/wrap_search_source_client.test.ts#:~:text=fetch), [wrap_search_source_client.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/lib/wrap_search_source_client.test.ts#:~:text=fetch), [wrap_search_source_client.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/lib/wrap_search_source_client.test.ts#:~:text=fetch), [wrap_search_source_client.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/lib/wrap_search_source_client.test.ts#:~:text=fetch), [wrap_search_source_client.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/lib/wrap_search_source_client.test.ts#:~:text=fetch), [wrap_search_source_client.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/lib/wrap_search_source_client.test.ts#:~:text=fetch) | - | | | [plugin.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/plugin.test.ts#:~:text=getKibanaFeatures) | 8.8.0 | -| | [maintenance_windows.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/public/application/maintenance_windows.tsx#:~:text=KibanaThemeProvider), [maintenance_windows.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/public/application/maintenance_windows.tsx#:~:text=KibanaThemeProvider), [maintenance_windows.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/public/application/maintenance_windows.tsx#:~:text=KibanaThemeProvider) | - | | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/plugin.ts#:~:text=license%24), [license_state.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/lib/license_state.test.ts#:~:text=license%24), [license_state.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/lib/license_state.test.ts#:~:text=license%24) | 8.8.0 | | | [task.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/server/usage/task.ts#:~:text=index) | - | | | [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes), [rule.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/alerting/common/rule.ts#:~:text=SavedObjectAttributes)+ 56 more | - | @@ -488,7 +487,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [use_cases_toast.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/public/common/use_cases_toast.tsx#:~:text=toMountPoint), [use_cases_toast.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/public/common/use_cases_toast.tsx#:~:text=toMountPoint), [use_cases_toast.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/public/common/use_cases_toast.tsx#:~:text=toMountPoint), [add_to_existing_case.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/public/components/visualizations/actions/add_to_existing_case.tsx#:~:text=toMountPoint), [add_to_existing_case.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/public/components/visualizations/actions/add_to_existing_case.tsx#:~:text=toMountPoint) | - | | | [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/common/ui/types.ts#:~:text=ResolvedSimpleSavedObject), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/common/ui/types.ts#:~:text=ResolvedSimpleSavedObject), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/common/ui/types.ts#:~:text=ResolvedSimpleSavedObject), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/common/ui/types.ts#:~:text=ResolvedSimpleSavedObject) | - | | | [cases.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/saved_object_types/cases/cases.ts#:~:text=migrations), [configure.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/saved_object_types/configure.ts#:~:text=migrations), [comments.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/saved_object_types/comments.ts#:~:text=migrations), [user_actions.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/saved_object_types/user_actions.ts#:~:text=migrations), [connector_mappings.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/saved_object_types/connector_mappings.ts#:~:text=migrations) | - | | | [cases.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/saved_object_types/cases/cases.ts#:~:text=convertToMultiNamespaceTypeVersion), [configure.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/saved_object_types/configure.ts#:~:text=convertToMultiNamespaceTypeVersion), [comments.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/saved_object_types/comments.ts#:~:text=convertToMultiNamespaceTypeVersion), [user_actions.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/saved_object_types/user_actions.ts#:~:text=convertToMultiNamespaceTypeVersion), [connector_mappings.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cases/server/saved_object_types/connector_mappings.ts#:~:text=convertToMultiNamespaceTypeVersion) | - | @@ -508,6 +506,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| | | [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_integrations/cloud_data_migration/public/application/index.tsx#:~:text=KibanaThemeProvider), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_integrations/cloud_data_migration/public/application/index.tsx#:~:text=KibanaThemeProvider), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_integrations/cloud_data_migration/public/application/index.tsx#:~:text=KibanaThemeProvider) | - | +| | [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_integrations/cloud_data_migration/public/application/index.tsx#:~:text=theme%24) | - | @@ -546,6 +545,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | ---------------|-----------|-----------| | | [shared_imports.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cross_cluster_replication/public/shared_imports.ts#:~:text=KibanaThemeProvider), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cross_cluster_replication/public/app/index.tsx#:~:text=KibanaThemeProvider), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cross_cluster_replication/public/app/index.tsx#:~:text=KibanaThemeProvider), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cross_cluster_replication/public/app/index.tsx#:~:text=KibanaThemeProvider) | - | | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cross_cluster_replication/public/plugin.ts#:~:text=license%24) | 8.8.0 | +| | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cross_cluster_replication/public/plugin.ts#:~:text=theme%24) | - | @@ -963,8 +963,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [configure_image.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/image_embeddable/public/image_editor/configure_image.tsx#:~:text=toMountPoint), [configure_image.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/image_embeddable/public/image_editor/configure_image.tsx#:~:text=toMountPoint) | - | -| | [image_embeddable_factory.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/image_embeddable/public/image_embeddable/image_embeddable_factory.tsx#:~:text=executeTriggerActions) | - | +| | [image_embeddable.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/image_embeddable/public/components/image_embeddable.tsx#:~:text=executeTriggerActions) | - | @@ -974,6 +973,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | ---------------|-----------|-----------| | | [shared_imports.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/index_lifecycle_management/public/shared_imports.ts#:~:text=KibanaThemeProvider), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/index_lifecycle_management/public/application/index.tsx#:~:text=KibanaThemeProvider), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/index_lifecycle_management/public/application/index.tsx#:~:text=KibanaThemeProvider), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/index_lifecycle_management/public/application/index.tsx#:~:text=KibanaThemeProvider) | - | | | [license.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/index_lifecycle_management/server/services/license.ts#:~:text=license%24) | 8.8.0 | +| | [plugin.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/index_lifecycle_management/public/plugin.tsx#:~:text=theme%24) | - | @@ -983,6 +983,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | ---------------|-----------|-----------| | | [use_datastreams_rollover.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_datastreams_rollover/use_datastreams_rollover.tsx#:~:text=toMountPoint), [use_datastreams_rollover.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_datastreams_rollover/use_datastreams_rollover.tsx#:~:text=toMountPoint) | - | | | [shared_imports.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/index_management/public/shared_imports.ts#:~:text=KibanaThemeProvider), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/index_management/public/application/index.tsx#:~:text=KibanaThemeProvider), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/index_management/public/application/index.tsx#:~:text=KibanaThemeProvider), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/index_management/public/application/index.tsx#:~:text=KibanaThemeProvider) | - | +| | [mount_management_section.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/index_management/public/application/mount_management_section.ts#:~:text=theme%24) | - | @@ -1000,6 +1001,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| | | [shared_imports.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ingest_pipelines/public/shared_imports.ts#:~:text=KibanaThemeProvider), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ingest_pipelines/public/application/index.tsx#:~:text=KibanaThemeProvider), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ingest_pipelines/public/application/index.tsx#:~:text=KibanaThemeProvider), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ingest_pipelines/public/application/index.tsx#:~:text=KibanaThemeProvider) | - | +| | [mount_management_section.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/ingest_pipelines/public/application/mount_management_section.ts#:~:text=theme%24) | - | @@ -1069,6 +1071,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | ---------------|-----------|-----------| | | [shared_imports.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/license_management/public/shared_imports.ts#:~:text=KibanaThemeProvider), [app_providers.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/license_management/public/application/app_providers.tsx#:~:text=KibanaThemeProvider), [app_providers.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/license_management/public/application/app_providers.tsx#:~:text=KibanaThemeProvider), [app_providers.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/license_management/public/application/app_providers.tsx#:~:text=KibanaThemeProvider) | - | | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/license_management/public/plugin.ts#:~:text=license%24) | 8.8.0 | +| | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/license_management/public/plugin.ts#:~:text=theme%24) | - | @@ -1119,6 +1122,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | ---------------|-----------|-----------| | | [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/logstash/public/application/index.tsx#:~:text=KibanaThemeProvider), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/logstash/public/application/index.tsx#:~:text=KibanaThemeProvider), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/logstash/public/application/index.tsx#:~:text=KibanaThemeProvider) | - | | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/logstash/public/plugin.ts#:~:text=license%24) | 8.8.0 | +| | [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/logstash/public/application/index.tsx#:~:text=theme%24) | - | | | [save.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/logstash/server/routes/pipeline/save.ts#:~:text=authc) | - | @@ -1127,7 +1131,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| -| | [management_app.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/management/public/components/management_app/management_app.tsx#:~:text=KibanaThemeProvider), [management_app.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/management/public/components/management_app/management_app.tsx#:~:text=KibanaThemeProvider), [management_app.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/management/public/components/management_app/management_app.tsx#:~:text=KibanaThemeProvider) | - | | | [application.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/management/public/application.tsx#:~:text=appBasePath) | 8.8.0 | @@ -1261,6 +1264,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | ---------------|-----------|-----------| | | [shared_imports.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/remote_clusters/public/shared_imports.ts#:~:text=KibanaThemeProvider) | - | | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/remote_clusters/server/plugin.ts#:~:text=license%24) | 8.8.0 | +| | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/remote_clusters/public/plugin.ts#:~:text=theme%24) | - | @@ -1269,6 +1273,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| | | [job_failure.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/public/notifier/job_failure.tsx#:~:text=toMountPoint), [job_failure.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/public/notifier/job_failure.tsx#:~:text=toMountPoint), [job_failure.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/public/notifier/job_failure.tsx#:~:text=toMountPoint), [general_error.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/public/notifier/general_error.tsx#:~:text=toMountPoint), [general_error.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/public/notifier/general_error.tsx#:~:text=toMountPoint), [job_success.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/public/notifier/job_success.tsx#:~:text=toMountPoint), [job_success.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/public/notifier/job_success.tsx#:~:text=toMountPoint), [job_success.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/public/notifier/job_success.tsx#:~:text=toMountPoint), [job_warning_formulas.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/public/notifier/job_warning_formulas.tsx#:~:text=toMountPoint), [job_warning_formulas.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/public/notifier/job_warning_formulas.tsx#:~:text=toMountPoint)+ 7 more | - | +| | [mount_management_section.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/public/management/mount_management_section.tsx#:~:text=theme%24) | - | | | [core.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/server/core.ts#:~:text=CsvSearchSourceImmediateExportType), [core.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/server/core.ts#:~:text=CsvSearchSourceImmediateExportType) | - | | | [csv_searchsource_immediate.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/server/routes/internal/generate/csv_searchsource_immediate.ts#:~:text=JobParamsDownloadCSV), [csv_searchsource_immediate.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/server/routes/internal/generate/csv_searchsource_immediate.ts#:~:text=JobParamsDownloadCSV) | - | | | [csv_searchsource_immediate.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/server/routes/internal/generate/csv_searchsource_immediate.ts#:~:text=CSV_SEARCHSOURCE_IMMEDIATE_TYPE), [csv_searchsource_immediate.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/server/routes/internal/generate/csv_searchsource_immediate.ts#:~:text=CSV_SEARCHSOURCE_IMMEDIATE_TYPE), [csv_searchsource_immediate.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/reporting/server/routes/internal/generate/csv_searchsource_immediate.ts#:~:text=CSV_SEARCHSOURCE_IMMEDIATE_TYPE) | - | @@ -1284,6 +1289,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | ---------------|-----------|-----------| | | [shared_imports.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/rollup/public/shared_imports.ts#:~:text=KibanaThemeProvider), [application.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/rollup/public/application.tsx#:~:text=KibanaThemeProvider), [application.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/rollup/public/application.tsx#:~:text=KibanaThemeProvider), [application.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/rollup/public/application.tsx#:~:text=KibanaThemeProvider) | - | | | [license.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/rollup/server/services/license.ts#:~:text=license%24) | 8.8.0 | +| | [application.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/rollup/public/application.tsx#:~:text=theme%24) | - | @@ -1344,6 +1350,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | ---------------|-----------|-----------| | | [open_modal.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/public/components/edition_modal/open_modal.tsx#:~:text=toMountPoint), [open_modal.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/public/components/edition_modal/open_modal.tsx#:~:text=toMountPoint), [open_modal.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/public/components/edition_modal/open_modal.tsx#:~:text=toMountPoint), [open_assign_flyout.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/public/components/assign_flyout/open_assign_flyout.tsx#:~:text=toMountPoint), [open_assign_flyout.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/public/components/assign_flyout/open_assign_flyout.tsx#:~:text=toMountPoint) | - | | | [mount_section.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/public/management/mount_section.tsx#:~:text=KibanaThemeProvider), [mount_section.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/public/management/mount_section.tsx#:~:text=KibanaThemeProvider), [mount_section.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/public/management/mount_section.tsx#:~:text=KibanaThemeProvider) | - | +| | [mount_section.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/public/management/mount_section.tsx#:~:text=theme%24) | - | | | [request_handler_context.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/server/request_handler_context.ts#:~:text=authz) | - | | | [get_table_column_definition.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/public/ui_api/get_table_column_definition.tsx#:~:text=SavedObject), [get_table_column_definition.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/public/ui_api/get_table_column_definition.tsx#:~:text=SavedObject), [get_table_column_definition.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/public/ui_api/get_table_column_definition.tsx#:~:text=SavedObject), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/common/types.ts#:~:text=SavedObject), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/common/types.ts#:~:text=SavedObject), [utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/public/utils.ts#:~:text=SavedObject), [utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/public/utils.ts#:~:text=SavedObject), [utils.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/public/utils.test.ts#:~:text=SavedObject), [utils.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/public/utils.test.ts#:~:text=SavedObject), [utils.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/public/utils.test.ts#:~:text=SavedObject)+ 3 more | - | | | [get_table_column_definition.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/public/ui_api/get_table_column_definition.tsx#:~:text=SavedObjectReference), [get_table_column_definition.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/public/ui_api/get_table_column_definition.tsx#:~:text=SavedObjectReference), [references.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/common/references.ts#:~:text=SavedObjectReference), [references.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/common/references.ts#:~:text=SavedObjectReference), [references.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/common/references.ts#:~:text=SavedObjectReference), [references.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/common/references.ts#:~:text=SavedObjectReference), [references.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/common/references.ts#:~:text=SavedObjectReference), [references.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/common/references.ts#:~:text=SavedObjectReference), [references.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/common/references.ts#:~:text=SavedObjectReference), [utils.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/saved_objects_tagging/public/utils.ts#:~:text=SavedObjectReference)+ 12 more | - | @@ -1411,6 +1418,7 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | | [plugin.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/public/plugin.tsx#:~:text=license%24) | 8.8.0 | | | [license_service.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/common/licensing/license_service.test.ts#:~:text=mode), [license_service.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/common/licensing/license_service.test.ts#:~:text=mode), [license_service.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/common/licensing/license_service.test.ts#:~:text=mode) | 8.8.0 | | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/server/plugin.ts#:~:text=license%24) | 8.8.0 | +| | [api_keys_management_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/public/management/api_keys/api_keys_management_app.tsx#:~:text=theme%24), [users_management_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/public/management/users/users_management_app.tsx#:~:text=theme%24), [roles_management_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/public/management/roles/roles_management_app.tsx#:~:text=theme%24), [role_mappings_management_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/public/management/role_mappings/role_mappings_management_app.tsx#:~:text=theme%24) | - | | | [logout_app.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security/public/authentication/logout/logout_app.test.ts#:~:text=appBasePath) | 8.8.0 | @@ -1432,7 +1440,7 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | | [app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/app/app.tsx#:~:text=KibanaThemeProvider), [app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/app/app.tsx#:~:text=KibanaThemeProvider), [app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/public/app/app.tsx#:~:text=KibanaThemeProvider) | - | | | [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode)+ 7 more | 8.8.0 | | | [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode)+ 7 more | 8.8.0 | -| | [create_threat_signals.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/indicator_match/threat_mapping/create_threat_signals.ts#:~:text=license%24), [query.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/query/query.ts#:~:text=license%24), [threshold.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/threshold/threshold.ts#:~:text=license%24) | 8.8.0 | +| | [create_threat_signals.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/indicator_match/threat_mapping/create_threat_signals.ts#:~:text=license%24), [query.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/query/query.ts#:~:text=license%24), [threshold.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/threshold/threshold.ts#:~:text=license%24), [get_is_alert_suppression_active.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/get_is_alert_suppression_active.ts#:~:text=license%24) | 8.8.0 | | | [request_context_factory.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/request_context_factory.ts#:~:text=authc), [route.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_preview/api/preview_rules/route.ts#:~:text=authc), [create_signals_migration_route.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/create_signals_migration_route.ts#:~:text=authc), [delete_signals_migration_route.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/delete_signals_migration_route.ts#:~:text=authc), [finalize_signals_migration_route.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/routes/signals/finalize_signals_migration_route.ts#:~:text=authc), [common.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/timeline/utils/common.ts#:~:text=authc) | - | | | [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) | - | @@ -1494,6 +1502,7 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | ---------------|-----------|-----------| | | [shared_imports.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/snapshot_restore/public/shared_imports.ts#:~:text=KibanaThemeProvider), [app_providers.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/snapshot_restore/public/application/app_providers.tsx#:~:text=KibanaThemeProvider), [app_providers.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/snapshot_restore/public/application/app_providers.tsx#:~:text=KibanaThemeProvider), [app_providers.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/snapshot_restore/public/application/app_providers.tsx#:~:text=KibanaThemeProvider) | - | | | [license.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/snapshot_restore/server/services/license.ts#:~:text=license%24) | 8.8.0 | +| | [mount_management_section.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/snapshot_restore/public/application/mount_management_section.ts#:~:text=theme%24) | - | @@ -1504,6 +1513,7 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | | [on_post_auth_interceptor.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/spaces/server/lib/request_interceptors/on_post_auth_interceptor.ts#:~:text=getKibanaFeatures), [spaces_usage_collector.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/spaces/server/usage_collection/spaces_usage_collector.ts#:~:text=getKibanaFeatures), [on_post_auth_interceptor.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/spaces/server/lib/request_interceptors/on_post_auth_interceptor.test.ts#:~:text=getKibanaFeatures) | 8.8.0 | | | [spaces_management_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/spaces/public/management/spaces_management_app.tsx#:~:text=KibanaThemeProvider), [spaces_management_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/spaces/public/management/spaces_management_app.tsx#:~:text=KibanaThemeProvider), [spaces_management_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/spaces/public/management/spaces_management_app.tsx#:~:text=KibanaThemeProvider), [nav_control.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/spaces/public/nav_control/nav_control.tsx#:~:text=KibanaThemeProvider), [nav_control.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/spaces/public/nav_control/nav_control.tsx#:~:text=KibanaThemeProvider), [nav_control.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/spaces/public/nav_control/nav_control.tsx#:~:text=KibanaThemeProvider), [space_selector.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/spaces/public/space_selector/space_selector.tsx#:~:text=KibanaThemeProvider), [space_selector.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/spaces/public/space_selector/space_selector.tsx#:~:text=KibanaThemeProvider), [space_selector.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/spaces/public/space_selector/space_selector.tsx#:~:text=KibanaThemeProvider) | - | | | [spaces_usage_collector.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/spaces/server/usage_collection/spaces_usage_collector.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/spaces/server/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/spaces/server/plugin.ts#:~:text=license%24), [spaces_usage_collector.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/spaces/server/usage_collection/spaces_usage_collector.test.ts#:~:text=license%24) | 8.8.0 | +| | [spaces_management_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/spaces/public/management/spaces_management_app.tsx#:~:text=theme%24) | - | | | [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/spaces/public/legacy_urls/types.ts#:~:text=ResolvedSimpleSavedObject), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/spaces/public/legacy_urls/types.ts#:~:text=ResolvedSimpleSavedObject) | - | | | [copy_to_space_flyout_internal.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/spaces/public/copy_saved_objects_to_space/components/copy_to_space_flyout_internal.tsx#:~:text=createNewCopy) | - | | | [saved_objects_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/spaces/server/saved_objects/saved_objects_service.ts#:~:text=migrations), [saved_objects_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/spaces/server/saved_objects/saved_objects_service.ts#:~:text=migrations) | - | @@ -1576,8 +1586,7 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| | | [bulk_get_maintenance_windows.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/apis/bulk_get_maintenance_windows.ts#:~:text=MaintenanceWindow), [bulk_get_maintenance_windows.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/apis/bulk_get_maintenance_windows.ts#:~:text=MaintenanceWindow), [bulk_get_maintenance_windows.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/apis/bulk_get_maintenance_windows.ts#:~:text=MaintenanceWindow), [bulk_get_maintenance_windows.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/apis/bulk_get_maintenance_windows.ts#:~:text=MaintenanceWindow), [bulk_get_maintenance_windows.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/apis/bulk_get_maintenance_windows.ts#:~:text=MaintenanceWindow), [use_bulk_get_maintenance_windows.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_get_maintenance_windows.tsx#:~:text=MaintenanceWindow), [use_bulk_get_maintenance_windows.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/hooks/use_bulk_get_maintenance_windows.tsx#:~:text=MaintenanceWindow), [tooltip_content.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/maintenance_windows/tooltip_content.tsx#:~:text=MaintenanceWindow), [tooltip_content.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/maintenance_windows/tooltip_content.tsx#:~:text=MaintenanceWindow), [cell.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/sections/alerts_table/maintenance_windows/cell.tsx#:~:text=MaintenanceWindow)+ 11 more | - | -| | [use_bulk_edit_response.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_bulk_edit_response.tsx#:~:text=toMountPoint), [use_bulk_edit_response.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_bulk_edit_response.tsx#:~:text=toMountPoint), [use_bulk_edit_response.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_bulk_edit_response.tsx#:~:text=toMountPoint), [use_bulk_operation_toast.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_bulk_operation_toast.tsx#:~:text=toMountPoint), [use_bulk_operation_toast.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_bulk_operation_toast.tsx#:~:text=toMountPoint), [use_bulk_operation_toast.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/hooks/use_bulk_operation_toast.tsx#:~:text=toMountPoint), [rule_add.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_add.tsx#:~:text=toMountPoint), [rule_add.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_add.tsx#:~:text=toMountPoint), [rule_edit.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_edit.tsx#:~:text=toMountPoint), [rule_edit.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_edit.tsx#:~:text=toMountPoint)+ 6 more | - | -| | [app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/app.tsx#:~:text=KibanaThemeProvider), [app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/app.tsx#:~:text=KibanaThemeProvider), [app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/app.tsx#:~:text=KibanaThemeProvider), [connectors_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/connectors_app.tsx#:~:text=KibanaThemeProvider), [connectors_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/connectors_app.tsx#:~:text=KibanaThemeProvider), [connectors_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/connectors_app.tsx#:~:text=KibanaThemeProvider), [alerts_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/alerts_app.tsx#:~:text=KibanaThemeProvider), [alerts_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/alerts_app.tsx#:~:text=KibanaThemeProvider), [alerts_app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/alerts_app.tsx#:~:text=KibanaThemeProvider), [test_utils.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/sections/test_utils.tsx#:~:text=KibanaThemeProvider)+ 2 more | - | +| | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/plugin.ts#:~:text=theme%24) | - | | | [rule_reducer.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_reducer.ts#:~:text=SavedObjectAttribute), [rule_reducer.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_reducer.ts#:~:text=SavedObjectAttribute), [rule_reducer.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_reducer.ts#:~:text=SavedObjectAttribute), [rule_reducer.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_reducer.ts#:~:text=SavedObjectAttribute) | - | @@ -1616,6 +1625,7 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | ---------------|-----------|-----------| | | [shared_imports.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/public/shared_imports.ts#:~:text=KibanaThemeProvider), [app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/public/application/app.tsx#:~:text=KibanaThemeProvider), [app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/public/application/app.tsx#:~:text=KibanaThemeProvider), [app.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/public/application/app.tsx#:~:text=KibanaThemeProvider) | - | | | [reindex_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.ts#:~:text=license%24), [reindex_service.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts#:~:text=license%24), [reindex_service.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts#:~:text=license%24) | 8.8.0 | +| | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/public/plugin.ts#:~:text=theme%24) | - | | | [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/common/types.ts#:~:text=SavedObject), [types.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/common/types.ts#:~:text=SavedObject) | - | @@ -1737,4 +1747,5 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| | | [shared_imports.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/watcher/public/application/shared_imports.ts#:~:text=KibanaThemeProvider), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/watcher/public/application/index.tsx#:~:text=KibanaThemeProvider), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/watcher/public/application/index.tsx#:~:text=KibanaThemeProvider), [index.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/watcher/public/application/index.tsx#:~:text=KibanaThemeProvider) | - | -| | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/watcher/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/watcher/public/plugin.ts#:~:text=license%24) | 8.8.0 | \ No newline at end of file +| | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/watcher/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/watcher/public/plugin.ts#:~:text=license%24) | 8.8.0 | +| | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/watcher/public/plugin.ts#:~:text=theme%24) | - | \ No newline at end of file diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index b1d0f3373a8ad..d20d36c399065 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -69,9 +69,9 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Plugin | Deprecated API | Reference location(s) | Remove By | | --------|-------|-----------|-----------| -| management | | [application.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/management/public/application.tsx#:~:text=appBasePath) | 8.8.0 | | licenseManagement | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/license_management/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cross_cluster_replication/public/plugin.ts#:~:text=license%24), [plugin.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/painless_lab/public/plugin.tsx#:~:text=license%24), [plugin.tsx](https://github.com/elastic/kibana/tree/main/x-pack/plugins/painless_lab/public/plugin.tsx#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/searchprofiler/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/searchprofiler/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/watcher/public/plugin.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/watcher/public/plugin.ts#:~:text=license%24) | 8.8.0 | | indexLifecycleManagement | | [license.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/index_lifecycle_management/server/services/license.ts#:~:text=license%24), [license.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/painless_lab/server/services/license.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/remote_clusters/server/plugin.ts#:~:text=license%24), [license.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/rollup/server/services/license.ts#:~:text=license%24), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/searchprofiler/server/plugin.ts#:~:text=license%24), [license.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/snapshot_restore/server/services/license.ts#:~:text=license%24), [reindex_service.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.ts#:~:text=license%24), [reindex_service.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts#:~:text=license%24), [reindex_service.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/upgrade_assistant/server/lib/reindexing/reindex_service.test.ts#:~:text=license%24) | 8.8.0 | +| management | | [application.tsx](https://github.com/elastic/kibana/tree/main/src/plugins/management/public/application.tsx#:~:text=appBasePath) | 8.8.0 | @@ -173,4 +173,4 @@ migrates to using the Kibana Privilege model: https://github.com/elastic/kibana/ | --------|-------|-----------|-----------| | securitySolution | | [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode)+ 7 more | 8.8.0 | | securitySolution | | [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [policy_config.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/common/license/policy_config.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [fleet_integration.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/fleet_integration.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [create_default_policy.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/fleet_integration/handlers/create_default_policy.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode), [license_watch.test.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/endpoint/lib/policy/license_watch.test.ts#:~:text=mode)+ 7 more | 8.8.0 | -| securitySolution | | [create_threat_signals.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/indicator_match/threat_mapping/create_threat_signals.ts#:~:text=license%24), [query.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/query/query.ts#:~:text=license%24), [threshold.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/threshold/threshold.ts#:~:text=license%24) | 8.8.0 | \ No newline at end of file +| securitySolution | | [create_threat_signals.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/indicator_match/threat_mapping/create_threat_signals.ts#:~:text=license%24), [query.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/query/query.ts#:~:text=license%24), [threshold.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/threshold/threshold.ts#:~:text=license%24), [get_is_alert_suppression_active.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/get_is_alert_suppression_active.ts#:~:text=license%24) | 8.8.0 | \ No newline at end of file diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index 4dc8159298e43..4675a9d3e4594 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-04-08 +date: 2024-04-11 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 c96b5d54b3393..7437c9e72a728 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-04-08 +date: 2024-04-11 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 f845951d5045a..e618e0fe71d41 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverEnhanced'] --- import discoverEnhancedObj from './discover_enhanced.devdocs.json'; diff --git a/api_docs/ecs_data_quality_dashboard.mdx b/api_docs/ecs_data_quality_dashboard.mdx index 582801605f776..307e5dd88f68c 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ecsDataQualityDashboard'] --- import ecsDataQualityDashboardObj from './ecs_data_quality_dashboard.devdocs.json'; diff --git a/api_docs/elastic_assistant.devdocs.json b/api_docs/elastic_assistant.devdocs.json index 0a3515831ff8b..d018e3e4df09c 100644 --- a/api_docs/elastic_assistant.devdocs.json +++ b/api_docs/elastic_assistant.devdocs.json @@ -1552,7 +1552,7 @@ "section": "def-common.KibanaRequest", "text": "KibanaRequest" }, - "" + "" ], "path": "x-pack/plugins/elastic_assistant/server/types.ts", "deprecated": false, diff --git a/api_docs/elastic_assistant.mdx b/api_docs/elastic_assistant.mdx index f7c972da6e024..8602d2860b0dc 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-04-08 +date: 2024-04-11 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 0f441dcc254f0..3326b08586026 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddable'] --- import embeddableObj from './embeddable.devdocs.json'; diff --git a/api_docs/embeddable_enhanced.devdocs.json b/api_docs/embeddable_enhanced.devdocs.json index 9900ae72dfb5d..0447485d315cf 100644 --- a/api_docs/embeddable_enhanced.devdocs.json +++ b/api_docs/embeddable_enhanced.devdocs.json @@ -11,14 +11,39 @@ "label": "apiHasDynamicActions", "description": [], "signature": [ - "(api: unknown) => api is ", + "(api: unknown) => api is Required void; dynamicActionsState$: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishingSubject", + "text": "PublishingSubject" + }, + "<{ dynamicActions: ", + { + "pluginId": "uiActionsEnhanced", + "scope": "common", + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-common.DynamicActionsState", + "text": "DynamicActionsState" + }, + "; } | undefined>; }>>" ], "path": "x-pack/plugins/embeddable_enhanced/public/embeddables/interfaces/has_dynamic_actions.ts", "deprecated": false, @@ -90,42 +115,7 @@ "section": "def-public.EmbeddableOutput", "text": "EmbeddableOutput" }, - ", any> & ", - { - "pluginId": "embeddableEnhanced", - "scope": "public", - "docId": "kibEmbeddableEnhancedPluginApi", - "section": "def-public.HasDynamicActions", - "text": "HasDynamicActions" - } - ], - "path": "x-pack/plugins/embeddable_enhanced/public/types.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "embeddableEnhanced", - "id": "def-public.HasDynamicActions", - "type": "Interface", - "tags": [], - "label": "HasDynamicActions", - "description": [], - "path": "x-pack/plugins/embeddable_enhanced/public/embeddables/interfaces/has_dynamic_actions.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "embeddableEnhanced", - "id": "def-public.HasDynamicActions.enhancements", - "type": "Object", - "tags": [], - "label": "enhancements", - "description": [], - "signature": [ - "{ dynamicActions: ", + ", any> & Partial<{ enhancements: { dynamicActions: ", { "pluginId": "uiActionsEnhanced", "scope": "public", @@ -133,175 +123,7 @@ "section": "def-public.DynamicActionManager", "text": "DynamicActionManager" }, - "; }" - ], - "path": "x-pack/plugins/embeddable_enhanced/public/embeddables/interfaces/has_dynamic_actions.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "embeddableEnhanced", - "id": "def-public.HasDynamicActions.setDynamicActions", - "type": "Function", - "tags": [], - "label": "setDynamicActions", - "description": [], - "signature": [ - "(newState: { dynamicActions: ", - { - "pluginId": "uiActionsEnhanced", - "scope": "common", - "docId": "kibUiActionsEnhancedPluginApi", - "section": "def-common.DynamicActionsState", - "text": "DynamicActionsState" - }, - "; } | undefined) => void" - ], - "path": "x-pack/plugins/embeddable_enhanced/public/embeddables/interfaces/has_dynamic_actions.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "embeddableEnhanced", - "id": "def-public.HasDynamicActions.setDynamicActions.$1", - "type": "Object", - "tags": [], - "label": "newState", - "description": [], - "signature": [ - "{ dynamicActions: ", - { - "pluginId": "uiActionsEnhanced", - "scope": "common", - "docId": "kibUiActionsEnhancedPluginApi", - "section": "def-common.DynamicActionsState", - "text": "DynamicActionsState" - }, - "; } | undefined" - ], - "path": "x-pack/plugins/embeddable_enhanced/public/embeddables/interfaces/has_dynamic_actions.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": false - } - ], - "returnComment": [] - }, - { - "parentPluginId": "embeddableEnhanced", - "id": "def-public.HasDynamicActions.dynamicActionsState$", - "type": "Object", - "tags": [], - "label": "dynamicActionsState$", - "description": [], - "signature": [ - "{ source: ", - "Observable", - " | undefined; readonly value: { dynamicActions: ", - { - "pluginId": "uiActionsEnhanced", - "scope": "common", - "docId": "kibUiActionsEnhancedPluginApi", - "section": "def-common.DynamicActionsState", - "text": "DynamicActionsState" - }, - "; } | undefined; error: (err: any) => void; forEach: { (next: (value: { dynamicActions: ", - { - "pluginId": "uiActionsEnhanced", - "scope": "common", - "docId": "kibUiActionsEnhancedPluginApi", - "section": "def-common.DynamicActionsState", - "text": "DynamicActionsState" - }, - "; } | undefined) => void): Promise; (next: (value: { dynamicActions: ", - { - "pluginId": "uiActionsEnhanced", - "scope": "common", - "docId": "kibUiActionsEnhancedPluginApi", - "section": "def-common.DynamicActionsState", - "text": "DynamicActionsState" - }, - "; } | undefined) => void, promiseCtor: PromiseConstructorLike): Promise; }; getValue: () => { dynamicActions: ", - { - "pluginId": "uiActionsEnhanced", - "scope": "common", - "docId": "kibUiActionsEnhancedPluginApi", - "section": "def-common.DynamicActionsState", - "text": "DynamicActionsState" - }, - "; } | undefined; pipe: { (): ", - "Observable", - "<{ dynamicActions: ", - { - "pluginId": "uiActionsEnhanced", - "scope": "common", - "docId": "kibUiActionsEnhancedPluginApi", - "section": "def-common.DynamicActionsState", - "text": "DynamicActionsState" - }, - "; } | undefined>; (op1: ", - "OperatorFunction", - "<{ dynamicActions: ", - { - "pluginId": "uiActionsEnhanced", - "scope": "common", - "docId": "kibUiActionsEnhancedPluginApi", - "section": "def-common.DynamicActionsState", - "text": "DynamicActionsState" - }, - "; } | undefined, A>): ", - "Observable", - "; (op1: ", - "OperatorFunction", - "<{ dynamicActions: ", - { - "pluginId": "uiActionsEnhanced", - "scope": "common", - "docId": "kibUiActionsEnhancedPluginApi", - "section": "def-common.DynamicActionsState", - "text": "DynamicActionsState" - }, - "; } | undefined, A>, op2: ", - "OperatorFunction", - "): ", - "Observable", - "; (op1: ", - "OperatorFunction", - "<{ dynamicActions: ", - { - "pluginId": "uiActionsEnhanced", - "scope": "common", - "docId": "kibUiActionsEnhancedPluginApi", - "section": "def-common.DynamicActionsState", - "text": "DynamicActionsState" - }, - "; } | undefined, A>, op2: ", - "OperatorFunction", - ", op3: ", - "OperatorFunction", - "): ", - "Observable", - "; (op1: ", - "OperatorFunction", - "<{ dynamicActions: ", - { - "pluginId": "uiActionsEnhanced", - "scope": "common", - "docId": "kibUiActionsEnhancedPluginApi", - "section": "def-common.DynamicActionsState", - "text": "DynamicActionsState" - }, - "; } | undefined, A>, op2: ", - "OperatorFunction", - ", op3: ", - "OperatorFunction", - ", op4: ", - "OperatorFunction", - "): ", - "Observable", - "; (op1: ", - "OperatorFunction", - "<{ dynamicActions: ", + "; }; setDynamicActions: (newState: { dynamicActions: ", { "pluginId": "uiActionsEnhanced", "scope": "common", @@ -309,40 +131,14 @@ "section": "def-common.DynamicActionsState", "text": "DynamicActionsState" }, - "; } | undefined, A>, op2: ", - "OperatorFunction", - ", op3: ", - "OperatorFunction", - ", op4: ", - "OperatorFunction", - ", op5: ", - "OperatorFunction", - "): ", - "Observable", - "; (op1: ", - "OperatorFunction", - "<{ dynamicActions: ", + "; } | undefined) => void; dynamicActionsState$: ", { - "pluginId": "uiActionsEnhanced", + "pluginId": "@kbn/presentation-publishing", "scope": "common", - "docId": "kibUiActionsEnhancedPluginApi", - "section": "def-common.DynamicActionsState", - "text": "DynamicActionsState" + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishingSubject", + "text": "PublishingSubject" }, - "; } | undefined, A>, op2: ", - "OperatorFunction", - ", op3: ", - "OperatorFunction", - ", op4: ", - "OperatorFunction", - ", op5: ", - "OperatorFunction", - ", op6: ", - "OperatorFunction", - "): ", - "Observable", - "; (op1: ", - "OperatorFunction", "<{ dynamicActions: ", { "pluginId": "uiActionsEnhanced", @@ -351,203 +147,9 @@ "section": "def-common.DynamicActionsState", "text": "DynamicActionsState" }, - "; } | undefined, A>, op2: ", - "OperatorFunction", - ", op3: ", - "OperatorFunction", - ", op4: ", - "OperatorFunction", - ", op5: ", - "OperatorFunction", - ", op6: ", - "OperatorFunction", - ", op7: ", - "OperatorFunction", - "): ", - "Observable", - "; (op1: ", - "OperatorFunction", - "<{ dynamicActions: ", - { - "pluginId": "uiActionsEnhanced", - "scope": "common", - "docId": "kibUiActionsEnhancedPluginApi", - "section": "def-common.DynamicActionsState", - "text": "DynamicActionsState" - }, - "; } | undefined, A>, op2: ", - "OperatorFunction", - ", op3: ", - "OperatorFunction", - ", op4: ", - "OperatorFunction", - ", op5: ", - "OperatorFunction", - ", op6: ", - "OperatorFunction", - ", op7: ", - "OperatorFunction", - ", op8: ", - "OperatorFunction", - "): ", - "Observable", - "; (op1: ", - "OperatorFunction", - "<{ dynamicActions: ", - { - "pluginId": "uiActionsEnhanced", - "scope": "common", - "docId": "kibUiActionsEnhancedPluginApi", - "section": "def-common.DynamicActionsState", - "text": "DynamicActionsState" - }, - "; } | undefined, A>, op2: ", - "OperatorFunction", - ", op3: ", - "OperatorFunction", - ", op4: ", - "OperatorFunction", - ", op5: ", - "OperatorFunction", - ", op6: ", - "OperatorFunction", - ", op7: ", - "OperatorFunction", - ", op8: ", - "OperatorFunction", - ", op9: ", - "OperatorFunction", - "): ", - "Observable", - "; (op1: ", - "OperatorFunction", - "<{ dynamicActions: ", - { - "pluginId": "uiActionsEnhanced", - "scope": "common", - "docId": "kibUiActionsEnhancedPluginApi", - "section": "def-common.DynamicActionsState", - "text": "DynamicActionsState" - }, - "; } | undefined, A>, op2: ", - "OperatorFunction", - ", op3: ", - "OperatorFunction", - ", op4: ", - "OperatorFunction", - ", op5: ", - "OperatorFunction", - ", op6: ", - "OperatorFunction", - ", op7: ", - "OperatorFunction", - ", op8: ", - "OperatorFunction", - ", op9: ", - "OperatorFunction", - ", ...operations: ", - "OperatorFunction", - "[]): ", - "Observable", - "; }; complete: () => void; closed: boolean; observers: ", - "Observer", - "<{ dynamicActions: ", - { - "pluginId": "uiActionsEnhanced", - "scope": "common", - "docId": "kibUiActionsEnhancedPluginApi", - "section": "def-common.DynamicActionsState", - "text": "DynamicActionsState" - }, - "; } | undefined>[]; isStopped: boolean; hasError: boolean; thrownError: any; lift: (operator: ", - "Operator", - "<{ dynamicActions: ", - { - "pluginId": "uiActionsEnhanced", - "scope": "common", - "docId": "kibUiActionsEnhancedPluginApi", - "section": "def-common.DynamicActionsState", - "text": "DynamicActionsState" - }, - "; } | undefined, R>) => ", - "Observable", - "; unsubscribe: () => void; readonly observed: boolean; asObservable: () => ", - "Observable", - "<{ dynamicActions: ", - { - "pluginId": "uiActionsEnhanced", - "scope": "common", - "docId": "kibUiActionsEnhancedPluginApi", - "section": "def-common.DynamicActionsState", - "text": "DynamicActionsState" - }, - "; } | undefined>; operator: ", - "Operator", - " | undefined; subscribe: { (observerOrNext?: Partial<", - "Observer", - "<{ dynamicActions: ", - { - "pluginId": "uiActionsEnhanced", - "scope": "common", - "docId": "kibUiActionsEnhancedPluginApi", - "section": "def-common.DynamicActionsState", - "text": "DynamicActionsState" - }, - "; } | undefined>> | ((value: { dynamicActions: ", - { - "pluginId": "uiActionsEnhanced", - "scope": "common", - "docId": "kibUiActionsEnhancedPluginApi", - "section": "def-common.DynamicActionsState", - "text": "DynamicActionsState" - }, - "; } | undefined) => void) | undefined): ", - "Subscription", - "; (next?: ((value: { dynamicActions: ", - { - "pluginId": "uiActionsEnhanced", - "scope": "common", - "docId": "kibUiActionsEnhancedPluginApi", - "section": "def-common.DynamicActionsState", - "text": "DynamicActionsState" - }, - "; } | undefined) => void) | null | undefined, error?: ((error: any) => void) | null | undefined, complete?: (() => void) | null | undefined): ", - "Subscription", - "; }; toPromise: { (): Promise<{ dynamicActions: ", - { - "pluginId": "uiActionsEnhanced", - "scope": "common", - "docId": "kibUiActionsEnhancedPluginApi", - "section": "def-common.DynamicActionsState", - "text": "DynamicActionsState" - }, - "; } | undefined>; (PromiseCtor: PromiseConstructor): Promise<{ dynamicActions: ", - { - "pluginId": "uiActionsEnhanced", - "scope": "common", - "docId": "kibUiActionsEnhancedPluginApi", - "section": "def-common.DynamicActionsState", - "text": "DynamicActionsState" - }, - "; } | undefined>; (PromiseCtor: PromiseConstructorLike): Promise<{ dynamicActions: ", - { - "pluginId": "uiActionsEnhanced", - "scope": "common", - "docId": "kibUiActionsEnhancedPluginApi", - "section": "def-common.DynamicActionsState", - "text": "DynamicActionsState" - }, - "; } | undefined>; }; }" + "; } | undefined>; }>" ], - "path": "x-pack/plugins/embeddable_enhanced/public/embeddables/interfaces/has_dynamic_actions.ts", + "path": "x-pack/plugins/embeddable_enhanced/public/types.ts", "deprecated": false, "trackAdoption": false } @@ -695,19 +297,91 @@ "label": "EnhancedEmbeddable", "description": [], "signature": [ - "E & ", + "E & Partial<{ enhancements: { dynamicActions: ", { - "pluginId": "embeddableEnhanced", + "pluginId": "uiActionsEnhanced", "scope": "public", - "docId": "kibEmbeddableEnhancedPluginApi", - "section": "def-public.HasDynamicActions", - "text": "HasDynamicActions" - } + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-public.DynamicActionManager", + "text": "DynamicActionManager" + }, + "; }; setDynamicActions: (newState: { dynamicActions: ", + { + "pluginId": "uiActionsEnhanced", + "scope": "common", + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-common.DynamicActionsState", + "text": "DynamicActionsState" + }, + "; } | undefined) => void; dynamicActionsState$: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishingSubject", + "text": "PublishingSubject" + }, + "<{ dynamicActions: ", + { + "pluginId": "uiActionsEnhanced", + "scope": "common", + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-common.DynamicActionsState", + "text": "DynamicActionsState" + }, + "; } | undefined>; }>" ], "path": "x-pack/plugins/embeddable_enhanced/public/types.ts", "deprecated": false, "trackAdoption": false, "initialIsOpen": false + }, + { + "parentPluginId": "embeddableEnhanced", + "id": "def-public.HasDynamicActions", + "type": "Type", + "tags": [], + "label": "HasDynamicActions", + "description": [], + "signature": [ + "{ enhancements?: { dynamicActions: ", + { + "pluginId": "uiActionsEnhanced", + "scope": "public", + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-public.DynamicActionManager", + "text": "DynamicActionManager" + }, + "; } | undefined; setDynamicActions?: ((newState: { dynamicActions: ", + { + "pluginId": "uiActionsEnhanced", + "scope": "common", + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-common.DynamicActionsState", + "text": "DynamicActionsState" + }, + "; } | undefined) => void) | undefined; dynamicActionsState$?: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.PublishingSubject", + "text": "PublishingSubject" + }, + "<{ dynamicActions: ", + { + "pluginId": "uiActionsEnhanced", + "scope": "common", + "docId": "kibUiActionsEnhancedPluginApi", + "section": "def-common.DynamicActionsState", + "text": "DynamicActionsState" + }, + "; } | undefined> | undefined; }" + ], + "path": "x-pack/plugins/embeddable_enhanced/public/embeddables/interfaces/has_dynamic_actions.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false } ], "objects": [], @@ -746,27 +420,8 @@ "signature": [ "(uuid: string, getTitle: () => string | undefined, state: ", "DynamicActionsSerializedState", - ") => { dynamicActionsApi: ", - { - "pluginId": "embeddableEnhanced", - "scope": "public", - "docId": "kibEmbeddableEnhancedPluginApi", - "section": "def-public.HasDynamicActions", - "text": "HasDynamicActions" - }, - "; dynamicActionsComparator: ", - { - "pluginId": "@kbn/presentation-publishing", - "scope": "common", - "docId": "kibKbnPresentationPublishingPluginApi", - "section": "def-common.StateComparators", - "text": "StateComparators" - }, - "<", - "DynamicActionsSerializedState", - ">; serializeDynamicActions: () => ", - "DynamicActionsSerializedState", - "; }" + ") => ", + "ReactEmbeddableDynamicActionsApi" ], "path": "x-pack/plugins/embeddable_enhanced/public/plugin.ts", "deprecated": false, diff --git a/api_docs/embeddable_enhanced.mdx b/api_docs/embeddable_enhanced.mdx index 2bb082b449d9b..223c090c90146 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddableEnhanced'] --- import embeddableEnhancedObj from './embeddable_enhanced.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kib | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 23 | 0 | 23 | 1 | +| 19 | 0 | 19 | 2 | ## Client diff --git a/api_docs/encrypted_saved_objects.mdx b/api_docs/encrypted_saved_objects.mdx index 7afb79d966374..baa3a8986dcab 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-04-08 +date: 2024-04-11 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 70dc479a81212..b3d909ab3d90c 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'enterpriseSearch'] --- import enterpriseSearchObj from './enterprise_search.devdocs.json'; diff --git a/api_docs/es_ui_shared.mdx b/api_docs/es_ui_shared.mdx index b16015a4f2df4..4350e79375632 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esUiShared'] --- import esUiSharedObj from './es_ui_shared.devdocs.json'; diff --git a/api_docs/event_annotation.mdx b/api_docs/event_annotation.mdx index 24d6ba0f43327..22eb275cb83d2 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-04-08 +date: 2024-04-11 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 161009dccc4bb..e94617b939d97 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-04-08 +date: 2024-04-11 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 9053b8238068a..9be2075afb1aa 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-04-08 +date: 2024-04-11 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 007cb28ee5c20..363660a3edf91 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-04-08 +date: 2024-04-11 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 4afe9d7fb394a..8fa516bb5ccd7 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-04-08 +date: 2024-04-11 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 e12f5abb494fb..e7eae3ab34d90 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-04-08 +date: 2024-04-11 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 9ef51379d13be..bd6a9c0d6fa24 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-04-08 +date: 2024-04-11 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 7c2f9d8d44141..8c4f0821ed820 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-04-08 +date: 2024-04-11 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 ebe3ea5297dfd..e0f52d18e95b8 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-04-08 +date: 2024-04-11 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 df3953bf39b3a..ccb72ce142d72 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-04-08 +date: 2024-04-11 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 a52a862a6c259..1ff077f7f67ce 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-04-08 +date: 2024-04-11 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 1948f4b7bbcdd..49304687ee16a 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-04-08 +date: 2024-04-11 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 be83ecf6f296e..8cd6e6bbe8076 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-04-08 +date: 2024-04-11 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 da840db723b2e..0a3e5d00a985b 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRevealImage'] --- import expressionRevealImageObj from './expression_reveal_image.devdocs.json'; diff --git a/api_docs/expression_shape.mdx b/api_docs/expression_shape.mdx index eb81dc0d4eed8..6e4a7868e9215 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-04-08 +date: 2024-04-11 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 fbab485306507..62c8a82290b68 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionTagcloud'] --- import expressionTagcloudObj from './expression_tagcloud.devdocs.json'; diff --git a/api_docs/expression_x_y.mdx b/api_docs/expression_x_y.mdx index 20b07f2331c92..a8dc2fc4b40e1 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-04-08 +date: 2024-04-11 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 a57f3f1404b81..f9395b31b582c 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-04-08 +date: 2024-04-11 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 f2e78558b79c9..272ba98db3620 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-04-08 +date: 2024-04-11 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 f7f6602d97350..9ce0f4b509cb0 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldFormats'] --- import fieldFormatsObj from './field_formats.devdocs.json'; diff --git a/api_docs/file_upload.mdx b/api_docs/file_upload.mdx index 719c694c0a80e..c6c4993424128 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fileUpload'] --- import fileUploadObj from './file_upload.devdocs.json'; diff --git a/api_docs/files.devdocs.json b/api_docs/files.devdocs.json index 05b4118d5b628..117ba9c81c758 100644 --- a/api_docs/files.devdocs.json +++ b/api_docs/files.devdocs.json @@ -587,7 +587,11 @@ }, { "plugin": "imageEmbeddable", - "path": "src/plugins/image_embeddable/public/plugin.ts" + "path": "src/plugins/image_embeddable/public/components/image_editor/open_image_editor.tsx" + }, + { + "plugin": "imageEmbeddable", + "path": "src/plugins/image_embeddable/public/image_embeddable/get_image_embeddable_factory.tsx" }, { "plugin": "filesManagement", diff --git a/api_docs/files.mdx b/api_docs/files.mdx index 6d613ba7ee2ce..076581e73ad7c 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-04-08 +date: 2024-04-11 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 e2e8d109d99b0..3a8e46dd7dda0 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'filesManagement'] --- import filesManagementObj from './files_management.devdocs.json'; diff --git a/api_docs/fleet.devdocs.json b/api_docs/fleet.devdocs.json index 36f3b583b6df9..c85428b2bdccd 100644 --- a/api_docs/fleet.devdocs.json +++ b/api_docs/fleet.devdocs.json @@ -71,6 +71,54 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "fleet", + "id": "def-public.LazyPackagePolicyInputVarField", + "type": "Function", + "tags": [], + "label": "LazyPackagePolicyInputVarField", + "description": [], + "signature": [ + "React.ExoticComponent<", + { + "pluginId": "fleet", + "scope": "public", + "docId": "kibFleetPluginApi", + "section": "def-public.InputFieldProps", + "text": "InputFieldProps" + }, + " & { children?: React.ReactNode; }> & { readonly _result: React.FunctionComponent<", + { + "pluginId": "fleet", + "scope": "public", + "docId": "kibFleetPluginApi", + "section": "def-public.InputFieldProps", + "text": "InputFieldProps" + }, + ">; }" + ], + "path": "x-pack/plugins/fleet/public/index.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "fleet", + "id": "def-public.LazyPackagePolicyInputVarField.$1", + "type": "Uncategorized", + "tags": [], + "label": "props", + "description": [], + "signature": [ + "P" + ], + "path": "node_modules/@types/react/index.d.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "fleet", "id": "def-public.PackageIcon", @@ -832,524 +880,1344 @@ }, { "parentPluginId": "fleet", - "id": "def-public.IntegrationsAppBrowseRouteState", + "id": "def-public.InputFieldProps", "type": "Interface", "tags": [], - "label": "IntegrationsAppBrowseRouteState", + "label": "InputFieldProps", "description": [], - "path": "x-pack/plugins/fleet/public/types/intra_app_route_state.ts", + "path": "x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_var_field.tsx", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "fleet", - "id": "def-public.IntegrationsAppBrowseRouteState.forAgentPolicyId", - "type": "string", + "id": "def-public.InputFieldProps.varDef", + "type": "Object", "tags": [], - "label": "forAgentPolicyId", - "description": [ - "The agent policy that we are browsing integrations for" + "label": "varDef", + "description": [], + "signature": [ + { + "pluginId": "fleet", + "scope": "common", + "docId": "kibFleetPluginApi", + "section": "def-common.RegistryVarsEntry", + "text": "RegistryVarsEntry" + } ], - "path": "x-pack/plugins/fleet/public/types/intra_app_route_state.ts", + "path": "x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_var_field.tsx", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "fleet", - "id": "def-public.IntegrationsAppBrowseRouteState.fromIntegrations", - "type": "CompoundType", + "id": "def-public.InputFieldProps.value", + "type": "Any", "tags": [], - "label": "fromIntegrations", - "description": [ - "The integration tab the user navigated to details from" + "label": "value", + "description": [], + "signature": [ + "any" ], + "path": "x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_var_field.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.InputFieldProps.onChange", + "type": "Function", + "tags": [], + "label": "onChange", + "description": [], "signature": [ - "\"installed\" | \"updates_available\" | undefined" + "(newValue: any) => void" ], - "path": "x-pack/plugins/fleet/public/types/intra_app_route_state.ts", + "path": "x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_var_field.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "fleet", + "id": "def-public.InputFieldProps.onChange.$1", + "type": "Any", + "tags": [], + "label": "newValue", + "description": [], + "signature": [ + "any" + ], + "path": "x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_var_field.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "fleet", + "id": "def-public.InputFieldProps.errors", + "type": "CompoundType", + "tags": [], + "label": "errors", + "description": [], + "signature": [ + "string[] | null | undefined" + ], + "path": "x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_var_field.tsx", "deprecated": false, "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "fleet", - "id": "def-public.NewPackagePolicy", - "type": "Interface", - "tags": [], - "label": "NewPackagePolicy", - "description": [], - "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + }, { "parentPluginId": "fleet", - "id": "def-public.NewPackagePolicy.id", + "id": "def-public.InputFieldProps.forceShowErrors", "type": "CompoundType", "tags": [], - "label": "id", + "label": "forceShowErrors", "description": [], "signature": [ - "string | number | undefined" + "boolean | undefined" ], - "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", + "path": "x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_var_field.tsx", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "fleet", - "id": "def-public.NewPackagePolicy.name", - "type": "string", + "id": "def-public.InputFieldProps.frozen", + "type": "CompoundType", "tags": [], - "label": "name", + "label": "frozen", "description": [], - "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_var_field.tsx", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "fleet", - "id": "def-public.NewPackagePolicy.description", + "id": "def-public.InputFieldProps.packageType", "type": "string", "tags": [], - "label": "description", + "label": "packageType", "description": [], "signature": [ "string | undefined" ], - "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", + "path": "x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_var_field.tsx", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "fleet", - "id": "def-public.NewPackagePolicy.namespace", + "id": "def-public.InputFieldProps.packageName", "type": "string", "tags": [], - "label": "namespace", + "label": "packageName", "description": [], "signature": [ "string | undefined" ], - "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", + "path": "x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_var_field.tsx", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "fleet", - "id": "def-public.NewPackagePolicy.enabled", - "type": "boolean", + "id": "def-public.InputFieldProps.datastreams", + "type": "Array", "tags": [], - "label": "enabled", + "label": "datastreams", "description": [], - "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", + "signature": [ + "DataStream", + "[] | undefined" + ], + "path": "x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_var_field.tsx", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "fleet", - "id": "def-public.NewPackagePolicy.is_managed", + "id": "def-public.InputFieldProps.isEditPage", "type": "CompoundType", "tags": [], - "label": "is_managed", + "label": "isEditPage", "description": [], "signature": [ "boolean | undefined" ], - "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", + "path": "x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_var_field.tsx", "deprecated": false, "trackAdoption": false - }, + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.IntegrationCardItem", + "type": "Interface", + "tags": [], + "label": "IntegrationCardItem", + "description": [], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/card_utils.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ { "parentPluginId": "fleet", - "id": "def-public.NewPackagePolicy.policy_id", + "id": "def-public.IntegrationCardItem.url", "type": "string", "tags": [], - "label": "policy_id", + "label": "url", "description": [], - "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/card_utils.tsx", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "fleet", - "id": "def-public.NewPackagePolicy.package", - "type": "Object", + "id": "def-public.IntegrationCardItem.release", + "type": "CompoundType", "tags": [], - "label": "package", + "label": "release", "description": [], "signature": [ - { - "pluginId": "fleet", - "scope": "common", - "docId": "kibFleetPluginApi", - "section": "def-common.PackagePolicyPackage", - "text": "PackagePolicyPackage" - }, + "IntegrationCardReleaseLabel", " | undefined" ], - "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/card_utils.tsx", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "fleet", - "id": "def-public.NewPackagePolicy.inputs", - "type": "Array", + "id": "def-public.IntegrationCardItem.description", + "type": "string", "tags": [], - "label": "inputs", + "label": "description", "description": [], - "signature": [ - { - "pluginId": "fleet", - "scope": "common", - "docId": "kibFleetPluginApi", - "section": "def-common.NewPackagePolicyInput", - "text": "NewPackagePolicyInput" - }, - "[]" - ], - "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/card_utils.tsx", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "fleet", - "id": "def-public.NewPackagePolicy.vars", - "type": "Object", + "id": "def-public.IntegrationCardItem.name", + "type": "string", "tags": [], - "label": "vars", + "label": "name", "description": [], - "signature": [ - { - "pluginId": "fleet", - "scope": "common", - "docId": "kibFleetPluginApi", - "section": "def-common.PackagePolicyConfigRecord", - "text": "PackagePolicyConfigRecord" - }, - " | undefined" - ], - "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/card_utils.tsx", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "fleet", - "id": "def-public.NewPackagePolicy.elasticsearch", - "type": "Object", - "tags": [], - "label": "elasticsearch", - "description": [], - "signature": [ - "{ privileges?: { cluster?: string[] | undefined; } | undefined; } | undefined" - ], - "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "fleet", - "id": "def-public.PackageAssetsExtension", - "type": "Interface", - "tags": [], - "label": "PackageAssetsExtension", - "description": [ - "Extension point registration contract for Integration details Assets view" - ], - "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "fleet", - "id": "def-public.PackageAssetsExtension.package", + "id": "def-public.IntegrationCardItem.title", "type": "string", "tags": [], - "label": "package", + "label": "title", "description": [], - "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/card_utils.tsx", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "fleet", - "id": "def-public.PackageAssetsExtension.view", + "id": "def-public.IntegrationCardItem.version", "type": "string", "tags": [], - "label": "view", + "label": "version", "description": [], - "signature": [ - "\"package-detail-assets\"" - ], - "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/card_utils.tsx", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "fleet", - "id": "def-public.PackageAssetsExtension.Component", - "type": "Function", + "id": "def-public.IntegrationCardItem.icons", + "type": "Array", "tags": [], - "label": "Component", + "label": "icons", "description": [], "signature": [ - "React.ExoticComponent<{ children?: React.ReactNode; } | React.RefAttributes>> & { readonly _result: ", + "(", { - "pluginId": "fleet", - "scope": "public", + "pluginId": "customIntegrations", + "scope": "common", + "docId": "kibCustomIntegrationsPluginApi", + "section": "def-common.CustomIntegrationIcon", + "text": "CustomIntegrationIcon" + }, + " | ", + { + "pluginId": "fleet", + "scope": "common", + "docId": "kibFleetPluginApi", + "section": "def-common.PackageSpecIcon", + "text": "PackageSpecIcon" + }, + ")[]" + ], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/card_utils.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.IntegrationCardItem.integration", + "type": "string", + "tags": [], + "label": "integration", + "description": [], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/card_utils.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.IntegrationCardItem.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/card_utils.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.IntegrationCardItem.categories", + "type": "Array", + "tags": [], + "label": "categories", + "description": [], + "signature": [ + "string[]" + ], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/card_utils.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.IntegrationCardItem.fromIntegrations", + "type": "string", + "tags": [], + "label": "fromIntegrations", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/card_utils.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.IntegrationCardItem.isReauthorizationRequired", + "type": "CompoundType", + "tags": [], + "label": "isReauthorizationRequired", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/card_utils.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.IntegrationCardItem.isUnverified", + "type": "CompoundType", + "tags": [], + "label": "isUnverified", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/card_utils.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.IntegrationCardItem.isUpdateAvailable", + "type": "CompoundType", + "tags": [], + "label": "isUpdateAvailable", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/card_utils.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.IntegrationCardItem.isQuickstart", + "type": "CompoundType", + "tags": [], + "label": "isQuickstart", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/card_utils.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.IntegrationCardItem.showLabels", + "type": "CompoundType", + "tags": [], + "label": "showLabels", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/card_utils.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.IntegrationCardItem.extraLabelsBadges", + "type": "Array", + "tags": [], + "label": "extraLabelsBadges", + "description": [], + "signature": [ + "React.ReactNode[] | undefined" + ], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/card_utils.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.IntegrationCardItem.onCardClick", + "type": "Function", + "tags": [], + "label": "onCardClick", + "description": [], + "signature": [ + "(() => void) | undefined" + ], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/card_utils.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.IntegrationsAppBrowseRouteState", + "type": "Interface", + "tags": [], + "label": "IntegrationsAppBrowseRouteState", + "description": [], + "path": "x-pack/plugins/fleet/public/types/intra_app_route_state.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "fleet", + "id": "def-public.IntegrationsAppBrowseRouteState.forAgentPolicyId", + "type": "string", + "tags": [], + "label": "forAgentPolicyId", + "description": [ + "The agent policy that we are browsing integrations for" + ], + "path": "x-pack/plugins/fleet/public/types/intra_app_route_state.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.IntegrationsAppBrowseRouteState.fromIntegrations", + "type": "CompoundType", + "tags": [], + "label": "fromIntegrations", + "description": [ + "The integration tab the user navigated to details from" + ], + "signature": [ + "\"installed\" | \"updates_available\" | undefined" + ], + "path": "x-pack/plugins/fleet/public/types/intra_app_route_state.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.NewPackagePolicy", + "type": "Interface", + "tags": [], + "label": "NewPackagePolicy", + "description": [], + "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "fleet", + "id": "def-public.NewPackagePolicy.id", + "type": "CompoundType", + "tags": [], + "label": "id", + "description": [], + "signature": [ + "string | number | undefined" + ], + "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.NewPackagePolicy.name", + "type": "string", + "tags": [], + "label": "name", + "description": [], + "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.NewPackagePolicy.description", + "type": "string", + "tags": [], + "label": "description", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.NewPackagePolicy.namespace", + "type": "string", + "tags": [], + "label": "namespace", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.NewPackagePolicy.enabled", + "type": "boolean", + "tags": [], + "label": "enabled", + "description": [], + "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.NewPackagePolicy.is_managed", + "type": "CompoundType", + "tags": [], + "label": "is_managed", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.NewPackagePolicy.policy_id", + "type": "string", + "tags": [], + "label": "policy_id", + "description": [], + "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.NewPackagePolicy.package", + "type": "Object", + "tags": [], + "label": "package", + "description": [], + "signature": [ + { + "pluginId": "fleet", + "scope": "common", + "docId": "kibFleetPluginApi", + "section": "def-common.PackagePolicyPackage", + "text": "PackagePolicyPackage" + }, + " | undefined" + ], + "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.NewPackagePolicy.inputs", + "type": "Array", + "tags": [], + "label": "inputs", + "description": [], + "signature": [ + { + "pluginId": "fleet", + "scope": "common", + "docId": "kibFleetPluginApi", + "section": "def-common.NewPackagePolicyInput", + "text": "NewPackagePolicyInput" + }, + "[]" + ], + "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.NewPackagePolicy.vars", + "type": "Object", + "tags": [], + "label": "vars", + "description": [], + "signature": [ + { + "pluginId": "fleet", + "scope": "common", + "docId": "kibFleetPluginApi", + "section": "def-common.PackagePolicyConfigRecord", + "text": "PackagePolicyConfigRecord" + }, + " | undefined" + ], + "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.NewPackagePolicy.elasticsearch", + "type": "Object", + "tags": [], + "label": "elasticsearch", + "description": [], + "signature": [ + "{ privileges?: { cluster?: string[] | undefined; } | undefined; } | undefined" + ], + "path": "x-pack/plugins/fleet/common/types/models/package_policy.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.PackageAssetsExtension", + "type": "Interface", + "tags": [], + "label": "PackageAssetsExtension", + "description": [ + "Extension point registration contract for Integration details Assets view" + ], + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "fleet", + "id": "def-public.PackageAssetsExtension.package", + "type": "string", + "tags": [], + "label": "package", + "description": [], + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.PackageAssetsExtension.view", + "type": "string", + "tags": [], + "label": "view", + "description": [], + "signature": [ + "\"package-detail-assets\"" + ], + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.PackageAssetsExtension.Component", + "type": "Function", + "tags": [], + "label": "Component", + "description": [], + "signature": [ + "React.ExoticComponent<{ children?: React.ReactNode; } | React.RefAttributes>> & { readonly _result: ", + { + "pluginId": "fleet", + "scope": "public", + "docId": "kibFleetPluginApi", + "section": "def-public.PackageAssetsComponent", + "text": "PackageAssetsComponent" + }, + "; }" + ], + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "fleet", + "id": "def-public.PackageAssetsExtension.Component.$1", + "type": "Uncategorized", + "tags": [], + "label": "props", + "description": [], + "signature": [ + "P" + ], + "path": "node_modules/@types/react/index.d.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.PackageCustomExtension", + "type": "Interface", + "tags": [], + "label": "PackageCustomExtension", + "description": [ + "Extension point registration contract for Integration details Custom view" + ], + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "fleet", + "id": "def-public.PackageCustomExtension.package", + "type": "string", + "tags": [], + "label": "package", + "description": [], + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.PackageCustomExtension.view", + "type": "string", + "tags": [], + "label": "view", + "description": [], + "signature": [ + "\"package-detail-custom\"" + ], + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.PackageCustomExtension.Component", + "type": "Function", + "tags": [], + "label": "Component", + "description": [], + "signature": [ + "React.ExoticComponent<(", + { + "pluginId": "fleet", + "scope": "public", + "docId": "kibFleetPluginApi", + "section": "def-public.PackageCustomExtensionComponentProps", + "text": "PackageCustomExtensionComponentProps" + }, + " & React.RefAttributes>) | (", + { + "pluginId": "fleet", + "scope": "public", + "docId": "kibFleetPluginApi", + "section": "def-public.PackageCustomExtensionComponentProps", + "text": "PackageCustomExtensionComponentProps" + }, + " & { children?: React.ReactNode; })> & { readonly _result: ", + { + "pluginId": "fleet", + "scope": "public", + "docId": "kibFleetPluginApi", + "section": "def-public.PackageCustomExtensionComponent", + "text": "PackageCustomExtensionComponent" + }, + "; }" + ], + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "fleet", + "id": "def-public.PackageCustomExtension.Component.$1", + "type": "Uncategorized", + "tags": [], + "label": "props", + "description": [], + "signature": [ + "P" + ], + "path": "node_modules/@types/react/index.d.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.PackageCustomExtensionComponentProps", + "type": "Interface", + "tags": [], + "label": "PackageCustomExtensionComponentProps", + "description": [], + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "fleet", + "id": "def-public.PackageCustomExtensionComponentProps.pkgkey", + "type": "string", + "tags": [], + "label": "pkgkey", + "description": [ + "The package key value that should be used used for URLs" + ], + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.PackageCustomExtensionComponentProps.packageInfo", + "type": "CompoundType", + "tags": [], + "label": "packageInfo", + "description": [], + "signature": [ + { + "pluginId": "fleet", + "scope": "common", + "docId": "kibFleetPluginApi", + "section": "def-common.Installable", + "text": "Installable" + }, + "> | ", + { + "pluginId": "fleet", + "scope": "common", + "docId": "kibFleetPluginApi", + "section": "def-common.Installable", + "text": "Installable" + }, + ">" ], "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "deprecated": false, - "trackAdoption": false, - "returnComment": [], - "children": [ - { - "parentPluginId": "fleet", - "id": "def-public.PackageAssetsExtension.Component.$1", - "type": "Uncategorized", - "tags": [], - "label": "props", - "description": [], - "signature": [ - "P" - ], - "path": "node_modules/@types/react/index.d.ts", - "deprecated": false, - "trackAdoption": false - } - ] + "trackAdoption": false } ], "initialIsOpen": false }, { "parentPluginId": "fleet", - "id": "def-public.PackageCustomExtension", + "id": "def-public.PackageGenericErrorsListProps", "type": "Interface", "tags": [], - "label": "PackageCustomExtension", - "description": [ - "Extension point registration contract for Integration details Custom view" - ], + "label": "PackageGenericErrorsListProps", + "description": [], "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", "deprecated": false, "trackAdoption": false, "children": [ { "parentPluginId": "fleet", - "id": "def-public.PackageCustomExtension.package", + "id": "def-public.PackageGenericErrorsListProps.packageErrors", + "type": "Array", + "tags": [], + "label": "packageErrors", + "description": [ + "A list of errors from a package" + ], + "signature": [ + "FleetServerAgentComponentUnit", + "[]" + ], + "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.PackageListGridProps", + "type": "Interface", + "tags": [], + "label": "PackageListGridProps", + "description": [], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "fleet", + "id": "def-public.PackageListGridProps.isLoading", + "type": "CompoundType", + "tags": [], + "label": "isLoading", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.PackageListGridProps.controls", + "type": "CompoundType", + "tags": [], + "label": "controls", + "description": [], + "signature": [ + "React.ReactNode | React.ReactNode[]" + ], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.PackageListGridProps.list", + "type": "Array", + "tags": [], + "label": "list", + "description": [], + "signature": [ + { + "pluginId": "fleet", + "scope": "public", + "docId": "kibFleetPluginApi", + "section": "def-public.IntegrationCardItem", + "text": "IntegrationCardItem" + }, + "[]" + ], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.PackageListGridProps.searchTerm", + "type": "string", + "tags": [], + "label": "searchTerm", + "description": [], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.PackageListGridProps.setSearchTerm", + "type": "Function", + "tags": [], + "label": "setSearchTerm", + "description": [], + "signature": [ + "(search: string) => void" + ], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "fleet", + "id": "def-public.PackageListGridProps.setSearchTerm.$1", + "type": "string", + "tags": [], + "label": "search", + "description": [], + "signature": [ + "string" + ], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "fleet", + "id": "def-public.PackageListGridProps.selectedCategory", + "type": "string", + "tags": [], + "label": "selectedCategory", + "description": [], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.PackageListGridProps.setCategory", + "type": "Function", + "tags": [], + "label": "setCategory", + "description": [], + "signature": [ + "(category: string) => void" + ], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "fleet", + "id": "def-public.PackageListGridProps.setCategory.$1", + "type": "string", + "tags": [], + "label": "category", + "description": [], + "signature": [ + "string" + ], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "fleet", + "id": "def-public.PackageListGridProps.categories", + "type": "Array", + "tags": [], + "label": "categories", + "description": [], + "signature": [ + "CategoryFacet", + "[]" + ], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.PackageListGridProps.setUrlandReplaceHistory", + "type": "Function", + "tags": [], + "label": "setUrlandReplaceHistory", + "description": [], + "signature": [ + "(params: ", + "IntegrationsURLParameters", + ") => void" + ], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "fleet", + "id": "def-public.PackageListGridProps.setUrlandReplaceHistory.$1", + "type": "Object", + "tags": [], + "label": "params", + "description": [], + "signature": [ + "IntegrationsURLParameters" + ], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "fleet", + "id": "def-public.PackageListGridProps.setUrlandPushHistory", + "type": "Function", + "tags": [], + "label": "setUrlandPushHistory", + "description": [], + "signature": [ + "(params: ", + "IntegrationsURLParameters", + ") => void" + ], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "fleet", + "id": "def-public.PackageListGridProps.setUrlandPushHistory.$1", + "type": "Object", + "tags": [], + "label": "params", + "description": [], + "signature": [ + "IntegrationsURLParameters" + ], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.tsx", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "fleet", + "id": "def-public.PackageListGridProps.callout", + "type": "CompoundType", + "tags": [], + "label": "callout", + "description": [], + "signature": [ + "JSX.Element | null | undefined" + ], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.PackageListGridProps.showCardLabels", + "type": "CompoundType", + "tags": [], + "label": "showCardLabels", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.PackageListGridProps.title", "type": "string", "tags": [], - "label": "package", + "label": "title", "description": [], - "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", + "signature": [ + "string | undefined" + ], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.tsx", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "fleet", - "id": "def-public.PackageCustomExtension.view", + "id": "def-public.PackageListGridProps.availableSubCategories", + "type": "Array", + "tags": [], + "label": "availableSubCategories", + "description": [], + "signature": [ + "CategoryFacet", + "[] | undefined" + ], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-public.PackageListGridProps.selectedSubCategory", "type": "string", "tags": [], - "label": "view", + "label": "selectedSubCategory", "description": [], "signature": [ - "\"package-detail-custom\"" + "string | undefined" ], - "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.tsx", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "fleet", - "id": "def-public.PackageCustomExtension.Component", + "id": "def-public.PackageListGridProps.setSelectedSubCategory", "type": "Function", "tags": [], - "label": "Component", + "label": "setSelectedSubCategory", "description": [], "signature": [ - "React.ExoticComponent<(", - { - "pluginId": "fleet", - "scope": "public", - "docId": "kibFleetPluginApi", - "section": "def-public.PackageCustomExtensionComponentProps", - "text": "PackageCustomExtensionComponentProps" - }, - " & React.RefAttributes>) | (", - { - "pluginId": "fleet", - "scope": "public", - "docId": "kibFleetPluginApi", - "section": "def-public.PackageCustomExtensionComponentProps", - "text": "PackageCustomExtensionComponentProps" - }, - " & { children?: React.ReactNode; })> & { readonly _result: ", - { - "pluginId": "fleet", - "scope": "public", - "docId": "kibFleetPluginApi", - "section": "def-public.PackageCustomExtensionComponent", - "text": "PackageCustomExtensionComponent" - }, - "; }" + "((c: string | undefined) => void) | undefined" ], - "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.tsx", "deprecated": false, "trackAdoption": false, - "returnComment": [], "children": [ { "parentPluginId": "fleet", - "id": "def-public.PackageCustomExtension.Component.$1", - "type": "Uncategorized", + "id": "def-public.PackageListGridProps.setSelectedSubCategory.$1", + "type": "string", "tags": [], - "label": "props", + "label": "c", "description": [], "signature": [ - "P" + "string | undefined" ], - "path": "node_modules/@types/react/index.d.ts", + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.tsx", "deprecated": false, - "trackAdoption": false + "trackAdoption": false, + "isRequired": false } - ] - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "fleet", - "id": "def-public.PackageCustomExtensionComponentProps", - "type": "Interface", - "tags": [], - "label": "PackageCustomExtensionComponentProps", - "description": [], - "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + ], + "returnComment": [] + }, { "parentPluginId": "fleet", - "id": "def-public.PackageCustomExtensionComponentProps.pkgkey", - "type": "string", + "id": "def-public.PackageListGridProps.showMissingIntegrationMessage", + "type": "CompoundType", "tags": [], - "label": "pkgkey", - "description": [ - "The package key value that should be used used for URLs" + "label": "showMissingIntegrationMessage", + "description": [], + "signature": [ + "boolean | undefined" ], - "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.tsx", "deprecated": false, "trackAdoption": false }, { "parentPluginId": "fleet", - "id": "def-public.PackageCustomExtensionComponentProps.packageInfo", + "id": "def-public.PackageListGridProps.showControls", "type": "CompoundType", "tags": [], - "label": "packageInfo", + "label": "showControls", "description": [], "signature": [ - { - "pluginId": "fleet", - "scope": "common", - "docId": "kibFleetPluginApi", - "section": "def-common.Installable", - "text": "Installable" - }, - "> | ", - { - "pluginId": "fleet", - "scope": "common", - "docId": "kibFleetPluginApi", - "section": "def-common.Installable", - "text": "Installable" - }, - ">" + "boolean | undefined" ], - "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.tsx", "deprecated": false, "trackAdoption": false - } - ], - "initialIsOpen": false - }, - { - "parentPluginId": "fleet", - "id": "def-public.PackageGenericErrorsListProps", - "type": "Interface", - "tags": [], - "label": "PackageGenericErrorsListProps", - "description": [], - "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ + }, { "parentPluginId": "fleet", - "id": "def-public.PackageGenericErrorsListProps.packageErrors", - "type": "Array", + "id": "def-public.PackageListGridProps.showSearchTools", + "type": "CompoundType", "tags": [], - "label": "packageErrors", - "description": [ - "A list of errors from a package" - ], + "label": "showSearchTools", + "description": [], "signature": [ - "FleetServerAgentComponentUnit", - "[]" + "boolean | undefined" ], - "path": "x-pack/plugins/fleet/public/types/ui_extensions.ts", + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.tsx", "deprecated": false, "trackAdoption": false } @@ -2466,6 +3334,64 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "fleet", + "id": "def-public.AvailablePackagesHookType", + "type": "Type", + "tags": [], + "label": "AvailablePackagesHookType", + "description": [], + "signature": [ + "({ prereleaseIntegrationsEnabled, }: { prereleaseIntegrationsEnabled: boolean; }) => { initialSelectedCategory: string; selectedCategory: string; setCategory: React.Dispatch>; allCategories: ", + "CategoryFacet", + "[]; mainCategories: ", + "CategoryFacet", + "[]; availableSubCategories: ", + "CategoryFacet", + "[]; selectedSubCategory: string | undefined; setSelectedSubCategory: React.Dispatch>; searchTerm: string; setSearchTerm: React.Dispatch>; setUrlandPushHistory: ({ searchString, categoryId, subCategoryId, }: ", + "IntegrationsURLParameters", + ") => void; setUrlandReplaceHistory: ({ searchString, categoryId, subCategoryId, }: ", + "IntegrationsURLParameters", + ") => void; preference: ", + "IntegrationPreferenceType", + "; setPreference: React.Dispatch>; isLoading: boolean; isLoadingCategories: boolean; isLoadingAllPackages: boolean; isLoadingAppendCustomIntegrations: boolean; eprPackageLoadingError: ", + "RequestError", + " | null; eprCategoryLoadingError: ", + "RequestError", + " | null; filteredCards: ", + { + "pluginId": "fleet", + "scope": "public", + "docId": "kibFleetPluginApi", + "section": "def-public.IntegrationCardItem", + "text": "IntegrationCardItem" + }, + "[]; }" + ], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/hooks/use_available_packages.tsx", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "fleet", + "id": "def-public.AvailablePackagesHookType.$1", + "type": "Object", + "tags": [], + "label": "__0", + "description": [], + "signature": [ + "{ prereleaseIntegrationsEnabled: boolean; }" + ], + "path": "x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/hooks/use_available_packages.tsx", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "fleet", "id": "def-public.OnSaveQueryParamKeys", @@ -21133,6 +22059,21 @@ "path": "x-pack/plugins/fleet/common/types/models/epm.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-common.Installation.latest_executed_state", + "type": "Object", + "tags": [], + "label": "latest_executed_state", + "description": [], + "signature": [ + "InstallLatestExecutedState", + " | undefined" + ], + "path": "x-pack/plugins/fleet/common/types/models/epm.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -21177,7 +22118,8 @@ "label": "status", "description": [], "signature": [ - "\"installed\" | \"already_installed\" | undefined" + "InstallResultStatus", + " | undefined" ], "path": "x-pack/plugins/fleet/common/types/rest_spec/epm.ts", "deprecated": false, @@ -21729,6 +22671,20 @@ "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "fleet", + "id": "def-common.NewAgentPolicy.advanced_settings", + "type": "CompoundType", + "tags": [], + "label": "advanced_settings", + "description": [], + "signature": [ + "{ [key: string]: any; } | null | undefined" + ], + "path": "x-pack/plugins/fleet/common/types/models/agent_policy.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index f4b2b3a20d8a9..06c0e360c7502 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fleet'] --- import fleetObj from './fleet.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) for questi | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 1235 | 3 | 1115 | 59 | +| 1297 | 5 | 1176 | 66 | ## Client diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx index 5c490675ea364..4c33c29ee1dc8 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-04-08 +date: 2024-04-11 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 e3a5efc8449f2..75c71d13be5f9 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-04-08 +date: 2024-04-11 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 5d46dee79ce6c..77dbff3cb7b8d 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'home'] --- import homeObj from './home.devdocs.json'; diff --git a/api_docs/image_embeddable.devdocs.json b/api_docs/image_embeddable.devdocs.json index de7b6757c0d1d..49be07321c31d 100644 --- a/api_docs/image_embeddable.devdocs.json +++ b/api_docs/image_embeddable.devdocs.json @@ -3,36 +3,7 @@ "client": { "classes": [], "functions": [], - "interfaces": [ - { - "parentPluginId": "imageEmbeddable", - "id": "def-public.ImageClickContext", - "type": "Interface", - "tags": [], - "label": "ImageClickContext", - "description": [], - "path": "src/plugins/image_embeddable/public/actions/image_click_trigger.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "imageEmbeddable", - "id": "def-public.ImageClickContext.embeddable", - "type": "Object", - "tags": [], - "label": "embeddable", - "description": [], - "signature": [ - "ImageEmbeddable" - ], - "path": "src/plugins/image_embeddable/public/actions/image_click_trigger.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - } - ], + "interfaces": [], "enums": [], "misc": [ { diff --git a/api_docs/image_embeddable.mdx b/api_docs/image_embeddable.mdx index 6e008f13f9b36..81c4ae16676d0 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'imageEmbeddable'] --- import imageEmbeddableObj from './image_embeddable.devdocs.json'; @@ -21,13 +21,10 @@ Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sh | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 3 | 0 | 3 | 1 | +| 1 | 0 | 1 | 0 | ## Client -### Interfaces - - ### Consts, variables and types diff --git a/api_docs/index_lifecycle_management.mdx b/api_docs/index_lifecycle_management.mdx index 28bf06beff4ab..43047b3b42aed 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexLifecycleManagement'] --- import indexLifecycleManagementObj from './index_lifecycle_management.devdocs.json'; diff --git a/api_docs/index_management.devdocs.json b/api_docs/index_management.devdocs.json index 25706cb7c54fa..eef570a5d6b58 100644 --- a/api_docs/index_management.devdocs.json +++ b/api_docs/index_management.devdocs.json @@ -108,7 +108,7 @@ "tags": [], "label": "Index", "description": [], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -119,7 +119,7 @@ "tags": [], "label": "name", "description": [], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -133,7 +133,7 @@ "signature": [ "string | number | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -147,7 +147,7 @@ "signature": [ "string | number | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -158,7 +158,7 @@ "tags": [], "label": "isFrozen", "description": [], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -169,7 +169,7 @@ "tags": [], "label": "hidden", "description": [], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -183,7 +183,7 @@ "signature": [ "string | string[]" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -197,7 +197,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -211,7 +211,7 @@ "signature": [ "boolean | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -226,7 +226,7 @@ "IlmExplainLifecycleLifecycleExplain", " | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -240,7 +240,7 @@ "signature": [ "boolean | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -255,7 +255,7 @@ "HealthStatus", " | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -270,7 +270,7 @@ "IndicesStatsIndexMetadataState", " | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -284,7 +284,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -298,7 +298,7 @@ "signature": [ "number | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -312,7 +312,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -326,7 +326,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -340,7 +340,7 @@ "signature": [ "number | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false } @@ -354,7 +354,7 @@ "tags": [], "label": "IndexMappingProps", "description": [], - "path": "x-pack/plugins/index_management/public/application/sections/home/index_list/details_page/index_mapping_with_context_types.tsx", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -366,9 +366,16 @@ "label": "index", "description": [], "signature": [ - "Index | undefined" + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.Index", + "text": "Index" + }, + " | undefined" ], - "path": "x-pack/plugins/index_management/public/application/sections/home/index_list/details_page/index_mapping_with_context_types.tsx", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -382,7 +389,7 @@ "signature": [ "boolean | undefined" ], - "path": "x-pack/plugins/index_management/public/application/sections/home/index_list/details_page/index_mapping_with_context_types.tsx", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false } @@ -400,7 +407,7 @@ "tags": [], "label": "IndexManagementPluginSetup", "description": [], - "path": "x-pack/plugins/index_management/public/types.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -412,9 +419,15 @@ "label": "apiService", "description": [], "signature": [ - "PublicApiServiceSetup" + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.PublicApiServiceSetup", + "text": "PublicApiServiceSetup" + } ], - "path": "x-pack/plugins/index_management/public/types.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -426,9 +439,15 @@ "label": "extensionsService", "description": [], "signature": [ - "ExtensionsSetup" + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.ExtensionsSetup", + "text": "ExtensionsSetup" + } ], - "path": "x-pack/plugins/index_management/public/types.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false } @@ -443,7 +462,7 @@ "tags": [], "label": "IndexManagementPluginStart", "description": [], - "path": "x-pack/plugins/index_management/public/types.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -455,9 +474,15 @@ "label": "extensionsService", "description": [], "signature": [ - "ExtensionsSetup" + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.ExtensionsSetup", + "text": "ExtensionsSetup" + } ], - "path": "x-pack/plugins/index_management/public/types.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -479,15 +504,15 @@ }, "; }) => React.FC<", { - "pluginId": "indexManagement", - "scope": "public", - "docId": "kibIndexManagementPluginApi", - "section": "def-public.IndexMappingProps", + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.IndexMappingProps", "text": "IndexMappingProps" }, ">" ], - "path": "x-pack/plugins/index_management/public/types.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -498,7 +523,7 @@ "tags": [], "label": "deps", "description": [], - "path": "x-pack/plugins/index_management/public/types.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -519,7 +544,7 @@ }, "" ], - "path": "x-pack/plugins/index_management/public/types.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false } @@ -618,7 +643,7 @@ "tags": [], "label": "Index", "description": [], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -629,7 +654,7 @@ "tags": [], "label": "name", "description": [], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -643,7 +668,7 @@ "signature": [ "string | number | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -657,7 +682,7 @@ "signature": [ "string | number | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -668,7 +693,7 @@ "tags": [], "label": "isFrozen", "description": [], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -679,7 +704,7 @@ "tags": [], "label": "hidden", "description": [], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -693,7 +718,7 @@ "signature": [ "string | string[]" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -707,7 +732,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -721,7 +746,7 @@ "signature": [ "boolean | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -736,7 +761,7 @@ "IlmExplainLifecycleLifecycleExplain", " | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -750,7 +775,7 @@ "signature": [ "boolean | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -765,7 +790,7 @@ "HealthStatus", " | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -780,7 +805,7 @@ "IndicesStatsIndexMetadataState", " | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -794,7 +819,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -808,7 +833,7 @@ "signature": [ "number | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -822,7 +847,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -836,7 +861,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -850,7 +875,7 @@ "signature": [ "number | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false } @@ -2091,7 +2116,7 @@ "tags": [], "label": "Index", "description": [], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false, "children": [ @@ -2102,7 +2127,7 @@ "tags": [], "label": "name", "description": [], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -2116,7 +2141,7 @@ "signature": [ "string | number | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -2130,7 +2155,7 @@ "signature": [ "string | number | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -2141,7 +2166,7 @@ "tags": [], "label": "isFrozen", "description": [], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -2152,7 +2177,7 @@ "tags": [], "label": "hidden", "description": [], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -2166,7 +2191,7 @@ "signature": [ "string | string[]" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -2180,7 +2205,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -2194,7 +2219,7 @@ "signature": [ "boolean | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -2209,7 +2234,7 @@ "IlmExplainLifecycleLifecycleExplain", " | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -2223,7 +2248,7 @@ "signature": [ "boolean | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -2238,7 +2263,7 @@ "HealthStatus", " | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -2253,7 +2278,7 @@ "IndicesStatsIndexMetadataState", " | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -2267,7 +2292,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -2281,7 +2306,7 @@ "signature": [ "number | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -2295,7 +2320,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -2309,7 +2334,7 @@ "signature": [ "string | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false }, @@ -2323,7 +2348,7 @@ "signature": [ "number | undefined" ], - "path": "x-pack/plugins/index_management/common/types/indices.ts", + "path": "x-pack/packages/index-management/src/types.ts", "deprecated": false, "trackAdoption": false } @@ -2649,98 +2674,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "indexManagement", - "id": "def-common.SerializedEnrichPolicy", - "type": "Interface", - "tags": [], - "label": "SerializedEnrichPolicy", - "description": [], - "path": "x-pack/plugins/index_management/common/types/enrich_policies.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "indexManagement", - "id": "def-common.SerializedEnrichPolicy.type", - "type": "CompoundType", - "tags": [], - "label": "type", - "description": [], - "signature": [ - "\"match\" | \"range\" | \"geo_match\"" - ], - "path": "x-pack/plugins/index_management/common/types/enrich_policies.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "indexManagement", - "id": "def-common.SerializedEnrichPolicy.name", - "type": "string", - "tags": [], - "label": "name", - "description": [], - "path": "x-pack/plugins/index_management/common/types/enrich_policies.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "indexManagement", - "id": "def-common.SerializedEnrichPolicy.sourceIndices", - "type": "Array", - "tags": [], - "label": "sourceIndices", - "description": [], - "signature": [ - "string[]" - ], - "path": "x-pack/plugins/index_management/common/types/enrich_policies.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "indexManagement", - "id": "def-common.SerializedEnrichPolicy.matchField", - "type": "string", - "tags": [], - "label": "matchField", - "description": [], - "path": "x-pack/plugins/index_management/common/types/enrich_policies.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "indexManagement", - "id": "def-common.SerializedEnrichPolicy.enrichFields", - "type": "Array", - "tags": [], - "label": "enrichFields", - "description": [], - "signature": [ - "string[]" - ], - "path": "x-pack/plugins/index_management/common/types/enrich_policies.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "indexManagement", - "id": "def-common.SerializedEnrichPolicy.query", - "type": "Object", - "tags": [], - "label": "query", - "description": [], - "signature": [ - "Record | undefined" - ], - "path": "x-pack/plugins/index_management/common/types/enrich_policies.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "indexManagement", "id": "def-common.TemplateDeserialized", diff --git a/api_docs/index_management.mdx b/api_docs/index_management.mdx index 52a337a4e2d58..c8540ce5837f1 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexManagement'] --- import indexManagementObj from './index_management.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kiban | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 230 | 0 | 225 | 3 | +| 223 | 0 | 218 | 1 | ## Client diff --git a/api_docs/infra.mdx b/api_docs/infra.mdx index fc2108b070246..7a014d3353e24 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-04-08 +date: 2024-04-11 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 20ecf75c3ae54..10b690997c3da 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-04-08 +date: 2024-04-11 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 055be43a9923c..b07b34acdf09a 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'inspector'] --- import inspectorObj from './inspector.devdocs.json'; diff --git a/api_docs/interactive_setup.mdx b/api_docs/interactive_setup.mdx index 7adf81d32e058..95d3dbba8acd8 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'interactiveSetup'] --- import interactiveSetupObj from './interactive_setup.devdocs.json'; diff --git a/api_docs/kbn_ace.mdx b/api_docs/kbn_ace.mdx index a06853bf8f2fb..9ea6a6ba4f2a2 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-04-08 +date: 2024-04-11 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 8636d93ae6d7d..db0a8a51925f0 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-04-08 +date: 2024-04-11 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 8b62828fe7493..73f42d1956f4f 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-04-08 +date: 2024-04-11 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 f4f5bb2d0dab5..5ac0a3b5ba3c4 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-04-08 +date: 2024-04-11 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 23858e1b34dc0..7cd1ff4de1912 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-04-08 +date: 2024-04-11 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 6a9e028f8535d..a36fa61b13bc8 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-api-integration-helpers'] --- import kbnAlertingApiIntegrationHelpersObj from './kbn_alerting_api_integration_helpers.devdocs.json'; diff --git a/api_docs/kbn_alerting_state_types.mdx b/api_docs/kbn_alerting_state_types.mdx index 4e7acb57d0e9c..358eb2a28af1d 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-state-types'] --- import kbnAlertingStateTypesObj from './kbn_alerting_state_types.devdocs.json'; diff --git a/api_docs/kbn_alerting_types.mdx b/api_docs/kbn_alerting_types.mdx index afb2136113523..b4cc29f288517 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-types'] --- import kbnAlertingTypesObj from './kbn_alerting_types.devdocs.json'; diff --git a/api_docs/kbn_alerts_as_data_utils.mdx b/api_docs/kbn_alerts_as_data_utils.mdx index 9f8aefbed98c4..ec55ae20b9a3b 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-as-data-utils'] --- import kbnAlertsAsDataUtilsObj from './kbn_alerts_as_data_utils.devdocs.json'; diff --git a/api_docs/kbn_alerts_ui_shared.mdx b/api_docs/kbn_alerts_ui_shared.mdx index dc3397da5d118..8a9c8b7c8203f 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-ui-shared'] --- import kbnAlertsUiSharedObj from './kbn_alerts_ui_shared.devdocs.json'; diff --git a/api_docs/kbn_analytics.mdx b/api_docs/kbn_analytics.mdx index 8c4c7dbe5ff24..a81979a52ffe7 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics'] --- import kbnAnalyticsObj from './kbn_analytics.devdocs.json'; diff --git a/api_docs/kbn_analytics_client.mdx b/api_docs/kbn_analytics_client.mdx index 048bc9d5049dc..4ed0d0336dfaf 100644 --- a/api_docs/kbn_analytics_client.mdx +++ b/api_docs/kbn_analytics_client.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-client title: "@kbn/analytics-client" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-client plugin -date: 2024-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-client'] --- import kbnAnalyticsClientObj from './kbn_analytics_client.devdocs.json'; diff --git a/api_docs/kbn_analytics_collection_utils.mdx b/api_docs/kbn_analytics_collection_utils.mdx index 6034c9c592ce5..3c07d2def281e 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-collection-utils'] --- import kbnAnalyticsCollectionUtilsObj from './kbn_analytics_collection_utils.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx index 93f676df6da04..97c01bb4f242b 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-browser title: "@kbn/analytics-shippers-elastic-v3-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-browser plugin -date: 2024-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-browser'] --- import kbnAnalyticsShippersElasticV3BrowserObj from './kbn_analytics_shippers_elastic_v3_browser.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx index e4cc95c39c218..13de62f7d0366 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-common title: "@kbn/analytics-shippers-elastic-v3-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-common plugin -date: 2024-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-common'] --- import kbnAnalyticsShippersElasticV3CommonObj from './kbn_analytics_shippers_elastic_v3_common.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx index b36c824ed74d8..4130adc88eeea 100644 --- a/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx +++ b/api_docs/kbn_analytics_shippers_elastic_v3_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-elastic-v3-server title: "@kbn/analytics-shippers-elastic-v3-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-elastic-v3-server plugin -date: 2024-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-elastic-v3-server'] --- import kbnAnalyticsShippersElasticV3ServerObj from './kbn_analytics_shippers_elastic_v3_server.devdocs.json'; diff --git a/api_docs/kbn_analytics_shippers_fullstory.mdx b/api_docs/kbn_analytics_shippers_fullstory.mdx index 6410c54b50522..751cc9daa295d 100644 --- a/api_docs/kbn_analytics_shippers_fullstory.mdx +++ b/api_docs/kbn_analytics_shippers_fullstory.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-shippers-fullstory title: "@kbn/analytics-shippers-fullstory" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-shippers-fullstory plugin -date: 2024-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-shippers-fullstory'] --- import kbnAnalyticsShippersFullstoryObj from './kbn_analytics_shippers_fullstory.devdocs.json'; diff --git a/api_docs/kbn_apm_config_loader.mdx b/api_docs/kbn_apm_config_loader.mdx index e03f14a14dfbc..589b62971d7b3 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-04-08 +date: 2024-04-11 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 81b84bbc1ef1e..960291c69d650 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-data-view'] --- import kbnApmDataViewObj from './kbn_apm_data_view.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace.devdocs.json b/api_docs/kbn_apm_synthtrace.devdocs.json index 2d3c49ff1a341..3eb44a004304f 100644 --- a/api_docs/kbn_apm_synthtrace.devdocs.json +++ b/api_docs/kbn_apm_synthtrace.devdocs.json @@ -237,6 +237,38 @@ ], "returnComment": [] }, + { + "parentPluginId": "@kbn/apm-synthtrace", + "id": "def-server.ApmSynthtraceKibanaClient.getFleetApmPackagePath", + "type": "Function", + "tags": [], + "label": "getFleetApmPackagePath", + "description": [], + "signature": [ + "(packageVersion?: string | undefined) => string" + ], + "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_kibana_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/apm-synthtrace", + "id": "def-server.ApmSynthtraceKibanaClient.getFleetApmPackagePath.$1", + "type": "string", + "tags": [], + "label": "packageVersion", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_kibana_client.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": false + } + ], + "returnComment": [] + }, { "parentPluginId": "@kbn/apm-synthtrace", "id": "def-server.ApmSynthtraceKibanaClient.fetchLatestApmPackageVersion", @@ -261,7 +293,7 @@ "label": "installApmPackage", "description": [], "signature": [ - "(packageVersion: string) => Promise" + "(packageVersion?: string | undefined) => Promise<{ version: string; }>" ], "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_kibana_client.ts", "deprecated": false, @@ -275,15 +307,31 @@ "label": "packageVersion", "description": [], "signature": [ - "string" + "string | undefined" ], "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_kibana_client.ts", "deprecated": false, "trackAdoption": false, - "isRequired": true + "isRequired": false } ], "returnComment": [] + }, + { + "parentPluginId": "@kbn/apm-synthtrace", + "id": "def-server.ApmSynthtraceKibanaClient.uninstallApmPackage", + "type": "Function", + "tags": [], + "label": "uninstallApmPackage", + "description": [], + "signature": [ + "() => Promise" + ], + "path": "packages/kbn-apm-synthtrace/src/lib/apm/client/apm_synthtrace_kibana_client.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] } ], "initialIsOpen": false diff --git a/api_docs/kbn_apm_synthtrace.mdx b/api_docs/kbn_apm_synthtrace.mdx index 436368231c36f..2cd507d17b5c3 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace'] --- import kbnApmSynthtraceObj from './kbn_apm_synthtrace.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/te | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 44 | 0 | 44 | 8 | +| 47 | 0 | 47 | 8 | ## Server diff --git a/api_docs/kbn_apm_synthtrace_client.mdx b/api_docs/kbn_apm_synthtrace_client.mdx index 052006f1cff73..8ffab30b3d16f 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-04-08 +date: 2024-04-11 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 7555d1ae41c5f..dcf3044c616bd 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-04-08 +date: 2024-04-11 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 b8f571be2b570..c11620dd13d79 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-04-08 +date: 2024-04-11 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 708b4073b71eb..00cae43eeff8d 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-04-08 +date: 2024-04-11 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 d5c7d2eaec098..26fe4ed7d47bd 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-04-08 +date: 2024-04-11 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 0666ce8089ebc..4f7020ed928a1 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-04-08 +date: 2024-04-11 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 b6145aabd5c8a..8ae1860ef6107 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-04-08 +date: 2024-04-11 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 4ba0dd94744d3..ccda9452be516 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-04-08 +date: 2024-04-11 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 fce63e50b6af2..3e161f588b04f 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-04-08 +date: 2024-04-11 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 bbb0137981668..08c303687d82d 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-04-08 +date: 2024-04-11 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 a0879ae597480..7a3516763c13e 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-04-08 +date: 2024-04-11 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 0b0dc03518480..e3c153a5b0ea3 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-04-08 +date: 2024-04-11 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 2e6ddb92cf0ef..6e0df8a8d4d9b 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-04-08 +date: 2024-04-11 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 6001cba505769..3a8ef7992a746 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-04-08 +date: 2024-04-11 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 972f332ee4518..5183ebb475c1a 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-04-08 +date: 2024-04-11 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 c4770d6bbe918..bca5b2266d57f 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-04-08 +date: 2024-04-11 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 230c71bb18096..002b9e07fd776 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-04-08 +date: 2024-04-11 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 e0129ff9de751..67b3e4cc78d17 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-04-08 +date: 2024-04-11 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 3b8884953a241..cf03b2b2ac2a2 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-04-08 +date: 2024-04-11 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 c596d462367e0..3944184c34506 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-mocks'] --- import kbnConfigMocksObj from './kbn_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_config_schema.devdocs.json b/api_docs/kbn_config_schema.devdocs.json index aa5023e4e9fcd..2a6b482c1a98e 100644 --- a/api_docs/kbn_config_schema.devdocs.json +++ b/api_docs/kbn_config_schema.devdocs.json @@ -2602,6 +2602,21 @@ } ], "objects": [ + { + "parentPluginId": "@kbn/config-schema", + "id": "def-common.metaFields", + "type": "Object", + "tags": [], + "label": "metaFields", + "description": [], + "signature": [ + "{ readonly META_FIELD_X_OAS_OPTIONAL: \"x-oas-optional\"; readonly META_FIELD_X_OAS_MAX_LENGTH: \"x-oas-max-length\"; readonly META_FIELD_X_OAS_MIN_LENGTH: \"x-oas-min-length\"; readonly META_FIELD_X_OAS_GET_ADDITIONAL_PROPERTIES: \"x-oas-get-additional-properties\"; }" + ], + "path": "packages/kbn-config-schema/index.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/config-schema", "id": "def-common.schema", diff --git a/api_docs/kbn_config_schema.mdx b/api_docs/kbn_config_schema.mdx index e313cb1d37156..3366af3598309 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-schema'] --- import kbnConfigSchemaObj from './kbn_config_schema.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 | |-------------------|-----------|------------------------|-----------------| -| 140 | 3 | 137 | 18 | +| 141 | 3 | 138 | 18 | ## Common diff --git a/api_docs/kbn_content_management_content_editor.mdx b/api_docs/kbn_content_management_content_editor.mdx index 63ba0308bdcca..c61d5d7cffd6e 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-04-08 +date: 2024-04-11 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 f0a3518897dfc..0cc5135bd32fb 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-04-08 +date: 2024-04-11 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 1b39b0d2420a2..f484dc561dbd2 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-04-08 +date: 2024-04-11 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 f8de5dfaac029..74fced55d03be 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-04-08 +date: 2024-04-11 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 66c3ad36252f7..f24ba10eb3abe 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view-table'] --- import kbnContentManagementTableListViewTableObj from './kbn_content_management_table_list_view_table.devdocs.json'; diff --git a/api_docs/kbn_content_management_utils.mdx b/api_docs/kbn_content_management_utils.mdx index 637afc023c53f..407adb2e5b613 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-utils'] --- import kbnContentManagementUtilsObj from './kbn_content_management_utils.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser.mdx b/api_docs/kbn_core_analytics_browser.mdx index ca4e92f5055a2..c6ff8f174435c 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-04-08 +date: 2024-04-11 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 36059879bc510..64861fa12cea3 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-04-08 +date: 2024-04-11 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 b214a89f2614c..448c93f9fd14f 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-mocks'] --- import kbnCoreAnalyticsBrowserMocksObj from './kbn_core_analytics_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server.mdx b/api_docs/kbn_core_analytics_server.mdx index 3381380b93c88..6950d3ca3824f 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-04-08 +date: 2024-04-11 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 a2f20dcfa4962..7861e17847aed 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-04-08 +date: 2024-04-11 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 133b51c800185..756f564234ef4 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-04-08 +date: 2024-04-11 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 da92ca8f1dc5f..6329afd6ff027 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-04-08 +date: 2024-04-11 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 40ea2e5eb41e4..aa0320157eb83 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-04-08 +date: 2024-04-11 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 fb122893bb6fb..f9dfd1eee0e41 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-04-08 +date: 2024-04-11 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 dc1ea81ade1aa..bbd9dcd9bfb10 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-04-08 +date: 2024-04-11 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 65c2fa192bbf8..c1698cb363865 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-04-08 +date: 2024-04-11 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 a1cefc79a5cd2..c5cc7b9c8aa84 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-04-08 +date: 2024-04-11 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 fc8b17a875fc2..bd3264d8a725e 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-04-08 +date: 2024-04-11 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 355488a25f69c..483b948e25b4f 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-04-08 +date: 2024-04-11 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 55ccd055f9919..e8c2f724f2242 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-04-08 +date: 2024-04-11 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 28ab50a274d61..fb9d6eec6ac53 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-04-08 +date: 2024-04-11 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 f919e377a1e47..9a6ac726f9ca4 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-04-08 +date: 2024-04-11 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 821340c743835..cf887f01ba053 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-04-08 +date: 2024-04-11 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 dbdf6d1d14ab4..fc65114bb902e 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-04-08 +date: 2024-04-11 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 b183b7769baac..99346d31002a5 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-04-08 +date: 2024-04-11 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 c87fb295129bf..8e2627f2aaedb 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server-mocks'] --- import kbnCoreCapabilitiesServerMocksObj from './kbn_core_capabilities_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser.mdx b/api_docs/kbn_core_chrome_browser.mdx index bddcd111b193d..d0329bfd8d3ac 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-04-08 +date: 2024-04-11 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 630163438e1d1..e437d7aeaf359 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-04-08 +date: 2024-04-11 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 85533d34b800f..9562d59b26509 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-04-08 +date: 2024-04-11 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 fd03bcb56f177..186bc9f017832 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-04-08 +date: 2024-04-11 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 cf388cea99c9a..b4c7b6c517826 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-04-08 +date: 2024-04-11 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 c7dfab7044e60..b2e21127cf9ee 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-04-08 +date: 2024-04-11 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 5c9cb87490b1d..feb92bef2b933 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-04-08 +date: 2024-04-11 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 3e2610b5d8f8f..fa03000f80856 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-04-08 +date: 2024-04-11 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 1e2ca895c7763..4e55a0cd856b3 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-04-08 +date: 2024-04-11 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 f402e55bc811b..56142e95a8648 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-04-08 +date: 2024-04-11 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 74af9889db693..20e1a3533ce14 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-04-08 +date: 2024-04-11 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 fff432e70874c..c012ed845f09a 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-04-08 +date: 2024-04-11 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 03ff52b79cf28..3ebb705aec2ae 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-04-08 +date: 2024-04-11 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 a30f18d8500cb..1e16a56e6f00e 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-04-08 +date: 2024-04-11 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 0c56c982870ee..235c914b1f9c2 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-04-08 +date: 2024-04-11 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 2e2f89e203090..651d6581fb87e 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-04-08 +date: 2024-04-11 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 3f27095ef1611..ee8eaf4c89135 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-04-08 +date: 2024-04-11 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 2adf3352ec33b..c7670adb09555 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-04-08 +date: 2024-04-11 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 0c3461f4adc47..76875133264be 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-04-08 +date: 2024-04-11 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 fbe72aa2f3d8b..084692c79cfe4 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-04-08 +date: 2024-04-11 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 4fa849010dcf9..3c1ee43f6c87e 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-04-08 +date: 2024-04-11 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 e02e1f8cece6d..75c31316cf42f 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-04-08 +date: 2024-04-11 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 d4e69a4964f77..f90d1b984a7c4 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-04-08 +date: 2024-04-11 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 4e07c7cde38f6..c36d5c00cfa82 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-04-08 +date: 2024-04-11 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 1c754ceb42490..a7cc34853b55a 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-04-08 +date: 2024-04-11 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 104dda2d1da7e..f3a25406d89bf 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-04-08 +date: 2024-04-11 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 cccd2ac8ff69d..0d1f6e9fd7176 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-04-08 +date: 2024-04-11 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 b19069993db6f..1e7e9f6fb8673 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-04-08 +date: 2024-04-11 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 2dff9097c5278..1294aaf3f2162 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-04-08 +date: 2024-04-11 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 d048fe4062f64..22cc0e0df98a9 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-04-08 +date: 2024-04-11 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 0f7149644d45d..4bca6a11ca6ec 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-04-08 +date: 2024-04-11 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 d9e1287fc8841..dc054e2665628 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-04-08 +date: 2024-04-11 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 9f5653b7d0a54..08a54e8348956 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-04-08 +date: 2024-04-11 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 41ee29bc0838a..bbb8a9e1e0229 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-04-08 +date: 2024-04-11 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 fb6009b346c06..0af9be2454994 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-04-08 +date: 2024-04-11 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 eb0984fa3474d..9296cef85b616 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-04-08 +date: 2024-04-11 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 d4bc170744a6b..aee5d42b5b623 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-04-08 +date: 2024-04-11 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 96697729f4139..982cd1043f1f0 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-04-08 +date: 2024-04-11 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 a87dd9a655f68..ca1d34c017c47 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-04-08 +date: 2024-04-11 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 5123528f73fc7..a43266a901e0a 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-04-08 +date: 2024-04-11 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 b6429f88c726e..10896af44fbf0 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-04-08 +date: 2024-04-11 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 16ed5026b7e1b..54b69d39359a2 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-04-08 +date: 2024-04-11 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 de2f32476fdf9..1fc901659301c 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-04-08 +date: 2024-04-11 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 eb82219c6c019..6b71157e03f20 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-04-08 +date: 2024-04-11 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 cd67135cad8cf..1dde100330f6f 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-04-08 +date: 2024-04-11 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 a3b75beaa018c..ae628d3a61f81 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-04-08 +date: 2024-04-11 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 911f208ae1944..2eee70ab80e4a 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-04-08 +date: 2024-04-11 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 871e9900670f3..51121a0ba215e 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-04-08 +date: 2024-04-11 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 010a2d1c10529..bfd061d18d372 100644 --- a/api_docs/kbn_core_http_server.devdocs.json +++ b/api_docs/kbn_core_http_server.devdocs.json @@ -2825,6 +2825,19 @@ "path": "packages/core/http/core-http-server/src/csp.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-http-server", + "id": "def-common.ICspConfig.reportOnlyHeader", + "type": "string", + "tags": [], + "label": "reportOnlyHeader", + "description": [ + "\nThe CSP rules in a formatted directives string for use\nin a `Content-Security-Policy-Report-Only` header." + ], + "path": "packages/core/http/core-http-server/src/csp.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false diff --git a/api_docs/kbn_core_http_server.mdx b/api_docs/kbn_core_http_server.mdx index be746128fe53d..548f32b5a2d51 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server'] --- import kbnCoreHttpServerObj from './kbn_core_http_server.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 470 | 1 | 187 | 0 | +| 471 | 1 | 187 | 0 | ## Common diff --git a/api_docs/kbn_core_http_server_internal.devdocs.json b/api_docs/kbn_core_http_server_internal.devdocs.json index bb7f25ad59af1..51ef34ffcd613 100644 --- a/api_docs/kbn_core_http_server_internal.devdocs.json +++ b/api_docs/kbn_core_http_server_internal.devdocs.json @@ -136,6 +136,17 @@ "path": "packages/core/http/core-http-server-internal/src/csp/csp_config.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "@kbn/core-http-server-internal", + "id": "def-common.CspConfig.reportOnlyHeader", + "type": "string", + "tags": [], + "label": "reportOnlyHeader", + "description": [], + "path": "packages/core/http/core-http-server-internal/src/csp/csp_config.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false @@ -1490,7 +1501,15 @@ "section": "def-common.Type", "text": "Type" }, - "; strict: ", + "; report_only: ", + { + "pluginId": "@kbn/config-schema", + "scope": "common", + "docId": "kibKbnConfigSchemaPluginApi", + "section": "def-common.Type", + "text": "Type" + }, + " | undefined>; strict: ", { "pluginId": "@kbn/config-schema", "scope": "common", diff --git a/api_docs/kbn_core_http_server_internal.mdx b/api_docs/kbn_core_http_server_internal.mdx index ea1bd83e06bb8..5e7855960253b 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-04-08 +date: 2024-04-11 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 | |-------------------|-----------|------------------------|-----------------| -| 85 | 0 | 73 | 9 | +| 86 | 0 | 74 | 9 | ## Common diff --git a/api_docs/kbn_core_http_server_mocks.devdocs.json b/api_docs/kbn_core_http_server_mocks.devdocs.json index ddb6de38a236e..abb64f829f5dc 100644 --- a/api_docs/kbn_core_http_server_mocks.devdocs.json +++ b/api_docs/kbn_core_http_server_mocks.devdocs.json @@ -43,7 +43,7 @@ "section": "def-common.IExternalUrlPolicy", "text": "IExternalUrlPolicy" }, - "[]; }>>; csp: Partial>; }>) => ", + "[]; }>>; csp: Partial | undefined; } & { strict: boolean; disableEmbedding: boolean; disableUnsafeEval: boolean; script_src: string[]; worker_src: string[]; style_src: string[]; connect_src: string[]; default_src: string[]; font_src: string[]; frame_src: string[]; img_src: string[]; frame_ancestors: string[]; report_uri: string[]; report_to: string[]; warnLegacyBrowsers: boolean; }>>; }>) => ", { "pluginId": "@kbn/config-mocks", "scope": "common", @@ -80,7 +80,7 @@ "section": "def-common.IExternalUrlPolicy", "text": "IExternalUrlPolicy" }, - "[]; }>>; csp: Partial>; }>" + "[]; }>>; csp: Partial | undefined; } & { strict: boolean; disableEmbedding: boolean; disableUnsafeEval: boolean; script_src: string[]; worker_src: string[]; style_src: string[]; connect_src: string[]; default_src: string[]; font_src: string[]; frame_src: string[]; img_src: string[]; frame_ancestors: string[]; report_uri: string[]; report_to: string[]; warnLegacyBrowsers: boolean; }>>; }>" ], "path": "packages/core/http/core-http-server-mocks/src/test_utils.ts", "deprecated": false, diff --git a/api_docs/kbn_core_http_server_mocks.mdx b/api_docs/kbn_core_http_server_mocks.mdx index 2d067d4762bba..9ba04e2138dac 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-04-08 +date: 2024-04-11 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 e782bd07d1d92..75be22103ed75 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-04-08 +date: 2024-04-11 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 00fa239921b33..4f72f203cafea 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-04-08 +date: 2024-04-11 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 e1f73ab5063ce..a267ef67cd0a4 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-04-08 +date: 2024-04-11 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 1c56780da4ea8..0a0b63b77b848 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-04-08 +date: 2024-04-11 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 3315f35b1db88..9fb778c053cc8 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-04-08 +date: 2024-04-11 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 15e7292a5dcca..8d3258cf7c838 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-04-08 +date: 2024-04-11 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 c7454390e9360..3e57ee76f68a6 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-04-08 +date: 2024-04-11 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 5ff48ab7288c8..e4507b24b1d73 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-04-08 +date: 2024-04-11 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 edc0730a2b7a3..2d3ca695f1c6c 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-04-08 +date: 2024-04-11 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 1f81000fa52b6..7bb28a9cc7e92 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-04-08 +date: 2024-04-11 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 47180787f886b..2efe65d7dfc38 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-04-08 +date: 2024-04-11 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 ce52095d2d0f4..4955117a4dbff 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-04-08 +date: 2024-04-11 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 5c4f749878f24..86b35b1314bbe 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-04-08 +date: 2024-04-11 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 9f45c1238e21f..5923fc256e713 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-04-08 +date: 2024-04-11 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 fea237abe6af5..072dfe2b67455 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-04-08 +date: 2024-04-11 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 6986893c2224b..43494ed1cd3f6 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-04-08 +date: 2024-04-11 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 81e069e3ff1e8..0c2c430a2c84b 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-04-08 +date: 2024-04-11 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 35c9cf4a25fc4..56cf0f4fd5968 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-04-08 +date: 2024-04-11 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 64bf5ec0779cf..ff1f25a96a296 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-mocks'] --- import kbnCoreMetricsCollectorsServerMocksObj from './kbn_core_metrics_collectors_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server.mdx b/api_docs/kbn_core_metrics_server.mdx index 7da333c1b467a..695bf433e62ed 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-04-08 +date: 2024-04-11 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 fb50ddec60e52..0956b211148e1 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-04-08 +date: 2024-04-11 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 0b403d784db23..033dd80469b7b 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-04-08 +date: 2024-04-11 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 dc12da3e59c69..a62719b526f42 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-04-08 +date: 2024-04-11 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 a93ad0ac4c9be..5390a5eda19ba 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-04-08 +date: 2024-04-11 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 54a050ee0ea40..cf46cc06ac885 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-04-08 +date: 2024-04-11 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 7c0784e6e5893..e5fc1ba89d7d4 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-04-08 +date: 2024-04-11 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 d86bee3cd9702..2cd050cfea5fb 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-04-08 +date: 2024-04-11 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 5c184bc0b2388..8739e91dd76bf 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-04-08 +date: 2024-04-11 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 978866c1841d3..21d6a74de80be 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-04-08 +date: 2024-04-11 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 2c1c1fbe90d05..d070594991ac0 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-04-08 +date: 2024-04-11 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 b047173e03968..9d369da631939 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-04-08 +date: 2024-04-11 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 697676d60b0b2..1e628c6f9c85b 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-04-08 +date: 2024-04-11 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 6d83cca79b537..872654cc43fb9 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-04-08 +date: 2024-04-11 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 33239b1f68f6d..1e83394e3bed7 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-04-08 +date: 2024-04-11 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 bab027f7c82a2..83e8fd30af68a 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-04-08 +date: 2024-04-11 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 6ca5684b274db..c7365a456f5f3 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-04-08 +date: 2024-04-11 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 392f1889811ed..1c97a7ec260ca 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-04-08 +date: 2024-04-11 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 4bb60744bb019..37da96913e372 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-04-08 +date: 2024-04-11 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 3c4ed6ed5439a..981fd852bb832 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-04-08 +date: 2024-04-11 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 89ad4b95f5d7d..ef2360128c3d3 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-04-08 +date: 2024-04-11 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 544baf3a90a46..9d6e2f3ddb9d4 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-04-08 +date: 2024-04-11 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 7f73a323cdead..73cc6982b696a 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-04-08 +date: 2024-04-11 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 c66b3e9deb90e..30598111e2c7d 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-04-08 +date: 2024-04-11 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 42a788a71bee4..c371d98663f17 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-04-08 +date: 2024-04-11 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 fc2da9cb1fb2b..eba1373f876cd 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-04-08 +date: 2024-04-11 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 41552fc8165fc..966effe803517 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-04-08 +date: 2024-04-11 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 39d2564e66e2b..70b41d9f72f8c 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-04-08 +date: 2024-04-11 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.devdocs.json b/api_docs/kbn_core_saved_objects_base_server_internal.devdocs.json index 000b94aa9f7e6..2b36ef3164491 100644 --- a/api_docs/kbn_core_saved_objects_base_server_internal.devdocs.json +++ b/api_docs/kbn_core_saved_objects_base_server_internal.devdocs.json @@ -2625,10 +2625,10 @@ }, { "parentPluginId": "@kbn/core-saved-objects-base-server-internal", - "id": "def-common.HASH_TO_VERSION_MAP.epmpackagesc1e2020399dbebba2448096ca007c668", + "id": "def-common.HASH_TO_VERSION_MAP.epmpackages8ce219acd0f6f3529237d52193866afb", "type": "string", "tags": [], - "label": "'epm-packages|c1e2020399dbebba2448096ca007c668'", + "label": "'epm-packages|8ce219acd0f6f3529237d52193866afb'", "description": [], "path": "packages/core/saved-objects/core-saved-objects-base-server-internal/src/constants.ts", "deprecated": false, @@ -2856,10 +2856,10 @@ }, { "parentPluginId": "@kbn/core-saved-objects-base-server-internal", - "id": "def-common.HASH_TO_VERSION_MAP.ingestagentpolicies20768dc7ce5eced3eb309e50d8a6cf76", + "id": "def-common.HASH_TO_VERSION_MAP.ingestagentpolicies0fd93cd11c019b118e93a9157c22057b", "type": "string", "tags": [], - "label": "'ingest-agent-policies|20768dc7ce5eced3eb309e50d8a6cf76'", + "label": "'ingest-agent-policies|0fd93cd11c019b118e93a9157c22057b'", "description": [], "path": "packages/core/saved-objects/core-saved-objects-base-server-internal/src/constants.ts", "deprecated": false, 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 8b6ff96b8e3b2..8648c6778687f 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-04-08 +date: 2024-04-11 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 544b605370151..40ff0c94d1c67 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-04-08 +date: 2024-04-11 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 fe184e0ba08e6..d6ca84e3f3185 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-04-08 +date: 2024-04-11 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 4714e1fc55ff1..e15eb4b785917 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-04-08 +date: 2024-04-11 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 9033aa221d309..06d2d3c1c8635 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-04-08 +date: 2024-04-11 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 f7183a58081f9..be773d814b163 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-04-08 +date: 2024-04-11 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 603da73a9f911..792b52e5e715c 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-04-08 +date: 2024-04-11 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 e357d10bbbb7f..73d1d0b28460b 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-04-08 +date: 2024-04-11 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 14f408e031fd5..63483f80e1f53 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-04-08 +date: 2024-04-11 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 f2d01484d8310..3250dc70ab277 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-04-08 +date: 2024-04-11 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 30a88249edd21..25deace4e4f63 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-04-08 +date: 2024-04-11 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 6b75b4bc96506..c14b8a4e59726 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-04-08 +date: 2024-04-11 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 bf4efdf992e0c..95e7ceb0d7e39 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-04-08 +date: 2024-04-11 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 408076b5bed51..0ba59b9a67b74 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-04-08 +date: 2024-04-11 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 f83f891de0be1..b9c8c7ac78712 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-04-08 +date: 2024-04-11 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 0c9e7b4b64ca1..42fec98609b5a 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-04-08 +date: 2024-04-11 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 499f89d6326b6..d2cca1d33874d 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-04-08 +date: 2024-04-11 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 1e537042cc992..2530e1813c0a1 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-04-08 +date: 2024-04-11 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 792ccc2b8e612..04e817eba32f8 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-04-08 +date: 2024-04-11 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 18bb77e037d8e..9ec516fa3ca03 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-04-08 +date: 2024-04-11 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 92e08a3947aff..c63d76b3842a6 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-04-08 +date: 2024-04-11 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 acacc9f2ea1a5..2f5d758f920e4 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-04-08 +date: 2024-04-11 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 14890e11fb10b..84c84c9e01449 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-04-08 +date: 2024-04-11 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 8aeaa90946018..05fa4acde9ff8 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-04-08 +date: 2024-04-11 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 248b132febc88..a1c92d38bd73a 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-04-08 +date: 2024-04-11 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 1b7e72bc15959..212220e5bfd6d 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-04-08 +date: 2024-04-11 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 a7d4fc13ff0db..a9d809839d538 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-04-08 +date: 2024-04-11 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 cf9c8acfb8b2a..9cd72e0486303 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-04-08 +date: 2024-04-11 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 1ac2cb8cd39f8..efc3009123670 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-04-08 +date: 2024-04-11 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 f96e8ea46372b..b8a51fa08b26f 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-04-08 +date: 2024-04-11 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 28ef28756bde0..b5ef187c8026a 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-04-08 +date: 2024-04-11 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 df31294fdb7bd..85c4b7125b34c 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-04-08 +date: 2024-04-11 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 4c44d7e0920c6..71c03dfcc0a11 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-04-08 +date: 2024-04-11 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 bb5bb764d61c2..1b6e9a9c8537f 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-04-08 +date: 2024-04-11 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 0f7958451a8c3..ced3fa47e9c9d 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-04-08 +date: 2024-04-11 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 75660f7759d1b..374c4f12132e7 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-04-08 +date: 2024-04-11 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 ec32fbb526124..bab2f76b15c09 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-04-08 +date: 2024-04-11 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 b30b3db610f54..972240a7b22a6 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-04-08 +date: 2024-04-11 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 f41acbc7f03fc..2100cf9800442 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-04-08 +date: 2024-04-11 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 e06db39873b18..3f8b81ac679d4 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-04-08 +date: 2024-04-11 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 7fea5e7b793e6..4bbf0215f33d8 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-04-08 +date: 2024-04-11 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 234cb4727361f..072c64d8cc0dc 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-04-08 +date: 2024-04-11 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 0c78f7ba3c795..d20e2978ec0db 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-04-08 +date: 2024-04-11 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 9ba03314a538c..c00a69a42b5aa 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-mocks'] --- import kbnCoreUsageDataServerMocksObj from './kbn_core_usage_data_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server.mdx b/api_docs/kbn_core_user_settings_server.mdx index aaddce0669eee..0bfd98c270c4e 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-settings-server'] --- import kbnCoreUserSettingsServerObj from './kbn_core_user_settings_server.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server_internal.mdx b/api_docs/kbn_core_user_settings_server_internal.mdx index 1da9a7312fe3a..775df20717958 100644 --- a/api_docs/kbn_core_user_settings_server_internal.mdx +++ b/api_docs/kbn_core_user_settings_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-settings-server-internal title: "@kbn/core-user-settings-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-settings-server-internal plugin -date: 2024-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-settings-server-internal'] --- import kbnCoreUserSettingsServerInternalObj from './kbn_core_user_settings_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server_mocks.mdx b/api_docs/kbn_core_user_settings_server_mocks.mdx index 758cef4a323d2..093575abb8c12 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-04-08 +date: 2024-04-11 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 6343911eee61a..04e10de070ce7 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-04-08 +date: 2024-04-11 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 781f9f44132ff..bc9c05aea74fe 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-04-08 +date: 2024-04-11 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 34831924070d1..9cb5cc9c18e1e 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-04-08 +date: 2024-04-11 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 725a6a5b2e224..46f1ec386eeff 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-04-08 +date: 2024-04-11 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 6495cddb6ec12..4617124514fe3 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-04-08 +date: 2024-04-11 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 d58c0473798e4..a9059b56f5153 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-04-08 +date: 2024-04-11 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 56d812cd80f50..0bd95a4dccbf2 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-04-08 +date: 2024-04-11 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 43ee735012fe0..745d22893d045 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-04-08 +date: 2024-04-11 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 d49596a280f32..2437dc372578f 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-view-utils'] --- import kbnDataViewUtilsObj from './kbn_data_view_utils.devdocs.json'; diff --git a/api_docs/kbn_datemath.mdx b/api_docs/kbn_datemath.mdx index 8ef20c8adadd7..44fcd8eb75edb 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-04-08 +date: 2024-04-11 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 013fe422179bc..17dd9bd3b78b3 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-04-08 +date: 2024-04-11 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 ec17b9acac331..6edf0eb061e23 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-04-08 +date: 2024-04-11 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 5b1bc697ab2da..36eb9fa6c775d 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-fleet'] --- import kbnDeeplinksFleetObj from './kbn_deeplinks_fleet.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_management.mdx b/api_docs/kbn_deeplinks_management.mdx index 864bf6f64c3a4..07c4974308a69 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-04-08 +date: 2024-04-11 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 a60fa75177840..1d5138a2dee98 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-ml'] --- import kbnDeeplinksMlObj from './kbn_deeplinks_ml.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_observability.mdx b/api_docs/kbn_deeplinks_observability.mdx index 7450364f7923e..e4f549aea5026 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-observability'] --- import kbnDeeplinksObservabilityObj from './kbn_deeplinks_observability.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_search.mdx b/api_docs/kbn_deeplinks_search.mdx index b16ebc39234ee..c8406f4742fa1 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-04-08 +date: 2024-04-11 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 8f914d7424034..5babb6fbbee72 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-04-08 +date: 2024-04-11 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 d872e08d0a9de..231f9c80095a0 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-04-08 +date: 2024-04-11 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 f5cabf21d107e..e86a8c0f7dfb9 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-04-08 +date: 2024-04-11 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 d83fe34dbcd23..7ea141e3de49f 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-04-08 +date: 2024-04-11 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 c9cc03fbe3894..216fa01c79764 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-04-08 +date: 2024-04-11 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 911d02d7428be..8b40c3e3311b9 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-04-08 +date: 2024-04-11 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 8a3db06043848..5eadd145e5f62 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-04-08 +date: 2024-04-11 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 ba21abc6ea8f2..000a9398f8a95 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-04-08 +date: 2024-04-11 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 81f278107c81a..fdd0cf7cb8801 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-04-08 +date: 2024-04-11 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 3316d8b859b91..3c63c342ce6c4 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-utils'] --- import kbnDevUtilsObj from './kbn_dev_utils.devdocs.json'; diff --git a/api_docs/kbn_discover_utils.devdocs.json b/api_docs/kbn_discover_utils.devdocs.json index b87ba46995cce..7d8f9ab2fa812 100644 --- a/api_docs/kbn_discover_utils.devdocs.json +++ b/api_docs/kbn_discover_utils.devdocs.json @@ -739,6 +739,76 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/discover-utils", + "id": "def-common.isLegacyTableEnabled", + "type": "Function", + "tags": [], + "label": "isLegacyTableEnabled", + "description": [], + "signature": [ + "({\n uiSettings,\n isTextBasedQueryMode,\n}: { uiSettings: ", + { + "pluginId": "@kbn/core-ui-settings-browser", + "scope": "common", + "docId": "kibKbnCoreUiSettingsBrowserPluginApi", + "section": "def-common.IUiSettingsClient", + "text": "IUiSettingsClient" + }, + "; isTextBasedQueryMode: boolean; }) => boolean" + ], + "path": "packages/kbn-discover-utils/src/utils/is_legacy_table_enabled.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/discover-utils", + "id": "def-common.isLegacyTableEnabled.$1", + "type": "Object", + "tags": [], + "label": "{\n uiSettings,\n isTextBasedQueryMode,\n}", + "description": [], + "path": "packages/kbn-discover-utils/src/utils/is_legacy_table_enabled.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/discover-utils", + "id": "def-common.isLegacyTableEnabled.$1.uiSettings", + "type": "Object", + "tags": [], + "label": "uiSettings", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-ui-settings-browser", + "scope": "common", + "docId": "kibKbnCoreUiSettingsBrowserPluginApi", + "section": "def-common.IUiSettingsClient", + "text": "IUiSettingsClient" + } + ], + "path": "packages/kbn-discover-utils/src/utils/is_legacy_table_enabled.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/discover-utils", + "id": "def-common.isLegacyTableEnabled.$1.isTextBasedQueryMode", + "type": "boolean", + "tags": [], + "label": "isTextBasedQueryMode", + "description": [], + "path": "packages/kbn-discover-utils/src/utils/is_legacy_table_enabled.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/discover-utils", "id": "def-common.isNestedFieldParent", diff --git a/api_docs/kbn_discover_utils.mdx b/api_docs/kbn_discover_utils.mdx index 4e813cc93512f..d8ccf526357fa 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/discover-utils'] --- import kbnDiscoverUtilsObj from './kbn_discover_utils.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 59 | 0 | 37 | 4 | +| 63 | 0 | 41 | 4 | ## Common diff --git a/api_docs/kbn_doc_links.mdx b/api_docs/kbn_doc_links.mdx index b632966911d97..d19808401daa3 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-04-08 +date: 2024-04-11 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 48c3c6a185f5d..75715ea819409 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-04-08 +date: 2024-04-11 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 313dacf967462..e46bc0b57b343 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dom-drag-drop'] --- import kbnDomDragDropObj from './kbn_dom_drag_drop.devdocs.json'; diff --git a/api_docs/kbn_ebt_tools.mdx b/api_docs/kbn_ebt_tools.mdx index d4777c9afab90..990ec01cfea26 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-04-08 +date: 2024-04-11 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 cf96fa4096845..899d834c30a85 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-04-08 +date: 2024-04-11 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 d2e06fa630509..cb5f519c4585f 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-04-08 +date: 2024-04-11 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 f723fffa6ee5b..bf97e77f8fe40 100644 --- a/api_docs/kbn_elastic_assistant.devdocs.json +++ b/api_docs/kbn_elastic_assistant.devdocs.json @@ -1394,6 +1394,73 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.ClientMessage", + "type": "Interface", + "tags": [], + "label": "ClientMessage", + "description": [], + "signature": [ + { + "pluginId": "@kbn/elastic-assistant", + "scope": "public", + "docId": "kibKbnElasticAssistantPluginApi", + "section": "def-public.ClientMessage", + "text": "ClientMessage" + }, + " extends Omit<{ timestamp: string; role: \"user\" | \"system\" | \"assistant\"; content: string; reader?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; isError?: boolean | undefined; traceData?: { transactionId?: string | undefined; traceId?: string | undefined; } | undefined; }, \"content\" | \"reader\">" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.ClientMessage.reader", + "type": "Object", + "tags": [], + "label": "reader", + "description": [], + "signature": [ + "ReadableStreamDefaultReader | undefined" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.ClientMessage.content", + "type": "string", + "tags": [], + "label": "content", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/elastic-assistant", + "id": "def-public.ClientMessage.presentation", + "type": "Object", + "tags": [], + "label": "presentation", + "description": [], + "signature": [ + "MessagePresentation", + " | undefined" + ], + "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/elastic-assistant", "id": "def-public.CodeBlockDetails", @@ -1585,8 +1652,8 @@ "pluginId": "@kbn/elastic-assistant", "scope": "public", "docId": "kibKbnElasticAssistantPluginApi", - "section": "def-public.Message", - "text": "Message" + "section": "def-public.ClientMessage", + "text": "ClientMessage" }, "[]" ], @@ -1790,8 +1857,8 @@ "pluginId": "@kbn/elastic-assistant", "scope": "public", "docId": "kibKbnElasticAssistantPluginApi", - "section": "def-public.Message", - "text": "Message" + "section": "def-public.ClientMessage", + "text": "ClientMessage" }, "[] | undefined" ], @@ -1902,130 +1969,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.Message", - "type": "Interface", - "tags": [], - "label": "Message", - "description": [], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.Message.role", - "type": "CompoundType", - "tags": [], - "label": "role", - "description": [], - "signature": [ - "\"user\" | \"system\" | \"assistant\"" - ], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.Message.reader", - "type": "Object", - "tags": [], - "label": "reader", - "description": [], - "signature": [ - "ReadableStreamDefaultReader | undefined" - ], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.Message.replacements", - "type": "CompoundType", - "tags": [], - "label": "replacements", - "description": [], - "signature": [ - "Zod.objectOutputType<{}, Zod.ZodString, \"strip\"> | undefined" - ], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.Message.content", - "type": "string", - "tags": [], - "label": "content", - "description": [], - "signature": [ - "string | undefined" - ], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.Message.timestamp", - "type": "string", - "tags": [], - "label": "timestamp", - "description": [], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.Message.isError", - "type": "CompoundType", - "tags": [], - "label": "isError", - "description": [], - "signature": [ - "boolean | undefined" - ], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.Message.presentation", - "type": "Object", - "tags": [], - "label": "presentation", - "description": [], - "signature": [ - "MessagePresentation", - " | undefined" - ], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/elastic-assistant", - "id": "def-public.Message.traceData", - "type": "Object", - "tags": [], - "label": "traceData", - "description": [], - "signature": [ - "{ transactionId: string; traceId: string; } | undefined" - ], - "path": "x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "@kbn/elastic-assistant", "id": "def-public.PostKnowledgeBaseResponse", diff --git a/api_docs/kbn_elastic_assistant.mdx b/api_docs/kbn_elastic_assistant.mdx index af450cf60fae9..bcdd512465102 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-04-08 +date: 2024-04-11 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 | |-------------------|-----------|------------------------|-----------------| -| 155 | 0 | 133 | 8 | +| 150 | 0 | 128 | 8 | ## Client diff --git a/api_docs/kbn_elastic_assistant_common.devdocs.json b/api_docs/kbn_elastic_assistant_common.devdocs.json index 3e3c410b6b2e5..e8ebc581b78dc 100644 --- a/api_docs/kbn_elastic_assistant_common.devdocs.json +++ b/api_docs/kbn_elastic_assistant_common.devdocs.json @@ -1451,7 +1451,7 @@ "label": "ExecuteConnectorRequestBody", "description": [], "signature": [ - "{ actionTypeId: string; subAction: \"invokeAI\" | \"invokeStream\"; replacements: {} & { [k: string]: string; }; conversationId?: string | undefined; message?: string | undefined; model?: string | undefined; alertsIndexPattern?: string | undefined; allow?: string[] | undefined; allowReplacement?: string[] | undefined; isEnabledKnowledgeBase?: boolean | undefined; isEnabledRAGAlerts?: boolean | undefined; size?: number | undefined; }" + "{ actionTypeId: string; subAction: \"invokeAI\" | \"invokeStream\"; replacements: {} & { [k: string]: string; }; conversationId?: string | undefined; message?: string | undefined; model?: string | undefined; alertsIndexPattern?: string | undefined; allow?: string[] | undefined; allowReplacement?: string[] | undefined; isEnabledKnowledgeBase?: boolean | undefined; isEnabledRAGAlerts?: boolean | undefined; size?: number | undefined; langSmithProject?: string | undefined; langSmithApiKey?: string | undefined; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts", "deprecated": false, @@ -1466,7 +1466,7 @@ "label": "ExecuteConnectorRequestBodyInput", "description": [], "signature": [ - "{ actionTypeId: string; subAction: \"invokeAI\" | \"invokeStream\"; replacements: {} & { [k: string]: string; }; conversationId?: string | undefined; message?: string | undefined; model?: string | undefined; alertsIndexPattern?: string | undefined; allow?: string[] | undefined; allowReplacement?: string[] | undefined; isEnabledKnowledgeBase?: boolean | undefined; isEnabledRAGAlerts?: boolean | undefined; size?: number | undefined; }" + "{ actionTypeId: string; subAction: \"invokeAI\" | \"invokeStream\"; replacements: {} & { [k: string]: string; }; conversationId?: string | undefined; message?: string | undefined; model?: string | undefined; alertsIndexPattern?: string | undefined; allow?: string[] | undefined; allowReplacement?: string[] | undefined; isEnabledKnowledgeBase?: boolean | undefined; isEnabledRAGAlerts?: boolean | undefined; size?: number | undefined; langSmithProject?: string | undefined; langSmithApiKey?: string | undefined; }" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts", "deprecated": false, @@ -2810,7 +2810,7 @@ "label": "ExecuteConnectorRequestBody", "description": [], "signature": [ - "Zod.ZodObject<{ conversationId: Zod.ZodOptional; message: Zod.ZodOptional; model: Zod.ZodOptional; subAction: Zod.ZodEnum<[\"invokeAI\", \"invokeStream\"]>; actionTypeId: Zod.ZodString; alertsIndexPattern: Zod.ZodOptional; allow: Zod.ZodOptional>; allowReplacement: Zod.ZodOptional>; isEnabledKnowledgeBase: Zod.ZodOptional; isEnabledRAGAlerts: Zod.ZodOptional; replacements: Zod.ZodObject<{}, \"strip\", Zod.ZodString, Zod.objectOutputType<{}, Zod.ZodString, \"strip\">, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>; size: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { actionTypeId: string; subAction: \"invokeAI\" | \"invokeStream\"; replacements: {} & { [k: string]: string; }; conversationId?: string | undefined; message?: string | undefined; model?: string | undefined; alertsIndexPattern?: string | undefined; allow?: string[] | undefined; allowReplacement?: string[] | undefined; isEnabledKnowledgeBase?: boolean | undefined; isEnabledRAGAlerts?: boolean | undefined; size?: number | undefined; }, { actionTypeId: string; subAction: \"invokeAI\" | \"invokeStream\"; replacements: {} & { [k: string]: string; }; conversationId?: string | undefined; message?: string | undefined; model?: string | undefined; alertsIndexPattern?: string | undefined; allow?: string[] | undefined; allowReplacement?: string[] | undefined; isEnabledKnowledgeBase?: boolean | undefined; isEnabledRAGAlerts?: boolean | undefined; size?: number | undefined; }>" + "Zod.ZodObject<{ conversationId: Zod.ZodOptional; message: Zod.ZodOptional; model: Zod.ZodOptional; subAction: Zod.ZodEnum<[\"invokeAI\", \"invokeStream\"]>; actionTypeId: Zod.ZodString; alertsIndexPattern: Zod.ZodOptional; allow: Zod.ZodOptional>; allowReplacement: Zod.ZodOptional>; isEnabledKnowledgeBase: Zod.ZodOptional; isEnabledRAGAlerts: Zod.ZodOptional; replacements: Zod.ZodObject<{}, \"strip\", Zod.ZodString, Zod.objectOutputType<{}, Zod.ZodString, \"strip\">, Zod.objectInputType<{}, Zod.ZodString, \"strip\">>; size: Zod.ZodOptional; langSmithProject: Zod.ZodOptional; langSmithApiKey: Zod.ZodOptional; }, \"strip\", Zod.ZodTypeAny, { actionTypeId: string; subAction: \"invokeAI\" | \"invokeStream\"; replacements: {} & { [k: string]: string; }; conversationId?: string | undefined; message?: string | undefined; model?: string | undefined; alertsIndexPattern?: string | undefined; allow?: string[] | undefined; allowReplacement?: string[] | undefined; isEnabledKnowledgeBase?: boolean | undefined; isEnabledRAGAlerts?: boolean | undefined; size?: number | undefined; langSmithProject?: string | undefined; langSmithApiKey?: string | undefined; }, { actionTypeId: string; subAction: \"invokeAI\" | \"invokeStream\"; replacements: {} & { [k: string]: string; }; conversationId?: string | undefined; message?: string | undefined; model?: string | undefined; alertsIndexPattern?: string | undefined; allow?: string[] | undefined; allowReplacement?: string[] | undefined; isEnabledKnowledgeBase?: boolean | undefined; isEnabledRAGAlerts?: boolean | undefined; size?: number | undefined; langSmithProject?: string | undefined; langSmithApiKey?: string | undefined; }>" ], "path": "x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts", "deprecated": false, diff --git a/api_docs/kbn_elastic_assistant_common.mdx b/api_docs/kbn_elastic_assistant_common.mdx index e8a17ce0cd3a2..3c0bbe73f3e64 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-assistant-common'] --- import kbnElasticAssistantCommonObj from './kbn_elastic_assistant_common.devdocs.json'; diff --git a/api_docs/kbn_es.mdx b/api_docs/kbn_es.mdx index 9f18cf3744388..11d12fa5aef4d 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-04-08 +date: 2024-04-11 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 33cdaf49639d9..2d56f1604a707 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-04-08 +date: 2024-04-11 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 36f1329f0366f..d820683a30dfc 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-04-08 +date: 2024-04-11 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 499eb9ba9e9c9..53d295b90b041 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-query'] --- import kbnEsQueryObj from './kbn_es_query.devdocs.json'; diff --git a/api_docs/kbn_es_types.devdocs.json b/api_docs/kbn_es_types.devdocs.json index 90683089548fe..4be57d0c8550d 100644 --- a/api_docs/kbn_es_types.devdocs.json +++ b/api_docs/kbn_es_types.devdocs.json @@ -78,6 +78,17 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "@kbn/es-types", + "id": "def-common.ESQLSearchParams.version", + "type": "string", + "tags": [], + "label": "version", + "description": [], + "path": "packages/kbn-es-types/src/search.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "@kbn/es-types", "id": "def-common.ESQLSearchParams.filter", diff --git a/api_docs/kbn_es_types.mdx b/api_docs/kbn_es_types.mdx index 139740cb534e1..476d50b5a430a 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-types'] --- import kbnEsTypesObj from './kbn_es_types.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 25 | 0 | 25 | 0 | +| 26 | 0 | 26 | 0 | ## Common diff --git a/api_docs/kbn_eslint_plugin_imports.mdx b/api_docs/kbn_eslint_plugin_imports.mdx index 0c6301fd08659..8cbccacee1b58 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/eslint-plugin-imports'] --- import kbnEslintPluginImportsObj from './kbn_eslint_plugin_imports.devdocs.json'; diff --git a/api_docs/kbn_esql_ast.devdocs.json b/api_docs/kbn_esql_ast.devdocs.json index 3d5cdfbcd90b8..f8d3c562b9d24 100644 --- a/api_docs/kbn_esql_ast.devdocs.json +++ b/api_docs/kbn_esql_ast.devdocs.json @@ -742,72 +742,6 @@ ], "initialIsOpen": false }, - { - "parentPluginId": "@kbn/esql-ast", - "id": "def-common.ESQLLiteral", - "type": "Interface", - "tags": [], - "label": "ESQLLiteral", - "description": [], - "signature": [ - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLLiteral", - "text": "ESQLLiteral" - }, - " extends ESQLAstBaseItem" - ], - "path": "packages/kbn-esql-ast/src/types.ts", - "deprecated": false, - "trackAdoption": false, - "children": [ - { - "parentPluginId": "@kbn/esql-ast", - "id": "def-common.ESQLLiteral.type", - "type": "string", - "tags": [], - "label": "type", - "description": [], - "signature": [ - "\"literal\"" - ], - "path": "packages/kbn-esql-ast/src/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/esql-ast", - "id": "def-common.ESQLLiteral.literalType", - "type": "CompoundType", - "tags": [], - "label": "literalType", - "description": [], - "signature": [ - "\"string\" | \"number\" | \"boolean\" | \"null\"" - ], - "path": "packages/kbn-esql-ast/src/types.ts", - "deprecated": false, - "trackAdoption": false - }, - { - "parentPluginId": "@kbn/esql-ast", - "id": "def-common.ESQLLiteral.value", - "type": "CompoundType", - "tags": [], - "label": "value", - "description": [], - "signature": [ - "string | number" - ], - "path": "packages/kbn-esql-ast/src/types.ts", - "deprecated": false, - "trackAdoption": false - } - ], - "initialIsOpen": false - }, { "parentPluginId": "@kbn/esql-ast", "id": "def-common.ESQLLocation", @@ -1129,6 +1063,27 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "@kbn/esql-ast", + "id": "def-common.ESQLLiteral", + "type": "Type", + "tags": [], + "label": "ESQLLiteral", + "description": [], + "signature": [ + "ESQLNumberLiteral", + " | ", + "ESQLBooleanLiteral", + " | ", + "ESQLNullLiteral", + " | ", + "ESQLStringLiteral" + ], + "path": "packages/kbn-esql-ast/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/esql-ast", "id": "def-common.ESQLSingleAstItem", diff --git a/api_docs/kbn_esql_ast.mdx b/api_docs/kbn_esql_ast.mdx index ef2afbeacef3f..a6786015ae602 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-ast'] --- import kbnEsqlAstObj from './kbn_esql_ast.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 66 | 1 | 66 | 2 | +| 63 | 1 | 63 | 6 | ## Common diff --git a/api_docs/kbn_esql_utils.devdocs.json b/api_docs/kbn_esql_utils.devdocs.json index cc82826790a62..508643d19c733 100644 --- a/api_docs/kbn_esql_utils.devdocs.json +++ b/api_docs/kbn_esql_utils.devdocs.json @@ -371,6 +371,21 @@ "interfaces": [], "enums": [], "misc": [ + { + "parentPluginId": "@kbn/esql-utils", + "id": "def-common.ESQL_LATEST_VERSION", + "type": "string", + "tags": [], + "label": "ESQL_LATEST_VERSION", + "description": [], + "signature": [ + "\"2024.04.01\"" + ], + "path": "packages/kbn-esql-utils/constants.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "@kbn/esql-utils", "id": "def-common.TextBasedLanguages", diff --git a/api_docs/kbn_esql_utils.mdx b/api_docs/kbn_esql_utils.mdx index 742743176adef..1255c1c2ebea7 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-utils'] --- import kbnEsqlUtilsObj from './kbn_esql_utils.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 20 | 0 | 18 | 0 | +| 21 | 0 | 19 | 0 | ## Common diff --git a/api_docs/kbn_esql_validation_autocomplete.devdocs.json b/api_docs/kbn_esql_validation_autocomplete.devdocs.json index e4e67121121f3..1ec70772ee16b 100644 --- a/api_docs/kbn_esql_validation_autocomplete.devdocs.json +++ b/api_docs/kbn_esql_validation_autocomplete.devdocs.json @@ -219,6 +219,8 @@ "section": "def-common.AstProviderFn", "text": "AstProviderFn" }, + ", options: ", + "CodeActionOptions", ", resourceRetriever: ", { "pluginId": "@kbn/esql-validation-autocomplete", @@ -313,6 +315,21 @@ "id": "def-common.getActions.$4", "type": "Object", "tags": [], + "label": "options", + "description": [], + "signature": [ + "CodeActionOptions" + ], + "path": "packages/kbn-esql-validation-autocomplete/src/code_actions/actions.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + }, + { + "parentPluginId": "@kbn/esql-validation-autocomplete", + "id": "def-common.getActions.$5", + "type": "Object", + "tags": [], "label": "resourceRetriever", "description": [], "signature": [ @@ -545,13 +562,13 @@ " | ", "ESQLList", " | ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLLiteral", - "text": "ESQLLiteral" - }, + "ESQLNumberLiteral", + " | ", + "ESQLBooleanLiteral", + " | ", + "ESQLNullLiteral", + " | ", + "ESQLStringLiteral", " | ", { "pluginId": "@kbn/esql-ast", @@ -635,13 +652,13 @@ " | ", "ESQLList", " | ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLLiteral", - "text": "ESQLLiteral" - }, + "ESQLNumberLiteral", + " | ", + "ESQLBooleanLiteral", + " | ", + "ESQLNullLiteral", + " | ", + "ESQLStringLiteral", " | ", { "pluginId": "@kbn/esql-ast", @@ -709,13 +726,13 @@ " | ", "ESQLList", " | ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLLiteral", - "text": "ESQLLiteral" - }, + "ESQLNumberLiteral", + " | ", + "ESQLBooleanLiteral", + " | ", + "ESQLNullLiteral", + " | ", + "ESQLStringLiteral", " | ", { "pluginId": "@kbn/esql-ast", @@ -791,13 +808,13 @@ " | ", "ESQLList", " | ", - { - "pluginId": "@kbn/esql-ast", - "scope": "common", - "docId": "kibKbnEsqlAstPluginApi", - "section": "def-common.ESQLLiteral", - "text": "ESQLLiteral" - }, + "ESQLNumberLiteral", + " | ", + "ESQLBooleanLiteral", + " | ", + "ESQLNullLiteral", + " | ", + "ESQLStringLiteral", " | ", { "pluginId": "@kbn/esql-ast", @@ -1468,9 +1485,11 @@ "type": "Function", "tags": [], "label": "isEqualType", - "description": [], + "description": [ + "\nChecks if an AST argument is of the correct type\ngiven the definition." + ], "signature": [ - "(item: ", + "(arg: ", { "pluginId": "@kbn/esql-ast", "scope": "common", @@ -1478,7 +1497,7 @@ "section": "def-common.ESQLSingleAstItem", "text": "ESQLSingleAstItem" }, - ", argDef: { name: string; type: string; optional?: boolean | undefined; noNestingFunctions?: boolean | undefined; supportsWildcard?: boolean | undefined; literalOnly?: boolean | undefined; } | { name: string; type: string; optional?: boolean | undefined; innerType?: string | undefined; values?: string[] | undefined; valueDescriptions?: string[] | undefined; literalOnly?: boolean | undefined; wildcards?: boolean | undefined; }, references: ", + ", argDef: { name: string; type: string; optional?: boolean | undefined; noNestingFunctions?: boolean | undefined; supportsWildcard?: boolean | undefined; literalOnly?: boolean | undefined; literalOptions?: string[] | undefined; } | { name: string; type: string; optional?: boolean | undefined; innerType?: string | undefined; values?: string[] | undefined; valueDescriptions?: string[] | undefined; literalOnly?: boolean | undefined; wildcards?: boolean | undefined; }, references: ", "ReferenceMaps", ", parentCommand: string | undefined, nameHit: string | undefined) => boolean | undefined" ], @@ -1491,7 +1510,7 @@ "id": "def-common.isEqualType.$1", "type": "CompoundType", "tags": [], - "label": "item", + "label": "arg", "description": [], "signature": [ { @@ -1515,7 +1534,7 @@ "label": "argDef", "description": [], "signature": [ - "{ name: string; type: string; optional?: boolean | undefined; noNestingFunctions?: boolean | undefined; supportsWildcard?: boolean | undefined; literalOnly?: boolean | undefined; } | { name: string; type: string; optional?: boolean | undefined; innerType?: string | undefined; values?: string[] | undefined; valueDescriptions?: string[] | undefined; literalOnly?: boolean | undefined; wildcards?: boolean | undefined; }" + "{ name: string; type: string; optional?: boolean | undefined; noNestingFunctions?: boolean | undefined; supportsWildcard?: boolean | undefined; literalOnly?: boolean | undefined; literalOptions?: string[] | undefined; } | { name: string; type: string; optional?: boolean | undefined; innerType?: string | undefined; values?: string[] | undefined; valueDescriptions?: string[] | undefined; literalOnly?: boolean | undefined; wildcards?: boolean | undefined; }" ], "path": "packages/kbn-esql-validation-autocomplete/src/shared/helpers.ts", "deprecated": false, @@ -3222,7 +3241,7 @@ "label": "signatures", "description": [], "signature": [ - "{ params: { name: string; type: string; optional?: boolean | undefined; noNestingFunctions?: boolean | undefined; supportsWildcard?: boolean | undefined; literalOnly?: boolean | undefined; }[]; minParams?: number | undefined; returnType: string; examples?: string[] | undefined; }[]" + "{ params: { name: string; type: string; optional?: boolean | undefined; noNestingFunctions?: boolean | undefined; supportsWildcard?: boolean | undefined; literalOnly?: boolean | undefined; literalOptions?: string[] | undefined; }[]; minParams?: number | undefined; returnType: string; examples?: string[] | undefined; }[]" ], "path": "packages/kbn-esql-validation-autocomplete/src/definitions/types.ts", "deprecated": false, @@ -3601,6 +3620,20 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "@kbn/esql-validation-autocomplete", + "id": "def-common.ValidationErrors.unsupportedLiteralOption", + "type": "Object", + "tags": [], + "label": "unsupportedLiteralOption", + "description": [], + "signature": [ + "{ message: string; type: { name: string; value: string; supportedOptions: string; }; }" + ], + "path": "packages/kbn-esql-validation-autocomplete/src/validation/types.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "@kbn/esql-validation-autocomplete", "id": "def-common.ValidationErrors.shadowFieldType", diff --git a/api_docs/kbn_esql_validation_autocomplete.mdx b/api_docs/kbn_esql_validation_autocomplete.mdx index 9826114529b83..2b308fc6b60f7 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-validation-autocomplete'] --- import kbnEsqlValidationAutocompleteObj from './kbn_esql_validation_autocomplete.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 192 | 0 | 183 | 7 | +| 194 | 0 | 184 | 8 | ## Common diff --git a/api_docs/kbn_event_annotation_common.mdx b/api_docs/kbn_event_annotation_common.mdx index 496bfd6771b3e..206b2ddf1cfd6 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-04-08 +date: 2024-04-11 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 b4b276455748c..a4f4a7b49e7b2 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-04-08 +date: 2024-04-11 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 e42f51b471ca8..f77f29a412fb1 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-04-08 +date: 2024-04-11 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 9f9fb4a5d538c..a015bef9c92c1 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-04-08 +date: 2024-04-11 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 5821be119a45d..8b31c7127a530 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-04-08 +date: 2024-04-11 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 5d6d532280121..21d8f568de8e2 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-04-08 +date: 2024-04-11 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 4069e2905ffeb..79bf51f4142f9 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-04-08 +date: 2024-04-11 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 e3ddede52324c..2179e6de1b87e 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-04-08 +date: 2024-04-11 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.devdocs.json b/api_docs/kbn_ftr_common_functional_ui_services.devdocs.json index 5c4b060c52ba8..8c9f048b6c087 100644 --- a/api_docs/kbn_ftr_common_functional_ui_services.devdocs.json +++ b/api_docs/kbn_ftr_common_functional_ui_services.devdocs.json @@ -1055,7 +1055,7 @@ "label": "getAttribute", "description": [], "signature": [ - "(selector: string, attribute: string, options?: number | { findTimeout?: number | undefined; tryTimeout?: number | undefined; } | undefined) => Promise" + "(selector: string, attribute: string, options?: number | { findTimeout?: number | undefined; tryTimeout?: number | undefined; } | undefined) => Promise" ], "path": "packages/kbn-ftr-common-functional-ui-services/services/test_subjects.ts", "deprecated": false, @@ -2620,13 +2620,15 @@ "parentPluginId": "@kbn/ftr-common-functional-ui-services", "id": "def-common.WebElementWrapper.getAttribute", "type": "Function", - "tags": [], + "tags": [ + "return" + ], "label": "getAttribute", "description": [ "\nRetrieves the current value of the given attribute of this element. Will return the current\nvalue, even if it has been modified after the page has been loaded. More exactly, this method\nwill return the value of the given attribute, unless that attribute is not present, in which\ncase the value of the property with the same name is returned. If neither value is set, null\nis returned (for example, the \"value\" property of a textarea element). The \"style\" attribute\nis converted as best can be to a text representation with a trailing semi-colon.\nhttps://seleniumhq.github.io/selenium/docs/api/javascript/module/selenium-webdriver/lib/webdriver_exports_WebElement.html#getAttribute\n" ], "signature": [ - "(name: string) => Promise" + "(name: string) => Promise" ], "path": "packages/kbn-ftr-common-functional-ui-services/services/web_element_wrapper/web_element_wrapper.ts", "deprecated": false, diff --git a/api_docs/kbn_ftr_common_functional_ui_services.mdx b/api_docs/kbn_ftr_common_functional_ui_services.mdx index 305124aa2c9be..ce991fd8b3dbd 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-04-08 +date: 2024-04-11 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 9a064980e4d0c..f98018ee29cce 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-04-08 +date: 2024-04-11 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 0e603817a5660..162ee9fa6119a 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-04-08 +date: 2024-04-11 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 dd0b71d2c6da5..50f54b486b578 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate-csv'] --- import kbnGenerateCsvObj from './kbn_generate_csv.devdocs.json'; diff --git a/api_docs/kbn_guided_onboarding.mdx b/api_docs/kbn_guided_onboarding.mdx index cecf8613893b6..245b6be791d47 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-04-08 +date: 2024-04-11 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 7b077d6872a99..9c99b7c1ea88f 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-04-08 +date: 2024-04-11 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 91bf61cda2670..326881f4755f4 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-04-08 +date: 2024-04-11 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 3228cc0a7a32c..fcdccb72344cb 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-04-08 +date: 2024-04-11 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 ba19d95f84429..0ada8e17d1b58 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-04-08 +date: 2024-04-11 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 a8cb2c28e2399..c5e112d17975d 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-04-08 +date: 2024-04-11 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 dd13c8944b995..ba0c6e8434479 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-04-08 +date: 2024-04-11 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 0bc9327f05077..5318236c0611d 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-04-08 +date: 2024-04-11 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 254b29cc72b08..790c701888ad3 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/import-resolver'] --- import kbnImportResolverObj from './kbn_import_resolver.devdocs.json'; diff --git a/api_docs/kbn_index_management.devdocs.json b/api_docs/kbn_index_management.devdocs.json new file mode 100644 index 0000000000000..e7a2015875695 --- /dev/null +++ b/api_docs/kbn_index_management.devdocs.json @@ -0,0 +1,2143 @@ +{ + "id": "@kbn/index-management", + "client": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "server": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.EmptyListContent", + "type": "Interface", + "tags": [], + "label": "EmptyListContent", + "description": [], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.EmptyListContent.renderContent", + "type": "Function", + "tags": [], + "label": "renderContent", + "description": [], + "signature": [ + "(args: { createIndexButton: React.ReactElement | null; }) => React.ReactElement | null" + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.EmptyListContent.renderContent.$1", + "type": "Object", + "tags": [], + "label": "args", + "description": [], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.EmptyListContent.renderContent.$1.createIndexButton", + "type": "CompoundType", + "tags": [], + "label": "createIndexButton", + "description": [], + "signature": [ + "React.ReactElement | null" + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.ExtensionsSetup", + "type": "Interface", + "tags": [], + "label": "ExtensionsSetup", + "description": [], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.ExtensionsSetup.addAction", + "type": "Function", + "tags": [], + "label": "addAction", + "description": [], + "signature": [ + "(action: any) => void" + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.ExtensionsSetup.addAction.$1", + "type": "Any", + "tags": [], + "label": "action", + "description": [], + "signature": [ + "any" + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.ExtensionsSetup.addBanner", + "type": "Function", + "tags": [], + "label": "addBanner", + "description": [], + "signature": [ + "(banner: any) => void" + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.ExtensionsSetup.addBanner.$1", + "type": "Any", + "tags": [], + "label": "banner", + "description": [], + "signature": [ + "any" + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.ExtensionsSetup.addFilter", + "type": "Function", + "tags": [], + "label": "addFilter", + "description": [], + "signature": [ + "(filter: any) => void" + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.ExtensionsSetup.addFilter.$1", + "type": "Any", + "tags": [], + "label": "filter", + "description": [], + "signature": [ + "any" + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.ExtensionsSetup.addBadge", + "type": "Function", + "tags": [], + "label": "addBadge", + "description": [], + "signature": [ + "(badge: ", + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.IndexBadge", + "text": "IndexBadge" + }, + ") => void" + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.ExtensionsSetup.addBadge.$1", + "type": "Object", + "tags": [], + "label": "badge", + "description": [], + "signature": [ + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.IndexBadge", + "text": "IndexBadge" + } + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.ExtensionsSetup.addToggle", + "type": "Function", + "tags": [], + "label": "addToggle", + "description": [], + "signature": [ + "(toggle: ", + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.IndexToggle", + "text": "IndexToggle" + }, + ") => void" + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.ExtensionsSetup.addToggle.$1", + "type": "Object", + "tags": [], + "label": "toggle", + "description": [], + "signature": [ + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.IndexToggle", + "text": "IndexToggle" + } + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.ExtensionsSetup.addColumn", + "type": "Function", + "tags": [], + "label": "addColumn", + "description": [], + "signature": [ + "(column: ", + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.IndicesListColumn", + "text": "IndicesListColumn" + }, + ") => void" + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.ExtensionsSetup.addColumn.$1", + "type": "Object", + "tags": [], + "label": "column", + "description": [], + "signature": [ + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.IndicesListColumn", + "text": "IndicesListColumn" + } + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.ExtensionsSetup.setEmptyListContent", + "type": "Function", + "tags": [], + "label": "setEmptyListContent", + "description": [], + "signature": [ + "(content: ", + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.EmptyListContent", + "text": "EmptyListContent" + }, + ") => void" + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.ExtensionsSetup.setEmptyListContent.$1", + "type": "Object", + "tags": [], + "label": "content", + "description": [], + "signature": [ + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.EmptyListContent", + "text": "EmptyListContent" + } + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.ExtensionsSetup.addIndexDetailsTab", + "type": "Function", + "tags": [], + "label": "addIndexDetailsTab", + "description": [], + "signature": [ + "(tab: ", + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.IndexDetailsTab", + "text": "IndexDetailsTab" + }, + ") => void" + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.ExtensionsSetup.addIndexDetailsTab.$1", + "type": "Object", + "tags": [], + "label": "tab", + "description": [], + "signature": [ + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.IndexDetailsTab", + "text": "IndexDetailsTab" + } + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.ExtensionsSetup.setIndexOverviewContent", + "type": "Function", + "tags": [], + "label": "setIndexOverviewContent", + "description": [], + "signature": [ + "(content: ", + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.IndexContent", + "text": "IndexContent" + }, + ") => void" + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.ExtensionsSetup.setIndexOverviewContent.$1", + "type": "Object", + "tags": [], + "label": "content", + "description": [], + "signature": [ + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.IndexContent", + "text": "IndexContent" + } + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.ExtensionsSetup.setIndexMappingsContent", + "type": "Function", + "tags": [], + "label": "setIndexMappingsContent", + "description": [], + "signature": [ + "(content: ", + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.IndexContent", + "text": "IndexContent" + }, + ") => void" + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.ExtensionsSetup.setIndexMappingsContent.$1", + "type": "Object", + "tags": [], + "label": "content", + "description": [], + "signature": [ + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.IndexContent", + "text": "IndexContent" + } + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.Index", + "type": "Interface", + "tags": [], + "label": "Index", + "description": [], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.Index.name", + "type": "string", + "tags": [], + "label": "name", + "description": [], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.Index.primary", + "type": "CompoundType", + "tags": [], + "label": "primary", + "description": [], + "signature": [ + "string | number | undefined" + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.Index.replica", + "type": "CompoundType", + "tags": [], + "label": "replica", + "description": [], + "signature": [ + "string | number | undefined" + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.Index.isFrozen", + "type": "boolean", + "tags": [], + "label": "isFrozen", + "description": [], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.Index.hidden", + "type": "boolean", + "tags": [], + "label": "hidden", + "description": [], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.Index.aliases", + "type": "CompoundType", + "tags": [], + "label": "aliases", + "description": [], + "signature": [ + "string | string[]" + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.Index.data_stream", + "type": "string", + "tags": [], + "label": "data_stream", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.Index.isRollupIndex", + "type": "CompoundType", + "tags": [], + "label": "isRollupIndex", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.Index.ilm", + "type": "CompoundType", + "tags": [], + "label": "ilm", + "description": [], + "signature": [ + "IlmExplainLifecycleLifecycleExplain", + " | undefined" + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.Index.isFollowerIndex", + "type": "CompoundType", + "tags": [], + "label": "isFollowerIndex", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.Index.health", + "type": "CompoundType", + "tags": [], + "label": "health", + "description": [], + "signature": [ + "HealthStatus", + " | undefined" + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.Index.status", + "type": "CompoundType", + "tags": [], + "label": "status", + "description": [], + "signature": [ + "IndicesStatsIndexMetadataState", + " | undefined" + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.Index.uuid", + "type": "string", + "tags": [], + "label": "uuid", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.Index.documents", + "type": "number", + "tags": [], + "label": "documents", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.Index.size", + "type": "string", + "tags": [], + "label": "size", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.Index.primary_size", + "type": "string", + "tags": [], + "label": "primary_size", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.Index.documents_deleted", + "type": "number", + "tags": [], + "label": "documents_deleted", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexBadge", + "type": "Interface", + "tags": [], + "label": "IndexBadge", + "description": [], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexBadge.matchIndex", + "type": "Function", + "tags": [], + "label": "matchIndex", + "description": [], + "signature": [ + "(index: ", + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.Index", + "text": "Index" + }, + ") => boolean" + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexBadge.matchIndex.$1", + "type": "Object", + "tags": [], + "label": "index", + "description": [], + "signature": [ + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.Index", + "text": "Index" + } + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexBadge.label", + "type": "string", + "tags": [], + "label": "label", + "description": [], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexBadge.filterExpression", + "type": "string", + "tags": [], + "label": "filterExpression", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexBadge.color", + "type": "string", + "tags": [], + "label": "color", + "description": [], + "signature": [ + "string | undefined" + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexContent", + "type": "Interface", + "tags": [], + "label": "IndexContent", + "description": [], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexContent.renderContent", + "type": "Function", + "tags": [], + "label": "renderContent", + "description": [], + "signature": [ + "(args: { index: ", + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.Index", + "text": "Index" + }, + "; getUrlForApp: (appId: string, options?: { path?: string | undefined; absolute?: boolean | undefined; deepLinkId?: string | undefined; } | undefined) => string; }) => React.ReactElement | null" + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexContent.renderContent.$1", + "type": "Object", + "tags": [], + "label": "args", + "description": [], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexContent.renderContent.$1.index", + "type": "Object", + "tags": [], + "label": "index", + "description": [], + "signature": [ + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.Index", + "text": "Index" + } + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexContent.renderContent.$1.getUrlForApp", + "type": "Function", + "tags": [], + "label": "getUrlForApp", + "description": [], + "signature": [ + "(appId: string, options?: { path?: string | undefined; absolute?: boolean | undefined; deepLinkId?: string | undefined; } | undefined) => string" + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexContent.renderContent.$1.getUrlForApp.$1", + "type": "string", + "tags": [], + "label": "appId", + "description": [], + "path": "packages/core/application/core-application-browser/src/contracts.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexContent.renderContent.$1.getUrlForApp.$2", + "type": "Object", + "tags": [], + "label": "options", + "description": [], + "signature": [ + "{ path?: string | undefined; absolute?: boolean | undefined; deepLinkId?: string | undefined; } | undefined" + ], + "path": "packages/core/application/core-application-browser/src/contracts.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ] + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexDetailsTab", + "type": "Interface", + "tags": [], + "label": "IndexDetailsTab", + "description": [], + "path": "x-pack/packages/index-management/src/home_sections.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexDetailsTab.id", + "type": "string", + "tags": [], + "label": "id", + "description": [], + "path": "x-pack/packages/index-management/src/home_sections.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexDetailsTab.name", + "type": "CompoundType", + "tags": [], + "label": "name", + "description": [], + "signature": [ + "boolean | React.ReactChild | React.ReactFragment | React.ReactPortal | null | undefined" + ], + "path": "x-pack/packages/index-management/src/home_sections.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexDetailsTab.renderTabContent", + "type": "Function", + "tags": [], + "label": "renderTabContent", + "description": [], + "signature": [ + "(args: { index: ", + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.Index", + "text": "Index" + }, + "; getUrlForApp: (appId: string, options?: { path?: string | undefined; absolute?: boolean | undefined; deepLinkId?: string | undefined; } | undefined) => string; }) => React.ReactElement | null" + ], + "path": "x-pack/packages/index-management/src/home_sections.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexDetailsTab.renderTabContent.$1", + "type": "Object", + "tags": [], + "label": "args", + "description": [], + "path": "x-pack/packages/index-management/src/home_sections.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexDetailsTab.renderTabContent.$1.index", + "type": "Object", + "tags": [], + "label": "index", + "description": [], + "signature": [ + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.Index", + "text": "Index" + } + ], + "path": "x-pack/packages/index-management/src/home_sections.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexDetailsTab.renderTabContent.$1.getUrlForApp", + "type": "Function", + "tags": [], + "label": "getUrlForApp", + "description": [], + "signature": [ + "(appId: string, options?: { path?: string | undefined; absolute?: boolean | undefined; deepLinkId?: string | undefined; } | undefined) => string" + ], + "path": "x-pack/packages/index-management/src/home_sections.ts", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexDetailsTab.renderTabContent.$1.getUrlForApp.$1", + "type": "string", + "tags": [], + "label": "appId", + "description": [], + "path": "packages/core/application/core-application-browser/src/contracts.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexDetailsTab.renderTabContent.$1.getUrlForApp.$2", + "type": "Object", + "tags": [], + "label": "options", + "description": [], + "signature": [ + "{ path?: string | undefined; absolute?: boolean | undefined; deepLinkId?: string | undefined; } | undefined" + ], + "path": "packages/core/application/core-application-browser/src/contracts.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ] + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexDetailsTab.order", + "type": "number", + "tags": [], + "label": "order", + "description": [], + "path": "x-pack/packages/index-management/src/home_sections.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexDetailsTab.shouldRenderTab", + "type": "Function", + "tags": [], + "label": "shouldRenderTab", + "description": [], + "signature": [ + "((args: { index: ", + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.Index", + "text": "Index" + }, + "; }) => boolean) | undefined" + ], + "path": "x-pack/packages/index-management/src/home_sections.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexDetailsTab.shouldRenderTab.$1", + "type": "Object", + "tags": [], + "label": "args", + "description": [], + "path": "x-pack/packages/index-management/src/home_sections.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexDetailsTab.shouldRenderTab.$1.index", + "type": "Object", + "tags": [], + "label": "index", + "description": [], + "signature": [ + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.Index", + "text": "Index" + } + ], + "path": "x-pack/packages/index-management/src/home_sections.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexDetailsTab.breadcrumb", + "type": "CompoundType", + "tags": [], + "label": "breadcrumb", + "description": [], + "signature": [ + "EuiBreadcrumbProps", + " | undefined" + ], + "path": "x-pack/packages/index-management/src/home_sections.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexManagementPluginSetup", + "type": "Interface", + "tags": [], + "label": "IndexManagementPluginSetup", + "description": [], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexManagementPluginSetup.apiService", + "type": "Object", + "tags": [], + "label": "apiService", + "description": [], + "signature": [ + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.PublicApiServiceSetup", + "text": "PublicApiServiceSetup" + } + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexManagementPluginSetup.extensionsService", + "type": "Object", + "tags": [], + "label": "extensionsService", + "description": [], + "signature": [ + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.ExtensionsSetup", + "text": "ExtensionsSetup" + } + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexManagementPluginStart", + "type": "Interface", + "tags": [], + "label": "IndexManagementPluginStart", + "description": [], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexManagementPluginStart.extensionsService", + "type": "Object", + "tags": [], + "label": "extensionsService", + "description": [], + "signature": [ + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.ExtensionsSetup", + "text": "ExtensionsSetup" + } + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexManagementPluginStart.getIndexMappingComponent", + "type": "Function", + "tags": [], + "label": "getIndexMappingComponent", + "description": [], + "signature": [ + "(deps: { history: ", + { + "pluginId": "@kbn/core-application-browser", + "scope": "common", + "docId": "kibKbnCoreApplicationBrowserPluginApi", + "section": "def-common.ScopedHistory", + "text": "ScopedHistory" + }, + "; }) => React.FC<", + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.IndexMappingProps", + "text": "IndexMappingProps" + }, + ">" + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexManagementPluginStart.getIndexMappingComponent.$1", + "type": "Object", + "tags": [], + "label": "deps", + "description": [], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexManagementPluginStart.getIndexMappingComponent.$1.history", + "type": "Object", + "tags": [], + "label": "history", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-application-browser", + "scope": "common", + "docId": "kibKbnCoreApplicationBrowserPluginApi", + "section": "def-common.ScopedHistory", + "text": "ScopedHistory" + }, + "" + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexMappingProps", + "type": "Interface", + "tags": [], + "label": "IndexMappingProps", + "description": [], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexMappingProps.index", + "type": "Object", + "tags": [], + "label": "index", + "description": [], + "signature": [ + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.Index", + "text": "Index" + }, + " | undefined" + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexMappingProps.showAboutMappings", + "type": "CompoundType", + "tags": [], + "label": "showAboutMappings", + "description": [], + "signature": [ + "boolean | undefined" + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexToggle", + "type": "Interface", + "tags": [], + "label": "IndexToggle", + "description": [], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexToggle.matchIndex", + "type": "Function", + "tags": [], + "label": "matchIndex", + "description": [], + "signature": [ + "(index: ", + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.Index", + "text": "Index" + }, + ") => boolean" + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexToggle.matchIndex.$1", + "type": "Object", + "tags": [], + "label": "index", + "description": [], + "signature": [ + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.Index", + "text": "Index" + } + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexToggle.label", + "type": "string", + "tags": [], + "label": "label", + "description": [], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexToggle.name", + "type": "string", + "tags": [], + "label": "name", + "description": [], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndicesListColumn", + "type": "Interface", + "tags": [], + "label": "IndicesListColumn", + "description": [], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndicesListColumn.fieldName", + "type": "string", + "tags": [], + "label": "fieldName", + "description": [], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndicesListColumn.label", + "type": "string", + "tags": [], + "label": "label", + "description": [], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndicesListColumn.order", + "type": "number", + "tags": [], + "label": "order", + "description": [], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndicesListColumn.render", + "type": "Function", + "tags": [], + "label": "render", + "description": [], + "signature": [ + "((index: ", + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.Index", + "text": "Index" + }, + ") => React.ReactNode) | undefined" + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndicesListColumn.render.$1", + "type": "Object", + "tags": [], + "label": "index", + "description": [], + "signature": [ + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.Index", + "text": "Index" + } + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndicesListColumn.sort", + "type": "Function", + "tags": [], + "label": "sort", + "description": [], + "signature": [ + "((index: ", + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.Index", + "text": "Index" + }, + ") => any) | undefined" + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndicesListColumn.sort.$1", + "type": "Object", + "tags": [], + "label": "index", + "description": [], + "signature": [ + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.Index", + "text": "Index" + } + ], + "path": "x-pack/packages/index-management/src/services/extensions_service.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.PublicApiServiceSetup", + "type": "Interface", + "tags": [], + "label": "PublicApiServiceSetup", + "description": [], + "path": "x-pack/packages/index-management/src/services/public_api_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.PublicApiServiceSetup.getAllEnrichPolicies", + "type": "Function", + "tags": [], + "label": "getAllEnrichPolicies", + "description": [], + "signature": [ + "() => Promise<", + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.SendRequestResponse", + "text": "SendRequestResponse" + }, + "<", + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.SerializedEnrichPolicy", + "text": "SerializedEnrichPolicy" + }, + "[], any>>" + ], + "path": "x-pack/packages/index-management/src/services/public_api_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.SendRequestResponse", + "type": "Interface", + "tags": [], + "label": "SendRequestResponse", + "description": [], + "signature": [ + { + "pluginId": "@kbn/index-management", + "scope": "common", + "docId": "kibKbnIndexManagementPluginApi", + "section": "def-common.SendRequestResponse", + "text": "SendRequestResponse" + }, + "" + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.SendRequestResponse.data", + "type": "CompoundType", + "tags": [], + "label": "data", + "description": [], + "signature": [ + "D | null" + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.SendRequestResponse.error", + "type": "CompoundType", + "tags": [], + "label": "error", + "description": [], + "signature": [ + "E | null" + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.SerializedEnrichPolicy", + "type": "Interface", + "tags": [], + "label": "SerializedEnrichPolicy", + "description": [], + "path": "x-pack/packages/index-management/src/services/public_api_service.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.SerializedEnrichPolicy.type", + "type": "CompoundType", + "tags": [], + "label": "type", + "description": [], + "signature": [ + "\"match\" | \"range\" | \"geo_match\"" + ], + "path": "x-pack/packages/index-management/src/services/public_api_service.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.SerializedEnrichPolicy.name", + "type": "string", + "tags": [], + "label": "name", + "description": [], + "path": "x-pack/packages/index-management/src/services/public_api_service.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.SerializedEnrichPolicy.sourceIndices", + "type": "Array", + "tags": [], + "label": "sourceIndices", + "description": [], + "signature": [ + "string[]" + ], + "path": "x-pack/packages/index-management/src/services/public_api_service.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.SerializedEnrichPolicy.matchField", + "type": "string", + "tags": [], + "label": "matchField", + "description": [], + "path": "x-pack/packages/index-management/src/services/public_api_service.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.SerializedEnrichPolicy.enrichFields", + "type": "Array", + "tags": [], + "label": "enrichFields", + "description": [], + "signature": [ + "string[]" + ], + "path": "x-pack/packages/index-management/src/services/public_api_service.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.SerializedEnrichPolicy.query", + "type": "Object", + "tags": [], + "label": "query", + "description": [], + "signature": [ + "Record | undefined" + ], + "path": "x-pack/packages/index-management/src/services/public_api_service.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.SetupDependencies", + "type": "Interface", + "tags": [], + "label": "SetupDependencies", + "description": [], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.SetupDependencies.fleet", + "type": "Unknown", + "tags": [], + "label": "fleet", + "description": [], + "signature": [ + "unknown" + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.SetupDependencies.usageCollection", + "type": "Object", + "tags": [], + "label": "usageCollection", + "description": [], + "signature": [ + { + "pluginId": "usageCollection", + "scope": "public", + "docId": "kibUsageCollectionPluginApi", + "section": "def-public.UsageCollectionSetup", + "text": "UsageCollectionSetup" + } + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.SetupDependencies.management", + "type": "Object", + "tags": [], + "label": "management", + "description": [], + "signature": [ + { + "pluginId": "management", + "scope": "public", + "docId": "kibManagementPluginApi", + "section": "def-public.ManagementSetup", + "text": "ManagementSetup" + } + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.SetupDependencies.share", + "type": "CompoundType", + "tags": [], + "label": "share", + "description": [], + "signature": [ + "{ register: (shareMenuProvider: ", + { + "pluginId": "share", + "scope": "public", + "docId": "kibSharePluginApi", + "section": "def-public.ShareMenuProvider", + "text": "ShareMenuProvider" + }, + ") => 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; setAnonymousAccessServiceProvider: (provider: () => ", + { + "pluginId": "share", + "scope": "common", + "docId": "kibSharePluginApi", + "section": "def-common.AnonymousAccessServiceContract", + "text": "AnonymousAccessServiceContract" + }, + ") => void; }" + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.SetupDependencies.cloud", + "type": "Object", + "tags": [], + "label": "cloud", + "description": [], + "signature": [ + { + "pluginId": "cloud", + "scope": "public", + "docId": "kibCloudPluginApi", + "section": "def-public.CloudSetup", + "text": "CloudSetup" + }, + " | undefined" + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.StartDependencies", + "type": "Interface", + "tags": [], + "label": "StartDependencies", + "description": [], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.StartDependencies.cloud", + "type": "Object", + "tags": [], + "label": "cloud", + "description": [], + "signature": [ + { + "pluginId": "cloud", + "scope": "public", + "docId": "kibCloudPluginApi", + "section": "def-public.CloudSetup", + "text": "CloudSetup" + }, + " | undefined" + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.StartDependencies.console", + "type": "Object", + "tags": [], + "label": "console", + "description": [], + "signature": [ + { + "pluginId": "console", + "scope": "public", + "docId": "kibConsolePluginApi", + "section": "def-public.ConsolePluginStart", + "text": "ConsolePluginStart" + }, + " | undefined" + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.StartDependencies.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/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.StartDependencies.fleet", + "type": "Unknown", + "tags": [], + "label": "fleet", + "description": [], + "signature": [ + "unknown" + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.StartDependencies.usageCollection", + "type": "Object", + "tags": [], + "label": "usageCollection", + "description": [], + "signature": [ + { + "pluginId": "usageCollection", + "scope": "public", + "docId": "kibUsageCollectionPluginApi", + "section": "def-public.UsageCollectionSetup", + "text": "UsageCollectionSetup" + } + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.StartDependencies.management", + "type": "Object", + "tags": [], + "label": "management", + "description": [], + "signature": [ + { + "pluginId": "management", + "scope": "public", + "docId": "kibManagementPluginApi", + "section": "def-public.ManagementSetup", + "text": "ManagementSetup" + } + ], + "path": "x-pack/packages/index-management/src/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + } + ], + "enums": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexDetailsSection", + "type": "Enum", + "tags": [], + "label": "IndexDetailsSection", + "description": [], + "path": "x-pack/packages/index-management/src/home_sections.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.Section", + "type": "Enum", + "tags": [], + "label": "Section", + "description": [], + "path": "x-pack/packages/index-management/src/home_sections.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "misc": [ + { + "parentPluginId": "@kbn/index-management", + "id": "def-common.IndexDetailsTabId", + "type": "Type", + "tags": [], + "label": "IndexDetailsTabId", + "description": [], + "signature": [ + "string" + ], + "path": "x-pack/packages/index-management/src/home_sections.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + } + ], + "objects": [] + } +} \ No newline at end of file diff --git a/api_docs/kbn_index_management.mdx b/api_docs/kbn_index_management.mdx new file mode 100644 index 0000000000000..22f0045c7d5b6 --- /dev/null +++ b/api_docs/kbn_index_management.mdx @@ -0,0 +1,36 @@ +--- +#### +#### This document is auto-generated and is meant to be viewed inside our experimental, new docs system. +#### Reach out in #docs-engineering for more info. +#### +id: kibKbnIndexManagementPluginApi +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-04-11 +tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/index-management'] +--- +import kbnIndexManagementObj from './kbn_index_management.devdocs.json'; + + + +Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) for questions regarding this plugin. + +**Code health stats** + +| Public API count | Any count | Items lacking comments | Missing exports | +|-------------------|-----------|------------------------|-----------------| +| 122 | 3 | 122 | 0 | + +## Common + +### Interfaces + + +### Enums + + +### Consts, variables and types + + diff --git a/api_docs/kbn_infra_forge.mdx b/api_docs/kbn_infra_forge.mdx index e02622ea2a6ed..ea80ed8d78f43 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-04-08 +date: 2024-04-11 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 5b68a5cde3147..a96e601f3da61 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-04-08 +date: 2024-04-11 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 d0a5f6ecca544..33a86ef6ceb93 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/io-ts-utils'] --- import kbnIoTsUtilsObj from './kbn_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_jest_serializers.mdx b/api_docs/kbn_jest_serializers.mdx index c1a59a0d3b7a8..461d6b5337b38 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-04-08 +date: 2024-04-11 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 356c524386d9b..f1089897ec15e 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-04-08 +date: 2024-04-11 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 24a1f43821ffd..26b22e70b44e6 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/json-ast'] --- import kbnJsonAstObj from './kbn_json_ast.devdocs.json'; diff --git a/api_docs/kbn_kibana_manifest_schema.mdx b/api_docs/kbn_kibana_manifest_schema.mdx index 9bc92430cc547..1454145620784 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-04-08 +date: 2024-04-11 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 9b8eaf263f2d7..5a6a73b77e9b4 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-04-08 +date: 2024-04-11 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 69bca1866ee70..df72ab64c7053 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-04-08 +date: 2024-04-11 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 8fefb8e1be14e..0f9ce5b000d56 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-04-08 +date: 2024-04-11 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 06f468f117878..17395c31d0ad1 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-04-08 +date: 2024-04-11 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 38d013a7cb7cd..0a2cb75cfdd16 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-04-08 +date: 2024-04-11 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 bcd133a43ea37..c2eaa2ffe3a24 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-04-08 +date: 2024-04-11 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 b7a9d074db5d2..7f8b5babea59f 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/managed-vscode-config'] --- import kbnManagedVscodeConfigObj from './kbn_managed_vscode_config.devdocs.json'; diff --git a/api_docs/kbn_management_cards_navigation.mdx b/api_docs/kbn_management_cards_navigation.mdx index 2a5298add7b2e..bcf29227a10d2 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-04-08 +date: 2024-04-11 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 0f5ba591cc5ce..5164199bf6d48 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-04-08 +date: 2024-04-11 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 efa3293efd152..f073a0818064f 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-04-08 +date: 2024-04-11 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 730fed0df920b..2c101a68b10e2 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-04-08 +date: 2024-04-11 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 3bddcd7cafe16..b1b55b73ad616 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-04-08 +date: 2024-04-11 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 1b22c3b89cc9e..492911e2d706c 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-04-08 +date: 2024-04-11 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 02a8e96df91a0..81e613df7b14f 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-04-08 +date: 2024-04-11 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 62b630dfc529c..c585c21a66f11 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-04-08 +date: 2024-04-11 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 618ec0c98c5cf..93abc469098fa 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-04-08 +date: 2024-04-11 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 2da155401cabc..bd3adfde26096 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-04-08 +date: 2024-04-11 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 80e4a8f351bce..89da72b183790 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-04-08 +date: 2024-04-11 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 10755bdc2b5da..dd4b261790bc1 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-04-08 +date: 2024-04-11 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 ae364c87e00de..2f84b6e4b66d7 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-04-08 +date: 2024-04-11 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 85d127104e65d..4e2dd266d1217 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-04-08 +date: 2024-04-11 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 b3fb0120161fc..b86fa5435da1d 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-04-08 +date: 2024-04-11 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 b8f308b4e16cb..ec360be458746 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-04-08 +date: 2024-04-11 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 2982532952cdd..e8723dd3a3e06 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-04-08 +date: 2024-04-11 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 279f18773b12e..40feeabd464e0 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-04-08 +date: 2024-04-11 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 12ead612f7a9b..0d69aa998cc1e 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-04-08 +date: 2024-04-11 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 d441a3da121c3..66d9313fbfd3a 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-04-08 +date: 2024-04-11 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 4ea9e803e07a6..12e2e609eed78 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-04-08 +date: 2024-04-11 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 c8903430ac991..17b2a791a1632 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-04-08 +date: 2024-04-11 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 c49e8951530e4..2c26c5b516339 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-04-08 +date: 2024-04-11 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 7b4076c926392..e58cfa27295da 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-04-08 +date: 2024-04-11 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 deead20c2258e..0f244cd422e50 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-04-08 +date: 2024-04-11 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 ea76e2d20b009..913d36ee333cf 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-04-08 +date: 2024-04-11 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 1a7e14cba74a8..bbab16f15a517 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-04-08 +date: 2024-04-11 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 e826307104659..2818a458c3a28 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-04-08 +date: 2024-04-11 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 3695efdb3f0b0..cb302dbddd77f 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-04-08 +date: 2024-04-11 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 d91b2fb9b8fa2..6d23eb5d8117e 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-04-08 +date: 2024-04-11 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 89883bd18c06f..43e3aa956c537 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-04-08 +date: 2024-04-11 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 d6ec511d43542..6bd81d1d401ca 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-04-08 +date: 2024-04-11 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 5f1e398aed0ed..da25584acfda5 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-04-08 +date: 2024-04-11 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 f94133f9ca054..80ce3f7b6a681 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-04-08 +date: 2024-04-11 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 491f9a9556535..010f9f038e9bb 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-04-08 +date: 2024-04-11 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 ce0c8d9e77394..6ed0bc3c47fce 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-04-08 +date: 2024-04-11 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 d7263b0f29e20..5f04d795088c5 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-04-08 +date: 2024-04-11 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 afafa1103c5eb..83f2d33e809f9 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-04-08 +date: 2024-04-11 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 a5608a2517b0c..083107bebdf70 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-04-08 +date: 2024-04-11 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 7917eedd4e088..30115c907ba60 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-04-08 +date: 2024-04-11 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 06a9a8c283ef3..8c882763e145a 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-04-08 +date: 2024-04-11 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 4bb13ff1c3b42..1185b0254da15 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-04-08 +date: 2024-04-11 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 dab25dab44633..aff8cadea9a12 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-04-08 +date: 2024-04-11 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 c3c2a6870d0e7..835d8df102c3a 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-04-08 +date: 2024-04-11 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 64fdcce3a33aa..139818eef4d57 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-04-08 +date: 2024-04-11 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 c7a9626e42bc0..b37eb4c81e922 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-04-08 +date: 2024-04-11 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 5b5d9001fefe4..828e932481eed 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-04-08 +date: 2024-04-11 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 2f92ed228ffc3..382bda3edca02 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-04-08 +date: 2024-04-11 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 f759e7b83a0cc..abf4bf1030803 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-04-08 +date: 2024-04-11 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 3906913f808f5..87777ec714d8a 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-04-08 +date: 2024-04-11 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 0aee7a698cd91..bef406fc7f510 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-04-08 +date: 2024-04-11 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 7ce783cf54593..d0db204cc0d75 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-04-08 +date: 2024-04-11 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 2d958d4c651c3..440731b01d909 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-04-08 +date: 2024-04-11 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 405f05a46579d..ff4ab886ba5c1 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-04-08 +date: 2024-04-11 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 dac4e24759637..cd47fec4a7e02 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-04-08 +date: 2024-04-11 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 63ff5f46cffa1..78af5807a8b4c 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-helpers'] --- import kbnPluginHelpersObj from './kbn_plugin_helpers.devdocs.json'; diff --git a/api_docs/kbn_presentation_containers.devdocs.json b/api_docs/kbn_presentation_containers.devdocs.json index f5b0da725f680..39d68080ed50e 100644 --- a/api_docs/kbn_presentation_containers.devdocs.json +++ b/api_docs/kbn_presentation_containers.devdocs.json @@ -262,6 +262,46 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/presentation-containers", + "id": "def-common.canTrackContentfulRender", + "type": "Function", + "tags": [], + "label": "canTrackContentfulRender", + "description": [], + "signature": [ + "(root: unknown) => root is ", + { + "pluginId": "@kbn/presentation-containers", + "scope": "common", + "docId": "kibKbnPresentationContainersPluginApi", + "section": "def-common.TrackContentfulRender", + "text": "TrackContentfulRender" + } + ], + "path": "packages/presentation/presentation_containers/interfaces/track_contentful_render.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/presentation-containers", + "id": "def-common.canTrackContentfulRender.$1", + "type": "Unknown", + "tags": [], + "label": "root", + "description": [], + "signature": [ + "unknown" + ], + "path": "packages/presentation/presentation_containers/interfaces/track_contentful_render.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/presentation-containers", "id": "def-common.getContainerParentFromAPI", @@ -1373,6 +1413,38 @@ ], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/presentation-containers", + "id": "def-common.TrackContentfulRender", + "type": "Interface", + "tags": [], + "label": "TrackContentfulRender", + "description": [], + "path": "packages/presentation/presentation_containers/interfaces/track_contentful_render.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/presentation-containers", + "id": "def-common.TrackContentfulRender.trackContentfulRender", + "type": "Function", + "tags": [], + "label": "trackContentfulRender", + "description": [ + "\nA way to report that the contentful render has been completed" + ], + "signature": [ + "() => void" + ], + "path": "packages/presentation/presentation_containers/interfaces/track_contentful_render.ts", + "deprecated": false, + "trackAdoption": false, + "children": [], + "returnComment": [] + } + ], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/presentation-containers", "id": "def-common.TracksOverlays", diff --git a/api_docs/kbn_presentation_containers.mdx b/api_docs/kbn_presentation_containers.mdx index ce5f52da05b5c..6607c0993dd97 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/presentation-containers'] --- import kbnPresentationContainersObj from './kbn_presentation_containers.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kib | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 61 | 0 | 58 | 1 | +| 65 | 0 | 61 | 1 | ## Common diff --git a/api_docs/kbn_presentation_publishing.devdocs.json b/api_docs/kbn_presentation_publishing.devdocs.json index 6c622553ae841..c377de7917784 100644 --- a/api_docs/kbn_presentation_publishing.devdocs.json +++ b/api_docs/kbn_presentation_publishing.devdocs.json @@ -1727,12 +1727,12 @@ }, { "parentPluginId": "@kbn/presentation-publishing", - "id": "def-common.useBatchedPublishingSubjects", + "id": "def-common.useBatchedOptionalPublishingSubjects", "type": "Function", "tags": [], - "label": "useBatchedPublishingSubjects", + "label": "useBatchedOptionalPublishingSubjects", "description": [ - "\nBatches the latest values of multiple publishing subjects into a single object. Use this to avoid unnecessary re-renders.\nYou should avoid using this hook with subjects that your component pushes values to on user interaction, as it can cause a slight delay." + "\nBatches the latest values of multiple publishing subjects into a single object. Use this to avoid unnecessary re-renders.\nUse when `subjects` may not be defined on initial component render.\n" ], "signature": [ "[]>(...subjects_0: SubjectsType) => ", + "UnwrapPublishingSubjectTuple", + "" + ], + "path": "packages/presentation/presentation_publishing/publishing_subject/publishing_batcher.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/presentation-publishing", + "id": "def-common.useBatchedPublishingSubjects.$1", + "type": "Object", + "tags": [], + "label": "subjects", + "description": [ + "Publishing subjects array." + ], + "signature": [ + "[...SubjectsType]" + ], + "path": "packages/presentation/presentation_publishing/publishing_subject/publishing_batcher.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/presentation-publishing", "id": "def-common.useInheritedViewMode", diff --git a/api_docs/kbn_presentation_publishing.mdx b/api_docs/kbn_presentation_publishing.mdx index 5f5179d1d0907..6d8d34856d8bc 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/presentation-publishing'] --- import kbnPresentationPublishingObj from './kbn_presentation_publishing.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kib | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 180 | 0 | 153 | 6 | +| 182 | 0 | 153 | 6 | ## Common diff --git a/api_docs/kbn_profiling_utils.mdx b/api_docs/kbn_profiling_utils.mdx index ed8d7bf49b20a..88064f09bb878 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-04-08 +date: 2024-04-11 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 74a07b6021e00..3d57b8782aac2 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-04-08 +date: 2024-04-11 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 a4dc3471dfa12..fcc6f91b73a4a 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-field'] --- import kbnReactFieldObj from './kbn_react_field.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_common.mdx b/api_docs/kbn_react_kibana_context_common.mdx index bc7efabe746c8..9b270d6c83a1f 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-04-08 +date: 2024-04-11 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 3546d69bdcd81..9dbf04a5dedb3 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-04-08 +date: 2024-04-11 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 9d08500d8bebe..a442a49c3073a 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-04-08 +date: 2024-04-11 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 4f714198073a9..7f57c739a2427 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-04-08 +date: 2024-04-11 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 f5dfbecfff3fd..e0d3fd66a5eb8 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-04-08 +date: 2024-04-11 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 58b6884d58b19..3885fd8c3e674 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-04-08 +date: 2024-04-11 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 5cb7889bf2dd9..92903d2e21d4b 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-04-08 +date: 2024-04-11 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 9e3046e2af425..08118a2ce6b21 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-04-08 +date: 2024-04-11 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 2c49fe542fbba..95de6dd3dfabd 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-04-08 +date: 2024-04-11 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 0ee7387e17bd2..ae346819e3342 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-04-08 +date: 2024-04-11 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 ec1ba0fc598c4..91c8f60512ade 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-common'] --- import kbnReportingCommonObj from './kbn_reporting_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_csv.mdx b/api_docs/kbn_reporting_export_types_csv.mdx index 647a1c3f9c36c..4a18a89a6d7d2 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-04-08 +date: 2024-04-11 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 9b413cae38239..dfe118fa687cf 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-04-08 +date: 2024-04-11 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 6e37c9c820ed0..cb8a8e6fc8cfb 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-04-08 +date: 2024-04-11 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 3c4ac0b7dcba9..83980cc3250cd 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-04-08 +date: 2024-04-11 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 e89a51d601baf..7c62759541055 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-04-08 +date: 2024-04-11 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 b76c80e0095a5..4f8964ed72d3f 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-04-08 +date: 2024-04-11 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 5555e05b86450..87e47487b3cae 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-04-08 +date: 2024-04-11 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 40392ae2fef7b..599aa299903b8 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-04-08 +date: 2024-04-11 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 bb9b6658c4547..69903d71c4f87 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-04-08 +date: 2024-04-11 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 7e38dea5b408c..4617ba54b3bf7 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/resizable-layout'] --- import kbnResizableLayoutObj from './kbn_resizable_layout.devdocs.json'; diff --git a/api_docs/kbn_rison.mdx b/api_docs/kbn_rison.mdx index 34f7579d628e5..dc53d4dfd73bf 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rison'] --- import kbnRisonObj from './kbn_rison.devdocs.json'; diff --git a/api_docs/kbn_router_utils.mdx b/api_docs/kbn_router_utils.mdx index 85a5567bc4770..dfcd6e686a60a 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-04-08 +date: 2024-04-11 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 13b1a69f87903..2749d8201eaa2 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-04-08 +date: 2024-04-11 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 6fb5096589ba7..f983313e4a3fe 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-04-08 +date: 2024-04-11 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 612fffe2f9e58..df2cf1777a382 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-04-08 +date: 2024-04-11 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 f5945968c0849..71826902066dc 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-api-panels'] --- import kbnSearchApiPanelsObj from './kbn_search_api_panels.devdocs.json'; diff --git a/api_docs/kbn_search_connectors.mdx b/api_docs/kbn_search_connectors.mdx index 6eeff1cd38a6f..c2f299915fde1 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-04-08 +date: 2024-04-11 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 43790cc018bec..b95f0396d97e5 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-04-08 +date: 2024-04-11 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 9ae8b96470544..d86b8617dd905 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-04-08 +date: 2024-04-11 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 cc526894eeeb3..60c161c619aaf 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-response-warnings'] --- import kbnSearchResponseWarningsObj from './kbn_search_response_warnings.devdocs.json'; diff --git a/api_docs/kbn_security_hardening.mdx b/api_docs/kbn_security_hardening.mdx index b07e1e08bfa60..7981478567f6e 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-04-08 +date: 2024-04-11 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 c960a569cc464..fc6ee7e731a68 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-plugin-types-common'] --- import kbnSecurityPluginTypesCommonObj from './kbn_security_plugin_types_common.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_public.mdx b/api_docs/kbn_security_plugin_types_public.mdx index bdf8ffe4882e8..5df215417381d 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-plugin-types-public'] --- import kbnSecurityPluginTypesPublicObj from './kbn_security_plugin_types_public.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_server.mdx b/api_docs/kbn_security_plugin_types_server.mdx index 302633fcb0efd..db099ad74c6b9 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-04-08 +date: 2024-04-11 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 09718ff97a276..0843ffc6746d6 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-04-08 +date: 2024-04-11 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 8f9601578bea6..1d74e7d22fb4c 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-04-08 +date: 2024-04-11 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 4e22ec1fc6740..e54aafed6184e 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-04-08 +date: 2024-04-11 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 fac93c6a36ec7..efecd636f0282 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-04-08 +date: 2024-04-11 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 0811e6355afdb..cbca02f0eb69d 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-04-08 +date: 2024-04-11 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 8cf3931191407..da38b8b91323f 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-04-08 +date: 2024-04-11 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 abd2b9a95ea71..f36908d73ed78 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-04-08 +date: 2024-04-11 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 90331278203ed..a68735cd5eb4a 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-es-utils'] --- import kbnSecuritysolutionEsUtilsObj from './kbn_securitysolution_es_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_exception_list_components.mdx b/api_docs/kbn_securitysolution_exception_list_components.mdx index 7fda966b99c51..64a024ce56420 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-exception-list-components'] --- import kbnSecuritysolutionExceptionListComponentsObj from './kbn_securitysolution_exception_list_components.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_grouping.mdx b/api_docs/kbn_securitysolution_grouping.mdx index 5c96a0c1983e8..aafba1bf5d159 100644 --- a/api_docs/kbn_securitysolution_grouping.mdx +++ b/api_docs/kbn_securitysolution_grouping.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-grouping title: "@kbn/securitysolution-grouping" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-grouping plugin -date: 2024-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-grouping'] --- import kbnSecuritysolutionGroupingObj from './kbn_securitysolution_grouping.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_hook_utils.mdx b/api_docs/kbn_securitysolution_hook_utils.mdx index 3a8b3a0710fb7..3999854849dae 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-04-08 +date: 2024-04-11 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 e53c859243ccc..53dc822814c4a 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-04-08 +date: 2024-04-11 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 4506ba2b07bf9..ff5731d243c77 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-04-08 +date: 2024-04-11 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 06f36055f4657..9d5fe8547b5b1 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-04-08 +date: 2024-04-11 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 d0fa768fee9c9..d7f36671a2ac8 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-04-08 +date: 2024-04-11 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 700e87acf56e9..54fe93e544f71 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-04-08 +date: 2024-04-11 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 eb4a587644edb..ab140eda5ddda 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-04-08 +date: 2024-04-11 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 a40b783b110c3..ac7615d96e1e5 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-04-08 +date: 2024-04-11 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 97a1d03aebcbe..df8f42cedff9d 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-04-08 +date: 2024-04-11 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 43e4c85a9fc15..5b53eb701bb24 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-04-08 +date: 2024-04-11 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 1a2f1d579c433..81699c1a6575f 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-04-08 +date: 2024-04-11 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 1643b91f3c5af..cad1ca8d78577 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-04-08 +date: 2024-04-11 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 bc42f5d1bea8d..37a81039fdb5c 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-04-08 +date: 2024-04-11 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 4ae636d5a6217..e0028f81d0bfc 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-04-08 +date: 2024-04-11 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 5ab005960a976..3aeaaa5e9e3ad 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-04-08 +date: 2024-04-11 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 babfba55ab73a..1f91cbafa4b47 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-04-08 +date: 2024-04-11 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 c8f44a539c03c..ffefefa137ec4 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-04-08 +date: 2024-04-11 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 950bb45fd799f..1740b0cfd7f7a 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-04-08 +date: 2024-04-11 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 f8ef68090d19b..8715da7f97235 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-04-08 +date: 2024-04-11 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 e3d1b7704fc27..73ecdf0fa259f 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-storybook-config'] --- import kbnServerlessStorybookConfigObj from './kbn_serverless_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_shared_svg.mdx b/api_docs/kbn_shared_svg.mdx index 06afb5777e1c0..a7d7e83bc1e95 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-svg'] --- import kbnSharedSvgObj from './kbn_shared_svg.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_avatar_solution.mdx b/api_docs/kbn_shared_ux_avatar_solution.mdx index bfc0b8b776b70..75bba42b7679d 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-04-08 +date: 2024-04-11 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 e1032cf82c531..bd0bbda5baa08 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-04-08 +date: 2024-04-11 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 bdad22089985e..9dfa1a2a84ed5 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-04-08 +date: 2024-04-11 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 b352958d6bc3e..2347a4f8326c2 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-04-08 +date: 2024-04-11 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 7dd443d2ee464..e190bca1eda1e 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-04-08 +date: 2024-04-11 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 10859f0db9b1d..2802a8e47e9cb 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-04-08 +date: 2024-04-11 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 accff664604ac..ada2d6172f17f 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-04-08 +date: 2024-04-11 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 92d993a7bac9d..038edc61744ee 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-04-08 +date: 2024-04-11 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 48c471ac1598a..dc4efcb3465a4 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-04-08 +date: 2024-04-11 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 f31f27f2588dc..da5e1244ffd5d 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-04-08 +date: 2024-04-11 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 9897b33b83f8f..6025488fb5ce5 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-04-08 +date: 2024-04-11 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 f2c3e3bc08d76..618f8cb0ddcfb 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-04-08 +date: 2024-04-11 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 67918d558b5c0..837f8990b5c20 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-04-08 +date: 2024-04-11 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 c283ac91aa1bc..18c8ee01dc4a1 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-04-08 +date: 2024-04-11 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 88a0b0a25cf89..1b93e2e093403 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-04-08 +date: 2024-04-11 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 66dc6821fcd85..53f9ec1eec869 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-04-08 +date: 2024-04-11 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 fd6172f07953c..2a4dafa76e6a0 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-04-08 +date: 2024-04-11 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 b2bbc4b59a2d2..d81de97115621 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-04-08 +date: 2024-04-11 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 93ba8c8439707..5e66e3c001f91 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-04-08 +date: 2024-04-11 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 22ed0a58d9d93..b14b29520e571 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-04-08 +date: 2024-04-11 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 b0b26e0b0b14e..ceb26c1396fcb 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-04-08 +date: 2024-04-11 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 5866c0649389a..cfc47120351f2 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-04-08 +date: 2024-04-11 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 8e6311e44b130..bf6f1811079d6 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-04-08 +date: 2024-04-11 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 6a927b29576ae..69466b7c41716 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-04-08 +date: 2024-04-11 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 d9ebb1669ae19..3fdf3bb88c92b 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-04-08 +date: 2024-04-11 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 4e7009186c2a2..d6d084b66c6a3 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-04-08 +date: 2024-04-11 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 8f25818ea97a3..c717e09a8fe7d 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-04-08 +date: 2024-04-11 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 ee869fdce917b..c4c42b9bb4aa8 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-04-08 +date: 2024-04-11 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 31b299e723a8c..929878aed1b73 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-04-08 +date: 2024-04-11 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 84afae5d1ca81..205d2961dc07f 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-solution-nav'] --- import kbnSharedUxPageSolutionNavObj from './kbn_shared_ux_page_solution_nav.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx index fecf37a4c9e85..6b4f6b013f03f 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-04-08 +date: 2024-04-11 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 f74c5191a0180..3f9b0ee7bfec2 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-04-08 +date: 2024-04-11 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 b3884521b2366..d7c5ba3936a53 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-04-08 +date: 2024-04-11 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 d01f73f11d511..ee6e35d0d2868 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-04-08 +date: 2024-04-11 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 b1532607680fd..a162bfe976fa7 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-04-08 +date: 2024-04-11 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 dfc51d0c60b99..5ce873580b7da 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-04-08 +date: 2024-04-11 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 da2f1c3007b55..ea2ac0a4051a0 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-04-08 +date: 2024-04-11 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 4a2f27e328115..6a91a867fed52 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-04-08 +date: 2024-04-11 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 a22f82cc39956..db88ce2c4db78 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-04-08 +date: 2024-04-11 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 cf52d527940dd..ae4cc974f64e7 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/slo-schema'] --- import kbnSloSchemaObj from './kbn_slo_schema.devdocs.json'; diff --git a/api_docs/kbn_solution_nav_analytics.mdx b/api_docs/kbn_solution_nav_analytics.mdx index b90f447cf1401..ab557c965260b 100644 --- a/api_docs/kbn_solution_nav_analytics.mdx +++ b/api_docs/kbn_solution_nav_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-solution-nav-analytics title: "@kbn/solution-nav-analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/solution-nav-analytics plugin -date: 2024-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/solution-nav-analytics'] --- import kbnSolutionNavAnalyticsObj from './kbn_solution_nav_analytics.devdocs.json'; diff --git a/api_docs/kbn_solution_nav_es.mdx b/api_docs/kbn_solution_nav_es.mdx index 2f979b961d37f..eb0048af8e28d 100644 --- a/api_docs/kbn_solution_nav_es.mdx +++ b/api_docs/kbn_solution_nav_es.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-solution-nav-es title: "@kbn/solution-nav-es" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/solution-nav-es plugin -date: 2024-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/solution-nav-es'] --- import kbnSolutionNavEsObj from './kbn_solution_nav_es.devdocs.json'; diff --git a/api_docs/kbn_solution_nav_oblt.mdx b/api_docs/kbn_solution_nav_oblt.mdx index c1a417e637616..1b97a8841108a 100644 --- a/api_docs/kbn_solution_nav_oblt.mdx +++ b/api_docs/kbn_solution_nav_oblt.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-solution-nav-oblt title: "@kbn/solution-nav-oblt" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/solution-nav-oblt plugin -date: 2024-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/solution-nav-oblt'] --- import kbnSolutionNavObltObj from './kbn_solution_nav_oblt.devdocs.json'; diff --git a/api_docs/kbn_some_dev_log.mdx b/api_docs/kbn_some_dev_log.mdx index 31f8cf57da292..ff375bb93b060 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-04-08 +date: 2024-04-11 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 4f651b7758d10..ecf9cca6f603e 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-04-08 +date: 2024-04-11 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 6c27fc5097a63..6efbbede83ba4 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-04-08 +date: 2024-04-11 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 53bba9d0ba8d5..7baf9370b5415 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-04-08 +date: 2024-04-11 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 b57d52eb8ff05..a7313425e0527 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-04-08 +date: 2024-04-11 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 4e9de7a686d39..cc5f42b90fc9f 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-04-08 +date: 2024-04-11 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 68a4cf44028d0..166a5e89321e2 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test'] --- import kbnTestObj from './kbn_test.devdocs.json'; diff --git a/api_docs/kbn_test_eui_helpers.devdocs.json b/api_docs/kbn_test_eui_helpers.devdocs.json index d0b5f32517d7c..bb3fc948f8585 100644 --- a/api_docs/kbn_test_eui_helpers.devdocs.json +++ b/api_docs/kbn_test_eui_helpers.devdocs.json @@ -204,10 +204,10 @@ "functions": [ { "parentPluginId": "@kbn/test-eui-helpers", - "id": "def-common.getButtonGroupInputValue", + "id": "def-common.getSelectedButtonInGroup", "type": "Function", "tags": [], - "label": "getButtonGroupInputValue", + "label": "getSelectedButtonInGroup", "description": [], "signature": [ "(testId: string) => () => HTMLElement" @@ -218,7 +218,7 @@ "children": [ { "parentPluginId": "@kbn/test-eui-helpers", - "id": "def-common.getButtonGroupInputValue.$1", + "id": "def-common.getSelectedButtonInGroup.$1", "type": "string", "tags": [], "label": "testId", diff --git a/api_docs/kbn_test_eui_helpers.mdx b/api_docs/kbn_test_eui_helpers.mdx index 695738093c0e9..3bb2ed727311b 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-04-08 +date: 2024-04-11 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 4e2e5248f7a2c..ebdc357f392eb 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-jest-helpers'] --- import kbnTestJestHelpersObj from './kbn_test_jest_helpers.devdocs.json'; diff --git a/api_docs/kbn_test_subj_selector.devdocs.json b/api_docs/kbn_test_subj_selector.devdocs.json index 304d53d593c86..2ab9cc3c4a7a3 100644 --- a/api_docs/kbn_test_subj_selector.devdocs.json +++ b/api_docs/kbn_test_subj_selector.devdocs.json @@ -26,7 +26,7 @@ "tags": [], "label": "subj", "description": [ - "\nConverts a testSubject selector into a CSS selector.\n\ntestSubject selector syntax rules:\n\n - `data-test-subj` values can include spaces\n\n - prefixing a value with `~` will allow matching a single word in a `data-test-subj` that uses several space delimited list words\n - example: `~foo`\n - css equivalent: `[data-test-subj~=\"foo\"]`\n\n - the `>` character is used between two values to indicate that the value on the right must match an element inside an element matched by the value on the left\n - example: `foo > bar`\n - css equivalent: `[data-test-subj=foo] [data-test-subj=bar]`\n\n - the `&` character is used between two values to indicate that the value on both sides must both match the element\n - example: `foo & bar`\n - css equivalent: `[data-test-subj=foo][data-test-subj=bar]`" + "\nConverts a testSubject selector into a CSS selector.\n\ntestSubject selector syntax rules:\n\n - `data-test-subj` values can include spaces\n\n - prefixing a value with `*` will allow matching a `data-test-subj` attribute containing at least one occurrence of value within the string.\n - example: `*foo`\n - css equivalent: `[data-test-subj*=\"foo\"]`\n - DOM match example:
data-test-subj=\"bar-foo\"
\n\n - prefixing a value with `~` will allow matching a `data-test-subj` attribute represented as a whitespace-separated list of words, one of which is exactly value\n - example: `~foo`\n - css equivalent: `[data-test-subj~=\"foo\"]`\n - DOM match example:
data-test-subj=\"foo bar\"
\n\n - the `>` character is used between two values to indicate that the value on the right must match an element inside an element matched by the value on the left\n - example: `foo > bar`\n - css equivalent: `[data-test-subj=foo] [data-test-subj=bar]`\n - DOM match example:\n
data-test-subj=\"foo\"\n
data-test-subj=\"bar\"
\n
\n\n - the `&` character is used between two values to indicate that the value on both sides must both match the element\n - example: `foo & bar`\n - css equivalent: `[data-test-subj=foo][data-test-subj=bar]`\n - DOM match example:
data-test-subj=\"foo bar\"
" ], "signature": [ "(selector: string) => string" diff --git a/api_docs/kbn_test_subj_selector.mdx b/api_docs/kbn_test_subj_selector.mdx index eaf72c6d03d87..f43b97d0b96e2 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-04-08 +date: 2024-04-11 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 927a35f663483..d3c9a5d2c2923 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-04-08 +date: 2024-04-11 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 ec0ca3f487d57..66d4bccad459d 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-04-08 +date: 2024-04-11 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 f76a1d8c69ab7..2ee5c1542ba27 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-04-08 +date: 2024-04-11 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 07a1625e64a0e..5d60eb423bcf8 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/triggers-actions-ui-types'] --- import kbnTriggersActionsUiTypesObj from './kbn_triggers_actions_ui_types.devdocs.json'; diff --git a/api_docs/kbn_ts_projects.mdx b/api_docs/kbn_ts_projects.mdx index 316cd769a31f0..7b7d8b81f311e 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-04-08 +date: 2024-04-11 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 719865fb00931..2fcfbfca6d81a 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-04-08 +date: 2024-04-11 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 2cd4ac6a04930..3f7787939d569 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-04-08 +date: 2024-04-11 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 88f034594f47b..f4cf5afdcf182 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-04-08 +date: 2024-04-11 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.devdocs.json b/api_docs/kbn_ui_theme.devdocs.json index 1d1fb378e9a9e..0a7cbe86f839c 100644 --- a/api_docs/kbn_ui_theme.devdocs.json +++ b/api_docs/kbn_ui_theme.devdocs.json @@ -69,6 +69,18 @@ "deprecated": true, "trackAdoption": false, "references": [ + { + "plugin": "@kbn/monaco", + "path": "packages/kbn-monaco/src/esql/lib/esql_theme.ts" + }, + { + "plugin": "@kbn/monaco", + "path": "packages/kbn-monaco/src/esql/lib/esql_theme.ts" + }, + { + "plugin": "@kbn/monaco", + "path": "packages/kbn-monaco/src/esql/lib/esql_theme.ts" + }, { "plugin": "@kbn/monaco", "path": "packages/kbn-monaco/src/esql/lib/esql_theme.ts" diff --git a/api_docs/kbn_ui_theme.mdx b/api_docs/kbn_ui_theme.mdx index a7a92e94059a7..54bf626b577f2 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-theme'] --- import kbnUiThemeObj from './kbn_ui_theme.devdocs.json'; diff --git a/api_docs/kbn_unified_data_table.devdocs.json b/api_docs/kbn_unified_data_table.devdocs.json index 29cec239e12b3..23c3d47385761 100644 --- a/api_docs/kbn_unified_data_table.devdocs.json +++ b/api_docs/kbn_unified_data_table.devdocs.json @@ -128,6 +128,74 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/unified-data-table", + "id": "def-common.getRenderCustomToolbarWithElements", + "type": "Function", + "tags": [], + "label": "getRenderCustomToolbarWithElements", + "description": [ + "\nRender custom element on the left side and all controls to the right" + ], + "signature": [ + "({ leftSide, bottomSection, }: { leftSide?: React.ReactElement> | undefined; bottomSection?: React.ReactElement> | undefined; }) => ", + { + "pluginId": "@kbn/unified-data-table", + "scope": "common", + "docId": "kibKbnUnifiedDataTablePluginApi", + "section": "def-common.UnifiedDataTableRenderCustomToolbar", + "text": "UnifiedDataTableRenderCustomToolbar" + } + ], + "path": "packages/kbn-unified-data-table/src/components/custom_toolbar/render_custom_toolbar.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/unified-data-table", + "id": "def-common.getRenderCustomToolbarWithElements.$1", + "type": "Object", + "tags": [], + "label": "{\n leftSide,\n bottomSection,\n}", + "description": [], + "path": "packages/kbn-unified-data-table/src/components/custom_toolbar/render_custom_toolbar.tsx", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/unified-data-table", + "id": "def-common.getRenderCustomToolbarWithElements.$1.leftSide", + "type": "Object", + "tags": [], + "label": "leftSide", + "description": [], + "signature": [ + "React.ReactElement> | undefined" + ], + "path": "packages/kbn-unified-data-table/src/components/custom_toolbar/render_custom_toolbar.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "@kbn/unified-data-table", + "id": "def-common.getRenderCustomToolbarWithElements.$1.bottomSection", + "type": "Object", + "tags": [], + "label": "bottomSection", + "description": [], + "signature": [ + "React.ReactElement> | undefined" + ], + "path": "packages/kbn-unified-data-table/src/components/custom_toolbar/render_custom_toolbar.tsx", + "deprecated": false, + "trackAdoption": false + } + ] + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/unified-data-table", "id": "def-common.getRowsPerPageOptions", @@ -363,6 +431,52 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/unified-data-table", + "id": "def-common.renderCustomToolbar", + "type": "Function", + "tags": [], + "label": "renderCustomToolbar", + "description": [], + "signature": [ + "(props: ", + { + "pluginId": "@kbn/unified-data-table", + "scope": "common", + "docId": "kibKbnUnifiedDataTablePluginApi", + "section": "def-common.UnifiedDataTableRenderCustomToolbarProps", + "text": "UnifiedDataTableRenderCustomToolbarProps" + }, + ") => React.ReactElement>" + ], + "path": "packages/kbn-unified-data-table/src/components/custom_toolbar/render_custom_toolbar.tsx", + "deprecated": false, + "trackAdoption": false, + "returnComment": [], + "children": [ + { + "parentPluginId": "@kbn/unified-data-table", + "id": "def-common.renderCustomToolbar.$1", + "type": "Object", + "tags": [], + "label": "props", + "description": [], + "signature": [ + { + "pluginId": "@kbn/unified-data-table", + "scope": "common", + "docId": "kibKbnUnifiedDataTablePluginApi", + "section": "def-common.UnifiedDataTableRenderCustomToolbarProps", + "text": "UnifiedDataTableRenderCustomToolbarProps" + } + ], + "path": "packages/kbn-unified-data-table/src/components/custom_toolbar/render_custom_toolbar.tsx", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/unified-data-table", "id": "def-common.RowHeightSettings", @@ -418,7 +532,7 @@ "label": "UnifiedDataTable", "description": [], "signature": [ - "({ ariaLabelledBy, columns, columnsMeta, showColumnTokens, configHeaderRowHeight, headerRowHeightState, onUpdateHeaderRowHeight, controlColumnIds, dataView, loadingState, onFilter, onResize, onSetColumns, onSort, rows, searchDescription, searchTitle, settings, showTimeCol, showFullScreenButton, sort, useNewFieldsApi, isSortEnabled, isPaginationEnabled, cellActionsTriggerId, className, rowHeightState, onUpdateRowHeight, maxAllowedSampleSize, sampleSizeState, onUpdateSampleSize, isPlainRecord, rowsPerPageState, onUpdateRowsPerPage, onFieldEdited, services, renderCustomGridBody, renderCustomToolbar, trailingControlColumns, totalHits, onFetchMoreRecords, renderDocumentView, setExpandedDoc, expandedDoc, configRowHeight, showMultiFields, maxDocFieldsDisplayed, externalControlColumns, externalAdditionalControls, rowsPerPageOptions, visibleCellActions, externalCustomRenderers, consumer, componentsTourSteps, gridStyleOverride, rowLineHeightOverride, cellActionsMetadata, customGridColumnsConfiguration, customControlColumnsConfiguration, }: ", + "({ ariaLabelledBy, columns, columnsMeta, showColumnTokens, configHeaderRowHeight, headerRowHeightState, onUpdateHeaderRowHeight, controlColumnIds, dataView, loadingState, onFilter, onResize, onSetColumns, onSort, rows, searchDescription, searchTitle, settings, showTimeCol, showFullScreenButton, sort, useNewFieldsApi, isSortEnabled, isPaginationEnabled, cellActionsTriggerId, className, rowHeightState, onUpdateRowHeight, maxAllowedSampleSize, sampleSizeState, onUpdateSampleSize, isPlainRecord, rowsPerPageState, onUpdateRowsPerPage, onFieldEdited, services, renderCustomGridBody, renderCustomToolbar, trailingControlColumns, totalHits, onFetchMoreRecords, renderDocumentView, setExpandedDoc, expandedDoc, configRowHeight, showMultiFields, maxDocFieldsDisplayed, externalControlColumns, externalAdditionalControls, rowsPerPageOptions, visibleCellActions, externalCustomRenderers, consumer, componentsTourSteps, gridStyleOverride, rowLineHeightOverride, cellActionsMetadata, customGridColumnsConfiguration, customControlColumnsConfiguration, enableComparisonMode, }: ", { "pluginId": "@kbn/unified-data-table", "scope": "common", @@ -437,7 +551,7 @@ "id": "def-common.UnifiedDataTable.$1", "type": "Object", "tags": [], - "label": "{\n ariaLabelledBy,\n columns,\n columnsMeta,\n showColumnTokens,\n configHeaderRowHeight,\n headerRowHeightState,\n onUpdateHeaderRowHeight,\n controlColumnIds = CONTROL_COLUMN_IDS_DEFAULT,\n dataView,\n loadingState,\n onFilter,\n onResize,\n onSetColumns,\n onSort,\n rows,\n searchDescription,\n searchTitle,\n settings,\n showTimeCol,\n showFullScreenButton = true,\n sort,\n useNewFieldsApi,\n isSortEnabled = true,\n isPaginationEnabled = true,\n cellActionsTriggerId,\n className,\n rowHeightState,\n onUpdateRowHeight,\n maxAllowedSampleSize,\n sampleSizeState,\n onUpdateSampleSize,\n isPlainRecord = false,\n rowsPerPageState,\n onUpdateRowsPerPage,\n onFieldEdited,\n services,\n renderCustomGridBody,\n renderCustomToolbar,\n trailingControlColumns,\n totalHits,\n onFetchMoreRecords,\n renderDocumentView,\n setExpandedDoc,\n expandedDoc,\n configRowHeight,\n showMultiFields = true,\n maxDocFieldsDisplayed = 50,\n externalControlColumns,\n externalAdditionalControls,\n rowsPerPageOptions,\n visibleCellActions,\n externalCustomRenderers,\n consumer = 'discover',\n componentsTourSteps,\n gridStyleOverride,\n rowLineHeightOverride,\n cellActionsMetadata,\n customGridColumnsConfiguration,\n customControlColumnsConfiguration,\n}", + "label": "{\n ariaLabelledBy,\n columns,\n columnsMeta,\n showColumnTokens,\n configHeaderRowHeight,\n headerRowHeightState,\n onUpdateHeaderRowHeight,\n controlColumnIds = CONTROL_COLUMN_IDS_DEFAULT,\n dataView,\n loadingState,\n onFilter,\n onResize,\n onSetColumns,\n onSort,\n rows,\n searchDescription,\n searchTitle,\n settings,\n showTimeCol,\n showFullScreenButton = true,\n sort,\n useNewFieldsApi,\n isSortEnabled = true,\n isPaginationEnabled = true,\n cellActionsTriggerId,\n className,\n rowHeightState,\n onUpdateRowHeight,\n maxAllowedSampleSize,\n sampleSizeState,\n onUpdateSampleSize,\n isPlainRecord = false,\n rowsPerPageState,\n onUpdateRowsPerPage,\n onFieldEdited,\n services,\n renderCustomGridBody,\n renderCustomToolbar,\n trailingControlColumns,\n totalHits,\n onFetchMoreRecords,\n renderDocumentView,\n setExpandedDoc,\n expandedDoc,\n configRowHeight,\n showMultiFields = true,\n maxDocFieldsDisplayed = 50,\n externalControlColumns,\n externalAdditionalControls,\n rowsPerPageOptions,\n visibleCellActions,\n externalCustomRenderers,\n consumer = 'discover',\n componentsTourSteps,\n gridStyleOverride,\n rowLineHeightOverride,\n cellActionsMetadata,\n customGridColumnsConfiguration,\n customControlColumnsConfiguration,\n enableComparisonMode,\n}", "description": [], "signature": [ { @@ -2152,6 +2266,22 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "@kbn/unified-data-table", + "id": "def-common.UnifiedDataTableProps.enableComparisonMode", + "type": "CompoundType", + "tags": [], + "label": "enableComparisonMode", + "description": [ + "\nSet to true to allow users to compare selected documents" + ], + "signature": [ + "boolean | undefined" + ], + "path": "packages/kbn-unified-data-table/src/components/data_table.tsx", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "@kbn/unified-data-table", "id": "def-common.UnifiedDataTableProps.cellActionsMetadata", @@ -2178,7 +2308,7 @@ "tags": [], "label": "UnifiedDataTableRenderCustomToolbarProps", "description": [], - "path": "packages/kbn-unified-data-table/src/components/data_table.tsx", + "path": "packages/kbn-unified-data-table/src/components/custom_toolbar/render_custom_toolbar.tsx", "deprecated": false, "trackAdoption": false, "children": [ @@ -2192,7 +2322,7 @@ "signature": [ "EuiDataGridCustomToolbarProps" ], - "path": "packages/kbn-unified-data-table/src/components/data_table.tsx", + "path": "packages/kbn-unified-data-table/src/components/custom_toolbar/render_custom_toolbar.tsx", "deprecated": false, "trackAdoption": false }, @@ -2208,7 +2338,7 @@ "EuiDataGridToolBarAdditionalControlsOptions", "; }" ], - "path": "packages/kbn-unified-data-table/src/components/data_table.tsx", + "path": "packages/kbn-unified-data-table/src/components/custom_toolbar/render_custom_toolbar.tsx", "deprecated": false, "trackAdoption": false } @@ -2502,7 +2632,7 @@ }, ") => React.ReactElement>" ], - "path": "packages/kbn-unified-data-table/src/components/data_table.tsx", + "path": "packages/kbn-unified-data-table/src/components/custom_toolbar/render_custom_toolbar.tsx", "deprecated": false, "trackAdoption": false, "returnComment": [], @@ -2523,7 +2653,7 @@ "text": "UnifiedDataTableRenderCustomToolbarProps" } ], - "path": "packages/kbn-unified-data-table/src/components/data_table.tsx", + "path": "packages/kbn-unified-data-table/src/components/custom_toolbar/render_custom_toolbar.tsx", "deprecated": false, "trackAdoption": false } diff --git a/api_docs/kbn_unified_data_table.mdx b/api_docs/kbn_unified_data_table.mdx index ec4fd4ad9eee7..797e983aac747 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-data-table'] --- import kbnUnifiedDataTableObj from './kbn_unified_data_table.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 144 | 0 | 78 | 1 | +| 151 | 0 | 83 | 1 | ## Common diff --git a/api_docs/kbn_unified_doc_viewer.mdx b/api_docs/kbn_unified_doc_viewer.mdx index d20aaaea69035..bc6cccf14f0ef 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-doc-viewer'] --- import kbnUnifiedDocViewerObj from './kbn_unified_doc_viewer.devdocs.json'; diff --git a/api_docs/kbn_unified_field_list.mdx b/api_docs/kbn_unified_field_list.mdx index 44aac1322edd9..3c900e08d34ae 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-04-08 +date: 2024-04-11 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 f1df460dd12eb..ff4963d79e12a 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unsaved-changes-badge'] --- import kbnUnsavedChangesBadgeObj from './kbn_unsaved_changes_badge.devdocs.json'; diff --git a/api_docs/kbn_use_tracked_promise.mdx b/api_docs/kbn_use_tracked_promise.mdx index 81c8e6625baa4..882d32f157a3c 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-04-08 +date: 2024-04-11 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 8a641a3117a79..62a921bae03dd 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-04-08 +date: 2024-04-11 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 0c21fa5d41a8d..8beadba8ae341 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-04-08 +date: 2024-04-11 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 1af0d7eed447d..2c4fc04a43e19 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-04-08 +date: 2024-04-11 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 6bab006d44f44..be3d36c27a758 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utils'] --- import kbnUtilsObj from './kbn_utils.devdocs.json'; diff --git a/api_docs/kbn_visualization_ui_components.mdx b/api_docs/kbn_visualization_ui_components.mdx index 26e12f516bd36..b75595ffaa20c 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-04-08 +date: 2024-04-11 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.devdocs.json b/api_docs/kbn_visualization_utils.devdocs.json index b52439e9940d1..e20561e6cecba 100644 --- a/api_docs/kbn_visualization_utils.devdocs.json +++ b/api_docs/kbn_visualization_utils.devdocs.json @@ -61,23 +61,7 @@ "section": "def-common.DataView", "text": "DataView" }, - " | undefined; }) => { title: string; references: { id: string; name: string; type: string; }[]; state: { adHocDataViews?: { [x: string]: ", - { - "pluginId": "dataViews", - "scope": "common", - "docId": "kibDataViewsPluginApi", - "section": "def-common.DataViewSpec", - "text": "DataViewSpec" - }, - "; } | undefined; datasourceStates: { [x: string]: {}; formBased?: undefined; } | { formBased: {}; }; filters: ", - { - "pluginId": "@kbn/es-query", - "scope": "common", - "docId": "kibKbnEsQueryPluginApi", - "section": "def-common.Filter", - "text": "Filter" - }, - "[]; query: ", + " | undefined; }) => { references: { name: string; id: string; type: string; }[]; visualizationType: string; state: { visualization: {}; datasourceStates: Record; query: ", { "pluginId": "@kbn/es-query", "scope": "common", @@ -93,7 +77,15 @@ "section": "def-common.AggregateQuery", "text": "AggregateQuery" }, - "; visualization: {}; }; visualizationType: string; }" + "; filters: ", + { + "pluginId": "@kbn/es-query", + "scope": "common", + "docId": "kibKbnEsQueryPluginApi", + "section": "def-common.Filter", + "text": "Filter" + }, + "[]; }; title: string; }" ], "path": "packages/kbn-visualization-utils/src/get_lens_attributes.ts", "deprecated": false, diff --git a/api_docs/kbn_visualization_utils.mdx b/api_docs/kbn_visualization_utils.mdx index 87512d1585a8d..3883e49f5d29d 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-04-08 +date: 2024-04-11 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 df8c972843017..e18b1ceabe40f 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-04-08 +date: 2024-04-11 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 5784eb4299d2f..a7d661c7787ba 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-04-08 +date: 2024-04-11 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 243e3a73dc300..55619b64f0d36 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-04-08 +date: 2024-04-11 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 9f1fcfc5529b1..648ad46a47a5f 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaOverview'] --- import kibanaOverviewObj from './kibana_overview.devdocs.json'; diff --git a/api_docs/kibana_react.devdocs.json b/api_docs/kibana_react.devdocs.json index 43fbab84ee60c..4509a754f1314 100644 --- a/api_docs/kibana_react.devdocs.json +++ b/api_docs/kibana_react.devdocs.json @@ -559,18 +559,6 @@ "plugin": "serverless", "path": "x-pack/plugins/serverless/public/plugin.tsx" }, - { - "plugin": "management", - "path": "src/plugins/management/public/components/management_app/management_app.tsx" - }, - { - "plugin": "management", - "path": "src/plugins/management/public/components/management_app/management_app.tsx" - }, - { - "plugin": "management", - "path": "src/plugins/management/public/components/management_app/management_app.tsx" - }, { "plugin": "spaces", "path": "x-pack/plugins/spaces/public/management/spaces_management_app.tsx" @@ -619,22 +607,6 @@ "plugin": "savedObjects", "path": "src/plugins/saved_objects/public/save_modal/show_saved_object_save_modal.tsx" }, - { - "plugin": "indexManagement", - "path": "x-pack/plugins/index_management/public/shared_imports.ts" - }, - { - "plugin": "indexManagement", - "path": "x-pack/plugins/index_management/public/application/index.tsx" - }, - { - "plugin": "indexManagement", - "path": "x-pack/plugins/index_management/public/application/index.tsx" - }, - { - "plugin": "indexManagement", - "path": "x-pack/plugins/index_management/public/application/index.tsx" - }, { "plugin": "devTools", "path": "src/plugins/dev_tools/public/application.tsx" @@ -967,18 +939,6 @@ "plugin": "lens", "path": "x-pack/plugins/lens/public/embeddable/embeddable.tsx" }, - { - "plugin": "alerting", - "path": "x-pack/plugins/alerting/public/application/maintenance_windows.tsx" - }, - { - "plugin": "alerting", - "path": "x-pack/plugins/alerting/public/application/maintenance_windows.tsx" - }, - { - "plugin": "alerting", - "path": "x-pack/plugins/alerting/public/application/maintenance_windows.tsx" - }, { "plugin": "dashboard", "path": "src/plugins/dashboard/public/dashboard_container/embeddable/dashboard_container.tsx" @@ -1003,42 +963,6 @@ "plugin": "dashboard", "path": "src/plugins/dashboard/public/dashboard_app/dashboard_router.tsx" }, - { - "plugin": "triggersActionsUi", - "path": "x-pack/plugins/triggers_actions_ui/public/application/app.tsx" - }, - { - "plugin": "triggersActionsUi", - "path": "x-pack/plugins/triggers_actions_ui/public/application/app.tsx" - }, - { - "plugin": "triggersActionsUi", - "path": "x-pack/plugins/triggers_actions_ui/public/application/app.tsx" - }, - { - "plugin": "triggersActionsUi", - "path": "x-pack/plugins/triggers_actions_ui/public/application/connectors_app.tsx" - }, - { - "plugin": "triggersActionsUi", - "path": "x-pack/plugins/triggers_actions_ui/public/application/connectors_app.tsx" - }, - { - "plugin": "triggersActionsUi", - "path": "x-pack/plugins/triggers_actions_ui/public/application/connectors_app.tsx" - }, - { - "plugin": "triggersActionsUi", - "path": "x-pack/plugins/triggers_actions_ui/public/application/alerts_app.tsx" - }, - { - "plugin": "triggersActionsUi", - "path": "x-pack/plugins/triggers_actions_ui/public/application/alerts_app.tsx" - }, - { - "plugin": "triggersActionsUi", - "path": "x-pack/plugins/triggers_actions_ui/public/application/alerts_app.tsx" - }, { "plugin": "aiops", "path": "x-pack/plugins/aiops/public/embeddable/embeddable_change_point_chart.tsx" @@ -1319,6 +1243,22 @@ "plugin": "fleet", "path": "x-pack/plugins/fleet/public/applications/fleet/app.tsx" }, + { + "plugin": "indexManagement", + "path": "x-pack/plugins/index_management/public/shared_imports.ts" + }, + { + "plugin": "indexManagement", + "path": "x-pack/plugins/index_management/public/application/index.tsx" + }, + { + "plugin": "indexManagement", + "path": "x-pack/plugins/index_management/public/application/index.tsx" + }, + { + "plugin": "indexManagement", + "path": "x-pack/plugins/index_management/public/application/index.tsx" + }, { "plugin": "crossClusterReplication", "path": "x-pack/plugins/cross_cluster_replication/public/shared_imports.ts" @@ -1715,18 +1655,6 @@ "plugin": "ux", "path": "x-pack/plugins/observability_solution/ux/public/application/ux_app.tsx" }, - { - "plugin": "triggersActionsUi", - "path": "x-pack/plugins/triggers_actions_ui/public/application/sections/test_utils.tsx" - }, - { - "plugin": "triggersActionsUi", - "path": "x-pack/plugins/triggers_actions_ui/public/application/sections/test_utils.tsx" - }, - { - "plugin": "triggersActionsUi", - "path": "x-pack/plugins/triggers_actions_ui/public/application/sections/test_utils.tsx" - }, { "plugin": "filesManagement", "path": "src/plugins/files_management/public/mount_management_section.tsx" @@ -2436,26 +2364,6 @@ "plugin": "console", "path": "src/plugins/console/public/application/hooks/use_send_current_request/use_send_current_request.ts" }, - { - "plugin": "runtimeFields", - "path": "x-pack/plugins/runtime_fields/public/shared_imports.ts" - }, - { - "plugin": "runtimeFields", - "path": "x-pack/plugins/runtime_fields/public/load_editor.tsx" - }, - { - "plugin": "runtimeFields", - "path": "x-pack/plugins/runtime_fields/public/load_editor.tsx" - }, - { - "plugin": "indexManagement", - "path": "x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_datastreams_rollover/use_datastreams_rollover.tsx" - }, - { - "plugin": "indexManagement", - "path": "x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_datastreams_rollover/use_datastreams_rollover.tsx" - }, { "plugin": "dataViewEditor", "path": "src/plugins/data_view_editor/public/shared_imports.ts" @@ -2644,90 +2552,6 @@ "plugin": "dashboard", "path": "src/plugins/dashboard/public/dashboard_listing/dashboard_listing_table.tsx" }, - { - "plugin": "triggersActionsUi", - "path": "x-pack/plugins/triggers_actions_ui/public/application/hooks/use_bulk_edit_response.tsx" - }, - { - "plugin": "triggersActionsUi", - "path": "x-pack/plugins/triggers_actions_ui/public/application/hooks/use_bulk_edit_response.tsx" - }, - { - "plugin": "triggersActionsUi", - "path": "x-pack/plugins/triggers_actions_ui/public/application/hooks/use_bulk_edit_response.tsx" - }, - { - "plugin": "triggersActionsUi", - "path": "x-pack/plugins/triggers_actions_ui/public/application/hooks/use_bulk_operation_toast.tsx" - }, - { - "plugin": "triggersActionsUi", - "path": "x-pack/plugins/triggers_actions_ui/public/application/hooks/use_bulk_operation_toast.tsx" - }, - { - "plugin": "triggersActionsUi", - "path": "x-pack/plugins/triggers_actions_ui/public/application/hooks/use_bulk_operation_toast.tsx" - }, - { - "plugin": "triggersActionsUi", - "path": "x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_add.tsx" - }, - { - "plugin": "triggersActionsUi", - "path": "x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_add.tsx" - }, - { - "plugin": "triggersActionsUi", - "path": "x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_edit.tsx" - }, - { - "plugin": "triggersActionsUi", - "path": "x-pack/plugins/triggers_actions_ui/public/application/sections/rule_form/rule_edit.tsx" - }, - { - "plugin": "triggersActionsUi", - "path": "x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list.tsx" - }, - { - "plugin": "triggersActionsUi", - "path": "x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rules_list.tsx" - }, - { - "plugin": "triggersActionsUi", - "path": "x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_details.tsx" - }, - { - "plugin": "triggersActionsUi", - "path": "x-pack/plugins/triggers_actions_ui/public/application/sections/rule_details/components/rule_details.tsx" - }, - { - "plugin": "triggersActionsUi", - "path": "x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rule_status_dropdown.tsx" - }, - { - "plugin": "triggersActionsUi", - "path": "x-pack/plugins/triggers_actions_ui/public/application/sections/rules_list/components/rule_status_dropdown.tsx" - }, - { - "plugin": "cases", - "path": "x-pack/plugins/cases/public/common/use_cases_toast.tsx" - }, - { - "plugin": "cases", - "path": "x-pack/plugins/cases/public/common/use_cases_toast.tsx" - }, - { - "plugin": "cases", - "path": "x-pack/plugins/cases/public/common/use_cases_toast.tsx" - }, - { - "plugin": "cases", - "path": "x-pack/plugins/cases/public/components/visualizations/actions/add_to_existing_case.tsx" - }, - { - "plugin": "cases", - "path": "x-pack/plugins/cases/public/components/visualizations/actions/add_to_existing_case.tsx" - }, { "plugin": "observabilityShared", "path": "x-pack/plugins/observability_solution/observability_shared/public/components/header_menu/header_menu_portal.tsx" @@ -2944,6 +2768,26 @@ "plugin": "cloudSecurityPosture", "path": "x-pack/plugins/cloud_security_posture/public/components/take_action.tsx" }, + { + "plugin": "runtimeFields", + "path": "x-pack/plugins/runtime_fields/public/shared_imports.ts" + }, + { + "plugin": "runtimeFields", + "path": "x-pack/plugins/runtime_fields/public/load_editor.tsx" + }, + { + "plugin": "runtimeFields", + "path": "x-pack/plugins/runtime_fields/public/load_editor.tsx" + }, + { + "plugin": "indexManagement", + "path": "x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_datastreams_rollover/use_datastreams_rollover.tsx" + }, + { + "plugin": "indexManagement", + "path": "x-pack/plugins/index_management/public/application/components/component_templates/component_template_wizard/component_template_datastreams_rollover/use_datastreams_rollover.tsx" + }, { "plugin": "dashboardEnhanced", "path": "x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_create_drilldown/flyout_create_drilldown.tsx" @@ -2960,14 +2804,6 @@ "plugin": "dashboardEnhanced", "path": "x-pack/plugins/dashboard_enhanced/public/services/drilldowns/actions/flyout_edit_drilldown/flyout_edit_drilldown.tsx" }, - { - "plugin": "imageEmbeddable", - "path": "src/plugins/image_embeddable/public/image_editor/configure_image.tsx" - }, - { - "plugin": "imageEmbeddable", - "path": "src/plugins/image_embeddable/public/image_editor/configure_image.tsx" - }, { "plugin": "graph", "path": "x-pack/plugins/graph/public/helpers/saved_objects_utils/confirm_modal_promise.tsx" diff --git a/api_docs/kibana_react.mdx b/api_docs/kibana_react.mdx index d0b21bd47992a..5a65e91e6f44d 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-04-08 +date: 2024-04-11 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 3c6b31727ea39..0cf043730886c 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-04-08 +date: 2024-04-11 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 316c5ff854a56..76fc95d0da6c3 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kubernetesSecurity'] --- import kubernetesSecurityObj from './kubernetes_security.devdocs.json'; diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx index abe2879cb2dd2..a80e89e8ab02f 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-04-08 +date: 2024-04-11 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 9d82f91838e11..fb72c60373c02 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-04-08 +date: 2024-04-11 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 78097aa481cad..18443639db13b 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseManagement'] --- import licenseManagementObj from './license_management.devdocs.json'; diff --git a/api_docs/licensing.devdocs.json b/api_docs/licensing.devdocs.json index 18904192c445c..fbc75b9837f15 100644 --- a/api_docs/licensing.devdocs.json +++ b/api_docs/licensing.devdocs.json @@ -2222,6 +2222,10 @@ "plugin": "securitySolution", "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/threshold/threshold.ts" }, + { + "plugin": "securitySolution", + "path": "x-pack/plugins/security_solution/server/lib/detection_engine/rule_types/utils/get_is_alert_suppression_active.ts" + }, { "plugin": "painlessLab", "path": "x-pack/plugins/painless_lab/server/services/license.ts" diff --git a/api_docs/licensing.mdx b/api_docs/licensing.mdx index 5a83b6a8ef264..cfecbe7ccf113 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-04-08 +date: 2024-04-11 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 5329a28e78593..a471cea6455e6 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-04-08 +date: 2024-04-11 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 1898c238d6cc0..4148ba5ff479e 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lists'] --- import listsObj from './lists.devdocs.json'; diff --git a/api_docs/logs_explorer.mdx b/api_docs/logs_explorer.mdx index 5129a2c71e6ca..11b934d5ac644 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsExplorer'] --- import logsExplorerObj from './logs_explorer.devdocs.json'; diff --git a/api_docs/logs_shared.mdx b/api_docs/logs_shared.mdx index 5c51056b67f73..67561f53b1d69 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsShared'] --- import logsSharedObj from './logs_shared.devdocs.json'; diff --git a/api_docs/management.devdocs.json b/api_docs/management.devdocs.json index 6cb32d590a920..09117c7a85fef 100644 --- a/api_docs/management.devdocs.json +++ b/api_docs/management.devdocs.json @@ -579,9 +579,31 @@ }, { "parentPluginId": "management", - "id": "def-public.ManagementAppMountParams.theme$", + "id": "def-public.ManagementAppMountParams.theme", "type": "Object", "tags": [], + "label": "theme", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-theme-browser", + "scope": "common", + "docId": "kibKbnCoreThemeBrowserPluginApi", + "section": "def-common.ThemeServiceSetup", + "text": "ThemeServiceSetup" + } + ], + "path": "src/plugins/management/public/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "management", + "id": "def-public.ManagementAppMountParams.theme$", + "type": "Object", + "tags": [ + "deprecated" + ], "label": "theme$", "description": [], "signature": [ @@ -597,8 +619,90 @@ ">" ], "path": "src/plugins/management/public/types.ts", - "deprecated": false, - "trackAdoption": false + "deprecated": true, + "trackAdoption": false, + "references": [ + { + "plugin": "spaces", + "path": "x-pack/plugins/spaces/public/management/spaces_management_app.tsx" + }, + { + "plugin": "security", + "path": "x-pack/plugins/security/public/management/api_keys/api_keys_management_app.tsx" + }, + { + "plugin": "remoteClusters", + "path": "x-pack/plugins/remote_clusters/public/plugin.ts" + }, + { + "plugin": "security", + "path": "x-pack/plugins/security/public/management/users/users_management_app.tsx" + }, + { + "plugin": "security", + "path": "x-pack/plugins/security/public/management/roles/roles_management_app.tsx" + }, + { + "plugin": "security", + "path": "x-pack/plugins/security/public/management/role_mappings/role_mappings_management_app.tsx" + }, + { + "plugin": "savedObjectsTagging", + "path": "x-pack/plugins/saved_objects_tagging/public/management/mount_section.tsx" + }, + { + "plugin": "triggersActionsUi", + "path": "x-pack/plugins/triggers_actions_ui/public/plugin.ts" + }, + { + "plugin": "reporting", + "path": "x-pack/plugins/reporting/public/management/mount_management_section.tsx" + }, + { + "plugin": "licenseManagement", + "path": "x-pack/plugins/license_management/public/plugin.ts" + }, + { + "plugin": "indexManagement", + "path": "x-pack/plugins/index_management/public/application/mount_management_section.ts" + }, + { + "plugin": "crossClusterReplication", + "path": "x-pack/plugins/cross_cluster_replication/public/plugin.ts" + }, + { + "plugin": "indexLifecycleManagement", + "path": "x-pack/plugins/index_lifecycle_management/public/plugin.tsx" + }, + { + "plugin": "ingestPipelines", + "path": "x-pack/plugins/ingest_pipelines/public/application/mount_management_section.ts" + }, + { + "plugin": "logstash", + "path": "x-pack/plugins/logstash/public/application/index.tsx" + }, + { + "plugin": "rollup", + "path": "x-pack/plugins/rollup/public/application.tsx" + }, + { + "plugin": "snapshotRestore", + "path": "x-pack/plugins/snapshot_restore/public/application/mount_management_section.ts" + }, + { + "plugin": "upgradeAssistant", + "path": "x-pack/plugins/upgrade_assistant/public/plugin.ts" + }, + { + "plugin": "watcher", + "path": "x-pack/plugins/watcher/public/plugin.ts" + }, + { + "plugin": "cloudDataMigration", + "path": "x-pack/plugins/cloud_integrations/cloud_data_migration/public/application/index.tsx" + } + ] } ], "initialIsOpen": false diff --git a/api_docs/management.mdx b/api_docs/management.mdx index dd7912fe9957a..6143c44e41e58 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'management'] --- import managementObj from './management.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kiban | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 43 | 0 | 43 | 7 | +| 44 | 0 | 44 | 7 | ## Client diff --git a/api_docs/maps.mdx b/api_docs/maps.mdx index e2b71819b05d6..9f2f963375767 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-04-08 +date: 2024-04-11 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 98de91f46ecc9..5202743544a47 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mapsEms'] --- import mapsEmsObj from './maps_ems.devdocs.json'; diff --git a/api_docs/metrics_data_access.mdx b/api_docs/metrics_data_access.mdx index 4b11687734c6e..f9f9a27e47f61 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-04-08 +date: 2024-04-11 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 f8158653237da..00250e3ed45b7 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-04-08 +date: 2024-04-11 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 c817ce81b7754..3f71b2ca8b0ff 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-04-08 +date: 2024-04-11 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 df631d6119904..a3f2cff8da6d5 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-04-08 +date: 2024-04-11 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 aa20c16f499c7..06cef68af4be4 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoringCollection'] --- import monitoringCollectionObj from './monitoring_collection.devdocs.json'; diff --git a/api_docs/navigation.devdocs.json b/api_docs/navigation.devdocs.json index 415b04817bc72..b49c6e1f6bfc2 100644 --- a/api_docs/navigation.devdocs.json +++ b/api_docs/navigation.devdocs.json @@ -812,21 +812,6 @@ ], "enums": [], "misc": [ - { - "parentPluginId": "navigation", - "id": "def-public.SolutionNavigationOptInStatus", - "type": "Type", - "tags": [], - "label": "SolutionNavigationOptInStatus", - "description": [], - "signature": [ - "\"hidden\" | \"visible\" | \"ask\"" - ], - "path": "src/plugins/navigation/public/types.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "navigation", "id": "def-public.SolutionType", @@ -835,7 +820,7 @@ "label": "SolutionType", "description": [], "signature": [ - "\"security\" | \"es\" | \"oblt\"" + "\"security\" | \"analytics\" | \"es\" | \"oblt\"" ], "path": "src/plugins/navigation/public/types.ts", "deprecated": false, @@ -1136,21 +1121,6 @@ "interfaces": [], "enums": [], "misc": [ - { - "parentPluginId": "navigation", - "id": "def-common.DEFAULT_SOLUTION_NAV_UI_SETTING_ID", - "type": "string", - "tags": [], - "label": "DEFAULT_SOLUTION_NAV_UI_SETTING_ID", - "description": [], - "signature": [ - "\"solutionNav:default\"" - ], - "path": "src/plugins/navigation/common/constants.ts", - "deprecated": false, - "trackAdoption": false, - "initialIsOpen": false - }, { "parentPluginId": "navigation", "id": "def-common.ENABLE_SOLUTION_NAV_UI_SETTING_ID", @@ -1168,13 +1138,13 @@ }, { "parentPluginId": "navigation", - "id": "def-common.OPT_IN_STATUS_SOLUTION_NAV_UI_SETTING_ID", + "id": "def-common.SOLUTION_NAV_FEATURE_FLAG_NAME", "type": "string", "tags": [], - "label": "OPT_IN_STATUS_SOLUTION_NAV_UI_SETTING_ID", + "label": "SOLUTION_NAV_FEATURE_FLAG_NAME", "description": [], "signature": [ - "\"solutionNav:optInStatus\"" + "\"navigation.solutionNavEnabled\"" ], "path": "src/plugins/navigation/common/constants.ts", "deprecated": false, diff --git a/api_docs/navigation.mdx b/api_docs/navigation.mdx index 3262313c663b1..725abf77bf2ba 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'navigation'] --- import navigationObj from './navigation.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sh | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 50 | 0 | 48 | 5 | +| 48 | 0 | 46 | 5 | ## Client diff --git a/api_docs/newsfeed.mdx b/api_docs/newsfeed.mdx index c2abda8123d04..a15e097070e3b 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-04-08 +date: 2024-04-11 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 0bfe0bbdd59f4..f4306413bcb85 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-04-08 +date: 2024-04-11 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 922b355dfc460..49b5179f6ada4 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'notifications'] --- import notificationsObj from './notifications.devdocs.json'; diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index 66a2c8addf694..d3310e2b6c435 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observability'] --- import observabilityObj from './observability.devdocs.json'; diff --git a/api_docs/observability_a_i_assistant.devdocs.json b/api_docs/observability_a_i_assistant.devdocs.json index fb609b87644e8..4eab184fc7ba4 100644 --- a/api_docs/observability_a_i_assistant.devdocs.json +++ b/api_docs/observability_a_i_assistant.devdocs.json @@ -2130,7 +2130,19 @@ "StringC", "; responseLanguage: ", "StringC", - "; }>]>; }> | undefined; handler: ({}: ", + "; instructions: ", + "ArrayC", + "<", + "UnionC", + "<[", + "StringC", + ", ", + "TypeC", + "<{ doc_id: ", + "StringC", + "; text: ", + "StringC", + "; }>]>>; }>]>; }> | undefined; handler: ({}: ", "ObservabilityAIAssistantRouteHandlerResources", " & { params: { body: { messages: ", { @@ -2142,7 +2154,7 @@ }, "[]; screenContexts: ", "ObservabilityAIAssistantScreenContextRequest", - "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; }; }; }) => Promise<", + "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; instructions?: (string | { doc_id: string; text: string; })[] | undefined; }; }; }) => Promise<", "Readable", ">; } & ", "ObservabilityAIAssistantRouteCreateOptions", @@ -2646,7 +2658,19 @@ "StringC", "; responseLanguage: ", "StringC", - "; }>]>; }> | undefined; handler: ({}: ", + "; instructions: ", + "ArrayC", + "<", + "UnionC", + "<[", + "StringC", + ", ", + "TypeC", + "<{ doc_id: ", + "StringC", + "; text: ", + "StringC", + "; }>]>>; }>]>; }> | undefined; handler: ({}: ", "ObservabilityAIAssistantRouteHandlerResources", " & { params: { body: { messages: ", { @@ -2658,7 +2682,7 @@ }, "[]; screenContexts: ", "ObservabilityAIAssistantScreenContextRequest", - "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; }; }; }) => Promise<", + "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; instructions?: (string | { doc_id: string; text: string; })[] | undefined; }; }; }) => Promise<", "Readable", ">; } & ", "ObservabilityAIAssistantRouteCreateOptions", @@ -3735,7 +3759,19 @@ "StringC", "; responseLanguage: ", "StringC", - "; }>]>; }> | undefined; handler: ({}: ", + "; instructions: ", + "ArrayC", + "<", + "UnionC", + "<[", + "StringC", + ", ", + "TypeC", + "<{ doc_id: ", + "StringC", + "; text: ", + "StringC", + "; }>]>>; }>]>; }> | undefined; handler: ({}: ", "ObservabilityAIAssistantRouteHandlerResources", " & { params: { body: { messages: ", { @@ -3747,7 +3783,7 @@ }, "[]; screenContexts: ", "ObservabilityAIAssistantScreenContextRequest", - "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; }; }; }) => Promise<", + "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; instructions?: (string | { doc_id: string; text: string; })[] | undefined; }; }; }) => Promise<", "Readable", ">; } & ", "ObservabilityAIAssistantRouteCreateOptions", @@ -4369,7 +4405,19 @@ "StringC", "; responseLanguage: ", "StringC", - "; }>]>; }> | undefined; handler: ({}: ", + "; instructions: ", + "ArrayC", + "<", + "UnionC", + "<[", + "StringC", + ", ", + "TypeC", + "<{ doc_id: ", + "StringC", + "; text: ", + "StringC", + "; }>]>>; }>]>; }> | undefined; handler: ({}: ", "ObservabilityAIAssistantRouteHandlerResources", " & { params: { body: { messages: ", { @@ -4381,7 +4429,7 @@ }, "[]; screenContexts: ", "ObservabilityAIAssistantScreenContextRequest", - "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; }; }; }) => Promise<", + "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; instructions?: (string | { doc_id: string; text: string; })[] | undefined; }; }; }) => Promise<", "Readable", ">; } & ", "ObservabilityAIAssistantRouteCreateOptions", @@ -5594,7 +5642,19 @@ "StringC", "; responseLanguage: ", "StringC", - "; }>]>; }> | undefined; handler: ({}: ", + "; instructions: ", + "ArrayC", + "<", + "UnionC", + "<[", + "StringC", + ", ", + "TypeC", + "<{ doc_id: ", + "StringC", + "; text: ", + "StringC", + "; }>]>>; }>]>; }> | undefined; handler: ({}: ", "ObservabilityAIAssistantRouteHandlerResources", " & { params: { body: { messages: ", { @@ -5606,7 +5666,7 @@ }, "[]; screenContexts: ", "ObservabilityAIAssistantScreenContextRequest", - "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; }; }; }) => Promise<", + "[]; connectorId: string; persist: boolean; } & { conversationId?: string | undefined; title?: string | undefined; responseLanguage?: string | undefined; instructions?: (string | { doc_id: string; text: string; })[] | undefined; }; }; }) => Promise<", "Readable", ">; } & ", "ObservabilityAIAssistantRouteCreateOptions", diff --git a/api_docs/observability_a_i_assistant.mdx b/api_docs/observability_a_i_assistant.mdx index ba67a1c4f6f7e..898ea160b54e2 100644 --- a/api_docs/observability_a_i_assistant.mdx +++ b/api_docs/observability_a_i_assistant.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/observabilityAIAssistant title: "observabilityAIAssistant" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityAIAssistant plugin -date: 2024-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAIAssistant'] --- import observabilityAIAssistantObj from './observability_a_i_assistant.devdocs.json'; -Contact [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) for questions regarding this plugin. +Contact [@elastic/obs-ai-assistant](https://github.com/orgs/elastic/teams/obs-ai-assistant) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/observability_a_i_assistant_app.mdx b/api_docs/observability_a_i_assistant_app.mdx index c334f92d47c0c..ebe5ccc85d9aa 100644 --- a/api_docs/observability_a_i_assistant_app.mdx +++ b/api_docs/observability_a_i_assistant_app.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/observabilityAIAssistantApp title: "observabilityAIAssistantApp" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityAIAssistantApp plugin -date: 2024-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAIAssistantApp'] --- import observabilityAIAssistantAppObj from './observability_a_i_assistant_app.devdocs.json'; -Contact [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) for questions regarding this plugin. +Contact [@elastic/obs-ai-assistant](https://github.com/orgs/elastic/teams/obs-ai-assistant) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/observability_ai_assistant_management.mdx b/api_docs/observability_ai_assistant_management.mdx index f84768b1da652..27ee4a102cc83 100644 --- a/api_docs/observability_ai_assistant_management.mdx +++ b/api_docs/observability_ai_assistant_management.mdx @@ -8,14 +8,14 @@ slug: /kibana-dev-docs/api/observabilityAiAssistantManagement title: "observabilityAiAssistantManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityAiAssistantManagement plugin -date: 2024-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAiAssistantManagement'] --- import observabilityAiAssistantManagementObj from './observability_ai_assistant_management.devdocs.json'; -Contact [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) for questions regarding this plugin. +Contact [@elastic/obs-ai-assistant](https://github.com/orgs/elastic/teams/obs-ai-assistant) for questions regarding this plugin. **Code health stats** diff --git a/api_docs/observability_logs_explorer.mdx b/api_docs/observability_logs_explorer.mdx index 9f354432d92c6..5b3ab74509ff4 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-04-08 +date: 2024-04-11 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 3120250579bcf..36e402c9b4305 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-04-08 +date: 2024-04-11 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 1ae7a9b2b24ed..32e6b3ee71368 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-04-08 +date: 2024-04-11 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 4c88d8929235c..51537c78e275d 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-04-08 +date: 2024-04-11 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 2329f818f9528..55e78d0ca45ce 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-04-08 +date: 2024-04-11 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 2bc8e3a0d19b1..37f2a5c4fa3f5 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -15,23 +15,23 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Count | Plugins or Packages with a
public API | Number of teams | |--------------|----------|------------------------| -| 779 | 668 | 41 | +| 780 | 669 | 42 | ### Public API health stats | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 46896 | 234 | 35598 | 1817 | +| 47107 | 239 | 35799 | 1833 | ## Plugin Directory | Plugin name           | Maintaining team | Description | API Cnt | Any Cnt | Missing
comments | Missing
exports | |--------------|----------------|-----------|--------------|----------|---------------|--------| -| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 291 | 0 | 285 | 32 | +| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 296 | 0 | 290 | 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) | - | 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. | 67 | 0 | 4 | 1 | -| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 854 | 1 | 822 | 54 | +| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 857 | 1 | 825 | 54 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | The user interface for Elastic APM | 29 | 0 | 29 | 127 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 9 | 0 | 9 | 0 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | Asset manager plugin for entity assets (inventory, topology, etc) | 9 | 0 | 9 | 2 | @@ -69,7 +69,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/security-threat-hunting-explore](https://github.com/orgs/elastic/teams/security-threat-hunting-explore) | APIs used to assess the quality of data in Elasticsearch indexes | 2 | 0 | 0 | 0 | | | [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/security-generative-ai) | Server APIs for the Elastic AI Assistant | 45 | 0 | 31 | 0 | | | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds embeddables service to Kibana | 559 | 1 | 453 | 8 | -| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Extends embeddable plugin with more functionality | 23 | 0 | 23 | 1 | +| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Extends embeddable plugin with more functionality | 19 | 0 | 19 | 2 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides encryption and decryption utilities for saved objects containing sensitive information. | 53 | 0 | 46 | 1 | | | [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | Adds dashboards for discovering and managing Enterprise Search products. | 5 | 0 | 5 | 0 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 99 | 3 | 97 | 3 | @@ -96,7 +96,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | The file upload plugin contains components and services for uploading a file, analyzing its data, and then importing the data into an Elasticsearch index. Supported file types include CSV, TSV, newline-delimited JSON and GeoJSON. | 84 | 0 | 84 | 8 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | File upload, download, sharing, and serving over HTTP implementation in Kibana. | 240 | 0 | 24 | 9 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Simple UI for managing files in Kibana | 2 | 0 | 2 | 0 | -| | [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1235 | 3 | 1115 | 59 | +| | [@elastic/fleet](https://github.com/orgs/elastic/teams/fleet) | - | 1297 | 5 | 1176 | 66 | | ftrApis | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 0 | 0 | 0 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 72 | 0 | 14 | 5 | | globalSearchBar | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 0 | 0 | 0 | 0 | @@ -105,9 +105,9 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | grokdebugger | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 0 | 0 | 0 | 0 | | | [@elastic/platform-onboarding](https://github.com/orgs/elastic/teams/platform-onboarding) | Guided onboarding framework | 59 | 0 | 58 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 151 | 0 | 111 | 1 | -| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Image embeddable | 3 | 0 | 3 | 1 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Image embeddable | 1 | 0 | 1 | 0 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 4 | 0 | 4 | 0 | -| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 230 | 0 | 225 | 3 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 223 | 0 | 218 | 1 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | This plugin visualizes data from Filebeat and Metricbeat, and integrates with other Observability solutions | 37 | 0 | 34 | 6 | | | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 4 | 0 | 4 | 0 | | inputControlVis | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | Adds Input Control visualization to Kibana | 0 | 0 | 0 | 0 | @@ -127,7 +127,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | This plugin provides a LogsExplorer component using the Discover customization framework, offering several affordances specifically designed for log consumption. | 121 | 4 | 121 | 23 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | Exposes the shared components and APIs to access and visualize logs. | 302 | 0 | 276 | 32 | | logstash | [@elastic/logstash](https://github.com/orgs/elastic/teams/logstash) | - | 0 | 0 | 0 | 0 | -| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 43 | 0 | 43 | 7 | +| | [@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) | - | 275 | 0 | 274 | 31 | | | [@elastic/kibana-gis](https://github.com/orgs/elastic/teams/kibana-gis) | - | 60 | 0 | 60 | 0 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | Exposes utilities for accessing metrics data | 104 | 8 | 104 | 6 | @@ -135,14 +135,14 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | - | 2 | 0 | 2 | 0 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 15 | 3 | 13 | 1 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 9 | 0 | 9 | 0 | -| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 50 | 0 | 48 | 5 | +| | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 48 | 0 | 46 | 5 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 17 | 0 | 17 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 3 | 0 | 3 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 2 | 0 | 2 | 1 | | | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 670 | 2 | 661 | 14 | -| | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 242 | 1 | 240 | 25 | -| | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 2 | 0 | 2 | 0 | -| | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 2 | 0 | 2 | 0 | +| | [@elastic/obs-ai-assistant](https://github.com/orgs/elastic/teams/obs-ai-assistant) | - | 242 | 1 | 240 | 25 | +| | [@elastic/obs-ai-assistant](https://github.com/orgs/elastic/teams/obs-ai-assistant) | - | 2 | 0 | 2 | 0 | +| | [@elastic/obs-ai-assistant](https://github.com/orgs/elastic/teams/obs-ai-assistant) | - | 2 | 0 | 2 | 0 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | This plugin exposes and registers observability log consumption features. | 21 | 0 | 21 | 1 | | | [@elastic/obs-ux-logs-team](https://github.com/orgs/elastic/teams/obs-ux-logs-team) | - | 14 | 0 | 14 | 0 | | | [@elastic/observability-ui](https://github.com/orgs/elastic/teams/observability-ui) | - | 343 | 1 | 338 | 22 | @@ -155,22 +155,22 @@ 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) | - | 272 | 0 | 243 | 14 | +| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 274 | 0 | 245 | 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) | - | 129 | 2 | 118 | 4 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 25 | 0 | 25 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 164 | 0 | 150 | 2 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 89 | 0 | 83 | 3 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 105 | 0 | 57 | 1 | -| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | This plugin contains the definition and helper methods around saved searches, used by discover and visualizations. | 79 | 0 | 78 | 3 | +| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | This plugin contains the definition and helper methods around saved searches, used by discover and visualizations. | 80 | 0 | 79 | 4 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 32 | 0 | 13 | 0 | | | [@elastic/kibana-reporting-services](https://github.com/orgs/elastic/teams/kibana-reporting-services) | Kibana Screenshotting Plugin | 32 | 0 | 8 | 4 | | | [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | Plugin hosting shared features for connectors | 19 | 0 | 19 | 3 | | | [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | Plugin to provide access to and rendering of python notebooks for use in the persistent developer console. | 4 | 0 | 4 | 0 | -| | [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | - | 15 | 0 | 9 | 0 | +| | [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/teams/enterprise-search-frontend) | - | 15 | 0 | 9 | 1 | | searchprofiler | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 0 | 0 | 0 | 0 | | | [@elastic/kibana-security](https://github.com/orgs/elastic/teams/kibana-security) | This plugin provides authentication and authorization features, and exposes functionality to understand the capabilities of the currently authenticated user. | 409 | 0 | 199 | 2 | -| | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | - | 195 | 0 | 124 | 37 | +| | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | - | 196 | 0 | 124 | 37 | | | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | ESS customizations for Security Solution. | 6 | 0 | 6 | 0 | | | [@elastic/security-solution](https://github.com/orgs/elastic/teams/security-solution) | Serverless customizations for security. | 7 | 0 | 7 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | The core Serverless plugin, providing APIs to Serverless Project plugins. | 25 | 0 | 24 | 0 | @@ -194,11 +194,11 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/security-threat-hunting-investigations](https://github.com/orgs/elastic/teams/security-threat-hunting-investigations) | - | 240 | 1 | 196 | 17 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | This plugin provides access to the transforms features provided by Elastic. Transforms enable you to convert existing Elasticsearch indices into summarized indices, which provide opportunities for new insights and analytics. | 4 | 0 | 4 | 1 | | translations | [@elastic/kibana-localization](https://github.com/orgs/elastic/teams/kibana-localization) | - | 0 | 0 | 0 | 0 | -| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 592 | 1 | 566 | 60 | +| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 593 | 1 | 567 | 60 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Adds UI Actions service to Kibana | 149 | 0 | 103 | 9 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Extends UI Actions plugin with more functionality | 212 | 0 | 145 | 11 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | This plugin contains services reliant on the plugin lifecycle for the unified doc viewer component (see @kbn/unified-doc-viewer). | 10 | 0 | 7 | 2 | -| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | The `unifiedHistogram` plugin provides UI components to create a layout including a resizable histogram and a main display. | 55 | 0 | 23 | 2 | +| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | The `unifiedHistogram` plugin provides UI components to create a layout including a resizable histogram and a main display. | 62 | 0 | 29 | 5 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | Contains all the key functionality of Kibana's unified search experience.Contains all the key functionality of Kibana's unified search experience. | 152 | 2 | 113 | 23 | | upgradeAssistant | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 0 | 0 | 0 | 0 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | This plugin visualizes data from Heartbeat, and integrates with other Observability solutions. | 1 | 0 | 1 | 0 | @@ -245,7 +245,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 22 | 0 | 1 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 18 | 0 | 18 | 0 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 4 | 0 | 4 | 0 | -| | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 44 | 0 | 44 | 8 | +| | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 47 | 0 | 47 | 8 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 191 | 0 | 191 | 28 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 11 | 0 | 11 | 0 | | | [@elastic/kibana-qa](https://github.com/orgs/elastic/teams/kibana-qa) | - | 12 | 0 | 12 | 0 | @@ -266,7 +266,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 217 | 0 | 180 | 9 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 79 | 0 | 50 | 9 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 24 | 0 | 24 | 0 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 140 | 3 | 137 | 18 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 141 | 3 | 138 | 18 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 10 | 0 | 8 | 4 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 8 | 0 | 8 | 0 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 3 | 0 | 3 | 0 | @@ -342,8 +342,8 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 7 | 0 | 7 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 27 | 7 | 27 | 2 | | | [@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) | - | 470 | 1 | 187 | 0 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 85 | 0 | 73 | 9 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 471 | 1 | 187 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 86 | 0 | 74 | 9 | | | [@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 | @@ -466,24 +466,24 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 102 | 0 | 86 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 15 | 0 | 9 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 36 | 2 | 32 | 0 | -| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 59 | 0 | 37 | 4 | +| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 63 | 0 | 41 | 4 | | | [@elastic/docs](https://github.com/orgs/elastic/teams/docs) | - | 75 | 0 | 75 | 2 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 5 | 0 | 5 | 1 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 41 | 0 | 27 | 6 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 19 | 0 | 11 | 0 | | | [@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) | - | 155 | 0 | 133 | 8 | +| | [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/security-generative-ai) | - | 150 | 0 | 128 | 8 | | | [@elastic/security-generative-ai](https://github.com/orgs/elastic/teams/security-generative-ai) | - | 227 | 0 | 213 | 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) | - | 7 | 0 | 3 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 263 | 1 | 202 | 15 | -| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 25 | 0 | 25 | 0 | +| | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 26 | 0 | 26 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 2 | 0 | 1 | 0 | -| | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 66 | 1 | 66 | 2 | -| | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 20 | 0 | 18 | 0 | -| | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 192 | 0 | 183 | 7 | +| | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 63 | 1 | 63 | 6 | +| | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 21 | 0 | 19 | 0 | +| | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 194 | 0 | 184 | 8 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 39 | 0 | 39 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 52 | 0 | 52 | 1 | | | [@elastic/security-threat-hunting-investigations](https://github.com/orgs/elastic/teams/security-threat-hunting-investigations) | - | 38 | 0 | 14 | 1 | @@ -505,6 +505,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 51 | 0 | 48 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 61 | 0 | 1 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 47 | 0 | 40 | 0 | +| | [@elastic/kibana-management](https://github.com/orgs/elastic/teams/kibana-management) | - | 122 | 3 | 122 | 0 | | | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | - | 9 | 0 | 9 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 52 | 12 | 43 | 0 | | | [@elastic/obs-knowledge-team](https://github.com/orgs/elastic/teams/obs-knowledge-team) | - | 59 | 0 | 59 | 4 | @@ -575,8 +576,8 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 1 | 0 | 0 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 1 | 0 | 1 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 1 | 0 | 1 | 0 | -| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 61 | 0 | 58 | 1 | -| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 180 | 0 | 153 | 6 | +| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 65 | 0 | 61 | 1 | +| | [@elastic/kibana-presentation](https://github.com/orgs/elastic/teams/kibana-presentation) | - | 182 | 0 | 153 | 6 | | | [@elastic/obs-ux-infra_services-team](https://github.com/orgs/elastic/teams/obs-ux-infra_services-team) | - | 161 | 0 | 48 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 13 | 0 | 7 | 0 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 22 | 0 | 9 | 0 | @@ -708,7 +709,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | - | 42 | 0 | 28 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 54 | 0 | 45 | 0 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 9 | 0 | 8 | 0 | -| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Contains functionality for the unified data table which can be integrated into apps | 144 | 0 | 78 | 1 | +| | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Contains functionality for the unified data table which can be integrated into apps | 151 | 0 | 83 | 1 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 14 | 0 | 13 | 6 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | Contains functionality for the field list and field stats which can be integrated into apps | 293 | 0 | 269 | 10 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | - | 13 | 0 | 9 | 0 | diff --git a/api_docs/presentation_panel.mdx b/api_docs/presentation_panel.mdx index 57d20faf55a3e..80946675ecc16 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-04-08 +date: 2024-04-11 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 fa63d683dc19a..3b68c18a1af98 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-04-08 +date: 2024-04-11 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 21283a8152255..04e52be09a0f1 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-04-08 +date: 2024-04-11 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 ba278fb4bf70b..c15cf436b19a6 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-04-08 +date: 2024-04-11 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 d5f2cf72f61f5..7af3c4b20f4e8 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-04-08 +date: 2024-04-11 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 4e0fc433707a0..86f8c41f921ce 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-04-08 +date: 2024-04-11 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 b06014ee8c0c9..4404a70044337 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-04-08 +date: 2024-04-11 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 88ed5a87a9c52..5de86f60a610a 100644 --- a/api_docs/rule_registry.devdocs.json +++ b/api_docs/rule_registry.devdocs.json @@ -3588,7 +3588,7 @@ "signature": [ "(alerts: { _id: string; _source: T; }[], suppressionWindow: string, enrichAlerts?: ((alerts: { _id: string; _source: T; }[], params: { spaceId: string; }) => Promise<{ _id: string; _source: T; }[]>) | undefined, currentTimeOverride?: Date | undefined, isRuleExecutionOnly?: boolean | undefined) => Promise<", + ">(alerts: { _id: string; _source: T; }[], suppressionWindow: string, enrichAlerts?: ((alerts: { _id: string; _source: T; }[], params: { spaceId: string; }) => Promise<{ _id: string; _source: T; }[]>) | undefined, currentTimeOverride?: Date | undefined, isRuleExecutionOnly?: boolean | undefined, maxAlerts?: number | undefined) => Promise<", { "pluginId": "ruleRegistry", "scope": "server", @@ -3669,6 +3669,20 @@ "path": "x-pack/plugins/rule_registry/server/utils/persistence_types.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "ruleRegistry", + "id": "def-server.PersistenceServices.alertWithSuppression.$6", + "type": "number", + "tags": [], + "label": "maxAlerts", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "x-pack/plugins/rule_registry/server/utils/persistence_types.ts", + "deprecated": false, + "trackAdoption": false } ] } @@ -3871,7 +3885,7 @@ "section": "def-server.SuppressedAlertServiceResult", "text": "SuppressedAlertServiceResult" }, - " extends Omit<", + " extends ", { "pluginId": "ruleRegistry", "scope": "server", @@ -3879,7 +3893,7 @@ "section": "def-server.PersistenceAlertServiceResult", "text": "PersistenceAlertServiceResult" }, - ", \"alertsWereTruncated\">" + "" ], "path": "x-pack/plugins/rule_registry/server/utils/persistence_types.ts", "deprecated": false, @@ -4424,7 +4438,7 @@ "signature": [ "(alerts: { _id: string; _source: T; }[], suppressionWindow: string, enrichAlerts?: ((alerts: { _id: string; _source: T; }[], params: { spaceId: string; }) => Promise<{ _id: string; _source: T; }[]>) | undefined, currentTimeOverride?: Date | undefined, isRuleExecutionOnly?: boolean | undefined) => Promise<", + ">(alerts: { _id: string; _source: T; }[], suppressionWindow: string, enrichAlerts?: ((alerts: { _id: string; _source: T; }[], params: { spaceId: string; }) => Promise<{ _id: string; _source: T; }[]>) | undefined, currentTimeOverride?: Date | undefined, isRuleExecutionOnly?: boolean | undefined, maxAlerts?: number | undefined) => Promise<", { "pluginId": "ruleRegistry", "scope": "server", @@ -4505,6 +4519,20 @@ "path": "x-pack/plugins/rule_registry/server/utils/persistence_types.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "ruleRegistry", + "id": "def-server.SuppressedAlertService.$6", + "type": "number", + "tags": [], + "label": "maxAlerts", + "description": [], + "signature": [ + "number | undefined" + ], + "path": "x-pack/plugins/rule_registry/server/utils/persistence_types.ts", + "deprecated": false, + "trackAdoption": false } ], "initialIsOpen": false diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index 2c61e98041b26..bd79239a24d0c 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-04-08 +date: 2024-04-11 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 | |-------------------|-----------|------------------------|-----------------| -| 272 | 0 | 243 | 14 | +| 274 | 0 | 245 | 14 | ## Server diff --git a/api_docs/runtime_fields.mdx b/api_docs/runtime_fields.mdx index 1244f7232f860..763b74a791f4c 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-04-08 +date: 2024-04-11 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 fd3b56a0bfaf1..277b8c7317119 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-04-08 +date: 2024-04-11 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 51e5bbf70bb7c..44897c5a02f85 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-04-08 +date: 2024-04-11 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 a58da1237cb76..20f89cf859ee5 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-04-08 +date: 2024-04-11 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 cc80cf8937fac..e8482b4558995 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-04-08 +date: 2024-04-11 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 866da22c1fdfe..285fe906dd79c 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTaggingOss'] --- import savedObjectsTaggingOssObj from './saved_objects_tagging_oss.devdocs.json'; diff --git a/api_docs/saved_search.devdocs.json b/api_docs/saved_search.devdocs.json index daae9ae5829ab..be730ab9c77a6 100644 --- a/api_docs/saved_search.devdocs.json +++ b/api_docs/saved_search.devdocs.json @@ -1610,6 +1610,21 @@ "deprecated": false, "trackAdoption": false }, + { + "parentPluginId": "savedSearch", + "id": "def-common.SavedSearch.visContext", + "type": "CompoundType", + "tags": [], + "label": "visContext", + "description": [], + "signature": [ + "VisContextUnmapped", + " | undefined" + ], + "path": "src/plugins/saved_search/common/types.ts", + "deprecated": false, + "trackAdoption": false + }, { "parentPluginId": "savedSearch", "id": "def-common.SavedSearch.managed", diff --git a/api_docs/saved_search.mdx b/api_docs/saved_search.mdx index 902f4a1cc8778..408be3ef1c594 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedSearch'] --- import savedSearchObj from './saved_search.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 79 | 0 | 78 | 3 | +| 80 | 0 | 79 | 4 | ## Client diff --git a/api_docs/screenshot_mode.mdx b/api_docs/screenshot_mode.mdx index c048e1e3d191b..6d4664535c1b8 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-04-08 +date: 2024-04-11 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 ca350629758c6..6cc9f20a99ea4 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-04-08 +date: 2024-04-11 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 cd50e3a276e92..4ad6c6034d6a4 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchConnectors'] --- import searchConnectorsObj from './search_connectors.devdocs.json'; diff --git a/api_docs/search_notebooks.mdx b/api_docs/search_notebooks.mdx index a4daa0dc32a13..b6a665ab7ee44 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchNotebooks'] --- import searchNotebooksObj from './search_notebooks.devdocs.json'; diff --git a/api_docs/search_playground.devdocs.json b/api_docs/search_playground.devdocs.json index ccbf3c593b016..2a069c7157ede 100644 --- a/api_docs/search_playground.devdocs.json +++ b/api_docs/search_playground.devdocs.json @@ -40,7 +40,9 @@ "label": "PlaygroundProvider", "description": [], "signature": [ - "React.FunctionComponent<{ children?: React.ReactNode; }>" + "React.FunctionComponent<", + "PlaygroundProviderProps", + " & { children?: React.ReactNode; }>" ], "path": "x-pack/plugins/search_playground/public/types.ts", "deprecated": false, diff --git a/api_docs/search_playground.mdx b/api_docs/search_playground.mdx index 2402e00660eca..53d4b71cc159e 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchPlayground'] --- import searchPlaygroundObj from './search_playground.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/enterprise-search-frontend](https://github.com/orgs/elastic/te | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 15 | 0 | 9 | 0 | +| 15 | 0 | 9 | 1 | ## Client diff --git a/api_docs/security.mdx b/api_docs/security.mdx index 858e187c42e8f..5333647cfa66c 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'security'] --- import securityObj from './security.devdocs.json'; diff --git a/api_docs/security_solution.devdocs.json b/api_docs/security_solution.devdocs.json index d678c5a215349..127964a469521 100644 --- a/api_docs/security_solution.devdocs.json +++ b/api_docs/security_solution.devdocs.json @@ -114,7 +114,7 @@ "label": "experimentalFeatures", "description": [], "signature": [ - "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly chartEmbeddablesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly expandableTimelineFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly newHostDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineEnabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; }" + "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly chartEmbeddablesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly expandableTimelineFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly newHostDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly alertSuppressionForNewTermsRuleEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineEnabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; }" ], "path": "x-pack/plugins/security_solution/public/plugin.tsx", "deprecated": false, @@ -473,7 +473,7 @@ "label": "data", "description": [], "signature": [ - "({ id: string; type: \"eql\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; version: number; references: string[]; interval: string; description: string; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"eql\"; created_at: string; created_by: string; updated_at: string; updated_by: string; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; data_view_id?: string | undefined; filters?: unknown[] | undefined; event_category_override?: string | undefined; tiebreaker_field?: string | undefined; timestamp_field?: string | undefined; } | { id: string; type: \"query\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; version: number; references: string[]; interval: string; description: string; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"kuery\" | \"lucene\"; created_at: string; created_by: string; updated_at: string; updated_by: string; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; filters?: unknown[] | undefined; data_view_id?: string | undefined; saved_id?: string | undefined; response_actions?: ({ params: { query?: string | undefined; ecs_mapping?: Zod.objectOutputType<{}, Zod.ZodObject<{ field: Zod.ZodOptional; value: Zod.ZodOptional]>>; }, \"strip\", Zod.ZodTypeAny, { field?: string | undefined; value?: string | string[] | undefined; }, { field?: string | undefined; value?: string | string[] | undefined; }>, \"strip\"> | undefined; queries?: { id: string; query: string; ecs_mapping?: Zod.objectOutputType<{}, Zod.ZodObject<{ field: Zod.ZodOptional; value: Zod.ZodOptional]>>; }, \"strip\", Zod.ZodTypeAny, { field?: string | undefined; value?: string | string[] | undefined; }, { field?: string | undefined; value?: string | string[] | undefined; }>, \"strip\"> | undefined; version?: string | undefined; platform?: string | undefined; removed?: boolean | undefined; snapshot?: boolean | undefined; }[] | undefined; pack_id?: string | undefined; saved_query_id?: string | undefined; timeout?: number | undefined; }; action_type_id: \".osquery\"; } | { params: { command: \"isolate\"; comment?: string | undefined; } | { config: { field: string; overwrite: boolean; }; command: \"kill-process\" | \"suspend-process\"; comment?: string | undefined; }; action_type_id: \".endpoint\"; })[] | undefined; alert_suppression?: { group_by: string[]; duration?: { value: number; unit: \"m\" | \"h\" | \"s\"; } | undefined; missing_fields_strategy?: \"doNotSuppress\" | \"suppress\" | undefined; } | undefined; } | { id: string; type: \"saved_query\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; version: number; references: string[]; interval: string; description: string; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"kuery\" | \"lucene\"; created_at: string; created_by: string; updated_at: string; updated_by: string; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; saved_id: string; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; query?: string | undefined; filters?: unknown[] | undefined; data_view_id?: string | undefined; response_actions?: ({ params: { query?: string | undefined; ecs_mapping?: Zod.objectOutputType<{}, Zod.ZodObject<{ field: Zod.ZodOptional; value: Zod.ZodOptional]>>; }, \"strip\", Zod.ZodTypeAny, { field?: string | undefined; value?: string | string[] | undefined; }, { field?: string | undefined; value?: string | string[] | undefined; }>, \"strip\"> | undefined; queries?: { id: string; query: string; ecs_mapping?: Zod.objectOutputType<{}, Zod.ZodObject<{ field: Zod.ZodOptional; value: Zod.ZodOptional]>>; }, \"strip\", Zod.ZodTypeAny, { field?: string | undefined; value?: string | string[] | undefined; }, { field?: string | undefined; value?: string | string[] | undefined; }>, \"strip\"> | undefined; version?: string | undefined; platform?: string | undefined; removed?: boolean | undefined; snapshot?: boolean | undefined; }[] | undefined; pack_id?: string | undefined; saved_query_id?: string | undefined; timeout?: number | undefined; }; action_type_id: \".osquery\"; } | { params: { command: \"isolate\"; comment?: string | undefined; } | { config: { field: string; overwrite: boolean; }; command: \"kill-process\" | \"suspend-process\"; comment?: string | undefined; }; action_type_id: \".endpoint\"; })[] | undefined; alert_suppression?: { group_by: string[]; duration?: { value: number; unit: \"m\" | \"h\" | \"s\"; } | undefined; missing_fields_strategy?: \"doNotSuppress\" | \"suppress\" | undefined; } | undefined; } | { id: string; type: \"threshold\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; version: number; references: string[]; interval: string; description: string; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"kuery\" | \"lucene\"; created_at: string; created_by: string; updated_at: string; updated_by: string; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; threshold: { value: number; field: (string | string[]) & (string | string[] | undefined); cardinality?: { value: number; field: string; }[] | undefined; }; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; filters?: unknown[] | undefined; data_view_id?: string | undefined; saved_id?: string | undefined; alert_suppression?: { duration: { value: number; unit: \"m\" | \"h\" | \"s\"; }; } | undefined; } | { id: string; type: \"threat_match\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; version: number; references: string[]; interval: string; description: string; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"kuery\" | \"lucene\"; created_at: string; created_by: string; updated_at: string; updated_by: string; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; threat_query: string; threat_mapping: { entries: { type: \"mapping\"; value: string; field: string; }[]; }[]; threat_index: string[]; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; filters?: unknown[] | undefined; data_view_id?: string | undefined; saved_id?: string | undefined; alert_suppression?: { group_by: string[]; duration?: { value: number; unit: \"m\" | \"h\" | \"s\"; } | undefined; missing_fields_strategy?: \"doNotSuppress\" | \"suppress\" | undefined; } | undefined; threat_filters?: unknown[] | undefined; threat_indicator_path?: string | undefined; threat_language?: \"lucene\" | \"kuery\" | undefined; concurrent_searches?: number | undefined; items_per_search?: number | undefined; } | { id: string; type: \"machine_learning\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; version: number; references: string[]; interval: string; description: string; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; created_at: string; created_by: string; updated_at: string; updated_by: string; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; anomaly_threshold: number; machine_learning_job_id: (string | string[]) & (string | string[] | undefined); namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; } | { id: string; type: \"new_terms\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; version: number; references: string[]; interval: string; description: string; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"kuery\" | \"lucene\"; created_at: string; created_by: string; updated_at: string; updated_by: string; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; new_terms_fields: string[]; history_window_start: string; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; filters?: unknown[] | undefined; data_view_id?: string | undefined; } | { id: string; type: \"esql\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; version: number; references: string[]; interval: string; description: string; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"esql\"; created_at: string; created_by: string; updated_at: string; updated_by: string; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; })[]" + "({ id: string; type: \"eql\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; version: number; references: string[]; interval: string; description: string; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"eql\"; created_at: string; created_by: string; updated_at: string; updated_by: string; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; data_view_id?: string | undefined; filters?: unknown[] | undefined; event_category_override?: string | undefined; tiebreaker_field?: string | undefined; timestamp_field?: string | undefined; } | { id: string; type: \"query\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; version: number; references: string[]; interval: string; description: string; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"kuery\" | \"lucene\"; created_at: string; created_by: string; updated_at: string; updated_by: string; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; filters?: unknown[] | undefined; data_view_id?: string | undefined; saved_id?: string | undefined; response_actions?: ({ params: { query?: string | undefined; ecs_mapping?: Zod.objectOutputType<{}, Zod.ZodObject<{ field: Zod.ZodOptional; value: Zod.ZodOptional]>>; }, \"strip\", Zod.ZodTypeAny, { field?: string | undefined; value?: string | string[] | undefined; }, { field?: string | undefined; value?: string | string[] | undefined; }>, \"strip\"> | undefined; queries?: { id: string; query: string; ecs_mapping?: Zod.objectOutputType<{}, Zod.ZodObject<{ field: Zod.ZodOptional; value: Zod.ZodOptional]>>; }, \"strip\", Zod.ZodTypeAny, { field?: string | undefined; value?: string | string[] | undefined; }, { field?: string | undefined; value?: string | string[] | undefined; }>, \"strip\"> | undefined; version?: string | undefined; platform?: string | undefined; removed?: boolean | undefined; snapshot?: boolean | undefined; }[] | undefined; pack_id?: string | undefined; saved_query_id?: string | undefined; timeout?: number | undefined; }; action_type_id: \".osquery\"; } | { params: { command: \"isolate\"; comment?: string | undefined; } | { config: { field: string; overwrite: boolean; }; command: \"kill-process\" | \"suspend-process\"; comment?: string | undefined; }; action_type_id: \".endpoint\"; })[] | undefined; alert_suppression?: { group_by: string[]; duration?: { value: number; unit: \"m\" | \"h\" | \"s\"; } | undefined; missing_fields_strategy?: \"doNotSuppress\" | \"suppress\" | undefined; } | undefined; } | { id: string; type: \"saved_query\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; version: number; references: string[]; interval: string; description: string; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"kuery\" | \"lucene\"; created_at: string; created_by: string; updated_at: string; updated_by: string; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; saved_id: string; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; query?: string | undefined; filters?: unknown[] | undefined; data_view_id?: string | undefined; response_actions?: ({ params: { query?: string | undefined; ecs_mapping?: Zod.objectOutputType<{}, Zod.ZodObject<{ field: Zod.ZodOptional; value: Zod.ZodOptional]>>; }, \"strip\", Zod.ZodTypeAny, { field?: string | undefined; value?: string | string[] | undefined; }, { field?: string | undefined; value?: string | string[] | undefined; }>, \"strip\"> | undefined; queries?: { id: string; query: string; ecs_mapping?: Zod.objectOutputType<{}, Zod.ZodObject<{ field: Zod.ZodOptional; value: Zod.ZodOptional]>>; }, \"strip\", Zod.ZodTypeAny, { field?: string | undefined; value?: string | string[] | undefined; }, { field?: string | undefined; value?: string | string[] | undefined; }>, \"strip\"> | undefined; version?: string | undefined; platform?: string | undefined; removed?: boolean | undefined; snapshot?: boolean | undefined; }[] | undefined; pack_id?: string | undefined; saved_query_id?: string | undefined; timeout?: number | undefined; }; action_type_id: \".osquery\"; } | { params: { command: \"isolate\"; comment?: string | undefined; } | { config: { field: string; overwrite: boolean; }; command: \"kill-process\" | \"suspend-process\"; comment?: string | undefined; }; action_type_id: \".endpoint\"; })[] | undefined; alert_suppression?: { group_by: string[]; duration?: { value: number; unit: \"m\" | \"h\" | \"s\"; } | undefined; missing_fields_strategy?: \"doNotSuppress\" | \"suppress\" | undefined; } | undefined; } | { id: string; type: \"threshold\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; version: number; references: string[]; interval: string; description: string; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"kuery\" | \"lucene\"; created_at: string; created_by: string; updated_at: string; updated_by: string; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; threshold: { value: number; field: (string | string[]) & (string | string[] | undefined); cardinality?: { value: number; field: string; }[] | undefined; }; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; filters?: unknown[] | undefined; data_view_id?: string | undefined; saved_id?: string | undefined; alert_suppression?: { duration: { value: number; unit: \"m\" | \"h\" | \"s\"; }; } | undefined; } | { id: string; type: \"threat_match\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; version: number; references: string[]; interval: string; description: string; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"kuery\" | \"lucene\"; created_at: string; created_by: string; updated_at: string; updated_by: string; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; threat_query: string; threat_mapping: { entries: { type: \"mapping\"; value: string; field: string; }[]; }[]; threat_index: string[]; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; filters?: unknown[] | undefined; data_view_id?: string | undefined; saved_id?: string | undefined; alert_suppression?: { group_by: string[]; duration?: { value: number; unit: \"m\" | \"h\" | \"s\"; } | undefined; missing_fields_strategy?: \"doNotSuppress\" | \"suppress\" | undefined; } | undefined; threat_filters?: unknown[] | undefined; threat_indicator_path?: string | undefined; threat_language?: \"lucene\" | \"kuery\" | undefined; concurrent_searches?: number | undefined; items_per_search?: number | undefined; } | { id: string; type: \"machine_learning\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; version: number; references: string[]; interval: string; description: string; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; created_at: string; created_by: string; updated_at: string; updated_by: string; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; anomaly_threshold: number; machine_learning_job_id: (string | string[]) & (string | string[] | undefined); namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; } | { id: string; type: \"new_terms\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; version: number; references: string[]; interval: string; description: string; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"kuery\" | \"lucene\"; created_at: string; created_by: string; updated_at: string; updated_by: string; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; new_terms_fields: string[]; history_window_start: string; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; index?: string[] | undefined; filters?: unknown[] | undefined; data_view_id?: string | undefined; alert_suppression?: { group_by: string[]; duration?: { value: number; unit: \"m\" | \"h\" | \"s\"; } | undefined; missing_fields_strategy?: \"doNotSuppress\" | \"suppress\" | undefined; } | undefined; } | { id: string; type: \"esql\"; name: string; actions: { params: {} & { [k: string]: unknown; }; id: string; group: string; action_type_id: string; uuid?: string | undefined; alerts_filter?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; frequency?: { throttle: string | null; notifyWhen: \"onActionGroupChange\" | \"onActiveAlert\" | \"onThrottleInterval\"; summary: boolean; } | undefined; }[]; tags: string[]; setup: string; enabled: boolean; revision: number; query: string; version: number; references: string[]; interval: string; description: string; risk_score: number; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; from: string; to: string; language: \"esql\"; created_at: string; created_by: string; updated_at: string; updated_by: string; author: string[]; immutable: boolean; rule_id: string; threat: { framework: string; tactic: { id: string; name: string; reference: string; }; technique?: { id: string; name: string; reference: string; subtechnique?: { id: string; name: string; reference: string; }[] | undefined; }[] | undefined; }[]; risk_score_mapping: { value: string; field: string; operator: \"equals\"; risk_score?: number | undefined; }[]; severity_mapping: { value: string; field: string; severity: \"medium\" | \"high\" | \"low\" | \"critical\"; operator: \"equals\"; }[]; exceptions_list: { id: string; type: \"endpoint\" | \"detection\" | \"rule_default\" | \"endpoint_trusted_apps\" | \"endpoint_events\" | \"endpoint_host_isolation_exceptions\" | \"endpoint_blocklists\"; list_id: string; namespace_type: \"single\" | \"agnostic\"; }[]; false_positives: string[]; max_signals: number; related_integrations: { version: string; package: string; integration?: string | undefined; }[]; required_fields: { type: string; name: string; ecs: boolean; }[]; namespace?: string | undefined; license?: string | undefined; throttle?: string | undefined; outcome?: \"exactMatch\" | \"aliasMatch\" | \"conflict\" | undefined; alias_target_id?: string | undefined; alias_purpose?: \"savedObjectConversion\" | \"savedObjectImport\" | undefined; meta?: Zod.objectOutputType<{}, Zod.ZodUnknown, \"strip\"> | undefined; note?: string | undefined; rule_name_override?: string | undefined; timestamp_override?: string | undefined; timestamp_override_fallback_disabled?: boolean | undefined; timeline_id?: string | undefined; timeline_title?: string | undefined; building_block_type?: string | undefined; output_index?: string | undefined; investigation_fields?: { field_names: string[]; } | undefined; execution_summary?: { last_execution: { message: string; date: string; status: \"running\" | \"succeeded\" | \"failed\" | \"going to run\" | \"partial failure\"; metrics: { total_search_duration_ms?: number | undefined; total_indexing_duration_ms?: number | undefined; total_enrichment_duration_ms?: number | undefined; execution_gap_duration_s?: number | undefined; }; status_order: number; }; } | undefined; })[]" ], "path": "x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/types.ts", "deprecated": false, @@ -568,7 +568,7 @@ "\nExperimental flag needed to enable the link" ], "signature": [ - "\"assistantModelEvaluation\" | \"tGridEnabled\" | \"tGridEventRenderedViewEnabled\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"chartEmbeddablesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"insightsRelatedAlertsByProcessAncestry\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionsEnabled\" | \"endpointResponseActionsEnabled\" | \"responseActionUploadEnabled\" | \"automatedProcessActionsEnabled\" | \"responseActionsSentinelOneV1Enabled\" | \"responseActionsSentinelOneV2Enabled\" | \"alertsPageChartsEnabled\" | \"alertTypeEnabled\" | \"expandableFlyoutInCreateRuleEnabled\" | \"expandableEventFlyoutEnabled\" | \"expandableTimelineFlyoutEnabled\" | \"alertsPageFiltersEnabled\" | \"newUserDetailsFlyout\" | \"newUserDetailsFlyoutManagedUser\" | \"newHostDetailsFlyout\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"disableTimelineSaveTour\" | \"riskEnginePrivilegesRouteEnabled\" | \"sentinelOneDataInAnalyzerEnabled\" | \"sentinelOneManualHostActionsEnabled\" | \"crowdstrikeDataInAnalyzerEnabled\" | \"jsonPrebuiltRulesDiffingEnabled\" | \"timelineEsqlTabDisabled\" | \"unifiedComponentsInTimelineEnabled\" | \"analyzerDatePickersAndSourcererDisabled\" | \"perFieldPrebuiltRulesDiffingEnabled\" | \"malwareOnWriteScanOptionAvailable\" | undefined" + "\"assistantModelEvaluation\" | \"tGridEnabled\" | \"tGridEventRenderedViewEnabled\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"chartEmbeddablesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"insightsRelatedAlertsByProcessAncestry\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionsEnabled\" | \"endpointResponseActionsEnabled\" | \"responseActionUploadEnabled\" | \"automatedProcessActionsEnabled\" | \"responseActionsSentinelOneV1Enabled\" | \"responseActionsSentinelOneV2Enabled\" | \"alertsPageChartsEnabled\" | \"alertTypeEnabled\" | \"expandableFlyoutInCreateRuleEnabled\" | \"expandableEventFlyoutEnabled\" | \"expandableTimelineFlyoutEnabled\" | \"alertsPageFiltersEnabled\" | \"newUserDetailsFlyout\" | \"newUserDetailsFlyoutManagedUser\" | \"newHostDetailsFlyout\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"disableTimelineSaveTour\" | \"riskEnginePrivilegesRouteEnabled\" | \"alertSuppressionForNewTermsRuleEnabled\" | \"sentinelOneDataInAnalyzerEnabled\" | \"sentinelOneManualHostActionsEnabled\" | \"crowdstrikeDataInAnalyzerEnabled\" | \"jsonPrebuiltRulesDiffingEnabled\" | \"timelineEsqlTabDisabled\" | \"unifiedComponentsInTimelineEnabled\" | \"analyzerDatePickersAndSourcererDisabled\" | \"perFieldPrebuiltRulesDiffingEnabled\" | \"malwareOnWriteScanOptionAvailable\" | undefined" ], "path": "x-pack/plugins/security_solution/public/common/links/types.ts", "deprecated": false, @@ -648,7 +648,7 @@ "\nExperimental flag needed to disable the link. Opposite of experimentalKey" ], "signature": [ - "\"assistantModelEvaluation\" | \"tGridEnabled\" | \"tGridEventRenderedViewEnabled\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"chartEmbeddablesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"insightsRelatedAlertsByProcessAncestry\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionsEnabled\" | \"endpointResponseActionsEnabled\" | \"responseActionUploadEnabled\" | \"automatedProcessActionsEnabled\" | \"responseActionsSentinelOneV1Enabled\" | \"responseActionsSentinelOneV2Enabled\" | \"alertsPageChartsEnabled\" | \"alertTypeEnabled\" | \"expandableFlyoutInCreateRuleEnabled\" | \"expandableEventFlyoutEnabled\" | \"expandableTimelineFlyoutEnabled\" | \"alertsPageFiltersEnabled\" | \"newUserDetailsFlyout\" | \"newUserDetailsFlyoutManagedUser\" | \"newHostDetailsFlyout\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"disableTimelineSaveTour\" | \"riskEnginePrivilegesRouteEnabled\" | \"sentinelOneDataInAnalyzerEnabled\" | \"sentinelOneManualHostActionsEnabled\" | \"crowdstrikeDataInAnalyzerEnabled\" | \"jsonPrebuiltRulesDiffingEnabled\" | \"timelineEsqlTabDisabled\" | \"unifiedComponentsInTimelineEnabled\" | \"analyzerDatePickersAndSourcererDisabled\" | \"perFieldPrebuiltRulesDiffingEnabled\" | \"malwareOnWriteScanOptionAvailable\" | undefined" + "\"assistantModelEvaluation\" | \"tGridEnabled\" | \"tGridEventRenderedViewEnabled\" | \"excludePoliciesInFilterEnabled\" | \"kubernetesEnabled\" | \"chartEmbeddablesEnabled\" | \"donutChartEmbeddablesEnabled\" | \"previewTelemetryUrlEnabled\" | \"insightsRelatedAlertsByProcessAncestry\" | \"extendedRuleExecutionLoggingEnabled\" | \"socTrendsEnabled\" | \"responseActionsEnabled\" | \"endpointResponseActionsEnabled\" | \"responseActionUploadEnabled\" | \"automatedProcessActionsEnabled\" | \"responseActionsSentinelOneV1Enabled\" | \"responseActionsSentinelOneV2Enabled\" | \"alertsPageChartsEnabled\" | \"alertTypeEnabled\" | \"expandableFlyoutInCreateRuleEnabled\" | \"expandableEventFlyoutEnabled\" | \"expandableTimelineFlyoutEnabled\" | \"alertsPageFiltersEnabled\" | \"newUserDetailsFlyout\" | \"newUserDetailsFlyoutManagedUser\" | \"newHostDetailsFlyout\" | \"riskScoringPersistence\" | \"riskScoringRoutesEnabled\" | \"esqlRulesDisabled\" | \"protectionUpdatesEnabled\" | \"disableTimelineSaveTour\" | \"riskEnginePrivilegesRouteEnabled\" | \"alertSuppressionForNewTermsRuleEnabled\" | \"sentinelOneDataInAnalyzerEnabled\" | \"sentinelOneManualHostActionsEnabled\" | \"crowdstrikeDataInAnalyzerEnabled\" | \"jsonPrebuiltRulesDiffingEnabled\" | \"timelineEsqlTabDisabled\" | \"unifiedComponentsInTimelineEnabled\" | \"analyzerDatePickersAndSourcererDisabled\" | \"perFieldPrebuiltRulesDiffingEnabled\" | \"malwareOnWriteScanOptionAvailable\" | undefined" ], "path": "x-pack/plugins/security_solution/public/common/links/types.ts", "deprecated": false, @@ -2015,7 +2015,7 @@ "label": "experimentalFeatures", "description": [], "signature": [ - "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly chartEmbeddablesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly expandableTimelineFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly newHostDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineEnabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; }" + "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly chartEmbeddablesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly expandableTimelineFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly newHostDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly alertSuppressionForNewTermsRuleEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineEnabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; }" ], "path": "x-pack/plugins/security_solution/public/types.ts", "deprecated": false, @@ -3134,7 +3134,7 @@ "\nThe security solution generic experimental features" ], "signature": [ - "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly chartEmbeddablesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly expandableTimelineFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly newHostDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineEnabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; }" + "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly chartEmbeddablesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly expandableTimelineFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly newHostDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly alertSuppressionForNewTermsRuleEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineEnabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; }" ], "path": "x-pack/plugins/security_solution/server/plugin_contract.ts", "deprecated": false, @@ -3310,7 +3310,7 @@ "label": "ExperimentalFeatures", "description": [], "signature": [ - "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly chartEmbeddablesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly expandableTimelineFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly newHostDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineEnabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; }" + "{ readonly tGridEnabled: boolean; readonly tGridEventRenderedViewEnabled: boolean; readonly excludePoliciesInFilterEnabled: boolean; readonly kubernetesEnabled: boolean; readonly chartEmbeddablesEnabled: boolean; readonly donutChartEmbeddablesEnabled: boolean; readonly previewTelemetryUrlEnabled: boolean; readonly insightsRelatedAlertsByProcessAncestry: boolean; readonly extendedRuleExecutionLoggingEnabled: boolean; readonly socTrendsEnabled: boolean; readonly responseActionsEnabled: boolean; readonly endpointResponseActionsEnabled: boolean; readonly responseActionUploadEnabled: boolean; readonly automatedProcessActionsEnabled: boolean; readonly responseActionsSentinelOneV1Enabled: boolean; readonly responseActionsSentinelOneV2Enabled: boolean; readonly alertsPageChartsEnabled: boolean; readonly alertTypeEnabled: boolean; readonly expandableFlyoutInCreateRuleEnabled: boolean; readonly expandableEventFlyoutEnabled: boolean; readonly expandableTimelineFlyoutEnabled: boolean; readonly alertsPageFiltersEnabled: boolean; readonly assistantModelEvaluation: boolean; readonly newUserDetailsFlyout: boolean; readonly newUserDetailsFlyoutManagedUser: boolean; readonly newHostDetailsFlyout: boolean; readonly riskScoringPersistence: boolean; readonly riskScoringRoutesEnabled: boolean; readonly esqlRulesDisabled: boolean; readonly protectionUpdatesEnabled: boolean; readonly disableTimelineSaveTour: boolean; readonly riskEnginePrivilegesRouteEnabled: boolean; readonly alertSuppressionForNewTermsRuleEnabled: boolean; readonly sentinelOneDataInAnalyzerEnabled: boolean; readonly sentinelOneManualHostActionsEnabled: boolean; readonly crowdstrikeDataInAnalyzerEnabled: boolean; readonly jsonPrebuiltRulesDiffingEnabled: boolean; readonly timelineEsqlTabDisabled: boolean; readonly unifiedComponentsInTimelineEnabled: boolean; readonly analyzerDatePickersAndSourcererDisabled: boolean; readonly perFieldPrebuiltRulesDiffingEnabled: boolean; readonly malwareOnWriteScanOptionAvailable: boolean; }" ], "path": "x-pack/plugins/security_solution/common/experimental_features.ts", "deprecated": false, @@ -3332,6 +3332,23 @@ "trackAdoption": false, "initialIsOpen": false }, + { + "parentPluginId": "securitySolution", + "id": "def-common.SENTINEL_ONE_ACTIVITY_INDEX", + "type": "string", + "tags": [], + "label": "SENTINEL_ONE_ACTIVITY_INDEX", + "description": [ + "\nIndex name where the SentinelOne activity log is written to by the SentinelOne integration" + ], + "signature": [ + "\"logs-sentinel_one.activity-default\"" + ], + "path": "x-pack/plugins/security_solution/common/endpoint/service/response_actions/sentinel_one.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "securitySolution", "id": "def-common.SERVER_APP_ID", @@ -3359,7 +3376,7 @@ "\nA list of allowed values that can be used in `xpack.securitySolution.enableExperimental`.\nThis object is then used to validate and parse the value entered." ], "signature": [ - "{ readonly tGridEnabled: true; readonly tGridEventRenderedViewEnabled: true; readonly excludePoliciesInFilterEnabled: false; readonly kubernetesEnabled: true; readonly chartEmbeddablesEnabled: true; readonly donutChartEmbeddablesEnabled: false; readonly previewTelemetryUrlEnabled: false; readonly insightsRelatedAlertsByProcessAncestry: true; readonly extendedRuleExecutionLoggingEnabled: false; readonly socTrendsEnabled: false; readonly responseActionsEnabled: true; readonly endpointResponseActionsEnabled: true; readonly responseActionUploadEnabled: true; readonly automatedProcessActionsEnabled: true; readonly responseActionsSentinelOneV1Enabled: true; readonly responseActionsSentinelOneV2Enabled: false; readonly alertsPageChartsEnabled: true; readonly alertTypeEnabled: false; readonly expandableFlyoutInCreateRuleEnabled: true; readonly expandableEventFlyoutEnabled: false; readonly expandableTimelineFlyoutEnabled: false; readonly alertsPageFiltersEnabled: true; readonly assistantModelEvaluation: false; readonly newUserDetailsFlyout: true; readonly newUserDetailsFlyoutManagedUser: false; readonly newHostDetailsFlyout: true; readonly riskScoringPersistence: true; readonly riskScoringRoutesEnabled: true; readonly esqlRulesDisabled: false; readonly protectionUpdatesEnabled: true; readonly disableTimelineSaveTour: false; readonly riskEnginePrivilegesRouteEnabled: true; readonly sentinelOneDataInAnalyzerEnabled: true; readonly sentinelOneManualHostActionsEnabled: true; readonly crowdstrikeDataInAnalyzerEnabled: false; readonly jsonPrebuiltRulesDiffingEnabled: true; readonly timelineEsqlTabDisabled: false; readonly unifiedComponentsInTimelineEnabled: false; readonly analyzerDatePickersAndSourcererDisabled: false; readonly perFieldPrebuiltRulesDiffingEnabled: true; readonly malwareOnWriteScanOptionAvailable: false; }" + "{ readonly tGridEnabled: true; readonly tGridEventRenderedViewEnabled: true; readonly excludePoliciesInFilterEnabled: false; readonly kubernetesEnabled: true; readonly chartEmbeddablesEnabled: true; readonly donutChartEmbeddablesEnabled: false; readonly previewTelemetryUrlEnabled: false; readonly insightsRelatedAlertsByProcessAncestry: true; readonly extendedRuleExecutionLoggingEnabled: false; readonly socTrendsEnabled: false; readonly responseActionsEnabled: true; readonly endpointResponseActionsEnabled: true; readonly responseActionUploadEnabled: true; readonly automatedProcessActionsEnabled: true; readonly responseActionsSentinelOneV1Enabled: true; readonly responseActionsSentinelOneV2Enabled: false; readonly alertsPageChartsEnabled: true; readonly alertTypeEnabled: false; readonly expandableFlyoutInCreateRuleEnabled: true; readonly expandableEventFlyoutEnabled: false; readonly expandableTimelineFlyoutEnabled: false; readonly alertsPageFiltersEnabled: true; readonly assistantModelEvaluation: false; readonly newUserDetailsFlyout: true; readonly newUserDetailsFlyoutManagedUser: false; readonly newHostDetailsFlyout: true; readonly riskScoringPersistence: true; readonly riskScoringRoutesEnabled: true; readonly esqlRulesDisabled: false; readonly protectionUpdatesEnabled: true; readonly disableTimelineSaveTour: false; readonly riskEnginePrivilegesRouteEnabled: true; readonly alertSuppressionForNewTermsRuleEnabled: false; readonly sentinelOneDataInAnalyzerEnabled: true; readonly sentinelOneManualHostActionsEnabled: true; readonly crowdstrikeDataInAnalyzerEnabled: false; readonly jsonPrebuiltRulesDiffingEnabled: true; readonly timelineEsqlTabDisabled: false; readonly unifiedComponentsInTimelineEnabled: false; readonly analyzerDatePickersAndSourcererDisabled: false; readonly perFieldPrebuiltRulesDiffingEnabled: true; readonly malwareOnWriteScanOptionAvailable: false; }" ], "path": "x-pack/plugins/security_solution/common/experimental_features.ts", "deprecated": false, diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx index a1528b152f588..f312c2cac7244 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolution'] --- import securitySolutionObj from './security_solution.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/security-solution](https://github.com/orgs/elastic/teams/secur | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 195 | 0 | 124 | 37 | +| 196 | 0 | 124 | 37 | ## Client diff --git a/api_docs/security_solution_ess.mdx b/api_docs/security_solution_ess.mdx index 46c7e9a32fd56..5c5689dc2355e 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-04-08 +date: 2024-04-11 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 b29acbb9a89a1..30382c633dd13 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-04-08 +date: 2024-04-11 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 d8d0528817edc..7d4715a9f12e5 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-04-08 +date: 2024-04-11 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 71ec840efa665..ab49498a76896 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-04-08 +date: 2024-04-11 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 a89b0c14590e9..b7fd39d03882c 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-04-08 +date: 2024-04-11 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 bd7a3e192edfc..b103afa7662aa 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-04-08 +date: 2024-04-11 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 6f3f481711257..46b6657560163 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-04-08 +date: 2024-04-11 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 102dd6b649323..6f7a49ed090e7 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-04-08 +date: 2024-04-11 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 9a64d28af87da..74b95fdc55e7b 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-04-08 +date: 2024-04-11 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 c9e27f0109d41..37a408d62f141 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-04-08 +date: 2024-04-11 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 569f0e8a4c361..7210ac1caaa1a 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-04-08 +date: 2024-04-11 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 e36d09af10be5..4396d60a8d673 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-04-08 +date: 2024-04-11 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 345dcc098eed3..31ffe404f6b13 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-04-08 +date: 2024-04-11 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 e07cffefcc0b8..057721127ffb8 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-04-08 +date: 2024-04-11 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 3bbfd762030c9..c0ff10e5478c9 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-04-08 +date: 2024-04-11 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 f107e6f430f9d..14d1ace77d3c1 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-04-08 +date: 2024-04-11 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 2256028e63716..ad69fa5e6c389 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-04-08 +date: 2024-04-11 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 c22699d64f723..eb93104e6faca 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-04-08 +date: 2024-04-11 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 1f99cc3226fd5..146487b6df516 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-04-08 +date: 2024-04-11 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 10319c0121222..ff8b67cd77ae9 100644 --- a/api_docs/timelines.devdocs.json +++ b/api_docs/timelines.devdocs.json @@ -4355,11 +4355,11 @@ }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/query_tab_content/index.tsx" + "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/query/index.tsx" }, { "plugin": "securitySolution", - "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/query_tab_content/index.tsx" + "path": "x-pack/plugins/security_solution/public/timelines/components/timeline/tabs/query/index.tsx" }, { "plugin": "securitySolution", diff --git a/api_docs/timelines.mdx b/api_docs/timelines.mdx index d957c672b63df..ed6771c98776b 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'timelines'] --- import timelinesObj from './timelines.devdocs.json'; diff --git a/api_docs/transform.mdx b/api_docs/transform.mdx index 7fde2ebaf75c6..d9c9816200617 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-04-08 +date: 2024-04-11 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 4e41078dfc377..ac04b9670f4f5 100644 --- a/api_docs/triggers_actions_ui.devdocs.json +++ b/api_docs/triggers_actions_ui.devdocs.json @@ -5774,22 +5774,39 @@ }, { "parentPluginId": "triggersActionsUi", - "id": "def-public.TriggersAndActionsUiServices.theme$", + "id": "def-public.TriggersAndActionsUiServices.i18n", "type": "Object", "tags": [], - "label": "theme$", + "label": "i18n", + "description": [], + "signature": [ + { + "pluginId": "@kbn/core-i18n-browser", + "scope": "common", + "docId": "kibKbnCoreI18nBrowserPluginApi", + "section": "def-common.I18nStart", + "text": "I18nStart" + } + ], + "path": "x-pack/plugins/triggers_actions_ui/public/application/app.tsx", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-public.TriggersAndActionsUiServices.theme", + "type": "Object", + "tags": [], + "label": "theme", "description": [], "signature": [ - "Observable", - "<", { "pluginId": "@kbn/core-theme-browser", "scope": "common", "docId": "kibKbnCoreThemeBrowserPluginApi", - "section": "def-common.CoreTheme", - "text": "CoreTheme" - }, - ">" + "section": "def-common.ThemeServiceSetup", + "text": "ThemeServiceSetup" + } ], "path": "x-pack/plugins/triggers_actions_ui/public/application/app.tsx", "deprecated": false, diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx index 3948f31aac319..90316504b5494 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'triggersActionsUi'] --- import triggersActionsUiObj from './triggers_actions_ui.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 | |-------------------|-----------|------------------------|-----------------| -| 592 | 1 | 566 | 60 | +| 593 | 1 | 567 | 60 | ## Client diff --git a/api_docs/ui_actions.devdocs.json b/api_docs/ui_actions.devdocs.json index 5d398579e7d92..aa8a658265dcf 100644 --- a/api_docs/ui_actions.devdocs.json +++ b/api_docs/ui_actions.devdocs.json @@ -783,7 +783,7 @@ }, { "plugin": "imageEmbeddable", - "path": "src/plugins/image_embeddable/public/image_embeddable/image_embeddable_factory.tsx" + "path": "src/plugins/image_embeddable/public/components/image_embeddable.tsx" }, { "plugin": "embeddable", diff --git a/api_docs/ui_actions.mdx b/api_docs/ui_actions.mdx index 4101b8565b7e8..c9eb7032fa9ba 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActions'] --- import uiActionsObj from './ui_actions.devdocs.json'; diff --git a/api_docs/ui_actions_enhanced.devdocs.json b/api_docs/ui_actions_enhanced.devdocs.json index 7eeb5a7446abf..66263338b020e 100644 --- a/api_docs/ui_actions_enhanced.devdocs.json +++ b/api_docs/ui_actions_enhanced.devdocs.json @@ -3365,7 +3365,15 @@ "label": "isCompatible", "description": [], "signature": [ - "(context: C) => Promise" + "(context: ", + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.EmbeddableApiContext", + "text": "EmbeddableApiContext" + }, + ") => Promise" ], "path": "src/plugins/ui_actions_enhanced/public/dynamic_actions/dynamic_action_manager.ts", "deprecated": false, @@ -3374,12 +3382,18 @@ { "parentPluginId": "uiActionsEnhanced", "id": "def-public.DynamicActionManagerParams.isCompatible.$1", - "type": "Uncategorized", + "type": "Object", "tags": [], "label": "context", "description": [], "signature": [ - "C" + { + "pluginId": "@kbn/presentation-publishing", + "scope": "common", + "docId": "kibKbnPresentationPublishingPluginApi", + "section": "def-common.EmbeddableApiContext", + "text": "EmbeddableApiContext" + } ], "path": "src/plugins/ui_actions_enhanced/public/dynamic_actions/dynamic_action_manager.ts", "deprecated": false, diff --git a/api_docs/ui_actions_enhanced.mdx b/api_docs/ui_actions_enhanced.mdx index 5cadf44ecadfb..78e43aeda9ff0 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-04-08 +date: 2024-04-11 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 80ebf56c9863e..736a9b7fefb69 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-04-08 +date: 2024-04-11 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 e46f7f6dfc4a7..6b53c653dfdca 100644 --- a/api_docs/unified_histogram.devdocs.json +++ b/api_docs/unified_histogram.devdocs.json @@ -3,6 +3,39 @@ "client": { "classes": [], "functions": [ + { + "parentPluginId": "unifiedHistogram", + "id": "def-public.canImportVisContext", + "type": "Function", + "tags": [], + "label": "canImportVisContext", + "description": [], + "signature": [ + "(visContext: unknown) => boolean" + ], + "path": "src/plugins/unified_histogram/public/utils/external_vis_context.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "unifiedHistogram", + "id": "def-public.canImportVisContext.$1", + "type": "Unknown", + "tags": [], + "label": "visContext", + "description": [], + "signature": [ + "unknown" + ], + "path": "src/plugins/unified_histogram/public/utils/external_vis_context.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "unifiedHistogram", "id": "def-public.getBreakdownField", @@ -466,17 +499,25 @@ "section": "def-common.RequestAdapter", "text": "RequestAdapter" }, - " | undefined; isChartLoading?: boolean | undefined; table?: ", + " | undefined; isChartLoading?: boolean | undefined; onVisContextChanged?: ((nextVisContext: ", { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.Datatable", - "text": "Datatable" + "pluginId": "unifiedHistogram", + "scope": "public", + "docId": "kibUnifiedHistogramPluginApi", + "section": "def-public.UnifiedHistogramVisContext", + "text": "UnifiedHistogramVisContext" + }, + " | undefined, externalVisContextStatus: ", + { + "pluginId": "unifiedHistogram", + "scope": "public", + "docId": "kibUnifiedHistogramPluginApi", + "section": "def-public.UnifiedHistogramExternalVisContextStatus", + "text": "UnifiedHistogramExternalVisContextStatus" }, - " | undefined; } & Pick<", + ") => void) | undefined; } & Pick<", "UnifiedHistogramLayoutProps", - ", \"className\" | \"children\" | \"query\" | \"filters\" | \"columns\" | \"container\" | \"onBrushEnd\" | \"disabledActions\" | \"timeRange\" | \"services\" | \"dataView\" | \"relativeTimeRange\" | \"renderCustomChartToggleActions\" | \"onFilter\" | \"withDefaultActions\" | \"abortController\"> & ", + ", \"className\" | \"children\" | \"query\" | \"filters\" | \"columns\" | \"container\" | \"onBrushEnd\" | \"disabledActions\" | \"timeRange\" | \"table\" | \"services\" | \"dataView\" | \"relativeTimeRange\" | \"renderCustomChartToggleActions\" | \"onFilter\" | \"externalVisContext\" | \"withDefaultActions\" | \"abortController\"> & ", { "pluginId": "@kbn/shared-ux-utility", "scope": "common", @@ -884,22 +925,16 @@ }, { "parentPluginId": "unifiedHistogram", - "id": "def-public.UnifiedHistogramState.currentSuggestion", + "id": "def-public.UnifiedHistogramState.currentSuggestionContext", "type": "Object", "tags": [], - "label": "currentSuggestion", + "label": "currentSuggestionContext", "description": [ "\nThe current Lens suggestion" ], "signature": [ - { - "pluginId": "lens", - "scope": "public", - "docId": "kibLensPluginApi", - "section": "def-public.Suggestion", - "text": "Suggestion" - }, - " | undefined" + "UnifiedHistogramSuggestionContext", + " | undefined" ], "path": "src/plugins/unified_histogram/public/container/services/state_service.ts", "deprecated": false, @@ -1137,9 +1172,129 @@ } ], "initialIsOpen": false + }, + { + "parentPluginId": "unifiedHistogram", + "id": "def-public.UnifiedHistogramVisContext", + "type": "Interface", + "tags": [], + "label": "UnifiedHistogramVisContext", + "description": [ + "\nUnified Histogram type for recreating a stored Lens vis" + ], + "path": "src/plugins/unified_histogram/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "unifiedHistogram", + "id": "def-public.UnifiedHistogramVisContext.attributes", + "type": "CompoundType", + "tags": [], + "label": "attributes", + "description": [], + "signature": [ + "LensAttributes<\"lnsXY\", ", + { + "pluginId": "lens", + "scope": "public", + "docId": "kibLensPluginApi", + "section": "def-public.XYState", + "text": "XYState" + }, + "> | LensAttributes<\"lnsPie\", ", + "PieVisualizationState", + "> | LensAttributes<\"lnsHeatmap\", ", + { + "pluginId": "lens", + "scope": "public", + "docId": "kibLensPluginApi", + "section": "def-public.HeatmapVisualizationState", + "text": "HeatmapVisualizationState" + }, + "> | LensAttributes<\"lnsGauge\", ", + { + "pluginId": "lens", + "scope": "public", + "docId": "kibLensPluginApi", + "section": "def-public.GaugeVisualizationState", + "text": "GaugeVisualizationState" + }, + "> | LensAttributes<\"lnsDatatable\", ", + { + "pluginId": "lens", + "scope": "public", + "docId": "kibLensPluginApi", + "section": "def-public.DatatableVisualizationState", + "text": "DatatableVisualizationState" + }, + "> | LensAttributes<\"lnsLegacyMetric\", ", + { + "pluginId": "lens", + "scope": "common", + "docId": "kibLensPluginApi", + "section": "def-common.LegacyMetricState", + "text": "LegacyMetricState" + }, + "> | LensAttributes<\"lnsMetric\", ", + { + "pluginId": "lens", + "scope": "public", + "docId": "kibLensPluginApi", + "section": "def-public.MetricVisualizationState", + "text": "MetricVisualizationState" + }, + "> | LensAttributes" + ], + "path": "src/plugins/unified_histogram/public/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "unifiedHistogram", + "id": "def-public.UnifiedHistogramVisContext.requestData", + "type": "Object", + "tags": [], + "label": "requestData", + "description": [], + "signature": [ + "LensRequestData" + ], + "path": "src/plugins/unified_histogram/public/types.ts", + "deprecated": false, + "trackAdoption": false + }, + { + "parentPluginId": "unifiedHistogram", + "id": "def-public.UnifiedHistogramVisContext.suggestionType", + "type": "Enum", + "tags": [], + "label": "suggestionType", + "description": [], + "signature": [ + "UnifiedHistogramSuggestionType" + ], + "path": "src/plugins/unified_histogram/public/types.ts", + "deprecated": false, + "trackAdoption": false + } + ], + "initialIsOpen": false } ], "enums": [ + { + "parentPluginId": "unifiedHistogram", + "id": "def-public.UnifiedHistogramExternalVisContextStatus", + "type": "Enum", + "tags": [], + "label": "UnifiedHistogramExternalVisContextStatus", + "description": [], + "path": "src/plugins/unified_histogram/public/types.ts", + "deprecated": false, + "trackAdoption": false, + "initialIsOpen": false + }, { "parentPluginId": "unifiedHistogram", "id": "def-public.UnifiedHistogramFetchStatus", @@ -1250,17 +1405,25 @@ "section": "def-common.RequestAdapter", "text": "RequestAdapter" }, - " | undefined; isChartLoading?: boolean | undefined; table?: ", + " | undefined; isChartLoading?: boolean | undefined; onVisContextChanged?: ((nextVisContext: ", { - "pluginId": "expressions", - "scope": "common", - "docId": "kibExpressionsPluginApi", - "section": "def-common.Datatable", - "text": "Datatable" + "pluginId": "unifiedHistogram", + "scope": "public", + "docId": "kibUnifiedHistogramPluginApi", + "section": "def-public.UnifiedHistogramVisContext", + "text": "UnifiedHistogramVisContext" + }, + " | undefined, externalVisContextStatus: ", + { + "pluginId": "unifiedHistogram", + "scope": "public", + "docId": "kibUnifiedHistogramPluginApi", + "section": "def-public.UnifiedHistogramExternalVisContextStatus", + "text": "UnifiedHistogramExternalVisContextStatus" }, - " | undefined; } & Pick<", + ") => void) | undefined; } & Pick<", "UnifiedHistogramLayoutProps", - ", \"className\" | \"children\" | \"query\" | \"filters\" | \"columns\" | \"container\" | \"onBrushEnd\" | \"disabledActions\" | \"timeRange\" | \"services\" | \"dataView\" | \"relativeTimeRange\" | \"renderCustomChartToggleActions\" | \"onFilter\" | \"withDefaultActions\" | \"abortController\">" + ", \"className\" | \"children\" | \"query\" | \"filters\" | \"columns\" | \"container\" | \"onBrushEnd\" | \"disabledActions\" | \"timeRange\" | \"table\" | \"services\" | \"dataView\" | \"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 17932661104bf..7e1f0bb91c65e 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedHistogram'] --- import unifiedHistogramObj from './unified_histogram.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/k | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 55 | 0 | 23 | 2 | +| 62 | 0 | 29 | 5 | ## Client diff --git a/api_docs/unified_search.mdx b/api_docs/unified_search.mdx index f7b7d49ccae15..258ccb275f8cd 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-04-08 +date: 2024-04-11 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 c719c91c46cec..285be06df0bc6 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-04-08 +date: 2024-04-11 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 bcd6f5590038d..6575e63a4aabc 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-04-08 +date: 2024-04-11 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 bd6a2d3e70c61..47c46f1fff52a 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-04-08 +date: 2024-04-11 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 33eb42a780469..b653f0369fe57 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-04-08 +date: 2024-04-11 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 25d98cf584a7d..837fedd69408d 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-04-08 +date: 2024-04-11 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 9d6466bc5ce02..1b8856a69010e 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-04-08 +date: 2024-04-11 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 25cfc3d03ef82..00c058e062d0b 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-04-08 +date: 2024-04-11 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 2c0e33ef95c73..6a86042a1484b 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-04-08 +date: 2024-04-11 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 f8fe40e874388..b2cafefcbdfab 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-04-08 +date: 2024-04-11 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 4e86941d8e217..a62bced2e6ca9 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-04-08 +date: 2024-04-11 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 65be55bf5f3e7..7414d252fde89 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-04-08 +date: 2024-04-11 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 570cef6e63f16..67987e3c94096 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-04-08 +date: 2024-04-11 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 52bfc5737fa88..1c8861e922992 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-04-08 +date: 2024-04-11 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 aee6d34b9610e..3d529fa9e1b4d 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-04-08 +date: 2024-04-11 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 c90b9e126df69..e3a73c7b1ffb6 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeXy'] --- import visTypeXyObj from './vis_type_xy.devdocs.json'; diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx index b9608b3cca27c..8c523ab66160d 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-04-08 +date: 2024-04-11 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations'] --- import visualizationsObj from './visualizations.devdocs.json'; diff --git a/config/serverless.es.yml b/config/serverless.es.yml index a312ce3b87b1c..d60b55e8cf463 100644 --- a/config/serverless.es.yml +++ b/config/serverless.es.yml @@ -35,7 +35,6 @@ xpack.actions.enabledActionTypes: ['.email', '.index', '.slack', '.jira', '.webh no_data_page.analyticsNoDataPageFlavor: 'serverless_search' # Disable Dev tools -xpack.grokdebugger.enabled: false xpack.painless_lab.enabled: false xpack.ml.ad.enabled: false diff --git a/config/serverless.oblt.yml b/config/serverless.oblt.yml index a2e7d8d4eeb97..35d63ac5a49ef 100644 --- a/config/serverless.oblt.yml +++ b/config/serverless.oblt.yml @@ -81,6 +81,9 @@ xpack.apm.featureFlags.migrationToFleetAvailable: false xpack.apm.featureFlags.sourcemapApiAvailable: false xpack.apm.featureFlags.storageExplorerAvailable: false +## Set the AI Assistant type +aiAssistantManagementSelection.preferredAIAssistantType: "observability" + # Specify in telemetry the project type telemetry.labels.serverless: observability diff --git a/docs/developer/advanced/upgrading-nodejs.asciidoc b/docs/developer/advanced/upgrading-nodejs.asciidoc index 546d5ae46f164..c86666c839998 100644 --- a/docs/developer/advanced/upgrading-nodejs.asciidoc +++ b/docs/developer/advanced/upgrading-nodejs.asciidoc @@ -19,7 +19,7 @@ These files must be updated when upgrading Node.js: - {kib-repo}blob/{branch}/WORKSPACE.bazel[`WORKSPACE.bazel`] - The version is specified in the `node_version` property. Besides this property, the list of files under `node_repositories` must be updated along with their respective SHA256 hashes. These can be found in the `SHASUMS256.txt` file inside the public `kibana-custom-node-artifacts` GCP bucket. - Example for Node.js v20.12.1: https://storage.googleapis.com/kibana-custom-node-artifacts/node-glibc-217/dist/v20.12.1/SHASUMS256.txt[kibana-custom-node-artifacts/node-glibc-217/dist/v20.12.1/SHASUMS256.txt] + Example for Node.js v20.12.2: https://storage.googleapis.com/kibana-custom-node-artifacts/node-glibc-217/dist/v20.12.2/SHASUMS256.txt[kibana-custom-node-artifacts/node-glibc-217/dist/v20.12.2/SHASUMS256.txt] See PR {kib-repo}pull/128123[#128123] for an example of how the Node.js version has been upgraded previously. @@ -43,7 +43,7 @@ The only difference between the offical Node.js build and our custom build, is t ==== How to start a new build To generate a new custom Node.js build, https://buildkite.com/elastic/kibana-custom-node-dot-js-builds#new[start a new build] on our dedicated Buildkite pipeline (requires Elastic employee permissions). -Give it a clear name (e.g. `Node 20.12.1`) and remember so set the custom `OVERRIDE_TARGET_VERSION` environment variable to the desired Node.js version - e.g. `OVERRIDE_TARGET_VERSION=20.12.1`. +Give it a clear name (e.g. `Node 20.12.2`) and remember so set the custom `OVERRIDE_TARGET_VERSION` environment variable to the desired Node.js version - e.g. `OVERRIDE_TARGET_VERSION=20.12.2`. You find the "Environment Variables" field by expanding "Options >" in the "New Build" dialog. === Backporting diff --git a/docs/management/connectors/action-types/cases-webhook.asciidoc b/docs/management/connectors/action-types/cases-webhook.asciidoc index 8610c4593d513..3d5bfecffcb3b 100644 --- a/docs/management/connectors/action-types/cases-webhook.asciidoc +++ b/docs/management/connectors/action-types/cases-webhook.asciidoc @@ -53,6 +53,7 @@ image::management/connectors/images/cases-webhook-connector-comments.png[Add cas Add HTTP header:: A set of key-value pairs sent as headers with the request URLs for the create case, update case, get case, and create comment methods. +For example, set `Content-Type` to the appropriate media type for your requests. Create case method:: The REST API HTTP request method to create a case in the third-party system: `post`(default), `put`, or `patch`. diff --git a/docs/management/connectors/action-types/webhook.asciidoc b/docs/management/connectors/action-types/webhook.asciidoc index 1868f96d14c1d..d9a4dd43daeaf 100644 --- a/docs/management/connectors/action-types/webhook.asciidoc +++ b/docs/management/connectors/action-types/webhook.asciidoc @@ -34,7 +34,9 @@ Authentication:: The authentication type: none, basic, or SSL. If you choose basic authentication, you must provide a user name and password. If you choose SSL authentication, you must provide SSL server certificate authentication data in a CRT and key file format or a PFX file format. You can also optionally provide a passphrase if the files are password-protected. -HTTP headers:: A set of key-value pairs sent as headers with the request. +HTTP headers:: +A set of key-value pairs sent as headers with the request. +For example, set `Content-Type` to the appropriate media type for your requests. Certificate authority:: A certificate authority (CA) that the connector can trust, for example to sign and validate server certificates. This option is available for all authentication types. diff --git a/docs/setup/settings.asciidoc b/docs/setup/settings.asciidoc index 1bc5bb4c14dc2..9d5cedff34c84 100644 --- a/docs/setup/settings.asciidoc +++ b/docs/setup/settings.asciidoc @@ -60,6 +60,9 @@ NOTE: The `frame-ancestors` directive can also be configured by using <>. In that case, that takes precedence and any values in `csp.frame_ancestors` are ignored. +`csp.report_only.form_action`:: +Add sources for the https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/form-action[Content Security Policy `form-action` directive] in reporting mode. + `csp.report_uri`:: Add sources for the https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/report-uri[Content Security Policy `report-uri` directive]. diff --git a/package.json b/package.json index 816332219392a..f980721107057 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "url": "https://github.com/elastic/kibana.git" }, "engines": { - "node": "20.12.1", + "node": "20.12.2", "yarn": "^1.22.19" }, "resolutions": { @@ -107,7 +107,7 @@ "@elastic/ecs": "^8.11.1", "@elastic/elasticsearch": "^8.13.0", "@elastic/ems-client": "8.5.1", - "@elastic/eui": "93.5.2", + "@elastic/eui": "93.6.0", "@elastic/filesaver": "1.1.2", "@elastic/node-crypto": "1.2.1", "@elastic/numeral": "^2.5.1", @@ -509,6 +509,7 @@ "@kbn/iframe-embedded-plugin": "link:x-pack/test/functional_embedded/plugins/iframe_embedded", "@kbn/image-embeddable-plugin": "link:src/plugins/image_embeddable", "@kbn/index-lifecycle-management-plugin": "link:x-pack/plugins/index_lifecycle_management", + "@kbn/index-management": "link:x-pack/packages/index-management", "@kbn/index-management-plugin": "link:x-pack/plugins/index_management", "@kbn/index-patterns-test-plugin": "link:test/plugin_functional/plugins/index_patterns", "@kbn/infra-forge": "link:x-pack/packages/kbn-infra-forge", @@ -1519,6 +1520,7 @@ "@types/vinyl-fs": "^3.0.2", "@types/watchpack": "^1.1.5", "@types/webpack": "^4.41.3", + "@types/webpack-bundle-analyzer": "^4.7.0", "@types/webpack-env": "^1.15.3", "@types/webpack-merge": "^4.1.5", "@types/webpack-sources": "^0.1.4", diff --git a/packages/core/application/core-application-browser-internal/integration_tests/router.test.tsx b/packages/core/application/core-application-browser-internal/integration_tests/router.test.tsx index b23368e4dba2e..4e8204e923c2c 100644 --- a/packages/core/application/core-application-browser-internal/integration_tests/router.test.tsx +++ b/packages/core/application/core-application-browser-internal/integration_tests/router.test.tsx @@ -119,7 +119,7 @@ describe('AppRouter', () => { expect(app1.mounter.mount).toHaveBeenCalled(); expect(dom?.html()).toMatchInlineSnapshot(` - "
diff --git a/x-pack/plugins/security_solution/public/explore/components/authentication/__snapshots__/authentications_user_table.test.tsx.snap b/x-pack/plugins/security_solution/public/explore/components/authentication/__snapshots__/authentications_user_table.test.tsx.snap index 3d31cd3759ffe..4acce15364b6b 100644 --- a/x-pack/plugins/security_solution/public/explore/components/authentication/__snapshots__/authentications_user_table.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/explore/components/authentication/__snapshots__/authentications_user_table.test.tsx.snap @@ -104,7 +104,7 @@ exports[`Authentication User Table Component rendering it renders the user authe
-

@@ -113,7 +113,7 @@ exports[`Authentication User Table Component rendering it renders the user authe > Authentications -

+
diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/hooks/use_tabs.test.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/hooks/use_tabs.test.tsx new file mode 100644 index 0000000000000..87a23a06b7ce1 --- /dev/null +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/hooks/use_tabs.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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { RenderHookResult } from '@testing-library/react-hooks'; +import { renderHook } from '@testing-library/react-hooks'; +import type { UseTabsParams, UseTabsResult } from './use_tabs'; +import { allThreeTabs, twoTabs, useTabs } from './use_tabs'; + +const mockStorageGet = jest.fn(); +jest.mock('../../../../common/lib/kibana', () => { + const originalModule = jest.requireActual('../../../../common/lib/kibana'); + return { + ...originalModule, + useKibana: jest.fn().mockReturnValue({ + services: { + storage: { + get: () => mockStorageGet(), + }, + }, + }), + }; +}); + +describe('useTabs', () => { + let hookResult: RenderHookResult; + + it('should return 3 tabs to render and the one from path as selected', () => { + const initialProps: UseTabsParams = { + flyoutIsExpandable: true, + path: { tab: 'table' }, + }; + + hookResult = renderHook((props: UseTabsParams) => useTabs(props), { initialProps }); + + expect(hookResult.result.current.tabsDisplayed).toEqual(allThreeTabs); + expect(hookResult.result.current.selectedTabId).toEqual('table'); + }); + + it('should return 2 tabs to render and the one from path as selected', () => { + const initialProps: UseTabsParams = { + flyoutIsExpandable: false, + path: { tab: 'json' }, + }; + + hookResult = renderHook((props: UseTabsParams) => useTabs(props), { initialProps }); + + expect(hookResult.result.current.tabsDisplayed).toEqual(twoTabs); + expect(hookResult.result.current.selectedTabId).toEqual('json'); + }); + + it('should ignore the value from path if it is not in the list of tabs to display', () => { + const initialProps: UseTabsParams = { + flyoutIsExpandable: true, + path: { tab: 'wrong' }, + }; + + hookResult = renderHook((props: UseTabsParams) => useTabs(props), { initialProps }); + + expect(hookResult.result.current.selectedTabId).not.toEqual('wrong'); + }); + + it('should return selected tab from local storage if it is in the list of tabs to display', () => { + const initialProps: UseTabsParams = { + flyoutIsExpandable: true, + path: undefined, + }; + mockStorageGet.mockReturnValue('overview'); + + hookResult = renderHook((props: UseTabsParams) => useTabs(props), { initialProps }); + + expect(hookResult.result.current.tabsDisplayed).toEqual(allThreeTabs); + expect(hookResult.result.current.selectedTabId).toEqual('overview'); + }); + + it('should ignore the local storage value if it is not in the list of tabs to display', () => { + const initialProps: UseTabsParams = { + flyoutIsExpandable: true, + path: undefined, + }; + mockStorageGet.mockReturnValue('wrong'); + + hookResult = renderHook((props: UseTabsParams) => useTabs(props), { initialProps }); + + expect(hookResult.result.current.selectedTabId).not.toEqual('wrong'); + }); + + it('should return 3 tabs to render and and the first from the list as selected tab', () => { + const initialProps: UseTabsParams = { + flyoutIsExpandable: true, + path: undefined, + }; + mockStorageGet.mockReturnValue(undefined); + + hookResult = renderHook((props: UseTabsParams) => useTabs(props), { initialProps }); + + expect(hookResult.result.current.tabsDisplayed).toEqual(allThreeTabs); + expect(hookResult.result.current.selectedTabId).toEqual('overview'); + }); + + it('should return 2 tabs to render and and the first from the list as selected tab', () => { + const initialProps: UseTabsParams = { + flyoutIsExpandable: false, + path: undefined, + }; + mockStorageGet.mockReturnValue(undefined); + + hookResult = renderHook((props: UseTabsParams) => useTabs(props), { initialProps }); + + expect(hookResult.result.current.tabsDisplayed).toEqual(twoTabs); + expect(hookResult.result.current.selectedTabId).toEqual('table'); + }); +}); diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/hooks/use_tabs.ts b/x-pack/plugins/security_solution/public/flyout/document_details/right/hooks/use_tabs.ts new file mode 100644 index 0000000000000..2c238a8aae941 --- /dev/null +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/hooks/use_tabs.ts @@ -0,0 +1,81 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { useMemo } from 'react'; +import type { PanelPath } from '@kbn/expandable-flyout'; +import type { RightPanelPaths } from '..'; +import { useKibana } from '../../../../common/lib/kibana'; +import { FLYOUT_STORAGE_KEYS } from '../../shared/constants/local_storage'; +import * as tabs from '../tabs'; +import type { RightPanelTabType } from '../tabs'; + +export const allThreeTabs = [tabs.overviewTab, tabs.tableTab, tabs.jsonTab]; +export const twoTabs = [tabs.tableTab, tabs.jsonTab]; + +export interface UseTabsParams { + /** + * Whether the flyout is expandable or not. This will drive how many tabs we display. + */ + flyoutIsExpandable: boolean; + /** + * The path passed in when using the expandable flyout API to open a panel. + */ + path: PanelPath | undefined; +} + +export interface UseTabsResult { + /** + * The tabs to display in the right panel. + */ + tabsDisplayed: RightPanelTabType[]; + /** + * The tab id to selected in the right panel. + */ + selectedTabId: RightPanelPaths; +} + +/** + * Hook to get the tabs to display in the right panel and the selected tab. + */ +export const useTabs = ({ flyoutIsExpandable, path }: UseTabsParams): UseTabsResult => { + const { storage } = useKibana().services; + + // if the flyout is expandable we render all 3 tabs (overview, table and json) + // if the flyout is not, we render only table and json + const tabsDisplayed = useMemo( + () => (flyoutIsExpandable ? allThreeTabs : twoTabs), + [flyoutIsExpandable] + ); + + const selectedTabId = useMemo(() => { + // we use the value passed from the url and use it if it exists in the list of tabs to display + if (path) { + const selectedTab = tabsDisplayed.map((tab) => tab.id).find((tabId) => tabId === path.tab); + if (selectedTab) { + return selectedTab; + } + } + + // we check the tab saved in local storage and use it if it exists in the list of tabs to display + const tabSavedInlocalStorage = storage.get(FLYOUT_STORAGE_KEYS.RIGHT_PANEL_SELECTED_TABS); + if ( + tabSavedInlocalStorage && + tabsDisplayed.map((tab) => tab.id).includes(tabSavedInlocalStorage) + ) { + return tabSavedInlocalStorage; + } + + // we default back to the first tab of the list of tabs to display in case everything else has failed + const defaultTab = tabsDisplayed[0].id; + return defaultTab; + }, [path, storage, tabsDisplayed]); + + return { + tabsDisplayed, + selectedTabId, + }; +}; diff --git a/x-pack/plugins/security_solution/public/flyout/document_details/right/index.tsx b/x-pack/plugins/security_solution/public/flyout/document_details/right/index.tsx index 083481c9bbb41..5190c988e2026 100644 --- a/x-pack/plugins/security_solution/public/flyout/document_details/right/index.tsx +++ b/x-pack/plugins/security_solution/public/flyout/document_details/right/index.tsx @@ -6,9 +6,10 @@ */ import type { FC } from 'react'; -import React, { memo, useMemo, useEffect } from 'react'; +import React, { memo, useEffect } from 'react'; import type { FlyoutPanelProps, PanelPath } from '@kbn/expandable-flyout'; import { useExpandableFlyoutApi } from '@kbn/expandable-flyout'; +import { useTabs } from './hooks/use_tabs'; import { FLYOUT_STORAGE_KEYS } from '../shared/constants/local_storage'; import { useKibana } from '../../../common/lib/kibana'; import { useRightPanelContext } from './context'; @@ -16,7 +17,6 @@ import { PanelNavigation } from './navigation'; import { PanelHeader } from './header'; import { PanelContent } from './content'; import type { RightPanelTabType } from './tabs'; -import * as tabs from './tabs'; import { PanelFooter } from './footer'; import { useFlyoutIsExpandable } from './hooks/use_flyout_is_expandable'; @@ -45,25 +45,7 @@ export const RightPanel: FC> = memo(({ path }) => { // if the flyout is expandable we render all 3 tabs (overview, table and json) // if the flyout is not, we render only table and json const flyoutIsExpandable = useFlyoutIsExpandable({ getFieldsData, dataAsNestedObject }); - const tabsDisplayed = useMemo(() => { - return flyoutIsExpandable - ? [tabs.overviewTab, tabs.tableTab, tabs.jsonTab] - : [tabs.tableTab, tabs.jsonTab]; - }, [flyoutIsExpandable]); - - // we give priority to the url, meaning if a value is saved in the url then we load this one - // if not we check the local storage and use that value if it exists - // if not we use the default tab - const selectedTabId = useMemo(() => { - const defaultTab = tabsDisplayed[0].id; - const tabSavedInlocalStorage = storage.get(FLYOUT_STORAGE_KEYS.RIGHT_PANEL_SELECTED_TABS); - - if (!path) return tabSavedInlocalStorage || defaultTab; - return ( - tabsDisplayed.map((tab) => tab.id).find((tabId) => tabId === path.tab) ?? - (tabSavedInlocalStorage || defaultTab) - ); - }, [path, storage, tabsDisplayed]); + const { tabsDisplayed, selectedTabId } = useTabs({ flyoutIsExpandable, path }); const setSelectedTabId = (tabId: RightPanelTabType['id']) => { openRightPanel({ diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/bad_argument.test.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/bad_argument.test.tsx new file mode 100644 index 0000000000000..7a1cd8e9d5afb --- /dev/null +++ b/x-pack/plugins/security_solution/public/management/components/console/components/bad_argument.test.tsx @@ -0,0 +1,57 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { CommandDefinition, ConsoleProps } from '..'; +import type { AppContextTestRender } from '../../../../common/mock/endpoint'; +import type { ConsoleTestSetup } from '../mocks'; +import { getConsoleTestSetup } from '../mocks'; + +describe('BadArgument component', () => { + let render: (props?: Partial) => ReturnType; + let renderResult: ReturnType; + let command: CommandDefinition; + let enterCommand: ConsoleTestSetup['enterCommand']; + + beforeEach(() => { + const testSetup = getConsoleTestSetup(); + let commands: CommandDefinition[]; + + ({ commands, enterCommand } = testSetup); + command = commands[0]; + command.args = { + foo: { + about: 'foo', + required: true, + mustHaveValue: 'number-greater-than-zero', + allowMultiples: false, + }, + }; + + render = (props = {}) => (renderResult = testSetup.renderConsole(props)); + }); + + it('should display message and help output if command is not hidden from help', () => { + render(); + enterCommand('cmd1 --foo'); + + expect(renderResult.getByTestId('test-badArgument-message').textContent).toEqual( + 'Argument --foo must have a value' + ); + expect(renderResult.getByTestId('test-badArgument-commandUsage')); + }); + + it('should only display message (no help) if command is hidden from help', () => { + command.helpHidden = true; + render(); + enterCommand('cmd1 --foo'); + + expect(renderResult.getByTestId('test-badArgument-message').textContent).toEqual( + 'Argument --foo must have a value' + ); + expect(renderResult.queryByTestId('test-badArgument-commandUsage')).toBeNull(); + }); +}); diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/bad_argument.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/bad_argument.tsx index 32d66bada9a9d..1c75e4e9d3d95 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/bad_argument.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/bad_argument.tsx @@ -41,23 +41,28 @@ export const BadArgument = memo
{store.errorMessage}
- - - - - {`${command.commandDefinition.name} --help`} - ), - }} - /> - + + {!command.commandDefinition.helpHidden && ( +
+ + + + + {`${command.commandDefinition.name} --help`} + ), + }} + /> + +
+ )} ); } diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_execute_command.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_execute_command.tsx index 75e7facf7a801..589028c4f9447 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_execute_command.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/console_state/state_update_handlers/handle_execute_command.tsx @@ -351,7 +351,9 @@ export const handleExecuteCommand: ConsoleStoreReducer< case 'number': case 'number-greater-than-zero': - { + if (typeof argValue === 'boolean') { + dataValidationError = executionTranslations.mustHaveValue(argName); + } else { const valueNumber = Number(argValue); if (!Number.isSafeInteger(valueNumber)) { diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/validation_error.test.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/validation_error.test.tsx new file mode 100644 index 0000000000000..ccabc2d163068 --- /dev/null +++ b/x-pack/plugins/security_solution/public/management/components/console/components/validation_error.test.tsx @@ -0,0 +1,50 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { CommandDefinition, ConsoleProps } from '..'; +import type { AppContextTestRender } from '../../../../common/mock/endpoint'; +import type { ConsoleTestSetup } from '../mocks'; +import { getConsoleTestSetup } from '../mocks'; + +describe('ValidationError component', () => { + let render: (props?: Partial) => ReturnType; + let renderResult: ReturnType; + let command: CommandDefinition; + let enterCommand: ConsoleTestSetup['enterCommand']; + + beforeEach(() => { + const testSetup = getConsoleTestSetup(); + let commands: CommandDefinition[]; + + ({ commands, enterCommand } = testSetup); + command = commands[0]; + command.validate = () => 'this command is not active'; + + render = (props = {}) => (renderResult = testSetup.renderConsole(props)); + }); + + it('should display message and help output if command is not hidden from help', () => { + render(); + enterCommand('cmd1'); + + expect(renderResult.getByTestId('test-validationError-message').textContent).toEqual( + 'this command is not active' + ); + expect(renderResult.getByTestId('test-validationError-commandUsage')); + }); + + it('should only display message (no help) if command is hidden from help', () => { + command.helpHidden = true; + render(); + enterCommand('cmd1'); + + expect(renderResult.getByTestId('test-validationError-message').textContent).toEqual( + 'this command is not active' + ); + expect(renderResult.queryByTestId('test-validationError-commandUsage')).toBeNull(); + }); +}); diff --git a/x-pack/plugins/security_solution/public/management/components/console/components/validation_error.tsx b/x-pack/plugins/security_solution/public/management/components/console/components/validation_error.tsx index 2b372fd6c8f55..b7dee3f613f3b 100644 --- a/x-pack/plugins/security_solution/public/management/components/console/components/validation_error.tsx +++ b/x-pack/plugins/security_solution/public/management/components/console/components/validation_error.tsx @@ -42,23 +42,28 @@ export const ValidationError = memo< data-test-subj={getTestId('validationError')} >
{store.errorMessage}
- - - - - {`${command.commandDefinition.name} --help`} - ), - }} - /> - + + {!command.commandDefinition.helpHidden && ( +
+ + + + + {`${command.commandDefinition.name} --help`} + ), + }} + /> + +
+ )} ); }); diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/artifacts/artifacts_mocked_data.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/artifacts/artifacts_mocked_data.cy.ts index 8d21ff3804364..e7f32820c00d7 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/artifacts/artifacts_mocked_data.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/artifacts/artifacts_mocked_data.cy.ts @@ -31,7 +31,6 @@ const loginWithoutAccess = (url: string) => { loadPage(url); }; -// Flaky: https://github.com/elastic/kibana/issues/171168 describe('Artifacts pages', { tags: ['@ess', '@serverless'] }, () => { let endpointData: ReturnTypeFromChainable | undefined; diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/automated_response_actions/form.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/automated_response_actions/form.cy.ts index cd521f1cad32e..974ea666c15d6 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/automated_response_actions/form.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/automated_response_actions/form.cy.ts @@ -244,7 +244,7 @@ describe( ); }); cy.getByTestSubj(`response-actions-list-item-0`).within(() => { - cy.getByTestSubj('commandTypeField').should('have.text', 'isolate').and('be.disabled'); + cy.getByTestSubj('commandTypeField').should('have.text', 'isolate, ').and('be.disabled'); // Note: the trailing `, ` comes from screen-reader-only text cy.getByTestSubj('input').should('have.value', 'Isolate host').and('be.disabled'); cy.getByTestSubj('remove-response-action').should('be.disabled'); // Try removing action diff --git a/x-pack/plugins/security_solution/public/management/hooks/use_with_show_responder.tsx b/x-pack/plugins/security_solution/public/management/hooks/use_with_show_responder.tsx index 2c2966f065858..c36b02d90ccf0 100644 --- a/x-pack/plugins/security_solution/public/management/hooks/use_with_show_responder.tsx +++ b/x-pack/plugins/security_solution/public/management/hooks/use_with_show_responder.tsx @@ -7,7 +7,11 @@ import React, { useCallback } from 'react'; import { EuiBetaBadge, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; -import { TECHNICAL_PREVIEW, TECHNICAL_PREVIEW_TOOLTIP } from '../../common/translations'; +import { + TECHNICAL_PREVIEW, + TECHNICAL_PREVIEW_TOOLTIP, + UPGRADE_AGENT_FOR_RESPONDER, +} from '../../common/translations'; import { useLicense } from '../../common/hooks/use_license'; import type { ImmutableArray } from '../../../common/endpoint/types'; import { @@ -99,6 +103,12 @@ export const useWithShowResponder = (): ShowResponseActionsConsole => { return { ...command, helpHidden: true, + validate: () => { + return UPGRADE_AGENT_FOR_RESPONDER( + agentType, + command.name as ConsoleResponseActionCommands + ); + }, }; } return command; diff --git a/x-pack/plugins/security_solution/public/management/pages/blocklist/view/components/blocklist_form.test.tsx b/x-pack/plugins/security_solution/public/management/pages/blocklist/view/components/blocklist_form.test.tsx index c7d1c3a46d442..3fdf193b8e865 100644 --- a/x-pack/plugins/security_solution/public/management/pages/blocklist/view/components/blocklist_form.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/blocklist/view/components/blocklist_form.test.tsx @@ -154,7 +154,8 @@ describe('blocklist form', () => { it('should correctly default OS to windows', () => { render(); - expect(screen.getByTestId('blocklist-form-os-select').textContent).toEqual('Windows'); + // Note: the trailing `, ` comes from screen-reader-only text + expect(screen.getByTestId('blocklist-form-os-select').textContent).toEqual('Windows, '); }); it('should allow user to select between 3 OSs', () => { @@ -182,12 +183,12 @@ describe('blocklist form', () => { it('should correctly default field to hash', () => { render(); - expect(screen.getByTestId('blocklist-form-field-select').textContent).toEqual('Hash'); + expect(screen.getByTestId('blocklist-form-field-select').textContent).toEqual('Hash, '); }); it('should allow all 3 fields when Windows OS is selected', () => { render(); - expect(screen.getByTestId('blocklist-form-os-select').textContent).toEqual('Windows'); + expect(screen.getByTestId('blocklist-form-os-select').textContent).toEqual('Windows, '); userEvent.click(screen.getByTestId('blocklist-form-field-select')); expect(screen.queryAllByRole('option').length).toEqual(3); @@ -198,7 +199,7 @@ describe('blocklist form', () => { it('should only allow hash and path fields when Linux OS is selected', () => { render(createProps({ item: createItem({ os_types: [OperatingSystem.LINUX] }) })); - expect(screen.getByTestId('blocklist-form-os-select').textContent).toEqual('Linux'); + expect(screen.getByTestId('blocklist-form-os-select').textContent).toEqual('Linux, '); userEvent.click(screen.getByTestId('blocklist-form-field-select')); expect(screen.queryAllByRole('option').length).toEqual(2); @@ -209,7 +210,7 @@ describe('blocklist form', () => { it('should only allow hash and path fields when Mac OS is selected', () => { render(createProps({ item: createItem({ os_types: [OperatingSystem.MAC] }) })); - expect(screen.getByTestId('blocklist-form-os-select').textContent).toEqual('Mac'); + expect(screen.getByTestId('blocklist-form-os-select').textContent).toEqual('Mac, '); userEvent.click(screen.getByTestId('blocklist-form-field-select')); expect(screen.queryAllByRole('option').length).toEqual(2); @@ -233,7 +234,7 @@ describe('blocklist form', () => { it('should correctly create `file.path.caseless` when Mac OS is selected', async () => { render(createProps({ item: createItem({ os_types: [OperatingSystem.MAC] }) })); - expect(screen.getByTestId('blocklist-form-os-select').textContent).toEqual('Mac'); + expect(screen.getByTestId('blocklist-form-os-select').textContent).toEqual('Mac, '); userEvent.click(screen.getByTestId('blocklist-form-field-select')); await waitForEuiPopoverOpen(); @@ -249,7 +250,7 @@ describe('blocklist form', () => { it('should correctly create `file.path` when Linux is selected', async () => { render(createProps({ item: createItem({ os_types: [OperatingSystem.LINUX] }) })); - expect(screen.getByTestId('blocklist-form-os-select').textContent).toEqual('Linux'); + expect(screen.getByTestId('blocklist-form-os-select').textContent).toEqual('Linux, '); userEvent.click(screen.getByTestId('blocklist-form-field-select')); await waitForEuiPopoverOpen(); diff --git a/x-pack/plugins/security_solution/public/management/pages/policy/models/advanced_policy_schema.ts b/x-pack/plugins/security_solution/public/management/pages/policy/models/advanced_policy_schema.ts index 87321f6ce108a..cd9da0f7b7468 100644 --- a/x-pack/plugins/security_solution/public/management/pages/policy/models/advanced_policy_schema.ts +++ b/x-pack/plugins/security_solution/public/management/pages/policy/models/advanced_policy_schema.ts @@ -1176,6 +1176,17 @@ export const AdvancedPolicySchema: AdvancedPolicySchemaType[] = [ } ), }, + { + key: 'linux.advanced.events.enable_caps', + first_supported_version: '8.14', + documentation: i18n.translate( + 'xpack.securitySolution.endpoint.policy.advanced.linux.advanced.events.enable_caps', + { + defaultMessage: + 'This setting ensures thread capability arrays are not pruned from Linux process events before being sent to Elasticsearch. At the expense of higher Endpoint data volumes, a true value will ensure capability matching detection rules running within the Elastic stack can match. Detection rules running within Elastic Defend are unaffected because capabilities are conditionally pruned after rule processing. Default is false.', + } + ), + }, { key: 'windows.advanced.events.callstacks.emit_in_events', first_supported_version: '8.8', diff --git a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/form.test.tsx b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/form.test.tsx index e0cd4ff26a3e2..8c951fe470793 100644 --- a/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/form.test.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/trusted_apps/view/components/form.test.tsx @@ -213,7 +213,8 @@ describe('Trusted apps form', () => { }); it('should default OS to Windows', () => { - expect(getOsField().textContent).toEqual('Windows'); + // Note: the trailing `, ` comes from screen-reader-only text + expect(getOsField().textContent).toEqual('Windows, '); }); it('should allow user to select between 3 OSs', () => { diff --git a/x-pack/plugins/security_solution/public/overview/pages/overview.tsx b/x-pack/plugins/security_solution/public/overview/pages/overview.tsx index e91a7487f6491..c10fab09fa47b 100644 --- a/x-pack/plugins/security_solution/public/overview/pages/overview.tsx +++ b/x-pack/plugins/security_solution/public/overview/pages/overview.tsx @@ -5,9 +5,16 @@ * 2.0. */ -import { EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiShowFor } from '@elastic/eui'; +import { + EuiFlexGroup, + EuiFlexItem, + EuiSpacer, + EuiShowFor, + EuiScreenReaderOnly, +} from '@elastic/eui'; import React, { useCallback, useState, useMemo } from 'react'; +import { OVERVIEW } from '../../app/translations'; import { InputsModelId } from '../../common/store/inputs/constants'; import { FiltersGlobal } from '../../common/components/filters_global'; import { SiemSearchBar } from '../../common/components/search_bar'; @@ -69,6 +76,10 @@ const OverviewComponent = () => { return ( <> + +

{OVERVIEW}

+
+ {indicesExist ? ( <> diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/note_previews/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/note_previews/index.tsx index 5ac6f8074ab22..b73dcfe6e0126 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/note_previews/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/note_previews/index.tsx @@ -31,7 +31,7 @@ import { useDeepEqualSelector } from '../../../../common/hooks/use_selector'; import { SourcererScopeName } from '../../../../common/store/sourcerer/model'; import { useSourcererDataView } from '../../../../common/containers/sourcerer'; import { useDeleteNote } from './hooks/use_delete_note'; -import { getTimelineNoteSelector } from '../../timeline/notes_tab_content/selectors'; +import { getTimelineNoteSelector } from '../../timeline/tabs/notes/selectors'; export const NotePreviewsContainer = styled.section` padding-top: ${({ theme }) => `${theme.eui.euiSizeS}`}; diff --git a/x-pack/plugins/security_solution/public/timelines/components/side_panel/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/timelines/components/side_panel/__snapshots__/index.test.tsx.snap index 6d6dfa18538df..410b07fdc526a 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/side_panel/__snapshots__/index.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/timelines/components/side_panel/__snapshots__/index.test.tsx.snap @@ -216,7 +216,7 @@ exports[`Details Panel Component DetailsPanel:EventDetails: rendering it should class="euiFlyoutBody c1 emotion-euiFlyoutBody" >
{ + const { euiTheme } = useEuiTheme(); + const flyoutZIndex = useMemo( + () => ({ style: `z-index: ${(euiTheme.levels.flyout as number) + 3}` }), + [euiTheme] + ); + const alertId = detailsEcsData?.kibana?.alert ? detailsEcsData?._id : null; const ruleIndexRaw = useMemo( () => @@ -165,7 +171,12 @@ export const FlyoutFooterComponent = ({ /> )} {isAddEventFilterModalOpen && detailsEcsData != null && ( - + )} {isOsqueryFlyoutOpenWithAgentId && detailsEcsData != null && ( props.theme.eui.euiSizeS}; - width: 100%; -`; - -EqlTabHeaderContainer.displayName = 'EqlTabHeaderContainer'; - -const StyledEuiFlyoutHeader = styled(EuiFlyoutHeader)` - align-items: stretch; - box-shadow: none; - display: flex; - flex-direction: column; - margin-top: ${({ theme }) => theme.eui.euiSizeM} - padding: 0; - - &.euiFlyoutHeader { - ${({ theme }) => `padding: ${theme.eui.euiSizeS} 0 0 0;`} - } -`; - -const StyledEuiFlyoutBody = styled(EuiFlyoutBody)` - overflow-y: hidden; - flex: 1; - - .euiFlyoutBody__overflow { - overflow: hidden; - mask-image: none; - } - - .euiFlyoutBody__overflowContent { - padding: 0; - height: 100%; - display: flex; - } -`; - -const StyledEuiFlyoutFooter = styled(EuiFlyoutFooter)` - background: none; - padding: 0; - - &.euiFlyoutFooter { - ${({ theme }) => `padding: ${theme.eui.euiSizeS} 0 0 0;`} - } -`; - -const FullWidthFlexGroup = styled(EuiFlexGroup)` - margin: 0; - width: 100%; - overflow: hidden; -`; - -const ScrollableFlexItem = styled(EuiFlexItem)` - ${({ theme }) => `margin: 0 ${theme.eui.euiSizeM};`} - overflow: hidden; -`; - -const VerticalRule = styled.div` - width: 2px; - height: 100%; - background: ${({ theme }) => theme.eui.euiColorLightShade}; -`; - -VerticalRule.displayName = 'VerticalRule'; - -const EventsCountBadge = styled(EuiBadge)` - margin-left: ${({ theme }) => theme.eui.euiSizeS}; -`; - -const isTimerangeSame = (prevProps: Props, nextProps: Props) => - prevProps.end === nextProps.end && - prevProps.start === nextProps.start && - prevProps.timerangeKind === nextProps.timerangeKind; - -interface OwnProps { - renderCellValue: (props: CellValueElementProps) => React.ReactNode; - rowRenderers: RowRenderer[]; - timelineId: string; -} - -const EMPTY_EVENTS: TimelineItem[] = []; - -export type Props = OwnProps & PropsFromRedux; - -const NO_SORTING: Sort[] = []; - -const trailingControlColumns: ControlColumnProps[] = []; // stable reference - -export const EqlTabContentComponent: React.FC = ({ - activeTab, - columns, - end, - eqlOptions, - expandedDetail, - timelineId, - isLive, - itemsPerPage, - itemsPerPageOptions, - onEventClosed, - renderCellValue, - rowRenderers, - showExpandedDetails, - start, - timerangeKind, -}) => { - const dispatch = useDispatch(); - const { query: eqlQuery = '', ...restEqlOption } = eqlOptions; - const { portalNode: eqlEventsCountPortalNode } = useEqlEventsCountPortal(); - const { setTimelineFullScreen, timelineFullScreen } = useTimelineFullScreen(); - const { - browserFields, - dataViewId, - loading: loadingSourcerer, - runtimeMappings, - selectedPatterns, - } = useSourcererDataView(SourcererScopeName.timeline); - - const isEnterprisePlus = useLicense().isEnterprise(); - const ACTION_BUTTON_COUNT = isEnterprisePlus ? 6 : 5; - - const isBlankTimeline: boolean = isEmpty(eqlQuery); - - const canQueryTimeline = () => - loadingSourcerer != null && - !loadingSourcerer && - !isEmpty(start) && - !isEmpty(end) && - !isBlankTimeline; - - const getTimelineQueryFields = () => { - const columnsHeader = isEmpty(columns) ? defaultHeaders : columns; - const columnFields = columnsHeader.map((c) => c.id); - - return [...columnFields, ...requiredFieldsForActions]; - }; - - const [ - queryLoadingState, - { events, inspect, totalCount, pageInfo, loadPage, refreshedAt, refetch }, - ] = useTimelineEvents({ - dataViewId, - endDate: end, - eqlOptions: restEqlOption, - fields: getTimelineQueryFields(), - filterQuery: eqlQuery ?? '', - id: timelineId, - indexNames: selectedPatterns, - language: 'eql', - limit: itemsPerPage, - runtimeMappings, - skip: !canQueryTimeline(), - startDate: start, - timerangeKind, - }); - - const isQueryLoading = useMemo( - () => - queryLoadingState === DataLoadingState.loading || - queryLoadingState === DataLoadingState.loadingMore, - [queryLoadingState] - ); - - const handleOnPanelClosed = useCallback(() => { - onEventClosed({ tabType: TimelineTabs.eql, id: timelineId }); - }, [onEventClosed, timelineId]); - - useEffect(() => { - dispatch( - timelineActions.updateIsLoading({ - id: timelineId, - isLoading: isQueryLoading || loadingSourcerer, - }) - ); - }, [loadingSourcerer, timelineId, isQueryLoading, dispatch]); - - const leadingControlColumns = useMemo( - () => - getDefaultControlColumn(ACTION_BUTTON_COUNT).map((x) => ({ - ...x, - headerCellRender: HeaderActions, - })), - [ACTION_BUTTON_COUNT] - ); - - return ( - <> - - {totalCount >= 0 ? {totalCount} : null} - - - - - - - {timelineFullScreen && setTimelineFullScreen != null && ( - - )} - - {activeTab === TimelineTabs.eql && ( - - )} - - - - - - - - - - - - - - - - - - - - {!isBlankTimeline && ( -
+ "
basename: /app/app1 html: App 1
" @@ -131,7 +131,7 @@ describe('AppRouter', () => { expect(app1Unmount).toHaveBeenCalled(); expect(app2.mounter.mount).toHaveBeenCalled(); expect(dom?.html()).toMatchInlineSnapshot(` - "
+ "
basename: /app/app2 html:
App 2
" @@ -145,7 +145,7 @@ describe('AppRouter', () => { expect(standardApp.mounter.mount).toHaveBeenCalled(); expect(dom?.html()).toMatchInlineSnapshot(` - "
+ "
basename: /app/app1 html: App 1
" @@ -157,7 +157,7 @@ describe('AppRouter', () => { expect(standardAppUnmount).toHaveBeenCalled(); expect(chromelessApp.mounter.mount).toHaveBeenCalled(); expect(dom?.html()).toMatchInlineSnapshot(` - "
+ "
basename: /chromeless-a/path html:
Chromeless A
" @@ -169,7 +169,7 @@ describe('AppRouter', () => { expect(chromelessAppUnmount).toHaveBeenCalled(); expect(standardApp.mounter.mount).toHaveBeenCalledTimes(2); expect(dom?.html()).toMatchInlineSnapshot(` - "
+ "
basename: /app/app1 html: App 1
" @@ -183,7 +183,7 @@ describe('AppRouter', () => { expect(chromelessAppA.mounter.mount).toHaveBeenCalled(); expect(dom?.html()).toMatchInlineSnapshot(` - "
+ "
basename: /chromeless-a/path html:
Chromeless A
" @@ -195,7 +195,7 @@ describe('AppRouter', () => { expect(chromelessAppAUnmount).toHaveBeenCalled(); expect(chromelessAppB.mounter.mount).toHaveBeenCalled(); expect(dom?.html()).toMatchInlineSnapshot(` - "
+ "
basename: /chromeless-b/path html:
Chromeless B
" @@ -207,7 +207,7 @@ describe('AppRouter', () => { expect(chromelessAppBUnmount).toHaveBeenCalled(); expect(chromelessAppA.mounter.mount).toHaveBeenCalledTimes(2); expect(dom?.html()).toMatchInlineSnapshot(` - "
+ "
basename: /chromeless-a/path html:
Chromeless A
" diff --git a/packages/core/apps/core-apps-server-internal/src/bundle_routes/dynamic_asset_response.test.ts b/packages/core/apps/core-apps-server-internal/src/bundle_routes/dynamic_asset_response.test.ts new file mode 100644 index 0000000000000..dbf4b806be42c --- /dev/null +++ b/packages/core/apps/core-apps-server-internal/src/bundle_routes/dynamic_asset_response.test.ts @@ -0,0 +1,87 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 mockFs from 'mock-fs'; +import { kibanaResponseFactory } from '@kbn/core-http-router-server-internal'; +import { createDynamicAssetHandler } from './dynamic_asset_response'; + +function getHandler(args?: Partial[0]>) { + return createDynamicAssetHandler({ + bundlesPath: '/test', + publicPath: '/public', + fileHashCache: { + get: jest.fn(), + set: jest.fn(), + del: jest.fn(), + }, + isDist: true, + ...args, + }); +} + +afterEach(() => { + mockFs.restore(); +}); +it('returns 403 if the path requested does not match bundle path', async () => { + const handler = getHandler(); + const result = await handler( + {} as any, + { params: { path: '/non-existent/abc.js' }, headers: { 'accept-encoding': '*' } } as any, + kibanaResponseFactory + ); + expect(result.status).toBe(403); +}); + +it('returns 404 if the file does not exist', async () => { + const handler = getHandler(); + mockFs({}); // no files + const filePath = '/test/abc.js'; + const result = await handler( + {} as any, + { params: { path: filePath }, headers: { 'accept-encoding': '*' } } as any, + kibanaResponseFactory + ); + expect(result.status).toBe(404); +}); + +describe('headers', () => { + it('returns the expected headers', async () => { + const handler = getHandler(); + const filePath = '/test/abc.js'; + mockFs({ + [filePath]: Buffer.from('test'), + }); + const result = await handler( + {} as any, + { params: { path: filePath }, headers: { 'accept-encoding': 'br' } } as any, + kibanaResponseFactory + ); + expect(result.options.headers).toEqual({ + 'cache-control': 'public, max-age=31536000, immutable', + 'content-type': 'application/javascript; charset=utf-8', + }); + }); + + it('returns the expected headers when not in dist mode', async () => { + const handler = getHandler({ isDist: false }); + const filePath = '/test/abc.js'; + mockFs({ + [filePath]: Buffer.from('test'), + }); + const result = await handler( + {} as any, + { params: { path: filePath }, headers: { 'accept-encoding': '*' } } as any, + kibanaResponseFactory + ); + expect(result.options.headers).toEqual({ + 'cache-control': 'must-revalidate', + 'content-type': 'application/javascript; charset=utf-8', + etag: expect.stringMatching(/^[a-f0-9]{40}-\/public/i), + }); + }); +}); diff --git a/packages/core/apps/core-apps-server-internal/src/bundle_routes/dynamic_asset_response.ts b/packages/core/apps/core-apps-server-internal/src/bundle_routes/dynamic_asset_response.ts index 219beced6ca65..b79e4d27e1b86 100644 --- a/packages/core/apps/core-apps-server-internal/src/bundle_routes/dynamic_asset_response.ts +++ b/packages/core/apps/core-apps-server-internal/src/bundle_routes/dynamic_asset_response.ts @@ -75,7 +75,9 @@ export const createDynamicAssetHandler = ({ let headers: Record; if (isDist) { - headers = { 'cache-control': `max-age=${365 * DAY}` }; + headers = { + 'cache-control': `public, max-age=${365 * DAY}, immutable`, + }; } else { const stat = await fstat(fd); const hash = await getFileHash(fileHashCache, path, stat, fd); diff --git a/packages/core/apps/core-apps-server-internal/tsconfig.json b/packages/core/apps/core-apps-server-internal/tsconfig.json index fc8aa9f25349c..35698e91f6ddb 100644 --- a/packages/core/apps/core-apps-server-internal/tsconfig.json +++ b/packages/core/apps/core-apps-server-internal/tsconfig.json @@ -33,6 +33,7 @@ "@kbn/core-ui-settings-server", "@kbn/monaco", "@kbn/core-http-server-internal", + "@kbn/core-http-router-server-internal", ], "exclude": [ "target/**/*", diff --git a/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx b/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx index 664230d749d0b..1d48fdbb24dc0 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx +++ b/packages/core/chrome/core-chrome-browser-internal/src/chrome_service.tsx @@ -245,7 +245,6 @@ export class ChromeService { http, chromeBreadcrumbs$: breadcrumbs$, logger: this.logger, - setChromeStyle, }); const recentlyAccessed = await this.recentlyAccessed.start({ http }); const docTitle = this.docTitle.start(); diff --git a/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.test.ts b/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.test.ts index 52e22f7aef03a..508e72c5b86b4 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.test.ts +++ b/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.test.ts @@ -60,11 +60,9 @@ const logger = loggerMock.create(); const setup = ({ locationPathName = '/', navLinkIds, - setChromeStyle = jest.fn(), }: { locationPathName?: string; navLinkIds?: Readonly; - setChromeStyle?: () => void; } = {}) => { const history = createMemoryHistory({ initialEntries: [locationPathName], @@ -87,7 +85,6 @@ const setup = ({ http: httpServiceMock.createStartContract(), chromeBreadcrumbs$, logger, - setChromeStyle, }); return { projectNavigation, history, chromeBreadcrumbs$, navLinksService, application }; @@ -1018,22 +1015,6 @@ describe('solution navigations', () => { ); }); - it('should set the Chrome style when the active solution navigation changes', async () => { - const setChromeStyle = jest.fn(); - const { projectNavigation } = setup({ setChromeStyle }); - - expect(setChromeStyle).not.toHaveBeenCalled(); - - projectNavigation.updateSolutionNavigations({ 1: solution1, 2: solution2 }); - expect(setChromeStyle).not.toHaveBeenCalled(); - - projectNavigation.changeActiveSolutionNavigation('2'); - expect(setChromeStyle).toHaveBeenCalledWith('project'); // We have an active solution nav, we should switch to project style - - projectNavigation.changeActiveSolutionNavigation(null); - expect(setChromeStyle).toHaveBeenCalledWith('classic'); // No active solution, we should switch back to classic Kibana - }); - it('should change the active solution if no node match the current Location', async () => { const { projectNavigation, navLinksService } = setup({ locationPathName: '/app/app3', // we are on app3 which only exists in solution3 diff --git a/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.ts b/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.ts index 63675ea742aaf..59becdebeb406 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.ts +++ b/packages/core/chrome/core-chrome-browser-internal/src/project_navigation/project_navigation_service.ts @@ -16,7 +16,6 @@ import type { ChromeProjectNavigationNode, NavigationTreeDefinition, SolutionNavigationDefinitions, - ChromeStyle, CloudLinks, } from '@kbn/core-chrome-browser'; import type { InternalHttpStart } from '@kbn/core-http-browser-internal'; @@ -57,7 +56,6 @@ interface StartDeps { http: InternalHttpStart; chromeBreadcrumbs$: Observable; logger: Logger; - setChromeStyle: (style: ChromeStyle) => void; } export class ProjectNavigationService { @@ -91,23 +89,14 @@ export class ProjectNavigationService { private http?: InternalHttpStart; private navigationChangeSubscription?: Subscription; private unlistenHistory?: () => void; - private setChromeStyle: StartDeps['setChromeStyle'] = () => {}; - - public start({ - application, - navLinksService, - http, - chromeBreadcrumbs$, - logger, - setChromeStyle, - }: StartDeps) { + + public start({ application, navLinksService, http, chromeBreadcrumbs$, logger }: StartDeps) { this.application = application; this.navLinksService = navLinksService; this.http = http; this.logger = logger; this.onHistoryLocationChange(application.history.location); this.unlistenHistory = application.history.listen(this.onHistoryLocationChange.bind(this)); - this.setChromeStyle = setChromeStyle; this.handleActiveNodesChange(); this.handleEmptyActiveNodes(); @@ -418,7 +407,6 @@ export class ProjectNavigationService { // When we **do** have definitions, then passing `null` does mean we should change to "classic". if (Object.keys(definitions).length > 0) { if (id === null) { - this.setChromeStyle('classic'); this.navigationTree$.next(undefined); this.activeSolutionNavDefinitionId$.next(null); } else { @@ -427,8 +415,6 @@ export class ProjectNavigationService { throw new Error(`Solution navigation definition with id "${id}" does not exist.`); } - this.setChromeStyle('project'); - const { sideNavComponent } = definition; if (sideNavComponent) { this.setSideNavComponent(sideNavComponent); diff --git a/packages/core/chrome/core-chrome-browser-internal/src/ui/header/__snapshots__/collapsible_nav.test.tsx.snap b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/__snapshots__/collapsible_nav.test.tsx.snap index f505901f37abb..8baa13b7dc53f 100644 --- a/packages/core/chrome/core-chrome-browser-internal/src/ui/header/__snapshots__/collapsible_nav.test.tsx.snap +++ b/packages/core/chrome/core-chrome-browser-internal/src/ui/header/__snapshots__/collapsible_nav.test.tsx.snap @@ -59,7 +59,7 @@ Array [


,


- list_id + + list_id +
@@ -101,7 +105,11 @@ Object { - list_id + + list_id +
diff --git a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/entry_content.helper.tsx b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/entry_content.helper.tsx index e8d02dace3a81..260b361582ae3 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/entry_content.helper.tsx +++ b/packages/kbn-securitysolution-exception-list-components/src/exception_item_card/conditions/entry_content/entry_content.helper.tsx @@ -7,21 +7,29 @@ */ import React from 'react'; +import { css } from '@emotion/css'; import { EuiExpression, EuiBadge } from '@elastic/eui'; import type { ListOperatorTypeEnum } from '@kbn/securitysolution-io-ts-list-types'; import { ValueWithSpaceWarning } from '../../../..'; import { OPERATOR_TYPE_LABELS_EXCLUDED, OPERATOR_TYPE_LABELS_INCLUDED } from '../conditions.config'; import type { Entry } from '../types'; +const entryValueWrapStyle = css` + white-space: pre-wrap; +`; + +const EntryValueWrap = ({ children }: { children: React.ReactNode }) => ( + {children} +); const getEntryValue = (type: string, value?: string | string[]) => { if (type === 'match_any' && Array.isArray(value)) { return value.map((currentValue, index) => ( - {currentValue} + {currentValue} )); } - return value ?? ''; + return {value} ?? ''; }; export const getEntryOperator = (type: ListOperatorTypeEnum, operator: string) => { diff --git a/packages/kbn-securitysolution-exception-list-components/src/list_header/__snapshots__/list_header.test.tsx.snap b/packages/kbn-securitysolution-exception-list-components/src/list_header/__snapshots__/list_header.test.tsx.snap index 121d3eb791ed8..bdbbc9db0d9a5 100644 --- a/packages/kbn-securitysolution-exception-list-components/src/list_header/__snapshots__/list_header.test.tsx.snap +++ b/packages/kbn-securitysolution-exception-list-components/src/list_header/__snapshots__/list_header.test.tsx.snap @@ -26,7 +26,7 @@ Object { > () => { +export const getSelectedButtonInGroup = (testId: string) => () => { const buttonGroup = screen.getByTestId(testId); return within(buttonGroup).getByRole('button', { pressed: true }); }; diff --git a/packages/kbn-test-subj-selector/test_subj_selector.test.ts b/packages/kbn-test-subj-selector/test_subj_selector.test.ts index d8ad1e6ddfd56..e54cb516ba89a 100644 --- a/packages/kbn-test-subj-selector/test_subj_selector.test.ts +++ b/packages/kbn-test-subj-selector/test_subj_selector.test.ts @@ -13,6 +13,10 @@ describe('testSubjSelector()', function () { expect(subj('foo bar')).toEqual('[data-test-subj="foo bar"]'); expect(subj('foo > bar')).toEqual('[data-test-subj="foo"] [data-test-subj="bar"]'); expect(subj('foo > bar baz')).toEqual('[data-test-subj="foo"] [data-test-subj="bar baz"]'); + expect(subj('*foo')).toEqual('[data-test-subj*="foo"]'); + expect(subj('foo*')).toEqual('[data-test-subj="foo*"]'); + expect(subj('foo*bar')).toEqual('[data-test-subj="foo*bar"]'); + expect(subj('*foo >* bar')).toEqual('[data-test-subj*="foo"] [data-test-subj*="bar"]'); expect(subj('foo> ~bar')).toEqual('[data-test-subj="foo"] [data-test-subj~="bar"]'); expect(subj('~ foo')).toEqual('[data-test-subj~="foo"]'); expect(subj('~foo & ~ bar')).toEqual('[data-test-subj~="foo"][data-test-subj~="bar"]'); diff --git a/packages/kbn-test-subj-selector/test_subj_selector.ts b/packages/kbn-test-subj-selector/test_subj_selector.ts index e6db49755a89b..ca6bf569db68e 100644 --- a/packages/kbn-test-subj-selector/test_subj_selector.ts +++ b/packages/kbn-test-subj-selector/test_subj_selector.ts @@ -8,6 +8,7 @@ function selectorToTerms(selector: string) { return selector + .replace(/\s*\*\s*/g, '*') // css locator with '*' operator cannot contain spaces .replace(/\s*~\s*/g, '~') // css locator with '~' operator cannot contain spaces .replace(/\s*>\s*/g, '>') // remove all whitespace around joins > .replace(/\s*&\s*/g, '&') // remove all whitespace around joins & @@ -16,9 +17,13 @@ function selectorToTerms(selector: string) { function termToCssSelector(term: string) { if (term) { - return term.startsWith('~') - ? '[data-test-subj~="' + term.substring(1).replace(/\s/g, '') + '"]' - : '[data-test-subj="' + term + '"]'; + if (term.startsWith('~')) { + return '[data-test-subj~="' + term.substring(1).replace(/\s/g, '') + '"]'; + } else if (term.startsWith('*')) { + return '[data-test-subj*="' + term.substring(1).replace(/\s/g, '') + '"]'; + } else { + return '[data-test-subj="' + term + '"]'; + } } else { return ''; } @@ -31,17 +36,28 @@ function termToCssSelector(term: string) { * * - `data-test-subj` values can include spaces * - * - prefixing a value with `~` will allow matching a single word in a `data-test-subj` that uses several space delimited list words + * - prefixing a value with `*` will allow matching a `data-test-subj` attribute containing at least one occurrence of value within the string. + * - example: `*foo` + * - css equivalent: `[data-test-subj*="foo"]` + * - DOM match example:
data-test-subj="bar-foo"
+ * + * - prefixing a value with `~` will allow matching a `data-test-subj` attribute represented as a whitespace-separated list of words, one of which is exactly value * - example: `~foo` * - css equivalent: `[data-test-subj~="foo"]` + * - DOM match example:
data-test-subj="foo bar"
* * - the `>` character is used between two values to indicate that the value on the right must match an element inside an element matched by the value on the left * - example: `foo > bar` * - css equivalent: `[data-test-subj=foo] [data-test-subj=bar]` + * - DOM match example: + *
data-test-subj="foo" + *
data-test-subj="bar"
+ *
* * - the `&` character is used between two values to indicate that the value on both sides must both match the element * - example: `foo & bar` * - css equivalent: `[data-test-subj=foo][data-test-subj=bar]` + * - DOM match example:
data-test-subj="foo bar"
*/ export function subj(selector: string) { return selectorToTerms(selector) diff --git a/packages/kbn-text-based-editor/src/text_based_languages_editor.tsx b/packages/kbn-text-based-editor/src/text_based_languages_editor.tsx index 5c83b1bffb540..4c4440fe70029 100644 --- a/packages/kbn-text-based-editor/src/text_based_languages_editor.tsx +++ b/packages/kbn-text-based-editor/src/text_based_languages_editor.tsx @@ -22,7 +22,7 @@ import { getAggregateQueryMode, getLanguageDisplayName } from '@kbn/es-query'; import type { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public'; import type { ExpressionsStart } from '@kbn/expressions-plugin/public'; import type { CoreStart } from '@kbn/core/public'; -import type { IndexManagementPluginSetup } from '@kbn/index-management-plugin/public'; +import type { IndexManagementPluginSetup } from '@kbn/index-management'; import { TooltipWrapper } from '@kbn/visualization-utils'; import { type LanguageDocumentationSections, diff --git a/packages/kbn-text-based-editor/tsconfig.json b/packages/kbn-text-based-editor/tsconfig.json index ffd9ff79b6aad..78cee94bd68c8 100644 --- a/packages/kbn-text-based-editor/tsconfig.json +++ b/packages/kbn-text-based-editor/tsconfig.json @@ -23,7 +23,7 @@ "@kbn/data-plugin", "@kbn/expressions-plugin", "@kbn/data-views-plugin", - "@kbn/index-management-plugin", + "@kbn/index-management", "@kbn/visualization-utils", "@kbn/code-editor", "@kbn/shared-ux-markdown", diff --git a/packages/kbn-unified-data-table/index.ts b/packages/kbn-unified-data-table/index.ts index f59b98cda99d9..26095d948cb8a 100644 --- a/packages/kbn-unified-data-table/index.ts +++ b/packages/kbn-unified-data-table/index.ts @@ -7,11 +7,7 @@ */ export { UnifiedDataTable, DataLoadingState } from './src/components/data_table'; -export type { - UnifiedDataTableProps, - UnifiedDataTableRenderCustomToolbar, - UnifiedDataTableRenderCustomToolbarProps, -} from './src/components/data_table'; +export type { UnifiedDataTableProps } from './src/components/data_table'; export { RowHeightSettings, type RowHeightSettingsProps, @@ -31,3 +27,12 @@ export { popularizeField } from './src/utils/popularize_field'; export { useColumns } from './src/hooks/use_data_grid_columns'; export { OPEN_DETAILS, SELECT_ROW } from './src/components/data_table_columns'; export { DataTableRowControl } from './src/components/data_table_row_control'; + +export type { + UnifiedDataTableRenderCustomToolbar, + UnifiedDataTableRenderCustomToolbarProps, +} from './src/components/custom_toolbar/render_custom_toolbar'; +export { + getRenderCustomToolbarWithElements, + renderCustomToolbar, +} from './src/components/custom_toolbar/render_custom_toolbar'; diff --git a/packages/kbn-unified-data-table/src/components/compare_documents/compare_documents.test.tsx b/packages/kbn-unified-data-table/src/components/compare_documents/compare_documents.test.tsx new file mode 100644 index 0000000000000..5bf4c631cf5cf --- /dev/null +++ b/packages/kbn-unified-data-table/src/components/compare_documents/compare_documents.test.tsx @@ -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 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 { EuiDataGridProps } from '@elastic/eui'; +import { buildDataTableRecord } from '@kbn/discover-utils'; +import { generateEsHits } from '@kbn/discover-utils/src/__mocks__'; +import { render } from '@testing-library/react'; +import { omit } from 'lodash'; +import React from 'react'; +import { dataViewWithTimefieldMock } from '../../../__mocks__/data_view_with_timefield'; +import CompareDocuments, { CompareDocumentsProps } from './compare_documents'; +import { useComparisonFields } from './hooks/use_comparison_fields'; + +let mockLocalStorage: Record = {}; + +jest.mock('react-use/lib/useLocalStorage', () => + jest.fn((key: string, value: unknown) => { + mockLocalStorage[key] = JSON.stringify(value); + return [value, jest.fn()]; + }) +); + +let mockDataGridProps: EuiDataGridProps | undefined; + +jest.mock('@elastic/eui', () => ({ + ...jest.requireActual('@elastic/eui'), + EuiDataGrid: jest.fn((props) => { + mockDataGridProps = props; + return <>; + }), +})); + +jest.mock('./hooks/use_comparison_fields', () => { + const originalModule = jest.requireActual('./hooks/use_comparison_fields'); + return { + ...originalModule, + useComparisonFields: jest.fn(originalModule.useComparisonFields), + }; +}); + +const docs = generateEsHits(dataViewWithTimefieldMock, 5).map((hit) => + buildDataTableRecord(hit, dataViewWithTimefieldMock) +); + +const getDocById = (id: string) => docs.find((doc) => doc.raw._id === id); + +const renderCompareDocuments = ({ + forceShowAllFields = false, +}: { forceShowAllFields?: boolean } = {}) => { + const setSelectedDocs = jest.fn(); + const getCompareDocuments = (props?: Partial) => ( + + ); + const { rerender } = render(getCompareDocuments()); + return { + setSelectedDocs, + rerender: (props?: Partial) => rerender(getCompareDocuments(props)), + }; +}; + +describe('CompareDocuments', () => { + beforeEach(() => { + mockLocalStorage = {}; + mockDataGridProps = undefined; + }); + + it('should pass expected grid props', () => { + renderCompareDocuments(); + expect(mockDataGridProps).toBeDefined(); + expect(mockDataGridProps?.columns).toBeDefined(); + expect(mockDataGridProps?.css).toBeDefined(); + expect(omit(mockDataGridProps, 'columns', 'css')).toMatchInlineSnapshot(` + Object { + "aria-describedby": "test", + "aria-labelledby": "test", + "columnVisibility": Object { + "setVisibleColumns": [Function], + "visibleColumns": Array [ + "fields_generated-id", + "0", + "1", + "2", + ], + }, + "data-test-subj": "unifiedDataTableCompareDocuments", + "gridStyle": Object { + "border": "horizontal", + "cellPadding": "l", + "fontSize": "s", + "header": "underline", + "rowHover": "highlight", + "stripes": undefined, + }, + "id": "test", + "inMemory": Object { + "level": "sorting", + }, + "renderCellValue": [Function], + "renderCustomToolbar": [Function], + "rowCount": 3, + "rowHeightsOptions": Object { + "defaultHeight": "auto", + }, + "schemaDetectors": Array [], + "toolbarVisibility": Object { + "showColumnSelector": false, + "showDisplaySelector": false, + "showFullScreenSelector": true, + }, + } + `); + }); + + it('should get values from local storage', () => { + renderCompareDocuments(); + expect(mockLocalStorage).toEqual({ + 'test:dataGridComparisonDiffMode': '"basic"', + 'test:dataGridComparisonShowAllFields': 'false', + 'test:dataGridComparisonShowDiff': 'true', + 'test:dataGridComparisonShowDiffDecorations': 'true', + 'test:dataGridComparisonShowMatchingValues': 'true', + }); + }); + + it('should set selected docs when columns change', () => { + const { setSelectedDocs } = renderCompareDocuments(); + const visibleColumns = ['fields_generated-id', '0', '1', '2']; + mockDataGridProps?.columnVisibility.setVisibleColumns(visibleColumns); + expect(setSelectedDocs).toHaveBeenCalledWith(visibleColumns.slice(1)); + }); + + it('should force show all fields when prop is true', () => { + renderCompareDocuments(); + expect(useComparisonFields).toHaveBeenLastCalledWith( + expect.objectContaining({ showAllFields: false }) + ); + renderCompareDocuments({ forceShowAllFields: true }); + expect(useComparisonFields).toHaveBeenLastCalledWith( + expect.objectContaining({ showAllFields: true }) + ); + }); + + it('should retain comparison docs when getDocById loses access to them', () => { + const { rerender } = renderCompareDocuments(); + const visibleColumns = ['fields_generated-id', '0', '1', '2']; + expect(mockDataGridProps?.columnVisibility.visibleColumns).toEqual(visibleColumns); + rerender({ getDocById: () => undefined }); + expect(mockDataGridProps?.columnVisibility.visibleColumns).toEqual(visibleColumns); + }); +}); diff --git a/packages/kbn-unified-data-table/src/components/compare_documents/compare_documents.tsx b/packages/kbn-unified-data-table/src/components/compare_documents/compare_documents.tsx new file mode 100644 index 0000000000000..b6f22b6760362 --- /dev/null +++ b/packages/kbn-unified-data-table/src/components/compare_documents/compare_documents.tsx @@ -0,0 +1,215 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 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 { + EuiDataGrid, + EuiDataGridColumnVisibility, + EuiDataGridInMemory, + EuiDataGridProps, + EuiDataGridRowHeightsOptions, + EuiDataGridSchemaDetector, + EuiDataGridStyle, + EuiDataGridToolBarVisibilityOptions, + useGeneratedHtmlId, +} from '@elastic/eui'; +import type { DataView } from '@kbn/data-views-plugin/common'; +import type { DataTableRecord } from '@kbn/discover-utils/types'; +import type { FieldFormatsStart } from '@kbn/field-formats-plugin/public'; +import { memoize } from 'lodash'; +import React, { useMemo, useState } from 'react'; +import useLocalStorage from 'react-use/lib/useLocalStorage'; +import { GRID_STYLE } from '../../constants'; +import { ComparisonControls } from './comparison_controls'; +import { renderComparisonToolbar } from './comparison_toolbar'; +import { useComparisonCellValue } from './hooks/use_comparison_cell_value'; +import { useComparisonColumns } from './hooks/use_comparison_columns'; +import { useComparisonCss } from './hooks/use_comparison_css'; +import { useComparisonFields } from './hooks/use_comparison_fields'; +import type { DocumentDiffMode } from './types'; + +export interface CompareDocumentsProps { + id: string; + wrapper: HTMLElement | null; + consumer: string; + ariaDescribedBy: string; + ariaLabelledBy: string; + dataView: DataView; + isPlainRecord: boolean; + selectedFieldNames: string[]; + selectedDocs: string[]; + schemaDetectors: EuiDataGridSchemaDetector[]; + forceShowAllFields: boolean; + showFullScreenButton?: boolean; + fieldFormats: FieldFormatsStart; + getDocById: (id: string) => DataTableRecord | undefined; + setSelectedDocs: (selectedDocs: string[]) => void; + setIsCompareActive: (isCompareActive: boolean) => void; +} + +const COMPARISON_ROW_HEIGHT: EuiDataGridRowHeightsOptions = { defaultHeight: 'auto' }; +const COMPARISON_IN_MEMORY: EuiDataGridInMemory = { level: 'sorting' }; +const COMPARISON_GRID_STYLE: EuiDataGridStyle = { ...GRID_STYLE, stripes: undefined }; + +const getStorageKey = (consumer: string, key: string) => `${consumer}:dataGridComparison${key}`; + +const CompareDocuments = ({ + id, + wrapper, + consumer, + ariaDescribedBy, + ariaLabelledBy, + dataView, + isPlainRecord, + selectedFieldNames, + selectedDocs, + schemaDetectors, + forceShowAllFields, + showFullScreenButton, + fieldFormats, + getDocById, + setSelectedDocs, + setIsCompareActive, +}: CompareDocumentsProps) => { + // Memoize getDocById to ensure we don't lose access to the comparison docs if, for example, + // a time range change or auto refresh causes the previous docs to no longer be available + const [memoizedGetDocById] = useState(() => memoize(getDocById)); + const [showDiff, setShowDiff] = useLocalStorage(getStorageKey(consumer, 'ShowDiff'), true); + const [diffMode, setDiffMode] = useLocalStorage( + getStorageKey(consumer, 'DiffMode'), + 'basic' + ); + const [showDiffDecorations, setShowDiffDecorations] = useLocalStorage( + getStorageKey(consumer, 'ShowDiffDecorations'), + true + ); + const [showAllFields, setShowAllFields] = useLocalStorage( + getStorageKey(consumer, 'ShowAllFields'), + false + ); + const [showMatchingValues, setShowMatchingValues] = useLocalStorage( + getStorageKey(consumer, 'ShowMatchingValues'), + true + ); + + const fieldColumnId = useGeneratedHtmlId({ prefix: 'fields' }); + const { comparisonFields, totalFields } = useComparisonFields({ + dataView, + selectedFieldNames, + selectedDocs, + showAllFields: Boolean(forceShowAllFields || showAllFields), + showMatchingValues: Boolean(showMatchingValues), + getDocById: memoizedGetDocById, + }); + const comparisonColumns = useComparisonColumns({ + wrapper, + isPlainRecord, + fieldColumnId, + selectedDocs, + getDocById: memoizedGetDocById, + setSelectedDocs, + }); + const comparisonColumnVisibility = useMemo( + () => ({ + visibleColumns: comparisonColumns.map(({ id: columnId }) => columnId), + setVisibleColumns: (visibleColumns) => { + const [_fieldColumnId, ...newSelectedDocs] = visibleColumns; + setSelectedDocs(newSelectedDocs); + }, + }), + [comparisonColumns, setSelectedDocs] + ); + const additionalControls = useMemo( + () => ( + + ), + [ + diffMode, + forceShowAllFields, + isPlainRecord, + selectedDocs, + setDiffMode, + setIsCompareActive, + setShowAllFields, + setShowDiff, + setShowDiffDecorations, + setShowMatchingValues, + showAllFields, + showDiff, + showDiffDecorations, + showMatchingValues, + ] + ); + const comparisonToolbarVisibility = useMemo( + () => ({ + showColumnSelector: false, + showDisplaySelector: false, + showFullScreenSelector: showFullScreenButton, + }), + [showFullScreenButton] + ); + const renderCustomToolbarFn = useMemo( + () => + renderComparisonToolbar({ + additionalControls, + comparisonFields, + totalFields, + }), + [additionalControls, comparisonFields, totalFields] + ); + const renderCellValue = useComparisonCellValue({ + dataView, + comparisonFields, + fieldColumnId, + selectedDocs, + diffMode: showDiff ? diffMode : undefined, + fieldFormats, + getDocById: memoizedGetDocById, + }); + const comparisonCss = useComparisonCss({ + diffMode: showDiff ? diffMode : undefined, + showDiffDecorations, + }); + + return ( + + ); +}; + +// eslint-disable-next-line import/no-default-export +export default CompareDocuments; diff --git a/packages/kbn-unified-data-table/src/components/compare_documents/comparison_controls.test.tsx b/packages/kbn-unified-data-table/src/components/compare_documents/comparison_controls.test.tsx new file mode 100644 index 0000000000000..f95c547fac0ac --- /dev/null +++ b/packages/kbn-unified-data-table/src/components/compare_documents/comparison_controls.test.tsx @@ -0,0 +1,196 @@ +/* + * Copyright 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 { render, screen } from '@testing-library/react'; +import userEvent from '@testing-library/user-event'; +import React, { useState } from 'react'; +import { __IntlProvider as IntlProvider } from '@kbn/i18n-react'; +import { ComparisonControls, ComparisonControlsProps } from './comparison_controls'; +import { DocumentDiffMode } from './types'; + +const renderComparisonControls = ({ + isPlainRecord = false, + forceShowAllFields = false, +}: { + isPlainRecord?: ComparisonControlsProps['isPlainRecord']; + forceShowAllFields?: ComparisonControlsProps['forceShowAllFields']; +} = {}) => { + const selectedDocs = ['0', '1', '2']; + const Wrapper = () => { + const [showDiff, setShowDiff] = useState(true); + const [diffMode, setDiffMode] = useState('basic'); + const [showDiffDecorations, setShowDiffDecorations] = useState(true); + const [showMatchingValues, setShowMatchingValues] = useState(true); + const [showAllFields, setShowAllFields] = useState(true); + const [isCompareActive, setIsCompareActive] = useState(true); + return ( + <> + {isCompareActive && Comparison active} + + + + + ); + }; + render(); + const getComparisonSettingsButton = () => + screen.getByRole('button', { name: 'Comparison settings' }); + const getShowDiffSwitch = () => screen.getByTestId('unifiedDataTableShowDiffSwitch'); + const getDiffModeEntry = (mode: DocumentDiffMode) => + screen.getByTestId(`unifiedDataTableDiffMode-${mode}`); + const getShowAllFieldsSwitch = () => + screen.queryByTestId('unifiedDataTableDiffOptionSwitch-showAllFields'); + const getShowMatchingValuesSwitch = () => + screen.getByTestId('unifiedDataTableDiffOptionSwitch-showMatchingValues'); + const getShowDiffDecorationsSwitch = () => + screen.getByTestId('unifiedDataTableDiffOptionSwitch-showDiffDecorations'); + return { + getComparisonCountDisplay: () => + screen.getByText( + `Comparing ${selectedDocs.length} ${isPlainRecord ? 'results' : 'documents'}` + ), + getComparisonSettingsButton, + clickComparisonSettingsButton: () => userEvent.click(getComparisonSettingsButton()), + getShowDiffSwitch, + clickShowDiffSwitch: () => + userEvent.click(getShowDiffSwitch(), undefined, { + skipPointerEventsCheck: true, + }), + clickDiffModeFullValueButton: () => + userEvent.click(screen.getByRole('button', { name: 'Full value' }), undefined, { + skipPointerEventsCheck: true, + }), + clickDiffModeByCharacterButton: () => + userEvent.click(screen.getByRole('button', { name: 'By character' }), undefined, { + skipPointerEventsCheck: true, + }), + clickDiffModeByWordButton: () => + userEvent.click(screen.getByRole('button', { name: 'By word' }), undefined, { + skipPointerEventsCheck: true, + }), + clickDiffModeByLineButton: () => + userEvent.click(screen.getByRole('button', { name: 'By line' }), undefined, { + skipPointerEventsCheck: true, + }), + getDiffModeEntry, + diffModeIsSelected: (mode: DocumentDiffMode) => + getDiffModeEntry(mode).getAttribute('aria-current') === 'true', + getShowAllFieldsSwitch, + clickShowAllFieldsSwitch: () => { + const fieldSwitch = getShowAllFieldsSwitch(); + if (fieldSwitch) { + userEvent.click(fieldSwitch, undefined, { + skipPointerEventsCheck: true, + }); + } + }, + getShowMatchingValuesSwitch, + clickShowMatchingValuesSwitch: () => + userEvent.click(getShowMatchingValuesSwitch(), undefined, { + skipPointerEventsCheck: true, + }), + getShowDiffDecorationsSwitch, + clickShowDiffDecorationsSwitch: () => + userEvent.click(getShowDiffDecorationsSwitch(), undefined, { + skipPointerEventsCheck: true, + }), + getExitComparisonButton: () => screen.getByRole('button', { name: 'Exit comparison mode' }), + isCompareActive: () => screen.queryByText('Comparison active') !== null, + }; +}; + +describe('ComparisonControls', () => { + it('should render', () => { + const result = renderComparisonControls(); + expect(result.getComparisonCountDisplay()).toBeInTheDocument(); + expect(result.getComparisonSettingsButton()).toBeInTheDocument(); + expect(result.getExitComparisonButton()).toBeInTheDocument(); + }); + + it('should render with isPlainRecord = true', () => { + const result = renderComparisonControls({ isPlainRecord: true }); + expect(result.getComparisonCountDisplay()).toBeInTheDocument(); + expect(result.getComparisonSettingsButton()).toBeInTheDocument(); + expect(result.getExitComparisonButton()).toBeInTheDocument(); + }); + + it('should allow toggling show diff switch', () => { + const result = renderComparisonControls(); + result.clickComparisonSettingsButton(); + expect(result.getShowDiffSwitch()).toBeChecked(); + expect(result.getDiffModeEntry('basic')).toBeEnabled(); + expect(result.getDiffModeEntry('chars')).toBeEnabled(); + expect(result.getDiffModeEntry('words')).toBeEnabled(); + expect(result.getDiffModeEntry('lines')).toBeEnabled(); + expect(result.getShowDiffDecorationsSwitch()).toBeEnabled(); + result.clickShowDiffSwitch(); + expect(result.getShowDiffSwitch()).not.toBeChecked(); + expect(result.getDiffModeEntry('basic')).toBeDisabled(); + expect(result.getDiffModeEntry('chars')).toBeDisabled(); + expect(result.getDiffModeEntry('words')).toBeDisabled(); + expect(result.getDiffModeEntry('lines')).toBeDisabled(); + expect(result.getShowDiffDecorationsSwitch()).toBeDisabled(); + result.clickShowDiffSwitch(); + expect(result.getShowDiffSwitch()).toBeChecked(); + }); + + it('should allow changing diff mode', () => { + const result = renderComparisonControls(); + result.clickComparisonSettingsButton(); + expect(result.diffModeIsSelected('basic')).toBe(true); + result.clickDiffModeByCharacterButton(); + expect(result.diffModeIsSelected('chars')).toBe(true); + result.clickDiffModeByWordButton(); + expect(result.diffModeIsSelected('words')).toBe(true); + result.clickDiffModeByLineButton(); + expect(result.diffModeIsSelected('lines')).toBe(true); + result.clickDiffModeFullValueButton(); + expect(result.diffModeIsSelected('basic')).toBe(true); + }); + + it('should allow toggling options', () => { + const result = renderComparisonControls(); + result.clickComparisonSettingsButton(); + expect(result.getShowAllFieldsSwitch()).toBeChecked(); + expect(result.getShowMatchingValuesSwitch()).toBeChecked(); + expect(result.getShowDiffDecorationsSwitch()).toBeChecked(); + result.clickShowAllFieldsSwitch(); + expect(result.getShowAllFieldsSwitch()).not.toBeChecked(); + result.clickShowMatchingValuesSwitch(); + expect(result.getShowMatchingValuesSwitch()).not.toBeChecked(); + result.clickShowDiffDecorationsSwitch(); + expect(result.getShowDiffDecorationsSwitch()).not.toBeChecked(); + }); + + it('should hide showAllFields switch when forceShowAllFields is true', () => { + const result = renderComparisonControls({ forceShowAllFields: true }); + expect(result.getShowAllFieldsSwitch()).not.toBeInTheDocument(); + }); + + it('should exit comparison mode', () => { + const result = renderComparisonControls(); + expect(result.isCompareActive()).toBe(true); + userEvent.click(result.getExitComparisonButton()); + expect(result.isCompareActive()).toBe(false); + }); +}); diff --git a/packages/kbn-unified-data-table/src/components/compare_documents/comparison_controls.tsx b/packages/kbn-unified-data-table/src/components/compare_documents/comparison_controls.tsx new file mode 100644 index 0000000000000..6787c9e56dd05 --- /dev/null +++ b/packages/kbn-unified-data-table/src/components/compare_documents/comparison_controls.tsx @@ -0,0 +1,442 @@ +/* + * Copyright 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 { + EuiContextMenuItem, + EuiContextMenuItemProps, + EuiContextMenuPanel, + EuiDataGridToolbarControl, + EuiFlexGroup, + EuiFlexItem, + EuiHorizontalRule, + EuiIconTip, + EuiPopover, + EuiSwitch, + EuiSwitchProps, + EuiText, + EuiTitle, + EuiTitleSize, + useEuiTheme, +} from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import React, { FC, ReactNode, useState } from 'react'; +import { FormattedMessage } from '@kbn/i18n-react'; +import type { DocumentDiffMode } from './types'; + +export interface ComparisonControlsProps { + isPlainRecord?: boolean; + selectedDocs: string[]; + showDiff: boolean | undefined; + diffMode: DocumentDiffMode | undefined; + showDiffDecorations: boolean | undefined; + showMatchingValues: boolean | undefined; + showAllFields: boolean | undefined; + forceShowAllFields: boolean; + setIsCompareActive: (isCompareActive: boolean) => void; + setShowDiff: (showDiff: boolean) => void; + setDiffMode: (diffMode: DocumentDiffMode) => void; + setShowDiffDecorations: (showDiffDecorations: boolean) => void; + setShowMatchingValues: (showMatchingValues: boolean) => void; + setShowAllFields: (showAllFields: boolean) => void; +} + +export const ComparisonControls = ({ + isPlainRecord, + selectedDocs, + showDiff, + diffMode, + showDiffDecorations, + showMatchingValues, + showAllFields, + forceShowAllFields, + setIsCompareActive, + setShowDiff, + setDiffMode, + setShowDiffDecorations, + setShowMatchingValues, + setShowAllFields, +}: ComparisonControlsProps) => { + const { euiTheme } = useEuiTheme(); + + return ( + + + + + {isPlainRecord ? ( + + ) : ( + + )} + + + + + + + + + +
+ { + setIsCompareActive(false); + }} + data-test-subj="unifiedDataTableExitDocumentComparison" + > + + +
+
+
+ ); +}; + +const showDiffLabel = i18n.translate('unifiedDataTable.showDiff', { + defaultMessage: 'Show diff', +}); + +const ComparisonSettings = ({ + showDiff, + diffMode, + showDiffDecorations, + showMatchingValues, + showAllFields, + forceShowAllFields, + setShowDiff, + setDiffMode, + setShowDiffDecorations, + setShowMatchingValues, + setShowAllFields, +}: Pick< + ComparisonControlsProps, + | 'showDiff' + | 'diffMode' + | 'showDiffDecorations' + | 'showMatchingValues' + | 'showAllFields' + | 'forceShowAllFields' + | 'setShowDiff' + | 'setDiffMode' + | 'setShowDiffDecorations' + | 'setShowMatchingValues' + | 'setShowAllFields' +>) => { + const [isSettingsMenuOpen, setIsSettingsMenuOpen] = useState(false); + + return ( + + { + setIsSettingsMenuOpen(!isSettingsMenuOpen); + }} + data-test-subj="unifiedDataTableComparisonSettings" + > + + +
+ } + isOpen={isSettingsMenuOpen} + closePopover={() => { + setIsSettingsMenuOpen(false); + }} + panelPaddingSize="none" + anchorPosition="downCenter" + > + + { + setShowDiff(e.target.checked); + }} + data-test-subj="unifiedDataTableShowDiffSwitch" + /> + } + /> + + } + type="subsection" + /> + + + + + + + } + description={ + + } + type="subsection" + noPadding + /> + + + + + + + + + + + + + + + + } + /> + + {!forceShowAllFields && ( + { + setShowAllFields(e.target.checked); + }} + data-test-subj="showAllFields" + itemCss={{ paddingBottom: 0 }} + /> + )} + + { + setShowMatchingValues(e.target.checked); + }} + data-test-subj="showMatchingValues" + itemCss={{ paddingBottom: 0 }} + /> + + { + setShowDiffDecorations(e.target.checked); + }} + /> + + + ); +}; + +const SectionHeader = ({ + title, + description, + type = 'section', + noPadding, + append, +}: { + title: ReactNode; + description?: ReactNode; + type?: 'section' | 'subsection'; + noPadding?: boolean; + append?: ReactNode; +}) => { + const { euiTheme } = useEuiTheme(); + const size: EuiTitleSize = type === 'section' ? 'xxs' : 'xxxs'; + const HeadingTag = type === 'section' ? 'h3' : 'h4'; + + return ( + + + + + + {title} + + + {description && ( + + + + )} + + {append && {append}} + + + ); +}; + +const enableShowDiffTooltip = i18n.translate('unifiedDataTable.enableShowDiff', { + defaultMessage: 'You need to enable Show diff', +}); + +const DiffModeEntry: FC< + Pick & { + entryDiffMode: DocumentDiffMode; + disabled?: boolean; + } +> = ({ children, entryDiffMode, diffMode, disabled, setDiffMode }) => { + const { euiTheme } = useEuiTheme(); + + return ( + { + setDiffMode(entryDiffMode); + }} + data-test-subj={`unifiedDataTableDiffMode-${entryDiffMode}`} + css={{ paddingLeft: `calc(${euiTheme.size.m} + ${euiTheme.size.xxs})` }} + > + {children} + + ); +}; + +const DiffOptionSwitch = ({ + label, + description, + checked, + disabled, + onChange, + ['data-test-subj']: dataTestSubj, + itemCss, +}: Pick & { + description?: string; + disabled?: boolean; + ['data-test-subj']: string; + itemCss?: EuiContextMenuItemProps['css']; +}) => { + return ( + + + + + + {description && ( + + + + )} + + + ); +}; diff --git a/packages/kbn-unified-data-table/src/components/compare_documents/comparison_toolbar.test.tsx b/packages/kbn-unified-data-table/src/components/compare_documents/comparison_toolbar.test.tsx new file mode 100644 index 0000000000000..4709c8daaf29e --- /dev/null +++ b/packages/kbn-unified-data-table/src/components/compare_documents/comparison_toolbar.test.tsx @@ -0,0 +1,77 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { cleanup, render, screen } from '@testing-library/react'; +import React from 'react'; +import { renderComparisonToolbar } from './comparison_toolbar'; + +const renderToolbar = ({ + hasRoomForGridControls = true, + totalFields = 2, +}: { + hasRoomForGridControls?: boolean; + totalFields?: number; +} = {}) => { + const comparisonFields = ['field1', 'field2']; + const ComparisonToolbar = renderComparisonToolbar({ + additionalControls:
additionalControls
, + comparisonFields, + totalFields, + }); + render( + keyboardShortcutsControl
+ } + fullScreenControl={
fullScreenControl
} + columnControl={
columnControl
} + columnSortingControl={
columnSortingControl
} + displayControl={
displayControl
} + /> + ); + return { + getAdditionalControls: () => screen.queryByTestId('additionalControls'), + getKeyboardShortcutsControl: () => screen.queryByTestId('keyboardShortcutsControl'), + getFullScreenControl: () => screen.queryByTestId('fullScreenControl'), + getDisplayControl: () => screen.queryByTestId('displayControl'), + getColumnControl: () => screen.queryByTestId('columnControl'), + getColumnSortingControl: () => screen.queryByTestId('columnSortingControl'), + getComparisonLimitCallout: () => + screen.queryByText( + `Comparison is limited to ${comparisonFields.length} of ${totalFields} fields.` + ), + }; +}; + +describe('renderComparisonToolbar', () => { + it('should render the toolbar', () => { + const result = renderToolbar(); + expect(result.getAdditionalControls()).toBeInTheDocument(); + expect(result.getKeyboardShortcutsControl()).toBeInTheDocument(); + expect(result.getFullScreenControl()).toBeInTheDocument(); + expect(result.getDisplayControl()).toBeInTheDocument(); + expect(result.getColumnControl()).toBeInTheDocument(); + expect(result.getColumnSortingControl()).toBeInTheDocument(); + expect(result.getComparisonLimitCallout()).not.toBeInTheDocument(); + cleanup(); + const result2 = renderToolbar({ hasRoomForGridControls: false }); + expect(result2.getAdditionalControls()).toBeInTheDocument(); + expect(result2.getKeyboardShortcutsControl()).toBeInTheDocument(); + expect(result2.getFullScreenControl()).toBeInTheDocument(); + expect(result2.getDisplayControl()).toBeInTheDocument(); + expect(result2.getColumnControl()).not.toBeInTheDocument(); + expect(result2.getColumnSortingControl()).not.toBeInTheDocument(); + expect(result.getComparisonLimitCallout()).not.toBeInTheDocument(); + }); + + it('should render comparison limited callout when totalFields is greater than comparisonFields', () => { + const result = renderToolbar({ totalFields: 3 }); + expect(result.getComparisonLimitCallout()).toBeInTheDocument(); + }); +}); diff --git a/packages/kbn-unified-data-table/src/components/compare_documents/comparison_toolbar.tsx b/packages/kbn-unified-data-table/src/components/compare_documents/comparison_toolbar.tsx new file mode 100644 index 0000000000000..da6d591d65db0 --- /dev/null +++ b/packages/kbn-unified-data-table/src/components/compare_documents/comparison_toolbar.tsx @@ -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 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 { EuiCallOut, EuiDataGridCustomToolbarProps } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import React, { ReactElement } from 'react'; +import { internalRenderCustomToolbar } from '../custom_toolbar/render_custom_toolbar'; + +export interface ComparisonToolbarProps { + additionalControls: ReactElement; + comparisonFields: string[]; + totalFields: number; +} + +export const renderComparisonToolbar = ({ + additionalControls, + comparisonFields, + totalFields, +}: ComparisonToolbarProps) => { + return (toolbarProps: EuiDataGridCustomToolbarProps) => { + return internalRenderCustomToolbar({ + leftSide: additionalControls, + toolbarProps, + gridProps: {}, + bottomSection: + totalFields > comparisonFields.length ? ( + + ) : undefined, + }); + }; +}; diff --git a/packages/kbn-unified-data-table/src/components/compare_documents/hooks/__snapshots__/use_comparison_cell_value.test.tsx.snap b/packages/kbn-unified-data-table/src/components/compare_documents/hooks/__snapshots__/use_comparison_cell_value.test.tsx.snap new file mode 100644 index 0000000000000..84e37f5f515aa --- /dev/null +++ b/packages/kbn-unified-data-table/src/components/compare_documents/hooks/__snapshots__/use_comparison_cell_value.test.tsx.snap @@ -0,0 +1,449 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`useComparisonCellValue should render cells with diff mode "Chars" 1`] = ` +
+ + This is a message val + +
+`; + +exports[`useComparisonCellValue should render cells with diff mode "Chars" 2`] = ` +
+ + + This + + + one + + + is a + + + different + + + m + + + e + + + s + + + sa + + + g + + + e + + + val + + + ue + + +
+`; + +exports[`useComparisonCellValue should render cells with diff mode "Chars" 3`] = ` +
+ + + This is a message val + + +
+`; + +exports[`useComparisonCellValue should render cells with diff mode "Full value" 1`] = ` +
+ + This is a message val + +
+`; + +exports[`useComparisonCellValue should render cells with diff mode "Full value" 2`] = ` +
+ + This one is a different msg value + +
+`; + +exports[`useComparisonCellValue should render cells with diff mode "Full value" 3`] = ` +
+ + This is a message val + +
+`; + +exports[`useComparisonCellValue should render cells with diff mode "Lines" 1`] = ` +
+ + [ + "gif", + "png" +] + +
+`; + +exports[`useComparisonCellValue should render cells with diff mode "Lines" 2`] = ` +
+ +
+ [ + +
+
+ "gif", + +
+
+ "png", + +
+
+ "jpg" + +
+
+ ] +
+
+
+`; + +exports[`useComparisonCellValue should render cells with diff mode "Lines" 3`] = ` +
+ +
+ [ + "gif", + "png" +] +
+
+
+`; + +exports[`useComparisonCellValue should render cells with diff mode "Words" 1`] = ` +
+ + This is a message val + +
+`; + +exports[`useComparisonCellValue should render cells with diff mode "Words" 2`] = ` +
+ + + This + + + one + + + is a + + + message + + + different + + + + + + val + + + msg value + + +
+`; + +exports[`useComparisonCellValue should render cells with diff mode "Words" 3`] = ` +
+ + + This is a message val + + +
+`; + +exports[`useComparisonCellValue should render cells with no diff mode 1`] = ` +
+ + This is a message val + +
+`; + +exports[`useComparisonCellValue should render cells with no diff mode 2`] = ` +
+ + This one is a different msg value + +
+`; + +exports[`useComparisonCellValue should render cells with no diff mode 3`] = ` +
+ + This is a message val + +
+`; + +exports[`useComparisonCellValue should render exmpty cell if doc is not found 1`] = ` +
+ + - + +
+`; + +exports[`useComparisonCellValue should render field cells 1`] = ` +
+
+
+ + + string + + +
+
+
+ message +
+
+
+
+`; + +exports[`useComparisonCellValue should render field cells 2`] = ` +
+
+
+ + + string + + +
+
+
+ extension +
+
+
+
+`; + +exports[`useComparisonCellValue should render field cells 3`] = ` +
+
+
+ + + number + + +
+
+
+ bytes +
+
+
+
+`; diff --git a/packages/kbn-unified-data-table/src/components/compare_documents/hooks/__snapshots__/use_comparison_css.test.ts.snap b/packages/kbn-unified-data-table/src/components/compare_documents/hooks/__snapshots__/use_comparison_css.test.ts.snap new file mode 100644 index 0000000000000..123b4fe7f23c8 --- /dev/null +++ b/packages/kbn-unified-data-table/src/components/compare_documents/hooks/__snapshots__/use_comparison_css.test.ts.snap @@ -0,0 +1,473 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`useComparisonCss should render with basic diff mode and diff decorations 1`] = ` +Object { + "map": undefined, + "name": "1qc86qa", + "next": undefined, + "styles": " + .unifiedDataTable__cellValue { + white-space: pre-wrap; + } + + .unifiedDataTable__comparisonFieldName { + font-weight: 600; + } + + .unifiedDataTable__comparisonBaseDocCell { + background-color: rgba(211,218,230,0.2); + } + + + .unifiedDataTable__comparisonMatchCell { + .unifiedDataTable__cellValue { + &, + & * { + color: #007871 !important; + } + } + } + + .unifiedDataTable__comparisonDiffCell { + .unifiedDataTable__cellValue { + &, + & * { + color: #bd271e !important; + } + } + } + ; + + .unifiedDataTable__comparisonSegment { + position: relative; + } + + .unifiedDataTable__comparisonAddedSegment { + background-color: #e6f9f7; + color: #007871; + } + + .unifiedDataTable__comparisonRemovedSegment { + background-color: #f8e9e9; + color: #bd271e; + } + + + + + ", + "toString": [Function], +} +`; + +exports[`useComparisonCss should render with basic diff mode and no diff decorations 1`] = ` +Object { + "map": undefined, + "name": "1qc86qa", + "next": undefined, + "styles": " + .unifiedDataTable__cellValue { + white-space: pre-wrap; + } + + .unifiedDataTable__comparisonFieldName { + font-weight: 600; + } + + .unifiedDataTable__comparisonBaseDocCell { + background-color: rgba(211,218,230,0.2); + } + + + .unifiedDataTable__comparisonMatchCell { + .unifiedDataTable__cellValue { + &, + & * { + color: #007871 !important; + } + } + } + + .unifiedDataTable__comparisonDiffCell { + .unifiedDataTable__cellValue { + &, + & * { + color: #bd271e !important; + } + } + } + ; + + .unifiedDataTable__comparisonSegment { + position: relative; + } + + .unifiedDataTable__comparisonAddedSegment { + background-color: #e6f9f7; + color: #007871; + } + + .unifiedDataTable__comparisonRemovedSegment { + background-color: #f8e9e9; + color: #bd271e; + } + + + + + ", + "toString": [Function], +} +`; + +exports[`useComparisonCss should render with chars diff mode and diff decorations 1`] = ` +Object { + "map": undefined, + "name": "vd39me", + "next": undefined, + "styles": " + .unifiedDataTable__cellValue { + white-space: pre-wrap; + } + + .unifiedDataTable__comparisonFieldName { + font-weight: 600; + } + + .unifiedDataTable__comparisonBaseDocCell { + background-color: rgba(211,218,230,0.2); + } + + + + .unifiedDataTable__comparisonSegment { + position: relative; + } + + .unifiedDataTable__comparisonAddedSegment { + background-color: #e6f9f7; + color: #007871; + } + + .unifiedDataTable__comparisonRemovedSegment { + background-color: #f8e9e9; + color: #bd271e; + } + + + .unifiedDataTable__comparisonAddedSegment { + text-decoration: underline; + } + + .unifiedDataTable__comparisonRemovedSegment { + text-decoration: line-through; + } + ; + + + ", + "toString": [Function], +} +`; + +exports[`useComparisonCss should render with chars diff mode and no diff decorations 1`] = ` +Object { + "map": undefined, + "name": "1ylxgdl", + "next": undefined, + "styles": " + .unifiedDataTable__cellValue { + white-space: pre-wrap; + } + + .unifiedDataTable__comparisonFieldName { + font-weight: 600; + } + + .unifiedDataTable__comparisonBaseDocCell { + background-color: rgba(211,218,230,0.2); + } + + + + .unifiedDataTable__comparisonSegment { + position: relative; + } + + .unifiedDataTable__comparisonAddedSegment { + background-color: #e6f9f7; + color: #007871; + } + + .unifiedDataTable__comparisonRemovedSegment { + background-color: #f8e9e9; + color: #bd271e; + } + + + + + ", + "toString": [Function], +} +`; + +exports[`useComparisonCss should render with lines diff mode and diff decorations 1`] = ` +Object { + "map": undefined, + "name": "nlhk3s", + "next": undefined, + "styles": " + .unifiedDataTable__cellValue { + white-space: pre-wrap; + } + + .unifiedDataTable__comparisonFieldName { + font-weight: 600; + } + + .unifiedDataTable__comparisonBaseDocCell { + background-color: rgba(211,218,230,0.2); + } + + + + .unifiedDataTable__comparisonSegment { + position: relative; + } + + .unifiedDataTable__comparisonAddedSegment { + background-color: #e6f9f7; + color: #007871; + } + + .unifiedDataTable__comparisonRemovedSegment { + background-color: #f8e9e9; + color: #bd271e; + } + + + + + .unifiedDataTable__comparisonSegment { + padding-left: calc(4px / 2); + } + + + .unifiedDataTable__comparisonAddedSegment:before { + content: '+'; + + position: absolute; + width: 8px; + height: 100%; + margin-left: calc(-8px - calc(4px / 2)); + text-align: center; + line-height: 1; + font-weight: 500; + ; + background-color: #00BFB3; + color: #F1F4FA; + } + + .unifiedDataTable__comparisonRemovedSegment:before { + content: '-'; + + position: absolute; + width: 8px; + height: 100%; + margin-left: calc(-8px - calc(4px / 2)); + text-align: center; + line-height: 1; + font-weight: 500; + ; + background-color: #ce5d56; + color: #F1F4FA; + } + ; + ; + ", + "toString": [Function], +} +`; + +exports[`useComparisonCss should render with lines diff mode and no diff decorations 1`] = ` +Object { + "map": undefined, + "name": "1mthx0u", + "next": undefined, + "styles": " + .unifiedDataTable__cellValue { + white-space: pre-wrap; + } + + .unifiedDataTable__comparisonFieldName { + font-weight: 600; + } + + .unifiedDataTable__comparisonBaseDocCell { + background-color: rgba(211,218,230,0.2); + } + + + + .unifiedDataTable__comparisonSegment { + position: relative; + } + + .unifiedDataTable__comparisonAddedSegment { + background-color: #e6f9f7; + color: #007871; + } + + .unifiedDataTable__comparisonRemovedSegment { + background-color: #f8e9e9; + color: #bd271e; + } + + + + + .unifiedDataTable__comparisonSegment { + padding-left: calc(4px / 2); + } + + + ; + ", + "toString": [Function], +} +`; + +exports[`useComparisonCss should render with no diff mode and no diff decorations 1`] = ` +Object { + "map": undefined, + "name": "1ylxgdl", + "next": undefined, + "styles": " + .unifiedDataTable__cellValue { + white-space: pre-wrap; + } + + .unifiedDataTable__comparisonFieldName { + font-weight: 600; + } + + .unifiedDataTable__comparisonBaseDocCell { + background-color: rgba(211,218,230,0.2); + } + + + + .unifiedDataTable__comparisonSegment { + position: relative; + } + + .unifiedDataTable__comparisonAddedSegment { + background-color: #e6f9f7; + color: #007871; + } + + .unifiedDataTable__comparisonRemovedSegment { + background-color: #f8e9e9; + color: #bd271e; + } + + + + + ", + "toString": [Function], +} +`; + +exports[`useComparisonCss should render with words diff mode and diff decorations 1`] = ` +Object { + "map": undefined, + "name": "vd39me", + "next": undefined, + "styles": " + .unifiedDataTable__cellValue { + white-space: pre-wrap; + } + + .unifiedDataTable__comparisonFieldName { + font-weight: 600; + } + + .unifiedDataTable__comparisonBaseDocCell { + background-color: rgba(211,218,230,0.2); + } + + + + .unifiedDataTable__comparisonSegment { + position: relative; + } + + .unifiedDataTable__comparisonAddedSegment { + background-color: #e6f9f7; + color: #007871; + } + + .unifiedDataTable__comparisonRemovedSegment { + background-color: #f8e9e9; + color: #bd271e; + } + + + .unifiedDataTable__comparisonAddedSegment { + text-decoration: underline; + } + + .unifiedDataTable__comparisonRemovedSegment { + text-decoration: line-through; + } + ; + + + ", + "toString": [Function], +} +`; + +exports[`useComparisonCss should render with words diff mode and no diff decorations 1`] = ` +Object { + "map": undefined, + "name": "1ylxgdl", + "next": undefined, + "styles": " + .unifiedDataTable__cellValue { + white-space: pre-wrap; + } + + .unifiedDataTable__comparisonFieldName { + font-weight: 600; + } + + .unifiedDataTable__comparisonBaseDocCell { + background-color: rgba(211,218,230,0.2); + } + + + + .unifiedDataTable__comparisonSegment { + position: relative; + } + + .unifiedDataTable__comparisonAddedSegment { + background-color: #e6f9f7; + color: #007871; + } + + .unifiedDataTable__comparisonRemovedSegment { + background-color: #f8e9e9; + color: #bd271e; + } + + + + + ", + "toString": [Function], +} +`; diff --git a/packages/kbn-unified-data-table/src/components/compare_documents/hooks/calculate_diff.test.ts b/packages/kbn-unified-data-table/src/components/compare_documents/hooks/calculate_diff.test.ts new file mode 100644 index 0000000000000..55c7437bfb6af --- /dev/null +++ b/packages/kbn-unified-data-table/src/components/compare_documents/hooks/calculate_diff.test.ts @@ -0,0 +1,298 @@ +/* + * Copyright 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 { calculateDiff, formatDiffValue } from './calculate_diff'; + +describe('calculateDiff', () => { + const baseValue = ['This is a message val']; + const comparisonValue = ['This one is a different msg value']; + const baseValueJson = ['gif', 'png']; + const comparisonValueJson = ['png', 'jpg']; + + it('should return diffChars when diffMode is chars', () => { + const result = calculateDiff({ diffMode: 'chars', baseValue, comparisonValue }); + expect(result).toMatchInlineSnapshot(` + Array [ + Object { + "count": 5, + "value": "This ", + }, + Object { + "added": true, + "count": 4, + "removed": undefined, + "value": "one ", + }, + Object { + "count": 5, + "value": "is a ", + }, + Object { + "added": true, + "count": 10, + "removed": undefined, + "value": "different ", + }, + Object { + "count": 1, + "value": "m", + }, + Object { + "added": undefined, + "count": 1, + "removed": true, + "value": "e", + }, + Object { + "count": 1, + "value": "s", + }, + Object { + "added": undefined, + "count": 2, + "removed": true, + "value": "sa", + }, + Object { + "count": 1, + "value": "g", + }, + Object { + "added": undefined, + "count": 1, + "removed": true, + "value": "e", + }, + Object { + "count": 4, + "value": " val", + }, + Object { + "added": true, + "count": 2, + "removed": undefined, + "value": "ue", + }, + ] + `); + }); + + it('should return diffWords when diffMode is words', () => { + const result = calculateDiff({ diffMode: 'words', baseValue, comparisonValue }); + expect(result).toMatchInlineSnapshot(` + Array [ + Object { + "count": 2, + "value": "This ", + }, + Object { + "added": true, + "count": 2, + "removed": undefined, + "value": "one ", + }, + Object { + "count": 4, + "value": "is a ", + }, + Object { + "added": undefined, + "count": 1, + "removed": true, + "value": "message", + }, + Object { + "added": true, + "count": 1, + "removed": undefined, + "value": "different", + }, + Object { + "count": 1, + "value": " ", + }, + Object { + "added": undefined, + "count": 1, + "removed": true, + "value": "val", + }, + Object { + "added": true, + "count": 3, + "removed": undefined, + "value": "msg value", + }, + ] + `); + }); + + it('should return diffLines when diffMode is lines', () => { + const result = calculateDiff({ diffMode: 'lines', baseValue, comparisonValue }); + expect(result).toMatchInlineSnapshot(` + Array [ + Object { + "added": undefined, + "count": 1, + "removed": true, + "value": "This is a message val", + }, + Object { + "added": true, + "count": 1, + "removed": undefined, + "value": "This one is a different msg value", + }, + ] + `); + }); + + it('should return diffJson when diffMode is lines and values are json', () => { + const result = calculateDiff({ + diffMode: 'lines', + baseValue: baseValueJson, + comparisonValue: comparisonValueJson, + }); + expect(result).toMatchInlineSnapshot(` + Array [ + Object { + "count": 1, + "value": "[ + ", + }, + Object { + "added": undefined, + "count": 1, + "removed": true, + "value": " \\"gif\\", + ", + }, + Object { + "count": 1, + "value": " \\"png\\", + ", + }, + Object { + "added": true, + "count": 1, + "removed": undefined, + "value": " \\"jpg\\" + ", + }, + Object { + "count": 1, + "value": "]", + }, + ] + `); + }); + + it('should force json when comparing a single value to multiple values', () => { + const diffMode = 'lines'; + const result = calculateDiff({ + diffMode, + baseValue: ['single value'], + comparisonValue: ['multiple', 'values'], + }); + expect(result).toMatchInlineSnapshot(` + Array [ + Object { + "count": 1, + "value": "[ + ", + }, + Object { + "added": undefined, + "count": 1, + "removed": true, + "value": " \\"single value\\" + ", + }, + Object { + "added": true, + "count": 2, + "removed": undefined, + "value": " \\"multiple\\", + \\"values\\" + ", + }, + Object { + "count": 1, + "value": "]", + }, + ] + `); + const result2 = calculateDiff({ + diffMode, + baseValue: ['multiple', 'values'], + comparisonValue: ['single value'], + }); + expect(result2).toMatchInlineSnapshot(` + Array [ + Object { + "count": 1, + "value": "[ + ", + }, + Object { + "added": undefined, + "count": 2, + "removed": true, + "value": " \\"multiple\\", + \\"values\\" + ", + }, + Object { + "added": true, + "count": 1, + "removed": undefined, + "value": " \\"single value\\" + ", + }, + Object { + "count": 1, + "value": "]", + }, + ] + `); + }); +}); + +describe('formatDiffValue', () => { + it('should return a JSON stringified value when value is an object', () => { + const result = formatDiffValue({ key: 'value' }, false); + expect(result).toEqual({ value: '{\n "key": "value"\n}', isJson: true }); + }); + + it('should return a stringified value when value is not an object', () => { + const result = formatDiffValue(42, false); + expect(result).toEqual({ value: '42', isJson: false }); + }); + + it('should return an empty string when value is null', () => { + const result = formatDiffValue(null, false); + expect(result).toEqual({ value: '', isJson: false }); + }); + + it('should return an empty string when value is undefined', () => { + const result = formatDiffValue(undefined, false); + expect(result).toEqual({ value: '', isJson: false }); + }); + + it('should extract the first entry when value is an array with a single entry', () => { + const value = ['gif']; + const result = formatDiffValue(value, false); + expect(result).toEqual({ value: 'gif', isJson: false }); + }); + + it('should return a JSON stringified value when forceJson is true', () => { + const value = ['gif']; + const result = formatDiffValue(value, true); + expect(result).toEqual({ value: '[\n "gif"\n]', isJson: true }); + }); +}); diff --git a/packages/kbn-unified-data-table/src/components/compare_documents/hooks/calculate_diff.ts b/packages/kbn-unified-data-table/src/components/compare_documents/hooks/calculate_diff.ts new file mode 100644 index 0000000000000..3c94da1e18f01 --- /dev/null +++ b/packages/kbn-unified-data-table/src/components/compare_documents/hooks/calculate_diff.ts @@ -0,0 +1,60 @@ +/* + * Copyright 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 { diffChars, diffJson, diffLines, diffWords } from 'diff'; +import type { DocumentDiffMode } from '../types'; + +export interface CalculateDiffProps { + diffMode: Exclude; + baseValue: unknown; + comparisonValue: unknown; +} + +export const calculateDiff = ({ diffMode, baseValue, comparisonValue }: CalculateDiffProps) => { + const forceJson = + baseValue != null && + comparisonValue != null && + ((hasLengthOne(baseValue) && !hasLengthOne(comparisonValue)) || + (!hasLengthOne(baseValue) && hasLengthOne(comparisonValue))); + + const { value: formattedBaseValue, isJson: baseValueIsJson } = formatDiffValue( + baseValue, + forceJson + ); + + const { value: formattedComparisonValue, isJson: comparisonValueIsJson } = formatDiffValue( + comparisonValue, + forceJson + ); + + if (diffMode === 'chars') { + return diffChars(formattedBaseValue, formattedComparisonValue); + } + + if (diffMode === 'words') { + return diffWords(formattedBaseValue, formattedComparisonValue, { ignoreWhitespace: false }); + } + + return baseValueIsJson && comparisonValueIsJson + ? diffJson(formattedBaseValue, formattedComparisonValue, { ignoreWhitespace: false }) + : diffLines(formattedBaseValue, formattedComparisonValue, { ignoreWhitespace: false }); +}; + +export const formatDiffValue = (value: unknown, forceJson: boolean) => { + const extractedValue = !forceJson && hasLengthOne(value) ? value[0] : value; + + if (value != null && (forceJson || typeof extractedValue === 'object')) { + return { value: JSON.stringify(extractedValue, null, 2), isJson: true }; + } + + return { value: String(extractedValue ?? ''), isJson: false }; +}; + +const hasLengthOne = (value: unknown): value is unknown[] => { + return Array.isArray(value) && value.length === 1; +}; diff --git a/packages/kbn-unified-data-table/src/components/compare_documents/hooks/use_comparison_cell_value.test.tsx b/packages/kbn-unified-data-table/src/components/compare_documents/hooks/use_comparison_cell_value.test.tsx new file mode 100644 index 0000000000000..7ae6b705ae9fb --- /dev/null +++ b/packages/kbn-unified-data-table/src/components/compare_documents/hooks/use_comparison_cell_value.test.tsx @@ -0,0 +1,446 @@ +/* + * Copyright 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 { EuiDataGridCellValueElementProps, EuiDataGridSetCellProps } from '@elastic/eui'; +import { buildDataTableRecord } from '@kbn/discover-utils'; +import { generateEsHits } from '@kbn/discover-utils/src/__mocks__'; +import { fieldFormatsMock } from '@kbn/field-formats-plugin/common/mocks'; +import { render, screen } from '@testing-library/react'; +import { renderHook } from '@testing-library/react-hooks'; +import React from 'react'; +import { ReactNode, useState } from 'react'; +import { dataViewWithTimefieldMock } from '../../../../__mocks__/data_view_with_timefield'; +import { useComparisonCellValue, UseComparisonCellValueProps } from './use_comparison_cell_value'; +import { CELL_CLASS } from '../../../utils/get_render_cell_value'; +import { + ADDED_SEGMENT_CLASS, + BASE_CELL_CLASS, + DIFF_CELL_CLASS, + FIELD_NAME_CLASS, + MATCH_CELL_CLASS, + REMOVED_SEGMENT_CLASS, + SEGMENT_CLASS, +} from './use_comparison_css'; +import * as CalculateDiff from './calculate_diff'; + +const calculateDiff = jest.spyOn(CalculateDiff, 'calculateDiff'); + +const docs = generateEsHits(dataViewWithTimefieldMock, 3).map((hit, i) => { + switch (i) { + case 0: + case 2: + hit.fields!.message = ['This is a message val']; + hit.fields!.extension = ['gif', 'png']; + break; + case 1: + hit.fields!.message = ['This one is a different msg value']; + hit.fields!.extension = ['png', 'jpg']; + break; + } + + return buildDataTableRecord(hit, dataViewWithTimefieldMock); +}); + +const getDocById = (id: string) => docs.find((doc) => doc.raw._id === id); + +const fieldColumnId = 'fieldColumnId'; + +const renderComparisonCellValue = (props: Partial = {}) => { + const defaultProps: UseComparisonCellValueProps = { + dataView: dataViewWithTimefieldMock, + comparisonFields: ['message', 'extension', 'bytes'], + fieldColumnId, + selectedDocs: ['0', '1', '2'], + diffMode: undefined, + fieldFormats: fieldFormatsMock, + getDocById, + ...props, + }; + const hook = renderHook((currentProps) => useComparisonCellValue(currentProps), { + initialProps: defaultProps, + }); + return { + rerender: (newProps: Partial) => { + hook.rerender({ ...defaultProps, ...newProps }); + }, + renderCellValue: (cellValueProps: EuiDataGridCellValueElementProps) => { + return hook.result.current(cellValueProps); + }, + }; +}; + +const ComparisonCell = ({ + columnId, + colIndex, + rowIndex, + renderCellValue, +}: { + columnId: string; + colIndex: number; + rowIndex: number; + renderCellValue: (innerProps: EuiDataGridCellValueElementProps) => ReactNode; +}) => { + const [cellProps, setCellProps] = useState(); + return ( +
+ {renderCellValue({ + columnId, + colIndex, + rowIndex, + isExpandable: false, + isExpanded: false, + isDetails: false, + setCellProps, + })} +
+ ); +}; + +const renderComparisonCell = ({ + columnId, + colIndex, + rowIndex, + renderCellValue, +}: Parameters[0]) => { + render( + + ); + const getCell = () => screen.getByTestId(`${columnId}_${colIndex}_${rowIndex}`); + return { + getCell, + getCellValue: () => getCell().querySelector(`.${CELL_CLASS}`), + getAllSegments: () => getCell().querySelectorAll(`.${SEGMENT_CLASS}`), + getAddedSegments: () => getCell().querySelectorAll(`.${ADDED_SEGMENT_CLASS}`), + getRemovedSegments: () => getCell().querySelectorAll(`.${REMOVED_SEGMENT_CLASS}`), + }; +}; + +describe('useComparisonCellValue', () => { + it('should render field cells', () => { + const { renderCellValue } = renderComparisonCellValue(); + const messageCell = renderComparisonCell({ + columnId: fieldColumnId, + colIndex: 0, + rowIndex: 0, + renderCellValue, + }); + const messageElement = screen.getByText('message'); + expect(messageElement).toBeInTheDocument(); + expect(messageElement).toHaveClass(FIELD_NAME_CLASS); + expect(messageCell.getCell()).toMatchSnapshot(); + const extensionCell = renderComparisonCell({ + columnId: fieldColumnId, + colIndex: 0, + rowIndex: 1, + renderCellValue, + }); + const extensionElement = screen.getByText('extension'); + expect(extensionElement).toBeInTheDocument(); + expect(extensionElement).toHaveClass(FIELD_NAME_CLASS); + expect(extensionCell.getCell()).toMatchSnapshot(); + const bytesCell = renderComparisonCell({ + columnId: fieldColumnId, + colIndex: 0, + rowIndex: 2, + renderCellValue, + }); + const bytesElement = screen.getByText('bytes'); + expect(bytesElement).toBeInTheDocument(); + expect(bytesElement).toHaveClass(FIELD_NAME_CLASS); + expect(bytesCell.getCell()).toMatchSnapshot(); + }); + + it('should render exmpty cell if doc is not found', () => { + const { renderCellValue } = renderComparisonCellValue(); + const emptyCell = renderComparisonCell({ + columnId: 'unknown', + colIndex: 1, + rowIndex: 0, + renderCellValue, + }); + expect(emptyCell.getCellValue()).toBeInTheDocument(); + expect(emptyCell.getCell()).toMatchSnapshot(); + }); + + it('should render cells with no diff mode', () => { + const { renderCellValue } = renderComparisonCellValue(); + const baseCell = renderComparisonCell({ + columnId: '0', + colIndex: 1, + rowIndex: 0, + renderCellValue, + }); + expect(baseCell.getCellValue()).toBeInTheDocument(); + expect(baseCell.getCell()).toHaveClass(BASE_CELL_CLASS); + expect(baseCell.getCell()).not.toHaveClass(MATCH_CELL_CLASS); + expect(baseCell.getCell()).not.toHaveClass(DIFF_CELL_CLASS); + expect(baseCell.getAllSegments()).toHaveLength(0); + expect(baseCell.getCell()).toMatchSnapshot(); + const comparisonCell1 = renderComparisonCell({ + columnId: '1', + colIndex: 2, + rowIndex: 0, + renderCellValue, + }); + expect(comparisonCell1.getCellValue()).toBeInTheDocument(); + expect(comparisonCell1.getCell()).not.toHaveClass(BASE_CELL_CLASS); + expect(comparisonCell1.getCell()).not.toHaveClass(MATCH_CELL_CLASS); + expect(comparisonCell1.getCell()).not.toHaveClass(DIFF_CELL_CLASS); + expect(comparisonCell1.getAllSegments()).toHaveLength(0); + expect(comparisonCell1.getCell()).toMatchSnapshot(); + const comparisonCell2 = renderComparisonCell({ + columnId: '2', + colIndex: 3, + rowIndex: 0, + renderCellValue, + }); + expect(comparisonCell2.getCellValue()).toBeInTheDocument(); + expect(comparisonCell2.getCell()).not.toHaveClass(BASE_CELL_CLASS); + expect(comparisonCell2.getCell()).not.toHaveClass(MATCH_CELL_CLASS); + expect(comparisonCell2.getCell()).not.toHaveClass(DIFF_CELL_CLASS); + expect(comparisonCell2.getAllSegments()).toHaveLength(0); + expect(comparisonCell2.getCell()).toMatchSnapshot(); + }); + + it('should render cells with diff mode "Full value"', () => { + const { renderCellValue } = renderComparisonCellValue({ diffMode: 'basic' }); + const baseCell = renderComparisonCell({ + columnId: '0', + colIndex: 1, + rowIndex: 0, + renderCellValue, + }); + expect(baseCell.getCellValue()).toBeInTheDocument(); + expect(baseCell.getCell()).toHaveClass(BASE_CELL_CLASS); + expect(baseCell.getCell()).not.toHaveClass(MATCH_CELL_CLASS); + expect(baseCell.getCell()).not.toHaveClass(DIFF_CELL_CLASS); + expect(baseCell.getAllSegments()).toHaveLength(0); + expect(baseCell.getCell()).toMatchSnapshot(); + const comparisonCell1 = renderComparisonCell({ + columnId: '1', + colIndex: 2, + rowIndex: 0, + renderCellValue, + }); + expect(comparisonCell1.getCellValue()).toBeInTheDocument(); + expect(comparisonCell1.getCell()).not.toHaveClass(BASE_CELL_CLASS); + expect(comparisonCell1.getCell()).not.toHaveClass(MATCH_CELL_CLASS); + expect(comparisonCell1.getCell()).toHaveClass(DIFF_CELL_CLASS); + expect(comparisonCell1.getAllSegments()).toHaveLength(0); + expect(comparisonCell1.getCell()).toMatchSnapshot(); + const comparisonCell2 = renderComparisonCell({ + columnId: '2', + colIndex: 3, + rowIndex: 0, + renderCellValue, + }); + expect(comparisonCell2.getCellValue()).toBeInTheDocument(); + expect(comparisonCell2.getCell()).not.toHaveClass(BASE_CELL_CLASS); + expect(comparisonCell2.getCell()).toHaveClass(MATCH_CELL_CLASS); + expect(comparisonCell2.getCell()).not.toHaveClass(DIFF_CELL_CLASS); + expect(comparisonCell2.getAllSegments()).toHaveLength(0); + expect(comparisonCell2.getCell()).toMatchSnapshot(); + }); + + it('should render cells with diff mode "Chars"', () => { + const { renderCellValue } = renderComparisonCellValue({ diffMode: 'chars' }); + const baseCell = renderComparisonCell({ + columnId: '0', + colIndex: 1, + rowIndex: 0, + renderCellValue, + }); + expect(baseCell.getCellValue()).toBeInTheDocument(); + expect(baseCell.getCell()).toHaveClass(BASE_CELL_CLASS); + expect(baseCell.getCell()).not.toHaveClass(MATCH_CELL_CLASS); + expect(baseCell.getCell()).not.toHaveClass(DIFF_CELL_CLASS); + expect(baseCell.getAllSegments()).toHaveLength(0); + expect(baseCell.getCell()).toMatchSnapshot(); + const comparisonCell1 = renderComparisonCell({ + columnId: '1', + colIndex: 2, + rowIndex: 0, + renderCellValue, + }); + expect(comparisonCell1.getCellValue()).toBeInTheDocument(); + expect(comparisonCell1.getCell()).not.toHaveClass(BASE_CELL_CLASS); + expect(comparisonCell1.getCell()).not.toHaveClass(MATCH_CELL_CLASS); + expect(comparisonCell1.getCell()).not.toHaveClass(DIFF_CELL_CLASS); + expect(comparisonCell1.getAllSegments()).toHaveLength(12); + expect(comparisonCell1.getAddedSegments()).toHaveLength(3); + expect(comparisonCell1.getRemovedSegments()).toHaveLength(3); + expect(comparisonCell1.getCell()).toMatchSnapshot(); + const comparisonCell2 = renderComparisonCell({ + columnId: '2', + colIndex: 3, + rowIndex: 0, + renderCellValue, + }); + expect(comparisonCell2.getCellValue()).toBeInTheDocument(); + expect(comparisonCell2.getCell()).not.toHaveClass(BASE_CELL_CLASS); + expect(comparisonCell2.getCell()).not.toHaveClass(MATCH_CELL_CLASS); + expect(comparisonCell2.getCell()).not.toHaveClass(DIFF_CELL_CLASS); + expect(comparisonCell2.getAllSegments()).toHaveLength(1); + expect(comparisonCell2.getAddedSegments()).toHaveLength(0); + expect(comparisonCell2.getRemovedSegments()).toHaveLength(0); + expect(comparisonCell2.getCell()).toMatchSnapshot(); + }); + + it('should render cells with diff mode "Words"', () => { + const { renderCellValue } = renderComparisonCellValue({ diffMode: 'words' }); + const baseCell = renderComparisonCell({ + columnId: '0', + colIndex: 1, + rowIndex: 0, + renderCellValue, + }); + expect(baseCell.getCellValue()).toBeInTheDocument(); + expect(baseCell.getCell()).toHaveClass(BASE_CELL_CLASS); + expect(baseCell.getCell()).not.toHaveClass(MATCH_CELL_CLASS); + expect(baseCell.getCell()).not.toHaveClass(DIFF_CELL_CLASS); + expect(baseCell.getAllSegments()).toHaveLength(0); + expect(baseCell.getCell()).toMatchSnapshot(); + const comparisonCell1 = renderComparisonCell({ + columnId: '1', + colIndex: 2, + rowIndex: 0, + renderCellValue, + }); + expect(comparisonCell1.getCellValue()).toBeInTheDocument(); + expect(comparisonCell1.getCell()).not.toHaveClass(BASE_CELL_CLASS); + expect(comparisonCell1.getCell()).not.toHaveClass(MATCH_CELL_CLASS); + expect(comparisonCell1.getCell()).not.toHaveClass(DIFF_CELL_CLASS); + expect(comparisonCell1.getAllSegments()).toHaveLength(8); + expect(comparisonCell1.getAddedSegments()).toHaveLength(3); + expect(comparisonCell1.getRemovedSegments()).toHaveLength(2); + expect(comparisonCell1.getCell()).toMatchSnapshot(); + const comparisonCell2 = renderComparisonCell({ + columnId: '2', + colIndex: 3, + rowIndex: 0, + renderCellValue, + }); + expect(comparisonCell2.getCellValue()).toBeInTheDocument(); + expect(comparisonCell2.getCell()).not.toHaveClass(BASE_CELL_CLASS); + expect(comparisonCell2.getCell()).not.toHaveClass(MATCH_CELL_CLASS); + expect(comparisonCell2.getCell()).not.toHaveClass(DIFF_CELL_CLASS); + expect(comparisonCell2.getAllSegments()).toHaveLength(1); + expect(comparisonCell2.getAddedSegments()).toHaveLength(0); + expect(comparisonCell2.getRemovedSegments()).toHaveLength(0); + expect(comparisonCell2.getCell()).toMatchSnapshot(); + }); + + it('should render cells with diff mode "Lines"', () => { + const { renderCellValue } = renderComparisonCellValue({ diffMode: 'lines' }); + const baseCell = renderComparisonCell({ + columnId: '0', + colIndex: 1, + rowIndex: 1, + renderCellValue, + }); + expect(baseCell.getCellValue()).toBeInTheDocument(); + expect(baseCell.getCell()).toHaveClass(BASE_CELL_CLASS); + expect(baseCell.getCell()).not.toHaveClass(MATCH_CELL_CLASS); + expect(baseCell.getCell()).not.toHaveClass(DIFF_CELL_CLASS); + expect(baseCell.getAllSegments()).toHaveLength(0); + expect(baseCell.getCell()).toMatchSnapshot(); + const comparisonCell1 = renderComparisonCell({ + columnId: '1', + colIndex: 2, + rowIndex: 1, + renderCellValue, + }); + expect(comparisonCell1.getCellValue()).toBeInTheDocument(); + expect(comparisonCell1.getCell()).not.toHaveClass(BASE_CELL_CLASS); + expect(comparisonCell1.getCell()).not.toHaveClass(MATCH_CELL_CLASS); + expect(comparisonCell1.getCell()).not.toHaveClass(DIFF_CELL_CLASS); + expect(comparisonCell1.getAllSegments()).toHaveLength(5); + expect(comparisonCell1.getAddedSegments()).toHaveLength(1); + expect(comparisonCell1.getRemovedSegments()).toHaveLength(1); + expect(comparisonCell1.getCell()).toMatchSnapshot(); + const comparisonCell2 = renderComparisonCell({ + columnId: '2', + colIndex: 3, + rowIndex: 1, + renderCellValue, + }); + expect(comparisonCell2.getCellValue()).toBeInTheDocument(); + expect(comparisonCell2.getCell()).not.toHaveClass(BASE_CELL_CLASS); + expect(comparisonCell2.getCell()).not.toHaveClass(MATCH_CELL_CLASS); + expect(comparisonCell2.getCell()).not.toHaveClass(DIFF_CELL_CLASS); + expect(comparisonCell2.getAllSegments()).toHaveLength(1); + expect(comparisonCell2.getAddedSegments()).toHaveLength(0); + expect(comparisonCell2.getRemovedSegments()).toHaveLength(0); + expect(comparisonCell2.getCell()).toMatchSnapshot(); + }); + + it('should not recalculate diffs for advanced modes when remounting the same cell', () => { + calculateDiff.mockClear(); + expect(calculateDiff).not.toHaveBeenCalled(); + const { rerender, renderCellValue } = renderComparisonCellValue({ diffMode: 'chars' }); + const cellProps1 = { + columnId: '1', + colIndex: 2, + rowIndex: 1, + renderCellValue, + }; + const cellProps2 = { + columnId: '2', + colIndex: 3, + rowIndex: 1, + renderCellValue, + }; + renderComparisonCell(cellProps1); + expect(calculateDiff).toHaveBeenCalledTimes(1); + renderComparisonCell(cellProps2); + expect(calculateDiff).toHaveBeenCalledTimes(2); + renderComparisonCell(cellProps1); + expect(calculateDiff).toHaveBeenCalledTimes(2); + renderComparisonCell(cellProps2); + expect(calculateDiff).toHaveBeenCalledTimes(2); + rerender({ diffMode: 'words', selectedDocs: ['1', '2', '0'] }); + const cellProps3 = { + ...cellProps1, + columnId: '2', + }; + const cellProps4 = { + ...cellProps2, + columnId: '0', + }; + renderComparisonCell(cellProps3); + expect(calculateDiff).toHaveBeenCalledTimes(3); + renderComparisonCell(cellProps4); + expect(calculateDiff).toHaveBeenCalledTimes(4); + renderComparisonCell(cellProps3); + expect(calculateDiff).toHaveBeenCalledTimes(4); + renderComparisonCell(cellProps4); + expect(calculateDiff).toHaveBeenCalledTimes(4); + rerender({ diffMode: 'lines', selectedDocs: ['2', '0', '1'] }); + const cellProps5 = { + ...cellProps1, + columnId: '0', + }; + const cellProps6 = { + ...cellProps2, + columnId: '1', + }; + renderComparisonCell(cellProps5); + expect(calculateDiff).toHaveBeenCalledTimes(5); + renderComparisonCell(cellProps6); + expect(calculateDiff).toHaveBeenCalledTimes(6); + renderComparisonCell(cellProps5); + expect(calculateDiff).toHaveBeenCalledTimes(6); + renderComparisonCell(cellProps6); + expect(calculateDiff).toHaveBeenCalledTimes(6); + }); +}); diff --git a/packages/kbn-unified-data-table/src/components/compare_documents/hooks/use_comparison_cell_value.tsx b/packages/kbn-unified-data-table/src/components/compare_documents/hooks/use_comparison_cell_value.tsx new file mode 100644 index 0000000000000..98fae03a0ace3 --- /dev/null +++ b/packages/kbn-unified-data-table/src/components/compare_documents/hooks/use_comparison_cell_value.tsx @@ -0,0 +1,251 @@ +/* + * Copyright 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 { EuiDataGridCellValueElementProps, EuiFlexGroup, EuiFlexItem, EuiText } from '@elastic/eui'; +import type { DataView, DataViewField } from '@kbn/data-views-plugin/common'; +import { formatFieldValue } from '@kbn/discover-utils'; +import type { DataTableRecord } from '@kbn/discover-utils/types'; +import type { FieldFormatsStart } from '@kbn/field-formats-plugin/public'; +import { getFieldIconProps } from '@kbn/field-utils'; +import { FieldIcon } from '@kbn/react-field'; +import classNames from 'classnames'; +import { isEqual, memoize } from 'lodash'; +import React, { createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react'; +import { CELL_CLASS } from '../../../utils/get_render_cell_value'; +import type { DocumentDiffMode } from '../types'; +import { calculateDiff, CalculateDiffProps, formatDiffValue } from './calculate_diff'; +import { + ADDED_SEGMENT_CLASS, + BASE_CELL_CLASS, + DIFF_CELL_CLASS, + FIELD_NAME_CLASS, + MATCH_CELL_CLASS, + REMOVED_SEGMENT_CLASS, + SEGMENT_CLASS, +} from './use_comparison_css'; + +export interface UseComparisonCellValueProps { + dataView: DataView; + comparisonFields: string[]; + fieldColumnId: string; + selectedDocs: string[]; + diffMode: DocumentDiffMode | undefined; + fieldFormats: FieldFormatsStart; + getDocById: (id: string) => DataTableRecord | undefined; +} + +export const useComparisonCellValue = ({ + dataView, + comparisonFields, + fieldColumnId, + selectedDocs, + diffMode, + fieldFormats, + getDocById, +}: UseComparisonCellValueProps) => { + const baseDocId = selectedDocs[0]; + const baseDoc = useMemo(() => getDocById(baseDocId)?.flattened, [baseDocId, getDocById]); + const [calculateDiffMemoized] = useState(() => createCalculateDiffMemoized()); + + return useCallback( + (props: EuiDataGridCellValueElementProps) => ( + + + + ), + [ + baseDoc, + baseDocId, + calculateDiffMemoized, + comparisonFields, + dataView, + diffMode, + fieldColumnId, + fieldFormats, + getDocById, + ] + ); +}; + +type CellValueProps = Omit & + EuiDataGridCellValueElementProps & { + baseDocId: string; + baseDoc: DataTableRecord['flattened'] | undefined; + }; + +const EMPTY_VALUE = '-'; + +const CellValue = (props: CellValueProps) => { + const { dataView, comparisonFields, fieldColumnId, rowIndex, columnId, getDocById } = props; + const fieldName = comparisonFields[rowIndex]; + const field = useMemo(() => dataView.fields.getByName(fieldName), [dataView.fields, fieldName]); + const comparisonDoc = useMemo(() => getDocById(columnId), [columnId, getDocById]); + + if (columnId === fieldColumnId) { + return ; + } + + if (!comparisonDoc) { + return {EMPTY_VALUE}; + } + + return ( + + ); +}; + +interface FieldCellValueProps { + field: DataViewField | undefined; + fieldName: string; +} + +const FieldCellValue = ({ field, fieldName }: FieldCellValueProps) => { + return ( + + {field && ( + + + + )} + + + {field?.displayName ?? fieldName} + + + + ); +}; + +type DiffCellValueProps = CellValueProps & + FieldCellValueProps & { + comparisonDoc: DataTableRecord; + }; + +const DiffCellValue = ({ + dataView, + field, + fieldName, + baseDocId, + baseDoc, + comparisonDoc, + diffMode, + columnId, + fieldFormats, + setCellProps, +}: DiffCellValueProps) => { + const baseValue = baseDoc?.[fieldName]; + const comparisonValue = comparisonDoc?.flattened[fieldName]; + const isBaseDoc = columnId === baseDocId; + const formattedBaseValue = useMemo( + () => (isBaseDoc ? formatDiffValue(baseValue, false).value : undefined), + [baseValue, isBaseDoc] + ); + + useEffect(() => { + if (isBaseDoc) { + setCellProps({ className: BASE_CELL_CLASS }); + } else if (diffMode !== 'basic') { + setCellProps({ className: undefined }); + } else if (isEqual(baseValue, comparisonValue)) { + setCellProps({ className: MATCH_CELL_CLASS }); + } else { + setCellProps({ className: DIFF_CELL_CLASS }); + } + }, [baseValue, columnId, comparisonValue, baseDocId, diffMode, setCellProps, isBaseDoc]); + + if (!diffMode || diffMode === 'basic') { + return ( + + ); + } + + if (formattedBaseValue) { + return {formattedBaseValue || EMPTY_VALUE}; + } + + return ( + + ); +}; + +const DiffCellValueAdvanced = ({ diffMode, ...props }: CalculateDiffProps) => { + const diff = useDiff({ diffMode, ...props }); + const SegmentTag = diffMode === 'lines' ? 'div' : 'span'; + + return ( + + {diff.map((change, i) => ( + + {change.value || EMPTY_VALUE} + + ))} + + ); +}; + +// EuiDataGrid remounts cells often due to virtualization, e.g. on init to calculate cell sizes +// and while scrolling, so React memoization is not effective here. Instead we memoize the diff +// results in the comparison to avoid recalculating them frequently. +const createCalculateDiffMemoized = (): typeof calculateDiff => { + const calculateDiffMemoized = memoize((diffMode: CalculateDiffProps['diffMode']) => { + return memoize((baseValue: CalculateDiffProps['baseValue']) => { + return memoize((comparisonValue: CalculateDiffProps['comparisonValue']) => { + return calculateDiff({ diffMode, baseValue, comparisonValue }); + }); + }); + }); + + return ({ diffMode, baseValue, comparisonValue }: CalculateDiffProps) => { + return calculateDiffMemoized(diffMode)(baseValue)(comparisonValue); + }; +}; + +const DiffContext = createContext(calculateDiff); +const DiffProvider = DiffContext.Provider; + +const useDiff = (props: CalculateDiffProps) => { + const calculateDiffMemoized = useContext(DiffContext); + return calculateDiffMemoized(props); +}; diff --git a/packages/kbn-unified-data-table/src/components/compare_documents/hooks/use_comparison_columns.test.tsx b/packages/kbn-unified-data-table/src/components/compare_documents/hooks/use_comparison_columns.test.tsx new file mode 100644 index 0000000000000..c6df0f7fabcb6 --- /dev/null +++ b/packages/kbn-unified-data-table/src/components/compare_documents/hooks/use_comparison_columns.test.tsx @@ -0,0 +1,230 @@ +/* + * Copyright 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 { + DEFAULT_COLUMN_WIDTH, + FIELD_COLUMN_NAME, + FIELD_COLUMN_WIDTH, + useComparisonColumns, +} from './use_comparison_columns'; +import { renderHook } from '@testing-library/react-hooks'; +import type { EuiDataGridColumn, EuiDataGridColumnActions } from '@elastic/eui'; +import { render, screen } from '@testing-library/react'; +import React from 'react'; +import userEvent from '@testing-library/user-event'; +import { generateEsHits } from '@kbn/discover-utils/src/__mocks__'; +import { dataViewWithTimefieldMock } from '../../../../__mocks__/data_view_with_timefield'; +import { buildDataTableRecord } from '@kbn/discover-utils'; +import type { DataTableRecord } from '@kbn/discover-utils/types'; + +type DataGridColumn = Partial> & + Pick & { + actions?: Partial>; + }; + +const getComparisonColumn = ({ + column, + includePinAction, + includeRemoveAction, +}: { + column: DataGridColumn; + includePinAction?: boolean; + includeRemoveAction?: boolean; +}): EuiDataGridColumn => { + const additional: EuiDataGridColumnActions['additional'] = []; + if (includePinAction) { + additional.push({ + iconType: 'pin', + label: 'Pin for comparison', + size: 'xs', + onClick: expect.any(Function), + }); + } + if (includeRemoveAction) { + additional.push({ + iconType: 'cross', + label: 'Remove from comparison', + size: 'xs', + onClick: expect.any(Function), + }); + } + return { + display: undefined, + initialWidth: DEFAULT_COLUMN_WIDTH, + isSortable: false, + isExpandable: false, + ...column, + actions: { + showHide: false, + showMoveLeft: false, + showMoveRight: false, + showSortAsc: false, + showSortDesc: false, + ...column.actions, + additional, + }, + }; +}; + +const docs = generateEsHits(dataViewWithTimefieldMock, 4).map((hit) => + buildDataTableRecord(hit, dataViewWithTimefieldMock) +); + +const defaultGetDocById = (id: string) => docs.find((doc) => doc.raw._id === id); + +const fieldColumnId = 'fieldColumnId'; +const selectedDocs = ['0', '1', '2', '3']; + +const renderColumns = ({ + wrapperWidth, + isPlainRecord = false, + getDocById = defaultGetDocById, +}: { + wrapperWidth?: number; + isPlainRecord?: boolean; + getDocById?: (id: string) => DataTableRecord | undefined; +} = {}) => { + const wrapper = document.createElement('div'); + if (wrapperWidth) { + Object.defineProperty(wrapper, 'offsetWidth', { value: wrapperWidth }); + } + const setSelectedDocs = jest.fn(); + const { + result: { current: columns }, + } = renderHook(() => + useComparisonColumns({ + wrapper, + isPlainRecord, + fieldColumnId, + selectedDocs, + getDocById, + setSelectedDocs, + }) + ); + return { columns, setSelectedDocs }; +}; + +describe('useComparisonColumns', () => { + it('should return comparison columns', () => { + const { columns, setSelectedDocs } = renderColumns(); + expect(columns).toEqual([ + { + id: fieldColumnId, + displayAsText: FIELD_COLUMN_NAME, + initialWidth: FIELD_COLUMN_WIDTH, + isSortable: false, + isExpandable: false, + actions: false, + }, + getComparisonColumn({ + column: { + id: selectedDocs[0], + display: expect.anything(), + displayAsText: `Pinned document: ${selectedDocs[0]}`, + }, + includeRemoveAction: true, + }), + getComparisonColumn({ + column: { + id: selectedDocs[1], + display: selectedDocs[1], + displayAsText: `Comparison document: ${selectedDocs[1]}`, + actions: { + showMoveRight: true, + }, + }, + includePinAction: true, + includeRemoveAction: true, + }), + getComparisonColumn({ + column: { + id: selectedDocs[2], + display: selectedDocs[2], + displayAsText: `Comparison document: ${selectedDocs[2]}`, + actions: { + showMoveLeft: true, + showMoveRight: true, + }, + }, + includePinAction: true, + includeRemoveAction: true, + }), + getComparisonColumn({ + column: { + id: selectedDocs[3], + display: selectedDocs[3], + displayAsText: `Comparison document: ${selectedDocs[3]}`, + actions: { + showMoveLeft: true, + }, + }, + includePinAction: true, + includeRemoveAction: true, + }), + ]); + expect(columns[1].display).toMatchInlineSnapshot(` + + + + + + 0 + + + `); + const actions = columns[2].actions as EuiDataGridColumnActions; + const pinAction = actions.additional?.[0].onClick; + const removeAction = actions.additional?.[1].onClick; + render(
"`; -exports[`VisLegend Component Legend open should match the snapshot 1`] = `"
"`; +exports[`VisLegend Component Legend open should match the snapshot 1`] = `"
"`; diff --git a/src/plugins/visualizations/common/utils/accessors.ts b/src/plugins/visualizations/common/utils/accessors.ts index 929d0fae7b4b4..c258e06779f22 100644 --- a/src/plugins/visualizations/common/utils/accessors.ts +++ b/src/plugins/visualizations/common/utils/accessors.ts @@ -103,7 +103,7 @@ export function getFormatByAccessor( defaultColumnFormat?: SerializedFieldFormat ): SerializedFieldFormat | undefined { return typeof dimension === 'string' - ? getColumnByAccessor(dimension, columns)?.meta.params || defaultColumnFormat + ? getColumnByAccessor(dimension, columns)?.meta?.params || defaultColumnFormat : dimension.format || defaultColumnFormat; } diff --git a/test/api_integration/apis/esql/errors.ts b/test/api_integration/apis/esql/errors.ts index ad4e251a8f364..9a79706a43ae3 100644 --- a/test/api_integration/apis/esql/errors.ts +++ b/test/api_integration/apis/esql/errors.ts @@ -11,6 +11,7 @@ import Path from 'path'; import expect from '@kbn/expect'; import { MappingProperty } from '@elastic/elasticsearch/lib/api/types'; import { REPO_ROOT } from '@kbn/repo-info'; +import { ESQL_LATEST_VERSION } from '@kbn/esql-utils'; import uniqBy from 'lodash/uniqBy'; import { groupBy, mapValues } from 'lodash'; import { FtrProviderContext } from '../../ftr_provider_context'; @@ -123,6 +124,7 @@ export default function ({ getService }: FtrProviderContext) { path: '/_query', body: { query, + version: ESQL_LATEST_VERSION, }, }); return { resp, error: undefined }; diff --git a/test/examples/state_sync/todo_app.ts b/test/examples/state_sync/todo_app.ts index 68ed23c5a3eda..f4a851deba69d 100644 --- a/test/examples/state_sync/todo_app.ts +++ b/test/examples/state_sync/todo_app.ts @@ -32,7 +32,7 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide it('links are rendered correctly and state is preserved in links', async () => { const getHrefByLinkTestSubj = async (linkTestSubj: string) => - (await testSubjects.find(linkTestSubj)).getAttribute('href'); + (await (await testSubjects.find(linkTestSubj)).getAttribute('href')) ?? ''; await expectPathname(await getHrefByLinkTestSubj('filterLinkCompleted'), '/completed'); await expectPathname( @@ -115,7 +115,7 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide it('Links are rendered correctly and state is preserved in links', async () => { const getHrefByLinkTestSubj = async (linkTestSubj: string) => - (await testSubjects.find(linkTestSubj)).getAttribute('href'); + (await (await testSubjects.find(linkTestSubj)).getAttribute('href')) ?? ''; await expectHashPathname(await getHrefByLinkTestSubj('filterLinkCompleted'), '/completed'); await expectHashPathname( await getHrefByLinkTestSubj('filterLinkNotCompleted'), diff --git a/test/functional/apps/dashboard/group3/dashboard_state.ts b/test/functional/apps/dashboard/group3/dashboard_state.ts index 650d2e6b79269..e8cdc3b3aa2cb 100644 --- a/test/functional/apps/dashboard/group3/dashboard_state.ts +++ b/test/functional/apps/dashboard/group3/dashboard_state.ts @@ -295,7 +295,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('when removing a panel', async function () { await PageObjects.dashboard.waitForRenderComplete(); - const currentUrl = await getUrlFromShare(); + const currentUrl = (await getUrlFromShare()) ?? ''; const newUrl = updateAppStateQueryParam( currentUrl, (appState: Partial) => { @@ -319,7 +319,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await queryBar.clearQuery(); await dashboardAddPanel.addVisualization(PIE_CHART_VIS_NAME); await enableNewChartLibraryDebug(); - originalPieSliceStyle = await pieChart.getPieSliceStyle(`80,000`); + originalPieSliceStyle = (await pieChart.getPieSliceStyle(`80,000`)) ?? ''; }); it('updates a pie slice color on a hard refresh', async function () { diff --git a/test/functional/apps/dashboard/group4/dashboard_empty.ts b/test/functional/apps/dashboard/group4/dashboard_empty.ts index 03a9d965d589b..8cd11f4a7db86 100644 --- a/test/functional/apps/dashboard/group4/dashboard_empty.ts +++ b/test/functional/apps/dashboard/group4/dashboard_empty.ts @@ -11,21 +11,13 @@ import { FtrProviderContext } from '../../../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const log = getService('log'); const retry = getService('retry'); - const find = getService('find'); const filterBar = getService('filterBar'); const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const testSubjects = getService('testSubjects'); + const dataViews = getService('dataViews'); const PageObjects = getPageObjects(['common', 'dashboard', 'header', 'timePicker']); - const createDataView = async (dataViewName: string) => { - await testSubjects.setValue('createIndexPatternTitleInput', dataViewName, { - clearWithKeyboard: true, - typeCharByChar: true, - }); - await testSubjects.click('saveIndexPatternButton'); - }; - describe('dashboard empty state', () => { const kbnDirectory = 'test/functional/fixtures/kbn_archiver/dashboard/current/kibana'; @@ -56,15 +48,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { // create the new data view from the dashboards/create route in order to test that the dashboard is loaded properly as soon as the data view is created... await PageObjects.common.navigateToApp('dashboards', { hash: '/create' }); - const button = await testSubjects.find('createDataViewButton'); - button.click(); - await retry.waitForWithTimeout('index pattern editor form to be visible', 15000, async () => { - return await (await find.byClassName('indexPatternEditor__form')).isDisplayed(); - }); - const dataViewToCreate = 'logstash'; - await createDataView(dataViewToCreate); - await PageObjects.header.waitUntilLoadingHasFinished(); + await dataViews.createFromPrompt({ name: dataViewToCreate }); await retry.waitForWithTimeout( 'filter manager to be able to create a filter with the new data view', 5000, diff --git a/test/functional/apps/dashboard/group5/share.ts b/test/functional/apps/dashboard/group5/share.ts index 45bb5cd80c508..298a6749e4896 100644 --- a/test/functional/apps/dashboard/group5/share.ts +++ b/test/functional/apps/dashboard/group5/share.ts @@ -52,8 +52,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { if (mode === 'savedObject') { await PageObjects.share.exportAsSavedObject(); } - const sharedUrl = await PageObjects.share.getSharedUrl(); - return sharedUrl; + return PageObjects.share.getSharedUrl(); }; describe('share dashboard', () => { diff --git a/test/functional/apps/dashboard_elements/controls/common/control_group_apply_button.ts b/test/functional/apps/dashboard_elements/controls/common/control_group_apply_button.ts index 7702202309b70..40e75ac70ff09 100644 --- a/test/functional/apps/dashboard_elements/controls/common/control_group_apply_button.ts +++ b/test/functional/apps/dashboard_elements/controls/common/control_group_apply_button.ts @@ -189,7 +189,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); describe('time slider selections', () => { - let valueBefore: string; + let valueBefore: string | null; before(async () => { valueBefore = await dashboardControls.getTimeSliceFromTimeSlider(); diff --git a/test/functional/apps/dashboard_elements/controls/common/control_group_settings.ts b/test/functional/apps/dashboard_elements/controls/common/control_group_settings.ts index f4359f9887c59..80a8bc8148977 100644 --- a/test/functional/apps/dashboard_elements/controls/common/control_group_settings.ts +++ b/test/functional/apps/dashboard_elements/controls/common/control_group_settings.ts @@ -92,14 +92,16 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const getRange = async () => { await dashboardControls.rangeSliderWaitForLoading(rangeSliderId); - const lower = await dashboardControls.rangeSliderGetLowerBoundAttribute( - rangeSliderId, - 'placeholder' - ); - const upper = await dashboardControls.rangeSliderGetUpperBoundAttribute( - rangeSliderId, - 'placeholder' - ); + const lower = + (await dashboardControls.rangeSliderGetLowerBoundAttribute( + rangeSliderId, + 'placeholder' + )) ?? '0'; + const upper = + (await dashboardControls.rangeSliderGetUpperBoundAttribute( + rangeSliderId, + 'placeholder' + )) ?? '0'; return parseInt(upper, 10) - parseInt(lower, 10); }; diff --git a/test/functional/apps/discover/ccs_compatibility/_data_view_editor.ts b/test/functional/apps/discover/ccs_compatibility/_data_view_editor.ts index 1e9e13163cb9c..134ef7a414828 100644 --- a/test/functional/apps/discover/ccs_compatibility/_data_view_editor.ts +++ b/test/functional/apps/discover/ccs_compatibility/_data_view_editor.ts @@ -9,12 +9,11 @@ import { FtrProviderContext } from '../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const retry = getService('retry'); + const dataViews = getService('dataViews'); const kibanaServer = getService('kibanaServer'); const esArchiver = getService('esArchiver'); const security = getService('security'); const config = getService('config'); - const testSubjects = getService('testSubjects'); const PageObjects = getPageObjects([ 'common', 'discover', @@ -37,16 +36,6 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ? remoteArchiveDirectory : localArchiveDirectory; - const createDataView = async (dataViewName: string) => { - await PageObjects.discover.clickIndexPatternActions(); - await PageObjects.unifiedSearch.clickCreateNewDataView(); - await testSubjects.setValue('createIndexPatternTitleInput', dataViewName, { - clearWithKeyboard: true, - typeCharByChar: true, - }); - await testSubjects.click('saveIndexPatternButton'); - }; - describe('discover integration with data view editor', function describeIndexTests() { before(async function () { const roles = config.get('esTestCluster.ccs') @@ -69,18 +58,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('allows creating a new data view', async function () { const dataViewToCreate = config.get('esTestCluster.ccs') ? 'ftr-remote:logstash' : 'logstash'; - await createDataView(dataViewToCreate); - await PageObjects.header.waitUntilLoadingHasFinished(); - await retry.waitForWithTimeout( - 'data view selector to include a newly created dataview', - 5000, - async () => { - const dataViewTitle = await PageObjects.discover.getCurrentlySelectedDataView(); - // data view editor will add wildcard symbol by default - // so we need to include it in our original title when comparing - return dataViewTitle === `${dataViewToCreate}*`; - } - ); + await dataViews.createFromSearchBar({ name: dataViewToCreate }); + await dataViews.waitForSwitcherToBe(`${dataViewToCreate}*`); }); }); } diff --git a/test/functional/apps/discover/ccs_compatibility/_saved_queries.ts b/test/functional/apps/discover/ccs_compatibility/_saved_queries.ts index 417d9ad1bbcf2..0152735dad6b1 100644 --- a/test/functional/apps/discover/ccs_compatibility/_saved_queries.ts +++ b/test/functional/apps/discover/ccs_compatibility/_saved_queries.ts @@ -21,6 +21,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const savedQueryManagementComponent = getService('savedQueryManagementComponent'); const testSubjects = getService('testSubjects'); const config = getService('config'); + const dataViews = getService('dataViews'); const localArchiveDirectories = { nested: 'test/functional/fixtures/kbn_archiver/date_nested.json', discover: 'test/functional/fixtures/kbn_archiver/discover.json', @@ -54,7 +55,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { log.debug('set up a query with filters to save'); await PageObjects.common.setTime({ from, to }); await PageObjects.common.navigateToApp('discover'); - await PageObjects.discover.selectIndexPattern(logstashIndexPatternString); + await dataViews.switchToAndValidate(logstashIndexPatternString); await retry.try(async function tryingForTime() { const hitCount = await PageObjects.discover.getHitCount(); expect(hitCount).to.be('4,731'); @@ -120,14 +121,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(await filterBar.hasFilter('extension.raw', 'jpg')).to.be(false); expect(await queryBar.getQueryString()).to.eql(''); - await PageObjects.discover.selectIndexPattern(dateNestedIndexPattern); + await dataViews.switchToAndValidate(dateNestedIndexPattern); expect(await filterBar.hasFilter('extension.raw', 'jpg')).to.be(false); expect(await queryBar.getQueryString()).to.eql(''); - await PageObjects.discover.selectIndexPattern(logstashIndexPatternString); - const currentDataView = await PageObjects.discover.getCurrentlySelectedDataView(); - expect(currentDataView).to.be(logstashIndexPatternString); + await dataViews.switchToAndValidate(logstashIndexPatternString); await retry.try(async function tryingForTime() { const hitCount = await PageObjects.discover.getHitCount(); expect(hitCount).to.be('4,731'); diff --git a/test/functional/apps/discover/ccs_compatibility/_search_errors.ts b/test/functional/apps/discover/ccs_compatibility/_search_errors.ts index da2d2b5567341..254bfe6423326 100644 --- a/test/functional/apps/discover/ccs_compatibility/_search_errors.ts +++ b/test/functional/apps/discover/ccs_compatibility/_search_errors.ts @@ -15,6 +15,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const kibanaServer = getService('kibanaServer'); const retry = getService('retry'); const testSubjects = getService('testSubjects'); + const dataViews = getService('dataViews'); const PageObjects = getPageObjects(['common', 'discover', 'header', 'timePicker']); const isCcsTest = config.get('esTestCluster.ccs'); @@ -40,7 +41,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('exception on single shard shows warning and results', async () => { await PageObjects.common.navigateToApp('discover'); - await PageObjects.discover.selectIndexPattern(defaultIndex); + await dataViews.switchToAndValidate(defaultIndex); await PageObjects.timePicker.setDefaultAbsoluteRange(); await retry.try(async () => { const hitCount = await PageObjects.discover.getHitCount(); @@ -73,7 +74,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('exception on all shards shows error', async () => { await PageObjects.common.navigateToApp('discover'); - await PageObjects.discover.selectIndexPattern(defaultIndex); + await dataViews.switchToAndValidate(defaultIndex); await PageObjects.timePicker.setDefaultAbsoluteRange(); await retry.try(async () => { const hitCount = await PageObjects.discover.getHitCount(); diff --git a/test/functional/apps/discover/classic/_esql_grid.ts b/test/functional/apps/discover/classic/_esql_grid.ts new file mode 100644 index 0000000000000..7dfd331acec12 --- /dev/null +++ b/test/functional/apps/discover/classic/_esql_grid.ts @@ -0,0 +1,95 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { FtrProviderContext } from '../ftr_provider_context'; + +export default function ({ getService, getPageObjects }: FtrProviderContext) { + const esArchiver = getService('esArchiver'); + const kibanaServer = getService('kibanaServer'); + const testSubjects = getService('testSubjects'); + const security = getService('security'); + const dataGrid = getService('dataGrid'); + const dashboardAddPanel = getService('dashboardAddPanel'); + const dashboardPanelActions = getService('dashboardPanelActions'); + const PageObjects = getPageObjects([ + 'common', + 'discover', + 'dashboard', + 'header', + 'timePicker', + 'unifiedFieldList', + ]); + + const defaultSettings = { + defaultIndex: 'logstash-*', + 'doc_table:legacy': true, + }; + + describe('discover esql grid with legacy setting', async function () { + before(async () => { + await security.testUser.setRoles(['kibana_admin', 'test_logstash_reader']); + await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); + await kibanaServer.uiSettings.replace(defaultSettings); + await PageObjects.common.navigateToApp('discover'); + await PageObjects.timePicker.setDefaultAbsoluteRange(); + }); + + after(async () => { + await kibanaServer.savedObjects.cleanStandardList(); + await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover'); + await esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional'); + await kibanaServer.uiSettings.replace({}); + }); + + it('should render esql view correctly', async function () { + const savedSearchESQL = 'testESQLWithLegacySetting'; + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + + await testSubjects.existOrFail('docTableHeader'); + await testSubjects.missingOrFail('euiDataGridBody'); + + await PageObjects.discover.selectTextBaseLang(); + + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + + await testSubjects.missingOrFail('docTableHeader'); + await testSubjects.existOrFail('euiDataGridBody'); + + await dataGrid.clickRowToggle({ rowIndex: 0 }); + + await testSubjects.existOrFail('docTableDetailsFlyout'); + + await PageObjects.discover.saveSearch(savedSearchESQL); + + await PageObjects.common.navigateToApp('dashboard'); + await PageObjects.dashboard.clickNewDashboard(); + await PageObjects.timePicker.setDefaultAbsoluteRange(); + await dashboardAddPanel.clickOpenAddPanel(); + await dashboardAddPanel.addSavedSearch(savedSearchESQL); + await PageObjects.header.waitUntilLoadingHasFinished(); + + await testSubjects.missingOrFail('docTableHeader'); + await testSubjects.existOrFail('euiDataGridBody'); + + await dataGrid.clickRowToggle({ rowIndex: 0 }); + + await testSubjects.existOrFail('docTableDetailsFlyout'); + + await dashboardPanelActions.removePanelByTitle(savedSearchESQL); + + await dashboardAddPanel.addSavedSearch('A Saved Search'); + + await PageObjects.header.waitUntilLoadingHasFinished(); + await testSubjects.existOrFail('docTableHeader'); + await testSubjects.missingOrFail('euiDataGridBody'); + }); + }); +} diff --git a/test/functional/apps/discover/classic/index.ts b/test/functional/apps/discover/classic/index.ts index 845b5e2ee5ece..e6dc2f17c7699 100644 --- a/test/functional/apps/discover/classic/index.ts +++ b/test/functional/apps/discover/classic/index.ts @@ -27,5 +27,6 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./_field_data_with_fields_api')); loadTestFile(require.resolve('./_classic_table_doc_navigation')); loadTestFile(require.resolve('./_hide_announcements')); + loadTestFile(require.resolve('./_esql_grid')); }); } diff --git a/test/functional/apps/discover/embeddable/_saved_search_embeddable.ts b/test/functional/apps/discover/embeddable/_saved_search_embeddable.ts index f86358e584766..d964eed00cb27 100644 --- a/test/functional/apps/discover/embeddable/_saved_search_embeddable.ts +++ b/test/functional/apps/discover/embeddable/_saved_search_embeddable.ts @@ -134,7 +134,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('should show the the grid toolbar', async () => { await addSearchEmbeddableToDashboard(); - await testSubjects.existOrFail('dscGridToolbar'); + await testSubjects.existOrFail('unifiedDataTableToolbar'); }); }); } diff --git a/test/functional/apps/discover/group1/_discover_histogram.ts b/test/functional/apps/discover/group1/_discover_histogram.ts index ad5563e78f918..e695a7d97ebaa 100644 --- a/test/functional/apps/discover/group1/_discover_histogram.ts +++ b/test/functional/apps/discover/group1/_discover_histogram.ts @@ -304,10 +304,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.discover.saveSearch(savedSearch); await PageObjects.discover.chooseBreakdownField('extension.keyword'); await PageObjects.discover.setChartInterval('Second'); - let requestData = await testSubjects.getAttribute( - 'unifiedHistogramChart', - 'data-request-data' - ); + let requestData = + (await testSubjects.getAttribute('unifiedHistogramChart', 'data-request-data')) ?? ''; expect(JSON.parse(requestData)).to.eql({ dataViewId: 'long-window-logstash-*', timeField: '@timestamp', @@ -318,7 +316,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.discover.waitUntilSearchingHasFinished(); await PageObjects.discover.revertUnsavedChanges(); await PageObjects.discover.waitUntilSearchingHasFinished(); - requestData = await testSubjects.getAttribute('unifiedHistogramChart', 'data-request-data'); + requestData = + (await testSubjects.getAttribute('unifiedHistogramChart', 'data-request-data')) ?? ''; expect(JSON.parse(requestData)).to.eql({ dataViewId: 'long-window-logstash-*', timeField: '@timestamp', diff --git a/test/functional/apps/discover/group1/_greeting_screen.ts b/test/functional/apps/discover/group1/_greeting_screen.ts index f218bc28fc0ce..ea9126cc1d5a5 100644 --- a/test/functional/apps/discover/group1/_greeting_screen.ts +++ b/test/functional/apps/discover/group1/_greeting_screen.ts @@ -11,11 +11,11 @@ import expect from '@kbn/expect'; import { FtrProviderContext } from '../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { - const retry = getService('retry'); const kibanaServer = getService('kibanaServer'); const testSubjects = getService('testSubjects'); const esArchiver = getService('esArchiver'); const security = getService('security'); + const dataViews = getService('dataViews'); const PageObjects = getPageObjects(['common', 'header', 'discover', 'timePicker']); const defaultSettings = { defaultIndex: 'logstash-*', @@ -47,23 +47,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.common.navigateToApp('discover'); await PageObjects.header.waitUntilLoadingHasFinished(); - await testSubjects.click('createDataViewButton'); + await dataViews.createFromPrompt({ name: 'logs', hasTimeField: true }); + expect(await dataViews.isAdHoc()).to.be(false); - await testSubjects.setValue('createIndexPatternTitleInput', 'logs', { - clearWithKeyboard: true, - typeCharByChar: true, - }); - await retry.waitFor('timestamp field loaded', async () => { - const timestampField = await testSubjects.find('timestampField'); - return !(await timestampField.elementHasClass('euiComboBox-isDisabled')); - }); - await testSubjects.click('saveIndexPatternButton'); - await PageObjects.header.waitUntilLoadingHasFinished(); - expect(await PageObjects.discover.isAdHocDataViewSelected()).to.be(false); - - await PageObjects.discover.createAdHocDataView('log', true); - await PageObjects.header.waitUntilLoadingHasFinished(); - expect(await PageObjects.discover.isAdHocDataViewSelected()).to.be(true); + await dataViews.createFromSearchBar({ name: 'log', adHoc: true, hasTimeField: true }); + expect(await dataViews.isAdHoc()).to.be(true); expect(await PageObjects.discover.getIndexPatterns()).to.eql(['log*\nTemporary', 'logs*']); }); diff --git a/test/functional/apps/discover/group1/_no_data.ts b/test/functional/apps/discover/group1/_no_data.ts index 1a80955068bd0..5c5b518166abc 100644 --- a/test/functional/apps/discover/group1/_no_data.ts +++ b/test/functional/apps/discover/group1/_no_data.ts @@ -10,22 +10,13 @@ import { FtrProviderContext } from '../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const log = getService('log'); - const retry = getService('retry'); - const find = getService('find'); const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const testSubjects = getService('testSubjects'); const dataGrid = getService('dataGrid'); + const dataViews = getService('dataViews'); const PageObjects = getPageObjects(['common', 'discover', 'header', 'timePicker']); - const createDataView = async (dataViewName: string) => { - await testSubjects.setValue('createIndexPatternTitleInput', dataViewName, { - clearWithKeyboard: true, - typeCharByChar: true, - }); - await testSubjects.click('saveIndexPatternButton'); - }; - describe('discover no data', () => { const kbnDirectory = 'test/functional/fixtures/kbn_archiver/discover'; @@ -55,24 +46,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await kibanaServer.savedObjects.clean({ types: ['search', 'index-pattern'] }); await PageObjects.common.navigateToApp('discover'); - await testSubjects.click('createDataViewButton'); - await retry.waitForWithTimeout('data view editor form to be visible', 15000, async () => { - return await (await find.byClassName('indexPatternEditor__form')).isDisplayed(); - }); - const dataViewToCreate = 'logstash'; - await createDataView(dataViewToCreate); - await PageObjects.header.waitUntilLoadingHasFinished(); - await retry.waitForWithTimeout( - 'data view selector to include a newly created dataview', - 5000, - async () => { - const dataViewTitle = await PageObjects.discover.getCurrentlySelectedDataView(); - // data view editor will add wildcard symbol by default - // so we need to include it in our original title when comparing - return dataViewTitle === `${dataViewToCreate}*`; - } - ); + await dataViews.createFromPrompt({ name: dataViewToCreate }); + await dataViews.waitForSwitcherToBe(`${dataViewToCreate}*`); }); it('skips to Discover to try ES|QL', async () => { diff --git a/test/functional/apps/discover/group2/_data_grid.ts b/test/functional/apps/discover/group2/_data_grid.ts index cdce56db6e856..6384daabfa863 100644 --- a/test/functional/apps/discover/group2/_data_grid.ts +++ b/test/functional/apps/discover/group2/_data_grid.ts @@ -87,7 +87,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('should show the the grid toolbar', async () => { - await testSubjects.existOrFail('dscGridToolbar'); + await testSubjects.existOrFail('unifiedDataTableToolbar'); }); }); } diff --git a/test/functional/apps/discover/group2/_data_grid_context.ts b/test/functional/apps/discover/group2/_data_grid_context.ts index e8e218625687b..13b3eb994c7db 100644 --- a/test/functional/apps/discover/group2/_data_grid_context.ts +++ b/test/functional/apps/discover/group2/_data_grid_context.ts @@ -98,7 +98,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('should show the the grid toolbar', async () => { - await testSubjects.existOrFail('dscGridToolbar'); + await testSubjects.existOrFail('unifiedDataTableToolbar'); }); it('navigates to context view from embeddable', async () => { diff --git a/test/functional/apps/discover/group2/_data_grid_field_tokens.ts b/test/functional/apps/discover/group2/_data_grid_field_tokens.ts index 1d60fe3cd8c79..895fbee621cb1 100644 --- a/test/functional/apps/discover/group2/_data_grid_field_tokens.ts +++ b/test/functional/apps/discover/group2/_data_grid_field_tokens.ts @@ -48,7 +48,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const fieldIcons = await element.findAllByCssSelector('.kbnFieldIcon svg'); firstFieldIcons = await Promise.all( - fieldIcons.slice(0, 10).map((fieldIcon) => fieldIcon.getAttribute('aria-label')) + fieldIcons.slice(0, 10).map(async (fieldIcon) => { + return (await fieldIcon.getAttribute('aria-label')) ?? ''; + }) ).catch((error) => { log.debug(`error in findFirstFieldIcons: ${error.message}`); return undefined; diff --git a/test/functional/apps/discover/group2/_data_grid_new_line.ts b/test/functional/apps/discover/group2/_data_grid_new_line.ts index 34855d14e10be..8049a86fc1164 100644 --- a/test/functional/apps/discover/group2/_data_grid_new_line.ts +++ b/test/functional/apps/discover/group2/_data_grid_new_line.ts @@ -19,6 +19,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const kibanaServer = getService('kibanaServer'); const dataGrid = getService('dataGrid'); + const dataViews = getService('dataViews'); const PageObjects = getPageObjects([ 'settings', 'common', @@ -62,7 +63,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await kibanaServer.uiSettings.update(defaultSettings); await PageObjects.common.navigateToApp('discover'); await PageObjects.discover.waitUntilSearchingHasFinished(); - await PageObjects.discover.createAdHocDataView(INDEX_NAME, false); + await dataViews.createFromSearchBar({ name: INDEX_NAME, adHoc: true, hasTimeField: false }); await PageObjects.discover.waitUntilSearchingHasFinished(); }); diff --git a/test/functional/apps/discover/group3/_default_columns.ts b/test/functional/apps/discover/group3/_default_columns.ts index 14c95c349b72a..5935a9366534c 100644 --- a/test/functional/apps/discover/group3/_default_columns.ts +++ b/test/functional/apps/discover/group3/_default_columns.ts @@ -11,6 +11,7 @@ import { FtrProviderContext } from '../ftr_provider_context'; export default function ({ getService, getPageObjects }: FtrProviderContext) { const dataGrid = getService('dataGrid'); + const dataViews = getService('dataViews'); const PageObjects = getPageObjects([ 'common', 'discover', @@ -78,31 +79,19 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { 'DestCountry', ]); - await PageObjects.unifiedSearch.switchDataView( - 'discover-dataView-switch-link', - 'Kibana Sample Data Logs (TSDB)', - false - ); + await dataViews.switchToAndValidate('Kibana Sample Data Logs (TSDB)'); await PageObjects.discover.waitUntilSearchingHasFinished(); await PageObjects.discover.expandTimeRangeAsSuggestedInNoResultsMessage(); await PageObjects.discover.waitUntilSearchingHasFinished(); expect(await dataGrid.getHeaderFields()).to.eql(['timestamp', 'message', 'extension']); - await PageObjects.unifiedSearch.switchDataView( - 'discover-dataView-switch-link', - 'kibana_sample_data_flights', - false - ); + await dataViews.switchToAndValidate('kibana_sample_data_flights'); await PageObjects.discover.waitUntilSearchingHasFinished(); await PageObjects.discover.expandTimeRangeAsSuggestedInNoResultsMessage(); await PageObjects.discover.waitUntilSearchingHasFinished(); expect(await dataGrid.getHeaderFields()).to.eql(['timestamp', 'DestCountry']); - await PageObjects.unifiedSearch.switchDataView( - 'discover-dataView-switch-link', - 'logstash-*', - false - ); + await dataViews.switchToAndValidate('logstash-*'); await PageObjects.discover.waitUntilSearchingHasFinished(); await PageObjects.discover.expandTimeRangeAsSuggestedInNoResultsMessage(); await PageObjects.discover.waitUntilSearchingHasFinished(); @@ -116,12 +105,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.discover.waitUntilSearchingHasFinished(); expect(await dataGrid.getHeaderFields()).to.eql(['@timestamp', 'extension', 'bytes']); - - await PageObjects.unifiedSearch.switchDataView( - 'discover-dataView-switch-link', - 'Kibana Sample Data Logs (TSDB)', - false - ); + await dataViews.switchToAndValidate('Kibana Sample Data Logs (TSDB)'); await PageObjects.discover.waitUntilSearchingHasFinished(); await PageObjects.discover.expandTimeRangeAsSuggestedInNoResultsMessage(); await PageObjects.discover.waitUntilSearchingHasFinished(); @@ -132,11 +116,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { 'message', ]); - await PageObjects.unifiedSearch.switchDataView( - 'discover-dataView-switch-link', - 'logstash-*', - false - ); + await dataViews.switchToAndValidate('logstash-*'); await PageObjects.discover.waitUntilSearchingHasFinished(); await PageObjects.discover.expandTimeRangeAsSuggestedInNoResultsMessage(); await PageObjects.discover.waitUntilSearchingHasFinished(); @@ -157,11 +137,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { 'DestCountry', ]); - await PageObjects.unifiedSearch.switchDataView( - 'discover-dataView-switch-link', - 'kibana_sample_data_flights', - false - ); + await dataViews.switchToAndValidate('kibana_sample_data_flights'); await PageObjects.discover.waitUntilSearchingHasFinished(); await PageObjects.discover.expandTimeRangeAsSuggestedInNoResultsMessage(); await PageObjects.discover.waitUntilSearchingHasFinished(); diff --git a/test/functional/apps/discover/group3/_lens_vis.ts b/test/functional/apps/discover/group3/_lens_vis.ts index 5747dbd85de64..915b04b7ee537 100644 --- a/test/functional/apps/discover/group3/_lens_vis.ts +++ b/test/functional/apps/discover/group3/_lens_vis.ts @@ -18,16 +18,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const find = getService('find'); const browser = getService('browser'); const toasts = getService('toasts'); - const PageObjects = getPageObjects([ - 'settings', - 'common', - 'discover', - 'header', - 'timePicker', - 'dashboard', - 'unifiedFieldList', - 'unifiedSearch', - ]); + const dataViews = getService('dataViews'); + const PageObjects = getPageObjects(['common', 'discover', 'header', 'timePicker']); const security = getService('security'); const defaultSettings = { defaultIndex: 'logstash-*', @@ -73,11 +65,16 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(await PageObjects.discover.getHitCount()).to.be(totalCount); } - async function changeVisSeriesType(seriesType: string) { + async function openLensEditFlyout() { + await testSubjects.click('discoverQueryTotalHits'); // cancel any tooltips await testSubjects.click('unifiedHistogramEditFlyoutVisualization'); await retry.waitFor('flyout', async () => { return await testSubjects.exists('lnsChartSwitchPopover'); }); + } + + async function changeVisSeriesType(seriesType: string) { + await openLensEditFlyout(); await testSubjects.click('lnsChartSwitchPopover'); await testSubjects.setValue('lnsChartSwitchSearch', seriesType, { clearWithKeyboard: true, @@ -94,7 +91,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { async function getCurrentVisSeriesTypeLabel() { await toasts.dismissAll(); - await testSubjects.click('unifiedHistogramEditFlyoutVisualization'); + await openLensEditFlyout(); const seriesType = await testSubjects.getVisibleText('lnsChartSwitchPopover'); await testSubjects.click('cancelFlyoutButton'); return seriesType; @@ -107,7 +104,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { return await chartElement.getAttribute('data-title'); } - describe('discover lens vis', function describeIndexTests() { + describe('discover lens vis', function () { before(async () => { await security.testUser.setRoles(['kibana_admin', 'test_logstash_reader']); await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); @@ -171,13 +168,15 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('should show no histogram for non-time-based data views and recover for time-based data views', async () => { - await PageObjects.discover.createAdHocDataView('logs*', false); - + await dataViews.createFromSearchBar({ + name: 'logs', + adHoc: true, + hasTimeField: true, + changeTimestampField: `--- I don't want to use the time filter ---`, + }); await checkNoVis(defaultTotalCount); - await PageObjects.discover.clickIndexPatternActions(); - await PageObjects.unifiedSearch.editDataView('logs*', '@timestamp'); - + await dataViews.editFromSearchBar({ newName: 'logs', newTimeField: '@timestamp' }); await checkHistogramVis(defaultTimespan, defaultTotalCount); }); @@ -657,7 +656,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(await getCurrentVisSeriesTypeLabel()).to.be('Donut'); expect(await getCurrentVisChartTitle()).to.be('Donut'); - await testSubjects.click('unifiedHistogramEditFlyoutVisualization'); // open the flyout + await openLensEditFlyout(); await testSubjects.existOrFail('lnsEditOnFlyFlyout'); await testSubjects.existOrFail('unsavedChangesBadge'); diff --git a/test/functional/apps/discover/group3/_panels_toggle.ts b/test/functional/apps/discover/group3/_panels_toggle.ts index d471969d3528f..f2cc179b58fa3 100644 --- a/test/functional/apps/discover/group3/_panels_toggle.ts +++ b/test/functional/apps/discover/group3/_panels_toggle.ts @@ -14,6 +14,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const kibanaServer = getService('kibanaServer'); const testSubjects = getService('testSubjects'); const monacoEditor = getService('monacoEditor'); + const dataViews = getService('dataViews'); const PageObjects = getPageObjects([ 'settings', 'common', @@ -205,7 +206,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await kibanaServer.uiSettings.update(defaultSettings); await PageObjects.common.navigateToApp('discover'); await PageObjects.header.waitUntilLoadingHasFinished(); - await PageObjects.discover.createAdHocDataView('log*', false); + await dataViews.createFromSearchBar({ + name: 'log*', + adHoc: true, + hasTimeField: false, + }); await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); }); @@ -249,8 +254,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await kibanaServer.uiSettings.update(defaultSettings); await PageObjects.common.navigateToApp('discover'); await PageObjects.header.waitUntilLoadingHasFinished(); - await PageObjects.discover.createAdHocDataView('log*', false); - await PageObjects.header.waitUntilLoadingHasFinished(); + await dataViews.createFromSearchBar({ + name: 'log*', + adHoc: true, + hasTimeField: false, + }); await PageObjects.discover.selectTextBaseLang(); await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); }); diff --git a/test/functional/apps/discover/group3/_sidebar.ts b/test/functional/apps/discover/group3/_sidebar.ts index d536e09920590..2605f2bf93559 100644 --- a/test/functional/apps/discover/group3/_sidebar.ts +++ b/test/functional/apps/discover/group3/_sidebar.ts @@ -26,6 +26,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const monacoEditor = getService('monacoEditor'); const filterBar = getService('filterBar'); const fieldEditor = getService('fieldEditor'); + const dataViews = getService('dataViews'); const retry = getService('retry'); const dataGrid = getService('dataGrid'); const INITIAL_FIELD_LIST_SUMMARY = '48 available fields. 5 empty fields. 3 meta fields.'; @@ -490,7 +491,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { INITIAL_FIELD_LIST_SUMMARY ); - await PageObjects.discover.selectIndexPattern('with-timefield'); + await dataViews.switchToAndValidate('with-timefield'); await PageObjects.header.waitUntilLoadingHasFinished(); await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); @@ -507,7 +508,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { )}NoFieldsCallout-noFieldsExist` ); - await PageObjects.discover.selectIndexPattern('logstash-*'); + await dataViews.switchToAndValidate('logstash-*'); await PageObjects.header.waitUntilLoadingHasFinished(); await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); @@ -535,7 +536,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { INITIAL_FIELD_LIST_SUMMARY ); - await PageObjects.discover.selectIndexPattern('without-timefield'); + await dataViews.switchToAndValidate('without-timefield'); await PageObjects.header.waitUntilLoadingHasFinished(); await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); @@ -544,7 +545,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { '6 available fields. 3 meta fields.' ); - await PageObjects.discover.selectIndexPattern('with-timefield'); + await dataViews.switchToAndValidate('with-timefield'); await PageObjects.header.waitUntilLoadingHasFinished(); await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); @@ -558,7 +559,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { )}NoFieldsCallout-noFieldsMatch` ); - await PageObjects.discover.selectIndexPattern('logstash-*'); + await dataViews.switchToAndValidate('logstash-*'); await PageObjects.header.waitUntilLoadingHasFinished(); await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); @@ -614,7 +615,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { INITIAL_FIELD_LIST_SUMMARY ); - await PageObjects.discover.selectIndexPattern('indices-stats*'); + await dataViews.switchToAndValidate('indices-stats*'); await PageObjects.header.waitUntilLoadingHasFinished(); await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); @@ -623,7 +624,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { '6873 available fields. 3 meta fields.' ); - await PageObjects.discover.selectIndexPattern('logstash-*'); + await dataViews.switchToAndValidate('logstash-*'); await PageObjects.header.waitUntilLoadingHasFinished(); await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); @@ -639,9 +640,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('should work with ad-hoc data views and runtime fields', async () => { - await PageObjects.discover.createAdHocDataView('logstash', true); - await PageObjects.header.waitUntilLoadingHasFinished(); - + await dataViews.createFromSearchBar({ + name: 'logstash', + adHoc: true, + hasTimeField: true, + }); expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be( INITIAL_FIELD_LIST_SUMMARY ); @@ -749,7 +752,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { INITIAL_FIELD_LIST_SUMMARY ); - await PageObjects.discover.selectIndexPattern('with-timefield'); + await dataViews.switchToAndValidate('with-timefield'); await PageObjects.header.waitUntilLoadingHasFinished(); await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); diff --git a/test/functional/apps/discover/group3/_time_field_column.ts b/test/functional/apps/discover/group3/_time_field_column.ts index 8ed5188151bad..cbcb37a1294e7 100644 --- a/test/functional/apps/discover/group3/_time_field_column.ts +++ b/test/functional/apps/discover/group3/_time_field_column.ts @@ -30,6 +30,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const dashboardAddPanel = getService('dashboardAddPanel'); const dashboardPanelActions = getService('dashboardPanelActions'); const monacoEditor = getService('monacoEditor'); + const dataViews = getService('dataViews'); const testSubjects = getService('testSubjects'); const security = getService('security'); const docTable = getService('docTable'); @@ -257,9 +258,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { describe('without a time field', () => { beforeEach(async () => { - await PageObjects.discover.createAdHocDataView('logs*', false); + await dataViews.createFromSearchBar({ + name: 'logs*', + adHoc: true, + hasTimeField: false, + }); await PageObjects.discover.waitUntilSearchingHasFinished(); - await PageObjects.header.waitUntilLoadingHasFinished(); }); it('should render initial columns correctly', async () => { @@ -346,7 +350,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { `${SEARCH_NO_COLUMNS}${savedSearchSuffix}ESQL` ); await PageObjects.discover.waitUntilSearchingHasFinished(); - expect(await docTable.getHeaderFields()).to.eql( + expect(await dataGrid.getHeaderFields()).to.eql( hideTimeFieldColumnSetting ? ['Document'] : ['@timestamp', 'Document'] ); @@ -354,9 +358,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { `${SEARCH_NO_COLUMNS}${savedSearchSuffix}ESQLdrop` ); await PageObjects.discover.waitUntilSearchingHasFinished(); - expect(await docTable.getHeaderFields()).to.eql( - hideTimeFieldColumnSetting ? ['Document'] : ['@timestamp', 'Document'] - ); + expect(await dataGrid.getHeaderFields()).to.eql(['Document']); // only @timestamp is selected await PageObjects.discover.loadSavedSearch( @@ -377,8 +379,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { `${SEARCH_WITH_ONLY_TIMESTAMP}${savedSearchSuffix}ESQL` ); await PageObjects.discover.waitUntilSearchingHasFinished(); - expect(await docTable.getHeaderFields()).to.eql( - hideTimeFieldColumnSetting ? ['@timestamp'] : ['@timestamp', '@timestamp'] + expect(await dataGrid.getHeaderFields()).to.eql( + hideTimeFieldColumnSetting ? ['@timestamp'] : ['@timestamp', 'Document'] ); }); @@ -404,11 +406,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { `${SEARCH_WITH_SELECTED_COLUMNS}${savedSearchSuffix}ESQL` ); await PageObjects.discover.waitUntilSearchingHasFinished(); - expect(await docTable.getHeaderFields()).to.eql( - hideTimeFieldColumnSetting - ? ['bytes', 'extension'] - : ['@timestamp', 'bytes', 'extension'] - ); + expect(await dataGrid.getHeaderFields()).to.eql(['bytes', 'extension']); // with selected columns and @timestamp await PageObjects.discover.loadSavedSearch( @@ -431,11 +429,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { `${SEARCH_WITH_SELECTED_COLUMNS_AND_TIMESTAMP}${savedSearchSuffix}ESQL` ); await PageObjects.discover.waitUntilSearchingHasFinished(); - expect(await docTable.getHeaderFields()).to.eql( - hideTimeFieldColumnSetting - ? ['bytes', 'extension', '@timestamp'] - : ['@timestamp', 'bytes', 'extension', '@timestamp'] - ); + expect(await dataGrid.getHeaderFields()).to.eql(['bytes', 'extension', '@timestamp']); }); }); }); diff --git a/test/functional/apps/discover/group3/_view_mode_toggle.ts b/test/functional/apps/discover/group3/_view_mode_toggle.ts index 62c78efbc2432..935b75bf61937 100644 --- a/test/functional/apps/discover/group3/_view_mode_toggle.ts +++ b/test/functional/apps/discover/group3/_view_mode_toggle.ts @@ -61,7 +61,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await testSubjects.existOrFail('dscViewModeToggle'); if (!useLegacyTable) { - await testSubjects.existOrFail('dscGridToolbar'); + await testSubjects.existOrFail('unifiedDataTableToolbar'); } const documentsTab = await testSubjects.find('dscViewModeDocumentButton'); @@ -114,7 +114,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await testSubjects.missingOrFail('dscViewModeToggle'); if (!useLegacyTable) { - await testSubjects.existOrFail('dscGridToolbar'); + await testSubjects.existOrFail('unifiedDataTableToolbar'); } }); diff --git a/test/functional/apps/discover/group4/_adhoc_data_views.ts b/test/functional/apps/discover/group4/_adhoc_data_views.ts index f84b69d2184a1..4a25441ad531f 100644 --- a/test/functional/apps/discover/group4/_adhoc_data_views.ts +++ b/test/functional/apps/discover/group4/_adhoc_data_views.ts @@ -34,6 +34,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { ]); const find = getService('find'); const security = getService('security'); + const dataViews = getService('dataViews'); const addSearchToDashboard = async (name: string) => { await dashboardAddPanel.addSavedSearch(name); @@ -57,8 +58,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('should navigate back correctly from to surrounding and single views', async () => { - await PageObjects.discover.createAdHocDataView('logstash', true); - await PageObjects.header.waitUntilLoadingHasFinished(); + await dataViews.createFromSearchBar({ + name: 'logstash', + adHoc: true, + hasTimeField: true, + }); const first = await PageObjects.discover.getCurrentDataViewId(); await PageObjects.discover.addRuntimeField( @@ -79,7 +83,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await testSubjects.click('~breadcrumb & ~first'); await PageObjects.header.waitUntilLoadingHasFinished(); - expect(await PageObjects.discover.getCurrentlySelectedDataView()).to.be('logstash*'); + expect(await dataViews.getSelectedName()).to.be('logstash*'); // navigate to single doc view await dataGrid.clickRowToggle({ rowIndex: 0 }); @@ -90,7 +94,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await testSubjects.click('~breadcrumb & ~first'); await PageObjects.header.waitUntilLoadingHasFinished(); - expect(await PageObjects.discover.getCurrentlySelectedDataView()).to.be('logstash*'); + expect(await dataViews.getSelectedName()).to.be('logstash*'); }); it('should support query and filtering', async () => { @@ -136,8 +140,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('search results should be different after data view update', async () => { - await PageObjects.discover.createAdHocDataView('logst', true); - await PageObjects.header.waitUntilLoadingHasFinished(); + await dataViews.createFromSearchBar({ + name: 'logst', + adHoc: true, + hasTimeField: true, + }); const prevDataViewId = await PageObjects.discover.getCurrentDataViewId(); // trigger data view id update @@ -231,9 +238,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('should notify about invalid filter reffs', async () => { - await PageObjects.discover.createAdHocDataView('logstas', true); - await PageObjects.header.waitUntilLoadingHasFinished(); - + await dataViews.createFromSearchBar({ + name: 'logstas', + adHoc: true, + hasTimeField: true, + }); await filterBar.addFilter({ field: 'nestedField.child', operation: 'is', diff --git a/test/functional/apps/discover/group4/_data_view_edit.ts b/test/functional/apps/discover/group4/_data_view_edit.ts index c4cc4f796e884..381165d1d64f8 100644 --- a/test/functional/apps/discover/group4/_data_view_edit.ts +++ b/test/functional/apps/discover/group4/_data_view_edit.ts @@ -15,6 +15,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const security = getService('security'); const es = getService('es'); const retry = getService('retry'); + const dataViews = getService('dataViews'); + const PageObjects = getPageObjects([ 'common', 'unifiedSearch', @@ -72,11 +74,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }, }); - await PageObjects.discover.createAdHocDataView(initialPattern, true); - - await retry.waitFor('current data view to get updated', async () => { - return (await PageObjects.discover.getCurrentlySelectedDataView()) === `${initialPattern}*`; + await dataViews.createFromSearchBar({ + name: initialPattern, + adHoc: true, + hasTimeField: true, }); + await dataViews.waitForSwitcherToBe(`${initialPattern}*`); await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); expect(await PageObjects.discover.getHitCountInt()).to.be(2); @@ -85,8 +88,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { it('create saved data view', async function () { const updatedPattern = 'my-index-000001'; - await PageObjects.discover.clickIndexPatternActions(); - await PageObjects.unifiedSearch.createNewDataView(updatedPattern, false, true); + await dataViews.createFromSearchBar({ + name: updatedPattern, + adHoc: false, + hasTimeField: true, + }); await retry.try(async () => { expect(await PageObjects.discover.getHitCountInt()).to.be(1); @@ -118,8 +124,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }, }); } - await PageObjects.discover.clickIndexPatternActions(); - await PageObjects.unifiedSearch.editDataView(updatedPattern, 'timestamp'); + await dataViews.editFromSearchBar({ newName: updatedPattern, newTimeField: 'timestamp' }); await retry.try(async () => { expect(await PageObjects.discover.getHitCountInt()).to.be(3); }); @@ -130,11 +135,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('update data view with no time field', async function () { - await PageObjects.discover.clickIndexPatternActions(); - await PageObjects.unifiedSearch.editDataView( - undefined, - "--- I don't want to use the time filter ---" - ); + await dataViews.editFromSearchBar({ + newTimeField: "--- I don't want to use the time filter ---", + }); await retry.try(async () => { expect(await PageObjects.discover.getHitCountInt()).to.be(4); }); diff --git a/test/functional/apps/discover/group4/_document_comparison.ts b/test/functional/apps/discover/group4/_document_comparison.ts new file mode 100644 index 0000000000000..592567c0f854c --- /dev/null +++ b/test/functional/apps/discover/group4/_document_comparison.ts @@ -0,0 +1,262 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import expect from '@kbn/expect'; +import { FtrProviderContext } from '../ftr_provider_context'; + +export default function ({ getService, getPageObjects }: FtrProviderContext) { + const esArchiver = getService('esArchiver'); + const PageObjects = getPageObjects(['common', 'discover', 'timePicker', 'unifiedFieldList']); + const kibanaServer = getService('kibanaServer'); + const security = getService('security'); + const dataGrid = getService('dataGrid'); + const monacoEditor = getService('monacoEditor'); + const testSubjects = getService('testSubjects'); + + describe('Discover document comparison', () => { + before(async () => { + await security.testUser.setRoles(['kibana_admin', 'test_logstash_reader']); + await kibanaServer.importExport.load('test/functional/fixtures/kbn_archiver/discover.json'); + await esArchiver.loadIfNeeded('test/functional/fixtures/es_archiver/logstash_functional'); + await kibanaServer.uiSettings.replace({ defaultIndex: 'logstash-*' }); + }); + + after(async () => { + await kibanaServer.importExport.unload('test/functional/fixtures/kbn_archiver/discover.json'); + await esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional'); + await kibanaServer.uiSettings.replace({}); + await kibanaServer.savedObjects.cleanStandardList(); + }); + + describe('data view mode', () => { + before(async () => { + await PageObjects.common.navigateToApp('discover'); + await PageObjects.timePicker.setDefaultAbsoluteRange(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + }); + + runComparisonTests({ + comparisonDisplay: 'Comparing 2 documents', + tableHeaders: ['Field', 'AU_x3_g4GFA8no6QjkYX', 'AU_x3-TcGFA8no6Qjipx'], + fullFieldNames: [ + '@timestamp', + '_id', + '_index', + '@message', + '@message.raw', + '@tags', + '@tags.raw', + 'agent', + 'agent.raw', + 'bytes', + 'clientip', + 'extension', + 'extension.raw', + 'geo.coordinates', + 'geo.dest', + ], + selectedFieldNames: ['@timestamp', 'extension', 'bytes', '@message', 'agent'], + extensionRowIndex: 1, + bytesRowIndex: 2, + }); + }); + + describe('ES|QL mode', () => { + before(async () => { + await PageObjects.common.navigateToApp('discover'); + await PageObjects.timePicker.setDefaultAbsoluteRange(); + await PageObjects.discover.selectTextBaseLang(); + await monacoEditor.setCodeEditorValue('from logstash-* | sort @timestamp desc | limit 10'); + await testSubjects.click('querySubmitButton'); + await PageObjects.discover.waitUntilSearchingHasFinished(); + }); + + runComparisonTests({ + comparisonDisplay: 'Comparing 2 results', + tableHeaders: ['Field', 'Result 1', 'Result 2'], + fullFieldNames: [ + '@timestamp', + '@message', + '@message.raw', + '@tags', + '@tags.raw', + 'agent', + 'agent.raw', + 'bytes', + 'clientip', + 'extension', + 'extension.raw', + 'geo.coordinates', + 'geo.dest', + 'geo.src', + 'geo.srcdest', + ], + selectedFieldNames: ['extension', 'bytes', '@message', 'agent'], + extensionRowIndex: 0, + bytesRowIndex: 1, + }); + }); + }); + + function runComparisonTests({ + comparisonDisplay, + tableHeaders, + fullFieldNames, + selectedFieldNames, + extensionRowIndex, + bytesRowIndex, + }: { + comparisonDisplay: string; + tableHeaders: string[]; + fullFieldNames: string[]; + selectedFieldNames: string[]; + extensionRowIndex: number; + bytesRowIndex: number; + }) { + it('should allow comparing documents', async () => { + await dataGrid.selectRow(0); + expect(await dataGrid.compareSelectedButtonExists()).to.be(false); + await dataGrid.selectRow(1); + expect(await dataGrid.compareSelectedButtonExists()).to.be(true); + await dataGrid.clickCompareSelectedButton(); + await dataGrid.waitForComparisonModeToLoad(); + expect(await dataGrid.getComparisonDisplay()).to.be(comparisonDisplay); + }); + + it('should allow selecting comparison fields', async () => { + const headers = await dataGrid.getHeaders(); + expect(headers).to.eql(tableHeaders); + let fieldNames = await dataGrid.getComparisonFieldNames(); + expect(fieldNames.length >= fullFieldNames.length).to.be(true); + expect(fieldNames.slice(0, fullFieldNames.length)).to.eql(fullFieldNames); + await dataGrid.openComparisonSettingsMenu(); + expect(await dataGrid.showAllFieldsSwitchExists()).to.be(false); + await PageObjects.unifiedFieldList.clickFieldListItemAdd('extension'); + await PageObjects.unifiedFieldList.clickFieldListItemAdd('bytes'); + await PageObjects.unifiedFieldList.clickFieldListItemAdd('@message'); + await PageObjects.unifiedFieldList.clickFieldListItemAdd('agent'); + fieldNames = await dataGrid.getComparisonFieldNames(); + expect(fieldNames).have.length(selectedFieldNames.length); + expect(fieldNames).to.eql(selectedFieldNames); + }); + + const testDiffMode = async ({ + diffMode, + expectedExtensionValues, + expectedBytesValues, + }: { + diffMode?: Parameters[0]; + expectedExtensionValues: string[]; + expectedBytesValues: string[]; + }) => { + if (diffMode) { + await dataGrid.selectComparisonDiffMode(diffMode); + } + const extensionRow = await dataGrid.getComparisonRow(extensionRowIndex); + expect(extensionRow.fieldName).to.be('extension'); + expect(extensionRow.values).to.eql(expectedExtensionValues); + const bytesRow = await dataGrid.getComparisonRow(bytesRowIndex); + expect(bytesRow.fieldName).to.be('bytes'); + expect(bytesRow.values).to.eql(expectedBytesValues); + }; + + it('should allow changing diff modes', async () => { + await testDiffMode({ + diffMode: 'basic', + expectedExtensionValues: ['jpg', 'jpg'], + expectedBytesValues: ['7,124', '5,453'], + }); + await testDiffMode({ + diffMode: 'chars', + expectedExtensionValues: [ + 'jpg', + 'jpg', + ], + expectedBytesValues: [ + '7124', + '712' + + '5' + + '4' + + '53', + ], + }); + await testDiffMode({ + diffMode: 'words', + expectedExtensionValues: [ + 'jpg', + 'jpg', + ], + expectedBytesValues: [ + '7124', + '7124' + + '5453', + ], + }); + await testDiffMode({ + diffMode: 'lines', + expectedExtensionValues: [ + 'jpg', + '
jpg
', + ], + expectedBytesValues: [ + '7124', + '
7124
' + + '
5453
', + ], + }); + }); + + it('should allow toggling show diff switch', async () => { + await dataGrid.toggleShowDiffSwitch(); + await testDiffMode({ + expectedExtensionValues: ['jpg', 'jpg'], + expectedBytesValues: ['7,124', '5,453'], + }); + await dataGrid.toggleShowDiffSwitch(); + }); + + it('should allow toggling all fields', async () => { + await dataGrid.selectComparisonDiffMode('basic'); + await dataGrid.toggleShowAllFieldsSwitch(); + const fieldNames = await dataGrid.getComparisonFieldNames(); + expect(fieldNames.length >= fullFieldNames.length).to.be(true); + await dataGrid.toggleShowAllFieldsSwitch(); + }); + + it('should allow toggling matching values', async () => { + let fieldNames = await dataGrid.getComparisonFieldNames(); + expect(fieldNames).have.length(selectedFieldNames.length); + await dataGrid.toggleShowMatchingValuesSwitch(); + fieldNames = await dataGrid.getComparisonFieldNames(); + expect(fieldNames).have.length(selectedFieldNames.length - 1); + expect(fieldNames).to.eql(selectedFieldNames.filter((name) => name !== 'extension')); + await dataGrid.toggleShowMatchingValuesSwitch(); + }); + + it('should allow toggling diff decorations', async () => { + await dataGrid.selectComparisonDiffMode('words'); + let diffSegments = await dataGrid.getComparisonDiffSegments(bytesRowIndex, 2); + expect(diffSegments).to.eql([ + { decoration: 'removed', value: '7124' }, + { decoration: 'added', value: '5453' }, + ]); + await dataGrid.toggleShowDiffDecorationsSwitch(); + diffSegments = await dataGrid.getComparisonDiffSegments(bytesRowIndex, 2); + expect(diffSegments).to.eql([ + { decoration: undefined, value: '7124' }, + { decoration: undefined, value: '5453' }, + ]); + await dataGrid.toggleShowDiffDecorationsSwitch(); + }); + + it('should allow exiting comparison mode', async () => { + await dataGrid.exitComparisonMode(); + await PageObjects.discover.waitForDocTableLoadingComplete(); + }); + } +} diff --git a/test/functional/apps/discover/group4/_esql_view.ts b/test/functional/apps/discover/group4/_esql_view.ts index 1a328e415b951..09dcbe0d9577d 100644 --- a/test/functional/apps/discover/group4/_esql_view.ts +++ b/test/functional/apps/discover/group4/_esql_view.ts @@ -19,11 +19,14 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const monacoEditor = getService('monacoEditor'); const security = getService('security'); const retry = getService('retry'); + const browser = getService('browser'); const find = getService('find'); const esql = getService('esql'); + const dashboardAddPanel = getService('dashboardAddPanel'); const PageObjects = getPageObjects([ 'common', 'discover', + 'dashboard', 'header', 'timePicker', 'unifiedFieldList', @@ -81,7 +84,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(await testSubjects.exists('discoverQueryHits')).to.be(true); expect(await testSubjects.exists('discoverAlertsButton')).to.be(true); expect(await testSubjects.exists('shareTopNavButton')).to.be(true); - expect(await testSubjects.exists('dataGridColumnSortingButton')).to.be(false); + expect(await testSubjects.exists('dataGridColumnSortingButton')).to.be(true); expect(await testSubjects.exists('docTableExpandToggleColumn')).to.be(true); expect(await testSubjects.exists('fieldListFiltersFieldTypeFilterToggle')).to.be(true); await testSubjects.click('field-@message-showDetails'); @@ -324,5 +327,174 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await historyItem.findByTestSubject('TextBasedLangEditor-queryHistory-error'); }); }); + + describe('sorting', () => { + it('should sort correctly', async () => { + const savedSearchName = 'testSorting'; + + await PageObjects.discover.selectTextBaseLang(); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + + const testQuery = 'from logstash-* | sort @timestamp | limit 100'; + await monacoEditor.setCodeEditorValue(testQuery); + await testSubjects.click('querySubmitButton'); + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); + + await PageObjects.unifiedFieldList.clickFieldListItemAdd('bytes'); + + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + + await retry.waitFor('first cell contains an initial value', async () => { + const cell = await dataGrid.getCellElement(0, 2); + const text = await cell.getVisibleText(); + return text === '1,623'; + }); + + expect(await testSubjects.getVisibleText('dataGridColumnSortingButton')).to.be( + 'Sort fields' + ); + + await dataGrid.clickDocSortDesc('bytes', 'Sort High-Low'); + + await PageObjects.discover.waitUntilSearchingHasFinished(); + + await retry.waitFor('first cell contains the highest value', async () => { + const cell = await dataGrid.getCellElement(0, 2); + const text = await cell.getVisibleText(); + return text === '483'; + }); + + expect(await testSubjects.getVisibleText('dataGridColumnSortingButton')).to.be( + 'Sort fields\n1' + ); + + await PageObjects.discover.saveSearch(savedSearchName); + + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + + await retry.waitFor('first cell contains the same highest value', async () => { + const cell = await dataGrid.getCellElement(0, 2); + const text = await cell.getVisibleText(); + return text === '483'; + }); + + await browser.refresh(); + + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + + await retry.waitFor('first cell contains the same highest value after reload', async () => { + const cell = await dataGrid.getCellElement(0, 2); + const text = await cell.getVisibleText(); + return text === '483'; + }); + + await PageObjects.discover.clickNewSearchButton(); + + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + + await PageObjects.discover.loadSavedSearch(savedSearchName); + + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + + await retry.waitFor( + 'first cell contains the same highest value after reopening', + async () => { + const cell = await dataGrid.getCellElement(0, 2); + const text = await cell.getVisibleText(); + return text === '483'; + } + ); + + await dataGrid.clickDocSortDesc('bytes', 'Sort Low-High'); + + await PageObjects.discover.waitUntilSearchingHasFinished(); + + await retry.waitFor('first cell contains the lowest value', async () => { + const cell = await dataGrid.getCellElement(0, 2); + const text = await cell.getVisibleText(); + return text === '0'; + }); + + expect(await testSubjects.getVisibleText('dataGridColumnSortingButton')).to.be( + 'Sort fields\n1' + ); + + await PageObjects.unifiedFieldList.clickFieldListItemAdd('extension'); + + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + + await dataGrid.clickDocSortDesc('extension', 'Sort A-Z'); + + await retry.waitFor('first cell contains the lowest value for extension', async () => { + const cell = await dataGrid.getCellElement(0, 3); + const text = await cell.getVisibleText(); + return text === 'css'; + }); + + expect(await testSubjects.getVisibleText('dataGridColumnSortingButton')).to.be( + 'Sort fields\n2' + ); + + await browser.refresh(); + + await PageObjects.header.waitUntilLoadingHasFinished(); + await PageObjects.discover.waitUntilSearchingHasFinished(); + + await retry.waitFor('first cell contains the same lowest value after reload', async () => { + const cell = await dataGrid.getCellElement(0, 2); + const text = await cell.getVisibleText(); + return text === '0'; + }); + + await retry.waitFor( + 'first cell contains the same lowest value for extension after reload', + async () => { + const cell = await dataGrid.getCellElement(0, 3); + const text = await cell.getVisibleText(); + return text === 'css'; + } + ); + + await PageObjects.discover.saveSearch(savedSearchName); + + await PageObjects.common.navigateToApp('dashboard'); + await PageObjects.dashboard.clickNewDashboard(); + await PageObjects.timePicker.setDefaultAbsoluteRange(); + await dashboardAddPanel.clickOpenAddPanel(); + await dashboardAddPanel.addSavedSearch(savedSearchName); + await PageObjects.header.waitUntilLoadingHasFinished(); + + await retry.waitFor( + 'first cell contains the same lowest value as dashboard panel', + async () => { + const cell = await dataGrid.getCellElement(0, 2); + const text = await cell.getVisibleText(); + return text === '0'; + } + ); + + await retry.waitFor( + 'first cell contains the lowest value for extension as dashboard panel', + async () => { + const cell = await dataGrid.getCellElement(0, 3); + const text = await cell.getVisibleText(); + return text === 'css'; + } + ); + + expect(await testSubjects.getVisibleText('dataGridColumnSortingButton')).to.be( + 'Sort fields\n2' + ); + }); + }); }); } diff --git a/test/functional/apps/discover/group4/_field_list_new_fields.ts b/test/functional/apps/discover/group4/_field_list_new_fields.ts index 4646a57600b4a..b523aa433db6e 100644 --- a/test/functional/apps/discover/group4/_field_list_new_fields.ts +++ b/test/functional/apps/discover/group4/_field_list_new_fields.ts @@ -16,6 +16,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const es = getService('es'); const retry = getService('retry'); const queryBar = getService('queryBar'); + const dataViews = getService('dataViews'); const PageObjects = getPageObjects(['common', 'discover', 'timePicker', 'unifiedFieldList']); describe('Field list new fields in background handling', function () { @@ -52,11 +53,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }, }); - await PageObjects.discover.createAdHocDataView(initialPattern, true); - - await retry.waitFor('current data view to get updated', async () => { - return (await PageObjects.discover.getCurrentlySelectedDataView()) === `${initialPattern}*`; + await dataViews.createFromSearchBar({ + name: initialPattern, + adHoc: true, + hasTimeField: true, }); + await dataViews.waitForSwitcherToBe(`${initialPattern}*`); await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); expect(await PageObjects.discover.getHitCountInt()).to.be(1); @@ -98,11 +100,12 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }, }); - await PageObjects.discover.createAdHocDataView(initialPattern, true); - - await retry.waitFor('current data view to get updated', async () => { - return (await PageObjects.discover.getCurrentlySelectedDataView()) === `${initialPattern}*`; + await dataViews.createFromSearchBar({ + name: initialPattern, + adHoc: true, + hasTimeField: true, }); + await dataViews.waitForSwitcherToBe(`${initialPattern}*`); await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded(); expect(await PageObjects.discover.getHitCountInt()).to.be(1); diff --git a/test/functional/apps/discover/group4/_new_search.ts b/test/functional/apps/discover/group4/_new_search.ts index 2e78a2e3c9901..0b670842e027b 100644 --- a/test/functional/apps/discover/group4/_new_search.ts +++ b/test/functional/apps/discover/group4/_new_search.ts @@ -24,6 +24,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const monacoEditor = getService('monacoEditor'); const testSubjects = getService('testSubjects'); const security = getService('security'); + const dataViews = getService('dataViews'); describe('discover new search action', function () { before(async function () { @@ -61,7 +62,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); it('should work correctly for a saved search in data view mode', async function () { - await PageObjects.discover.createAdHocDataView('logs*', true); + await dataViews.createFromSearchBar({ + name: 'logs*', + adHoc: true, + hasTimeField: true, + }); await filterBar.addFilter({ field: 'extension', operation: 'is', value: 'css' }); await PageObjects.header.waitUntilLoadingHasFinished(); await queryBar.setQuery('bytes > 100'); @@ -81,10 +86,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(await PageObjects.discover.getHitCount()).to.be('14,004'); expect(await filterBar.hasFilter('extension', 'css')).to.be(false); expect(await queryBar.getQueryString()).to.be(''); - expect( - await PageObjects.unifiedSearch.getSelectedDataView('discover-dataView-switch-link') - ).to.be('logs**'); - expect(await PageObjects.discover.isAdHocDataViewSelected()).to.be(true); + expect(await dataViews.getSelectedName()).to.be('logs**'); + expect(await dataViews.isAdHoc()).to.be(true); }); it('should work correctly for ESQL mode', async () => { diff --git a/test/functional/apps/discover/group4/_runtime_fields_editor.ts b/test/functional/apps/discover/group4/_runtime_fields_editor.ts index 1e79a2b829fa4..de43dc8e74e92 100644 --- a/test/functional/apps/discover/group4/_runtime_fields_editor.ts +++ b/test/functional/apps/discover/group4/_runtime_fields_editor.ts @@ -17,6 +17,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const fieldEditor = getService('fieldEditor'); const security = getService('security'); const dataGrid = getService('dataGrid'); + const dataViews = getService('dataViews'); const PageObjects = getPageObjects([ 'common', 'discover', @@ -30,8 +31,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }; const createRuntimeField = async (fieldName: string) => { - await PageObjects.discover.clickIndexPatternActions(); - await PageObjects.discover.clickAddNewField(); + await dataViews.clickAddFieldFromSearchBar(); await fieldEditor.setName(fieldName); await fieldEditor.enableValue(); await fieldEditor.typeScript("emit('abc')"); diff --git a/test/functional/apps/discover/group4/index.ts b/test/functional/apps/discover/group4/index.ts index e8196216c2336..4a145b06cf248 100644 --- a/test/functional/apps/discover/group4/index.ts +++ b/test/functional/apps/discover/group4/index.ts @@ -36,5 +36,6 @@ export default function ({ getService, loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./_field_list_new_fields')); loadTestFile(require.resolve('./_request_cancellation')); loadTestFile(require.resolve('./_new_search')); + loadTestFile(require.resolve('./_document_comparison')); }); } diff --git a/test/functional/apps/kibana_overview/_analytics.ts b/test/functional/apps/kibana_overview/_analytics.ts index 8fd51106cd239..516f9d9e4850b 100644 --- a/test/functional/apps/kibana_overview/_analytics.ts +++ b/test/functional/apps/kibana_overview/_analytics.ts @@ -41,7 +41,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const verifyImageUrl = async (el: WebElementWrapper, imgName: string) => { const image = await el.findByCssSelector('img'); - const imageUrl = await image.getAttribute('src'); + const imageUrl = (await image.getAttribute('src')) ?? ''; expect(imageUrl.includes(imgName)).to.be(true); }; diff --git a/test/functional/apps/kibana_overview/_solutions.ts b/test/functional/apps/kibana_overview/_solutions.ts index 9869a295b6deb..75c80c0916d23 100644 --- a/test/functional/apps/kibana_overview/_solutions.ts +++ b/test/functional/apps/kibana_overview/_solutions.ts @@ -43,7 +43,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { for (let i = 0; i < solutionCards.length; i++) { const solutionCard = solutionCards[i]; const image = await solutionCard.findByCssSelector('img'); - const imageSrc = await image.getAttribute('src'); + const imageSrc = (await image.getAttribute('src')) ?? ''; const match = myRegexp.exec(imageSrc); myRegexp.lastIndex = 0; if (match && match.length > 1) { diff --git a/test/functional/apps/navigation/config.ts b/test/functional/apps/navigation/config.ts deleted file mode 100644 index 19df1f83ec844..0000000000000 --- a/test/functional/apps/navigation/config.ts +++ /dev/null @@ -1,35 +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 { FtrConfigProviderContext } from '@kbn/test'; - -export default async function ({ readConfigFile }: FtrConfigProviderContext) { - const functionalConfig = await readConfigFile(require.resolve('../../config.base.js')); - - return { - ...functionalConfig.getAll(), - testFiles: [require.resolve('.')], - kbnTestServer: { - ...functionalConfig.get('kbnTestServer'), - serverArgs: [ - ...functionalConfig.get('kbnTestServer.serverArgs'), - '--navigation.solutionNavigation.featureOn=true', - '--navigation.solutionNavigation.enabled=true', - '--navigation.solutionNavigation.optInStatus=visible', - '--navigation.solutionNavigation.defaultSolution=es', - // Note: the base64 string in the cloud.id config contains the ES endpoint required in the functional tests - '--xpack.cloud.id=ftr_fake_cloud_id:aGVsbG8uY29tOjQ0MyRFUzEyM2FiYyRrYm4xMjNhYmM=', - '--xpack.cloud.base_url=https://cloud.elastic.co', - '--xpack.cloud.deployment_url=/deployments/deploymentId', - '--xpack.cloud.organization_url=/organization/organizationId', - '--xpack.cloud.billing_url=/billing', - '--xpack.cloud.profile_url=/user/userId', - ], - }, - }; -} diff --git a/test/functional/apps/visualize/group1/_no_data.ts b/test/functional/apps/visualize/group1/_no_data.ts index 33b69de9a91c6..64d1a3c138ac9 100644 --- a/test/functional/apps/visualize/group1/_no_data.ts +++ b/test/functional/apps/visualize/group1/_no_data.ts @@ -13,17 +13,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { const testSubjects = getService('testSubjects'); const PageObjects = getPageObjects(['visualize', 'header', 'common']); const esArchiver = getService('esArchiver'); - const find = getService('find'); + const dataViews = getService('dataViews'); const kibanaServer = getService('kibanaServer'); - const createDataView = async (dataViewName: string) => { - await testSubjects.setValue('createIndexPatternTitleInput', dataViewName, { - clearWithKeyboard: true, - typeCharByChar: true, - }); - await testSubjects.click('saveIndexPatternButton'); - }; - describe('no data in visualize', function () { it('should show the integrations component if there is no data', async () => { await esArchiver.unload('test/functional/fixtures/es_archiver/logstash_functional'); @@ -43,15 +35,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await kibanaServer.savedObjects.clean({ types: ['search', 'index-pattern'] }); await PageObjects.common.navigateToApp('visualize'); await PageObjects.header.waitUntilLoadingHasFinished(); - const button = await testSubjects.find('createDataViewButton'); - button.click(); - await retry.waitForWithTimeout('index pattern editor form to be visible', 15000, async () => { - return await (await find.byClassName('indexPatternEditor__form')).isDisplayed(); - }); const dataViewToCreate = 'logstash'; - await createDataView(dataViewToCreate); - await PageObjects.header.waitUntilLoadingHasFinished(); + await dataViews.createFromPrompt({ name: dataViewToCreate }); await retry.waitForWithTimeout( 'data view selector to include a newly created dataview', diff --git a/test/functional/page_objects/console_page.ts b/test/functional/page_objects/console_page.ts index 51e671d26301b..3fdc1e8ab0f74 100644 --- a/test/functional/page_objects/console_page.ts +++ b/test/functional/page_objects/console_page.ts @@ -147,7 +147,7 @@ export class ConsolePageObject extends FtrService { if (!element) return false; const attribute = await element.getAttribute('style'); - return !attribute.includes('display: none;'); + return !attribute?.includes('display: none;'); } public async getAutocompleteSuggestion(index: number = 0) { @@ -321,7 +321,7 @@ export class ConsolePageObject extends FtrService { await blocks[blockNumber].click(); await this.retry.waitFor('json block to be collapsed', async () => { return blocks[blockNumber].getAttribute('class').then((classes) => { - return classes.includes('ace_closed'); + return classes?.includes('ace_closed') ?? false; }); }); } @@ -336,7 +336,7 @@ export class ConsolePageObject extends FtrService { await blocks[blockNumber].click(); await this.retry.waitFor('json block to be expanded', async () => { return blocks[blockNumber].getAttribute('class').then((classes) => { - return classes.includes('ace_open'); + return classes?.includes('ace_open') ?? false; }); }); } @@ -349,7 +349,7 @@ export class ConsolePageObject extends FtrService { } const classes = await blocks[blockNumber].getAttribute('class'); - return classes.includes('ace_open'); + return classes?.includes('ace_open') ?? false; } public async selectCurrentRequest() { @@ -385,7 +385,7 @@ export class ConsolePageObject extends FtrService { }); // style attribute looks like this: "top: 0px; height: 18.5px;" height is the line height - const styleAttribute = await line.getAttribute('style'); + const styleAttribute = (await line.getAttribute('style')) ?? ''; const height = parseFloat(styleAttribute.replace(/.*height: ([+-]?\d+(\.\d+)?).*/, '$1')); const top = parseFloat(styleAttribute.replace(/.*top: ([+-]?\d+(\.\d+)?).*/, '$1')); // calculate the line number by dividing the top position by the line height @@ -490,7 +490,7 @@ export class ConsolePageObject extends FtrService { const path = []; for (const pathPart of requestPath) { const className = await pathPart.getAttribute('class'); - if (className.includes('ace_param')) { + if (className?.includes('ace_param') ?? false) { // This is a parameter, we don't want to include it in the path break; } diff --git a/test/functional/page_objects/dashboard_page.ts b/test/functional/page_objects/dashboard_page.ts index 13a3a860fe7d9..2b98eedbb62f1 100644 --- a/test/functional/page_objects/dashboard_page.ts +++ b/test/functional/page_objects/dashboard_page.ts @@ -696,7 +696,11 @@ export class DashboardPageObject extends FtrService { const attributeName = 'data-shared-items-count'; const element = await this.find.byCssSelector(`[${attributeName}]`); if (element) { - return await element.getAttribute(attributeName); + const attribute = await element.getAttribute(attributeName); + + if (!attribute) throw new Error(`no attribute found for [${attributeName}]`); + + return attribute; } throw new Error('no element'); diff --git a/test/functional/page_objects/dashboard_page_controls.ts b/test/functional/page_objects/dashboard_page_controls.ts index 119b347c2ca69..c57539ba2079b 100644 --- a/test/functional/page_objects/dashboard_page_controls.ts +++ b/test/functional/page_objects/dashboard_page_controls.ts @@ -65,7 +65,9 @@ export class DashboardPageControls extends FtrService { public async getAllControlIds() { const controlFrames = await this.testSubjects.findAll('control-frame'); const ids = await Promise.all( - controlFrames.map(async (controlFrame) => await controlFrame.getAttribute('data-control-id')) + controlFrames.map( + async (controlFrame) => (await controlFrame.getAttribute('data-control-id')) ?? '' + ) ); this.log.debug('Got all control ids:', ids); return ids; @@ -93,7 +95,7 @@ export class DashboardPageControls extends FtrService { public async clearAllControls() { const controlIds = await this.getAllControlIds(); for (const controlId of controlIds) { - await this.removeExistingControl(controlId); + if (controlId) await this.removeExistingControl(controlId); } } @@ -162,7 +164,8 @@ export class DashboardPageControls extends FtrService { false: 'NONE', }; - const switchState = await this.testSubjects.getAttribute('control-group-chaining', 'checked'); + const switchState = + (await this.testSubjects.getAttribute('control-group-chaining', 'checked')) ?? ''; if (chainingSystem !== switchStateToChainingSystem[switchState]) { await this.testSubjects.click('control-group-chaining'); } @@ -432,7 +435,7 @@ export class DashboardPageControls extends FtrService { this.log.debug(`getting available options count from options list`); await this.optionsListPopoverWaitForLoading(); const availableOptions = await this.testSubjects.find(`optionsList-control-available-options`); - return +(await availableOptions.getAttribute('data-option-count')); + return +((await availableOptions.getAttribute('data-option-count')) ?? '0'); } public async optionsListPopoverGetAvailableOptions() { diff --git a/test/functional/page_objects/discover_page.ts b/test/functional/page_objects/discover_page.ts index 47165f90952ee..6704f56e5e0e1 100644 --- a/test/functional/page_objects/discover_page.ts +++ b/test/functional/page_objects/discover_page.ts @@ -16,7 +16,7 @@ export class DiscoverPageObject extends FtrService { private readonly find = this.ctx.getService('find'); private readonly flyout = this.ctx.getService('flyout'); private readonly header = this.ctx.getPageObject('header'); - private readonly unifiedSearch = this.ctx.getPageObject('unifiedSearch'); + private readonly dataViews = this.ctx.getService('dataViews'); private readonly unifiedFieldList = this.ctx.getPageObject('unifiedFieldList'); private readonly browser = this.ctx.getService('browser'); private readonly globalNav = this.ctx.getService('globalNav'); @@ -356,7 +356,7 @@ export class DiscoverPageObject extends FtrService { return await cell.getVisibleText(); } else { const textContent = await cell.getAttribute('textContent'); - return textContent.trim(); + return textContent?.trim(); } }) ); @@ -482,27 +482,6 @@ export class DiscoverPageObject extends FtrService { }); } - public async clickAddNewField() { - await this.retry.try(async () => { - await this.testSubjects.click('indexPattern-add-field'); - await this.find.byClassName('indexPatternFieldEditor__form'); - }); - } - - async createAdHocDataView(name: string, hasTimeField = false) { - await this.testSubjects.click('discover-dataView-switch-link'); - await this.unifiedSearch.createNewDataView(name, true, hasTimeField); - await this.retry.waitFor('flyout to get closed', async () => { - return !(await this.testSubjects.exists('indexPatternEditor__form')); - }); - } - - async clickAddField() { - await this.testSubjects.click('discover-dataView-switch-link'); - await this.testSubjects.existOrFail('indexPattern-add-field'); - await this.testSubjects.click('indexPattern-add-field'); - } - public async hasNoResults() { return await this.testSubjects.exists('discoverNoResults'); } @@ -552,23 +531,11 @@ export class DiscoverPageObject extends FtrService { return await this.dataGrid.clickDocSortAsc(field, text); } - public async isAdHocDataViewSelected() { - const dataView = await this.getCurrentlySelectedDataView(); - await this.testSubjects.click('discover-dataView-switch-link'); - const hasBadge = await this.testSubjects.exists(`dataViewItemTempBadge-${dataView}`); - await this.testSubjects.click('discover-dataView-switch-link'); - return hasBadge; - } - public async selectIndexPattern( indexPattern: string, waitUntilLoadingHasFinished: boolean = true ) { - await this.testSubjects.click('discover-dataView-switch-link'); - await this.find.setValue('[data-test-subj="indexPattern-switcher"] input', indexPattern); - await this.find.clickByCssSelector( - `[data-test-subj="indexPattern-switcher"] [title="${indexPattern}"]` - ); + await this.dataViews.switchTo(indexPattern); if (waitUntilLoadingHasFinished) { await this.header.waitUntilLoadingHasFinished(); } @@ -711,12 +678,6 @@ export class DiscoverPageObject extends FtrService { }); } - public async getCurrentlySelectedDataView() { - await this.testSubjects.existOrFail('discover-sidebar'); - const button = await this.testSubjects.find('discover-dataView-switch-link'); - return button.getAttribute('title'); - } - /** * Validates if data view references in the URL are equal. */ @@ -755,7 +716,7 @@ export class DiscoverPageObject extends FtrService { } public async addRuntimeField(name: string, script: string, type?: string) { - await this.clickAddField(); + await this.dataViews.clickAddFieldFromSearchBar(); await this.fieldEditor.setName(name); if (type) { await this.fieldEditor.setFieldType(type); diff --git a/test/functional/page_objects/home_page.ts b/test/functional/page_objects/home_page.ts index 4225f52b16994..0c85c51381b94 100644 --- a/test/functional/page_objects/home_page.ts +++ b/test/functional/page_objects/home_page.ts @@ -30,7 +30,7 @@ export class HomePageObject extends FtrService { async openSampleDataAccordion() { const accordionButton = await this.testSubjects.find('showSampleDataButton'); - let expandedAttribute = await accordionButton.getAttribute('aria-expanded'); + let expandedAttribute = (await accordionButton.getAttribute('aria-expanded')) ?? ''; let expanded = expandedAttribute.toLocaleLowerCase().includes('true'); this.log.debug(`Sample data accordion expanded: ${expanded}`); @@ -38,7 +38,7 @@ export class HomePageObject extends FtrService { await this.retry.waitFor('sample data according to be expanded', async () => { this.log.debug(`Opening sample data accordion`); await accordionButton.click(); - expandedAttribute = await accordionButton.getAttribute('aria-expanded'); + expandedAttribute = (await accordionButton.getAttribute('aria-expanded')) ?? ''; expanded = expandedAttribute.toLocaleLowerCase().includes('true'); return expanded; }); @@ -75,7 +75,7 @@ export class HomePageObject extends FtrService { const panelAttributes = await Promise.all( solutionPanels.map((panel) => panel.getAttribute('data-test-subj')) ); - return panelAttributes.map((attributeValue) => attributeValue.split('homSolutionPanel_')[1]); + return panelAttributes.map((attributeValue) => attributeValue?.split('homSolutionPanel_')[1]); } async goToSampleDataPage() { diff --git a/test/functional/page_objects/management/saved_objects_page.ts b/test/functional/page_objects/management/saved_objects_page.ts index b58907d13eabc..cbbb70587ea0e 100644 --- a/test/functional/page_objects/management/saved_objects_page.ts +++ b/test/functional/page_objects/management/saved_objects_page.ts @@ -283,7 +283,7 @@ export class SavedObjectsPageObject extends FtrService { let copySaveObjectsElement = null; const actions = await row.findByClassName('euiTableRowCell--hasActions'); // getting the innerHTML and checking if it 'includes' a string is faster than a timeout looking for each element - const actionsHTML = await actions.getAttribute('innerHTML'); + const actionsHTML = (await actions.getAttribute('innerHTML')) ?? ''; if (actionsHTML.includes('euiCollapsedItemActionsButton')) { menuElement = await row.findByTestSubject('euiCollapsedItemActionsButton'); } diff --git a/test/functional/page_objects/settings_page.ts b/test/functional/page_objects/settings_page.ts index fc1064f1b0464..546e08fe31115 100644 --- a/test/functional/page_objects/settings_page.ts +++ b/test/functional/page_objects/settings_page.ts @@ -131,7 +131,7 @@ export class SettingsPageObject extends FtrService { } async toggleAdvancedSettingCheckbox(propertyName: string, value?: boolean) { - let curValue: string | undefined; + let curValue: string | null; if (value !== undefined) { curValue = await this.getAdvancedSettingAriaCheckbox(propertyName); @@ -669,7 +669,7 @@ export class SettingsPageObject extends FtrService { // case where we don't want the * appended so we'll remove it if it was added await field.type(indexPatternName, { charByChar: true }); const tempName = await field.getAttribute('value'); - if (tempName.length > indexPatternName.length) { + if (tempName?.length ?? 0 > indexPatternName.length) { await field.type(this.browser.keys.DELETE, { charByChar: true }); } } diff --git a/test/functional/page_objects/share_page.ts b/test/functional/page_objects/share_page.ts index ce1dc4c45e21f..f0f5fa0180f21 100644 --- a/test/functional/page_objects/share_page.ts +++ b/test/functional/page_objects/share_page.ts @@ -52,7 +52,7 @@ export class SharePageObject extends FtrService { async getSharedUrl() { await this.openPermaLinks(); - return await this.testSubjects.getAttribute('copyShareUrlButton', 'data-share-url'); + return (await this.testSubjects.getAttribute('copyShareUrlButton', 'data-share-url')) ?? ''; } async createShortUrlExistOrFail() { diff --git a/test/functional/page_objects/tag_cloud_page.ts b/test/functional/page_objects/tag_cloud_page.ts index ba7648b323ca9..56063712c6fa8 100644 --- a/test/functional/page_objects/tag_cloud_page.ts +++ b/test/functional/page_objects/tag_cloud_page.ts @@ -36,7 +36,7 @@ export class TagCloudPageObject extends FtrService { const tags = await this.find.allByCssSelector('text'); async function returnTagSize(tag: WebElementWrapper) { const style = await tag.getAttribute('style'); - const fontSize = style.match(/font-size: ([^;]*);/); + const fontSize = style?.match(/font-size: ([^;]*);/); return fontSize ? fontSize[1] : ''; } return await Promise.all(tags.map(returnTagSize)); diff --git a/test/functional/page_objects/unified_field_list.ts b/test/functional/page_objects/unified_field_list.ts index 152a1b4c1c660..d09ac99e30790 100644 --- a/test/functional/page_objects/unified_field_list.ts +++ b/test/functional/page_objects/unified_field_list.ts @@ -36,9 +36,11 @@ export class UnifiedFieldListPageObject extends FtrService { } public async getSidebarAriaDescription(): Promise { - return await ( - await this.testSubjects.find('fieldListGrouped__ariaDescription') - ).getAttribute('innerText'); + return ( + (await ( + await this.testSubjects.find('fieldListGrouped__ariaDescription') + ).getAttribute('innerText')) ?? '' + ); } public async cleanSidebarLocalStorage(): Promise { @@ -78,7 +80,7 @@ export class UnifiedFieldListPageObject extends FtrService { } return Promise.all( - elements.map(async (element) => await element.getAttribute('data-attr-field')) + elements.map(async (element) => (await element.getAttribute('data-attr-field')) ?? '') ); } diff --git a/test/functional/page_objects/unified_search_page.ts b/test/functional/page_objects/unified_search_page.ts index 3ab2a2f1b54d6..eee70098d2ab1 100644 --- a/test/functional/page_objects/unified_search_page.ts +++ b/test/functional/page_objects/unified_search_page.ts @@ -12,7 +12,6 @@ export class UnifiedSearchPageObject extends FtrService { private readonly retry = this.ctx.getService('retry'); private readonly testSubjects = this.ctx.getService('testSubjects'); private readonly find = this.ctx.getService('find'); - private readonly comboBox = this.ctx.getService('comboBox'); public async switchDataView( switchButtonSelector: string, @@ -46,68 +45,6 @@ export class UnifiedSearchPageObject extends FtrService { return visibleText; } - private async modifyDataView(buttonLocator: string) { - await this.retry.waitForWithTimeout('data create new to be visible', 15000, async () => { - return await this.testSubjects.isDisplayed(buttonLocator); - }); - await this.testSubjects.click(buttonLocator); - await this.retry.waitForWithTimeout( - 'index pattern editor form to be visible', - 15000, - async () => { - return await (await this.find.byClassName('indexPatternEditor__form')).isDisplayed(); - } - ); - await (await this.find.byClassName('indexPatternEditor__form')).click(); - } - - public async clickCreateNewDataView() { - await this.modifyDataView('dataview-create-new'); - } - - public async clickEditDataView() { - await this.modifyDataView('indexPattern-manage-field'); - } - - public async createNewDataView(dataViewPattern: string, adHoc = false, hasTimeField = false) { - await this.clickCreateNewDataView(); - await this.testSubjects.setValue('createIndexPatternTitleInput', dataViewPattern, { - clearWithKeyboard: true, - typeCharByChar: true, - }); - await this.retry.waitFor('timestamp field loaded', async () => { - const timestampField = await this.testSubjects.find('timestampField'); - return hasTimeField - ? !(await timestampField.elementHasClass('euiComboBox-isDisabled')) - : true; - }); - await this.testSubjects.click(adHoc ? 'exploreIndexPatternButton' : 'saveIndexPatternButton'); - } - - public async editDataView(newPattern?: string, newTimeField?: string) { - await this.clickEditDataView(); - if (newPattern) { - await this.testSubjects.setValue('createIndexPatternTitleInput', newPattern, { - clearWithKeyboard: true, - typeCharByChar: true, - }); - } - if (newTimeField) { - await this.comboBox.set('timestampField', newTimeField); - } - await this.testSubjects.click('saveIndexPatternButton'); - if (await this.testSubjects.exists('confirmModalConfirmButton')) { - await this.testSubjects.click('confirmModalConfirmButton'); - } - } - - public async isAdHocDataView() { - const dataViewSwitcher = await this.testSubjects.find('discover-dataView-switch-link'); - const dataViewName = await dataViewSwitcher.getVisibleText(); - await dataViewSwitcher.click(); - return await this.testSubjects.exists(`dataViewItemTempBadge-${dataViewName}`); - } - public async selectTextBasedLanguage(language: string) { await this.find.clickByCssSelector( `[data-test-subj="text-based-languages-switcher"] [title="${language}"]` diff --git a/test/functional/page_objects/visual_builder_page.ts b/test/functional/page_objects/visual_builder_page.ts index 89f1a2e9389c2..d7bb97c5c8809 100644 --- a/test/functional/page_objects/visual_builder_page.ts +++ b/test/functional/page_objects/visual_builder_page.ts @@ -373,7 +373,7 @@ export class VisualBuilderPageObject extends FtrService { return await gaugeCount.getVisibleText(); } - public async getGaugeColor(isInner = false): Promise { + public async getGaugeColor(isInner = false): Promise { await this.visChart.waitForVisualizationRenderingStabilized(); const gaugeColoredCircle = await this.testSubjects.find(`gaugeCircle${isInner ? 'Inner' : ''}`); return await gaugeColoredCircle.getAttribute('stroke'); @@ -395,7 +395,7 @@ export class VisualBuilderPageObject extends FtrService { return await gaugeCount.getVisibleText(); } - public async getTopNBarStyle(nth: number = 0): Promise { + public async getTopNBarStyle(nth: number = 0): Promise { await this.visChart.waitForVisualizationRenderingStabilized(); const topNBars = await this.testSubjects.findAll('topNInnerBar'); return await topNBars[nth].getAttribute('style'); @@ -756,19 +756,19 @@ export class VisualBuilderPageObject extends FtrService { }); } - public async getBackgroundStyle(): Promise { + public async getBackgroundStyle(): Promise { await this.visChart.waitForVisualizationRenderingStabilized(); const visualization = await this.find.byClassName('tvbVis'); return await visualization.getAttribute('style'); } - public async getMetricValueStyle(): Promise { + public async getMetricValueStyle(): Promise { await this.visChart.waitForVisualizationRenderingStabilized(); const metricValue = await this.testSubjects.find('tsvbMetricValue'); return await metricValue.getAttribute('style'); } - public async getGaugeValueStyle(): Promise { + public async getGaugeValueStyle(): Promise { await this.visChart.waitForVisualizationRenderingStabilized(); const metricValue = await this.testSubjects.find('gaugeValue'); return await metricValue.getAttribute('style'); diff --git a/test/functional/page_objects/visualize_chart_page.ts b/test/functional/page_objects/visualize_chart_page.ts index 093fcdb9edbf9..19991de54da03 100644 --- a/test/functional/page_objects/visualize_chart_page.ts +++ b/test/functional/page_objects/visualize_chart_page.ts @@ -63,7 +63,7 @@ export class VisualizeChartPageObject extends FtrService { // check if enabled but not a line, area, histogram or pie chart if (await this.find.existsByCssSelector('.visLib__chart', 1)) { const chart = await this.find.byCssSelector('.visLib__chart'); - const chartType = await chart.getAttribute('data-vislib-chart-type'); + const chartType = (await chart.getAttribute('data-vislib-chart-type')) ?? ''; if (!['line', 'area', 'histogram', 'pie'].includes(chartType)) { this.log.debug(`-- isNewLibraryChart = false`); diff --git a/test/functional/services/combo_box.ts b/test/functional/services/combo_box.ts index 69794f3d2a6c8..cb9134751ae7b 100644 --- a/test/functional/services/combo_box.ts +++ b/test/functional/services/combo_box.ts @@ -108,7 +108,7 @@ export class ComboBoxService extends FtrService { ( await this.find.allByCssSelector(`.euiFilterSelectItem`, this.WAIT_FOR_EXISTS_TIME) ).map(async (e) => { - const title = await e.getAttribute('title'); + const title = (await e.getAttribute('title')) ?? ''; return { title, formattedTitle: title.toLowerCase().trim() }; }) ) diff --git a/test/functional/services/dashboard/panel_drilldown_actions.ts b/test/functional/services/dashboard/panel_drilldown_actions.ts index 5b76ce62dd02d..57fc42f323fbe 100644 --- a/test/functional/services/dashboard/panel_drilldown_actions.ts +++ b/test/functional/services/dashboard/panel_drilldown_actions.ts @@ -62,7 +62,7 @@ export function DashboardDrilldownPanelActionsProvider({ getService }: FtrProvid async getActionHrefByText(text: string) { log.debug(`getActionHref: "${text}"`); const item = await this.getActionWebElementByText(text); - return item.getAttribute('href'); + return (await item.getAttribute('href')) ?? ''; } async openHrefByText(text: string) { diff --git a/test/functional/services/data_grid.ts b/test/functional/services/data_grid.ts index 79d561bd2f855..c12d34c7d50f3 100644 --- a/test/functional/services/data_grid.ts +++ b/test/functional/services/data_grid.ts @@ -83,7 +83,7 @@ export class DataGridService extends FtrService { } private getCellElementSelector(rowIndex: number = 0, columnIndex: number = 0) { - return `[data-test-subj="euiDataGridBody"] [data-test-subj="dataGridRowCell"][data-gridcell-column-index="${columnIndex}"][data-gridcell-row-index="${rowIndex}"]`; + return `[data-test-subj="euiDataGridBody"] [data-test-subj="dataGridRowCell"][data-gridcell-column-index="${columnIndex}"][data-gridcell-visible-row-index="${rowIndex}"]`; } /** @@ -173,8 +173,11 @@ export class DataGridService extends FtrService { return await this.testSubjects.find(selector); } - public async getBodyRows(options?: SelectOptions): Promise { - return this.getDocTableRows(options); + public async getBodyRows( + options?: SelectOptions, + selector: string = 'docTable' + ): Promise { + return this.getDocTableRows(options, selector); } public async getRowsText(renderMoreRows?: boolean) { @@ -201,22 +204,22 @@ export class DataGridService extends FtrService { /** * Returns an array of rows (which are array of cells) */ - public async getDocTableRows(options?: SelectOptions) { + public async getDocTableRows(options?: SelectOptions, selector: string = 'docTable') { // open full screen mode if (options?.renderMoreRows) { await this.testSubjects.click('dataGridFullScreenButton'); } - const table = await this.getTable('docTable'); + const table = await this.getTable(selector); if (!table) { return []; } - const selector = options?.isAnchorRow + const cellSelector = options?.isAnchorRow ? '.euiDataGridRowCell.unifiedDataTable__cell--highlight' : '.euiDataGridRowCell'; - const cells = await table.findAllByCssSelector(selector); + const cells = await table.findAllByCssSelector(cellSelector); const rows: WebElementWrapper[][] = []; let rowIdx = -1; @@ -238,8 +241,11 @@ export class DataGridService extends FtrService { /** * Returns an array of cells for that row */ - public async getRow(options: SelectOptions): Promise { - return (await this.getBodyRows(options))[options.rowIndex || 0]; + public async getRow( + options: SelectOptions, + selector: string = 'docTable' + ): Promise { + return (await this.getBodyRows(options, selector))[options.rowIndex || 0]; } public async clickRowToggle( @@ -479,4 +485,122 @@ export class DataGridService extends FtrService { await this.testSubjects.click(option); await this.checkCurrentRowsPerPageToBe(newValue); } + + public async selectRow(rowIndex: number) { + const columns = await this.getRow({ rowIndex }); + const checkbox = await columns[1].findByClassName('euiCheckbox__input'); + await checkbox.click(); + } + + public async openSelectedRowsMenu() { + await this.testSubjects.click('unifiedDataTableSelectionBtn'); + await this.retry.try(async () => { + return await this.testSubjects.exists('unifiedDataTableSelectionMenu'); + }); + } + + public async compareSelectedButtonExists() { + return await this.testSubjects.exists('unifiedDataTableCompareSelectedDocuments'); + } + + public async clickCompareSelectedButton() { + await this.testSubjects.click('unifiedDataTableCompareSelectedDocuments'); + } + + public async waitForComparisonModeToLoad() { + await this.retry.try(async () => { + return await this.testSubjects.exists('unifiedDataTableCompareDocuments'); + }); + } + + public async getComparisonDisplay() { + const display = await this.testSubjects.find('unifiedDataTableComparisonDisplay'); + return await display.getVisibleText(); + } + + public async getComparisonFieldNames() { + const fields = await this.testSubjects.findAll('unifiedDataTableComparisonFieldName'); + return await Promise.all(fields.map((field) => field.getVisibleText())); + } + + public async getComparisonRow(rowIndex: number) { + const columns = await this.getRow({ rowIndex }, 'unifiedDataTableCompareDocuments'); + const fieldName = await columns[0] + .findByTestSubject('unifiedDataTableComparisonFieldName') + .then((field) => field.getVisibleText()); + const values = await Promise.all( + columns.slice(1).map(async (cell) => + cell + .findByClassName('unifiedDataTable__cellValue') + .then((cellValue) => cellValue.parseDomContent()) + .then((content) => content.html()) + ) + ); + return { fieldName, values }; + } + + public async openComparisonSettingsMenu() { + if (await this.testSubjects.exists('unifiedDataTableComparisonSettingsMenu')) { + return; + } + await this.testSubjects.click('unifiedDataTableComparisonSettings'); + await this.retry.try(async () => { + return await this.testSubjects.exists('unifiedDataTableComparisonSettingsMenu'); + }); + } + + public async toggleShowDiffSwitch() { + await this.openComparisonSettingsMenu(); + await this.testSubjects.click('unifiedDataTableShowDiffSwitch'); + } + + public async selectComparisonDiffMode(diffMode: 'basic' | 'chars' | 'words' | 'lines') { + await this.openComparisonSettingsMenu(); + const menuEntry = await this.testSubjects.find(`unifiedDataTableDiffMode-${diffMode}`); + await menuEntry.click(); + } + + public async getComparisonDiffSegments(rowIndex: number, cellIndex: number) { + const columns = await this.getRow({ rowIndex }, 'unifiedDataTableCompareDocuments'); + const segments = await columns[cellIndex].findAllByClassName( + 'unifiedDataTable__comparisonSegment' + ); + return Promise.all( + segments.map(async (segment) => { + const decoration = await segment.getComputedStyle('text-decoration'); + return { + decoration: decoration.includes('underline') + ? 'added' + : decoration.includes('line-through') + ? 'removed' + : undefined, + value: await segment.getVisibleText(), + }; + }) + ); + } + + public async showAllFieldsSwitchExists() { + await this.openComparisonSettingsMenu(); + return await this.testSubjects.exists('unifiedDataTableDiffOptionSwitch-showAllFields'); + } + + public async toggleShowAllFieldsSwitch() { + await this.openComparisonSettingsMenu(); + await this.testSubjects.click('unifiedDataTableDiffOptionSwitch-showAllFields'); + } + + public async toggleShowMatchingValuesSwitch() { + await this.openComparisonSettingsMenu(); + await this.testSubjects.click('unifiedDataTableDiffOptionSwitch-showMatchingValues'); + } + + public async toggleShowDiffDecorationsSwitch() { + await this.openComparisonSettingsMenu(); + await this.testSubjects.click('unifiedDataTableDiffOptionSwitch-showDiffDecorations'); + } + + public async exitComparisonMode() { + await this.testSubjects.click('unifiedDataTableExitDocumentComparison'); + } } diff --git a/test/functional/services/data_views.ts b/test/functional/services/data_views.ts new file mode 100644 index 0000000000000..d63f47a89cdb0 --- /dev/null +++ b/test/functional/services/data_views.ts @@ -0,0 +1,165 @@ +/* + * Copyright 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 { FtrService } from '../ftr_provider_context'; + +interface DataViewOptions { + name: string; + adHoc?: boolean; + hasTimeField?: boolean; + changeTimestampField?: string; +} + +export class DataViewsService extends FtrService { + private readonly retry = this.ctx.getService('retry'); + private readonly testSubjects = this.ctx.getService('testSubjects'); + private readonly find = this.ctx.getService('find'); + private readonly comboBox = this.ctx.getService('comboBox'); + private readonly header = this.ctx.getPageObjects(['header']).header; + + private async create({ + name, // Data View title, * will be added automatically + adHoc = false, // pass 'true' to have temporary Data View + hasTimeField = false, // pass 'true' if Data View has timestamp field + changeTimestampField, // optionally override default timestamp field + }: DataViewOptions) { + await this.testSubjects.existOrFail('indexPatternEditorFlyout'); + await this.testSubjects.setValue('createIndexPatternTitleInput', name, { + clearWithKeyboard: true, + typeCharByChar: true, + }); + if (hasTimeField) { + await this.retry.waitFor('timestamp field loaded', async () => { + const timestampField = await this.testSubjects.find('timestampField'); + return !(await timestampField.elementHasClass('euiComboBox-isDisabled')); + }); + + if (changeTimestampField) { + await this.comboBox.set('timestampField', changeTimestampField); + } + } + await this.testSubjects.click(adHoc ? 'exploreIndexPatternButton' : 'saveIndexPatternButton'); + await this.header.waitUntilLoadingHasFinished(); + } + + /** + * Create a new Data View from top search bar + */ + async createFromSearchBar({ + name, + adHoc = false, + hasTimeField = false, + changeTimestampField, + }: DataViewOptions) { + await this.testSubjects.click('*dataView-switch-link'); + await this.testSubjects.click('dataview-create-new'); + await this.create({ name, adHoc, hasTimeField, changeTimestampField }); + } + + /** + * Create the first Data View from Prompt, e.g. on Dashboard + */ + async createFromPrompt({ + name, + adHoc = false, + hasTimeField = false, + changeTimestampField, + }: DataViewOptions) { + await this.testSubjects.click('createDataViewButton'); + await this.create({ name, adHoc, hasTimeField, changeTimestampField }); + } + + /** + * Returns name for the currently selected Data View + */ + async getSelectedName() { + return this.testSubjects.getVisibleText('*dataView-switch-link'); + } + + /** + * Checks if currently selected Data View has temporary badge + */ + async isAdHoc() { + const dataView = await this.testSubjects.getAttribute('*dataView-switch-link', 'title'); + await this.testSubjects.click('*dataView-switch-link'); + const hasBadge = await this.testSubjects.exists(`dataViewItemTempBadge-${dataView}`); + await this.testSubjects.click('*dataView-switch-link'); + return hasBadge; + } + + /** + * Opens Create field flayout for the selected Data View + */ + async clickAddFieldFromSearchBar() { + await this.testSubjects.click('*dataView-switch-link'); + await this.testSubjects.click('indexPattern-add-field'); + await this.testSubjects.existOrFail('fieldEditor'); + } + + /** + * Switch Data View from top search bar + */ + public async switchTo(name: string) { + const selectedDataView = await this.getSelectedName(); + if (name === selectedDataView) { + return; + } + await this.testSubjects.click('*dataView-switch-link'); + await this.testSubjects.existOrFail('indexPattern-switcher'); + await this.testSubjects.setValue('indexPattern-switcher--input', name); + await this.find.clickByCssSelector( + `[data-test-subj="indexPattern-switcher"] [title="${name}"]` + ); + } + + /** + * Waits for selected Data View to equal name argument + */ + public async waitForSwitcherToBe(name: string) { + await this.retry.waitFor( + 'Data View switcher to be updated', + async () => (await this.getSelectedName()) === name + ); + } + + /** + * Switch Data View from top search bar and validate selection is applied + */ + public async switchToAndValidate(name: string) { + await this.switchTo(name); + await this.waitForSwitcherToBe(name); + } + + /** + * Edit currently selected Data View + */ + public async editFromSearchBar({ + newName, + newTimeField, + }: { + newName?: string; + newTimeField?: string; + }) { + await this.testSubjects.click('*dataView-switch-link'); + await this.testSubjects.click('indexPattern-manage-field'); + await this.testSubjects.existOrFail('indexPatternEditorFlyout'); + if (newName) { + await this.testSubjects.setValue('createIndexPatternTitleInput', newName, { + clearWithKeyboard: true, + typeCharByChar: true, + }); + } + if (newTimeField) { + await this.comboBox.set('timestampField', newTimeField); + } + await this.testSubjects.click('saveIndexPatternButton'); + if (await this.testSubjects.exists('confirmModalConfirmButton')) { + await this.testSubjects.click('confirmModalConfirmButton'); + } + } +} diff --git a/test/functional/services/filter_bar.ts b/test/functional/services/filter_bar.ts index 5866c0ee3f18a..be4abf4e0daf2 100644 --- a/test/functional/services/filter_bar.ts +++ b/test/functional/services/filter_bar.ts @@ -175,12 +175,12 @@ export class FilterBarService extends FtrService { public async isFilterPinned(key: string): Promise { const filter = await this.testSubjects.find(`~filter & ~filter-key-${key}`); - return (await filter.getAttribute('data-test-subj')).includes('filter-pinned'); + return ((await filter.getAttribute('data-test-subj')) ?? '').includes('filter-pinned'); } public async isFilterNegated(key: string): Promise { const filter = await this.testSubjects.find(`~filter & ~filter-key-${key}`); - return (await filter.getAttribute('data-test-subj')).includes('filter-negated'); + return ((await filter.getAttribute('data-test-subj')) ?? '').includes('filter-negated'); } public async getFilterCount(): Promise { diff --git a/test/functional/services/global_nav.ts b/test/functional/services/global_nav.ts index 4bbea9c9fd7a7..bac2d76a36bbb 100644 --- a/test/functional/services/global_nav.ts +++ b/test/functional/services/global_nav.ts @@ -42,10 +42,8 @@ export class GlobalNavService extends FtrService { public async badgeExistsOrFail(expectedLabel: string): Promise { await this.testSubjects.existOrFail('headerBadge'); - const actualLabel = await this.testSubjects.getAttribute( - 'headerBadge', - 'data-test-badge-label' - ); + const actualLabel = + (await this.testSubjects.getAttribute('headerBadge', 'data-test-badge-label')) ?? ''; expect(actualLabel.toUpperCase()).to.equal(expectedLabel.toUpperCase()); } diff --git a/test/functional/services/index.ts b/test/functional/services/index.ts index 01d5983c55493..83672889eff75 100644 --- a/test/functional/services/index.ts +++ b/test/functional/services/index.ts @@ -54,6 +54,7 @@ import { UsageCollectionService } from './usage_collection'; import { SavedObjectsFinderService } from './saved_objects_finder'; import { DashboardSettingsProvider } from './dashboard/dashboard_settings'; import { ESQLService } from './esql'; +import { DataViewsService } from './data_views'; export const services = { ...commonServiceProviders, @@ -76,6 +77,7 @@ export const services = { dashboardDrilldownPanelActions: DashboardDrilldownPanelActionsProvider, dashboardDrilldownsManage: DashboardDrilldownsManageProvider, dashboardSettings: DashboardSettingsProvider, + dataViews: DataViewsService, flyout: FlyoutService, comboBox: ComboBoxService, selectable: SelectableService, diff --git a/test/functional/services/query_bar.ts b/test/functional/services/query_bar.ts index ca6c161accc39..fa50432be10c5 100644 --- a/test/functional/services/query_bar.ts +++ b/test/functional/services/query_bar.ts @@ -18,7 +18,7 @@ export class QueryBarService extends FtrService { private readonly find = this.ctx.getService('find'); async getQueryString(): Promise { - return await this.testSubjects.getAttribute('queryInput', 'value'); + return (await this.testSubjects.getAttribute('queryInput', 'value')) ?? ''; } public async setQuery(query: string): Promise { diff --git a/test/functional/services/selectable.ts b/test/functional/services/selectable.ts index 8dd347ace74af..ce36da946afb3 100644 --- a/test/functional/services/selectable.ts +++ b/test/functional/services/selectable.ts @@ -64,7 +64,7 @@ export class SelectableService extends FtrService { const textWrapper = await option.findByClassName('euiSelectableListItem__text'); // Use innerText as getVisibleText doesn't return deeply nested text - const innerText = await textWrapper.getAttribute('innerText'); + const innerText = (await textWrapper.getAttribute('innerText')) ?? ''; // Replace screen reader and other Eui related text const visibleText = innerText diff --git a/test/functional/services/visualizations/elastic_chart.ts b/test/functional/services/visualizations/elastic_chart.ts index c3f2fdb20f388..d3ec3052cb4fa 100644 --- a/test/functional/services/visualizations/elastic_chart.ts +++ b/test/functional/services/visualizations/elastic_chart.ts @@ -124,12 +124,10 @@ export class ElasticChartService extends FtrService { */ public async getChartDebugDataFromChart(chart: WebElementWrapper): Promise { const visContainer = await chart.findByCssSelector('.echChartStatus'); - const debugDataString: string | undefined = await visContainer.getAttribute( - 'data-ech-debug-state' - ); + const debugDataString = await visContainer.getAttribute('data-ech-debug-state'); this.log.debug('data-ech-debug-state: ', debugDataString); - if (debugDataString === undefined) { + if (!debugDataString) { throw Error( `Elastic charts debugState not found, ensure 'setNewChartUiDebugFlag' is called before DOM rendering starts.` ); diff --git a/test/functional/services/visualizations/pie_chart.ts b/test/functional/services/visualizations/pie_chart.ts index 3c685222b143f..0c1254bf7a24a 100644 --- a/test/functional/services/visualizations/pie_chart.ts +++ b/test/functional/services/visualizations/pie_chart.ts @@ -126,7 +126,7 @@ export class PieChartService extends FtrService { } const pieSlices = await this.getAllPieSlices(name); const slicesStyles = await Promise.all( - pieSlices.map(async (pieSlice) => await pieSlice.getAttribute('style')) + pieSlices.map(async (pieSlice) => (await pieSlice.getAttribute('style')) ?? '') ); return slicesStyles .map( diff --git a/test/plugin_functional/test_suites/core_plugins/rendering.ts b/test/plugin_functional/test_suites/core_plugins/rendering.ts index ca06f8a6a731d..22066abf17d20 100644 --- a/test/plugin_functional/test_suites/core_plugins/rendering.ts +++ b/test/plugin_functional/test_suites/core_plugins/rendering.ts @@ -160,9 +160,7 @@ export default function ({ getService }: PluginFunctionalProviderContext) { 'monitoring.ui.enabled (boolean)', 'monitoring.ui.min_interval_seconds (number)', 'monitoring.ui.show_license_expiration (boolean)', - 'navigation.solutionNavigation.featureOn (boolean)', 'navigation.solutionNavigation.enabled (boolean)', - 'navigation.solutionNavigation.optInStatus (alternatives)', 'navigation.solutionNavigation.defaultSolution (alternatives)', 'newsfeed.fetchInterval (duration)', 'newsfeed.mainInterval (duration)', @@ -340,6 +338,7 @@ export default function ({ getService }: PluginFunctionalProviderContext) { 'xpack.observability_onboarding.ui.enabled (boolean)', 'xpack.observabilityLogsExplorer.navigation.showAppLink (any)', // conditional, is actually a boolean 'share.new_version.enabled (boolean)', + 'aiAssistantManagementSelection.preferredAIAssistantType (alternatives)', /** * Rule form V2 feature flags */ diff --git a/test/tsconfig.json b/test/tsconfig.json index c5c7467dd8bcd..ebf1a1e71c01b 100644 --- a/test/tsconfig.json +++ b/test/tsconfig.json @@ -73,5 +73,6 @@ "@kbn/links-plugin", "@kbn/ftr-common-functional-ui-services", "@kbn/monaco", + "@kbn/esql-utils", ] } diff --git a/tsconfig.base.json b/tsconfig.base.json index fef6173947031..45b0f4e18beaa 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -950,6 +950,8 @@ "@kbn/import-resolver/*": ["packages/kbn-import-resolver/*"], "@kbn/index-lifecycle-management-plugin": ["x-pack/plugins/index_lifecycle_management"], "@kbn/index-lifecycle-management-plugin/*": ["x-pack/plugins/index_lifecycle_management/*"], + "@kbn/index-management": ["x-pack/packages/index-management"], + "@kbn/index-management/*": ["x-pack/packages/index-management/*"], "@kbn/index-management-plugin": ["x-pack/plugins/index_management"], "@kbn/index-management-plugin/*": ["x-pack/plugins/index_management/*"], "@kbn/index-patterns-test-plugin": ["test/plugin_functional/plugins/index_patterns"], @@ -1814,7 +1816,9 @@ "@kbn/zod-helpers/*": ["packages/kbn-zod-helpers/*"], // END AUTOMATED PACKAGE LISTING // Allows for importing from `kibana` package for the exported types. - "@emotion/core": ["typings/@emotion"] + "@emotion/core": [ + "typings/@emotion" + ] }, // Support .tsx files and transform JSX into calls to React.createElement "jsx": "react", diff --git a/versions.json b/versions.json index 1f8467c72b636..41158ed17b5a6 100644 --- a/versions.json +++ b/versions.json @@ -8,13 +8,13 @@ "currentMinor": true }, { - "version": "8.13.2", + "version": "8.13.3", "branch": "8.13", "currentMajor": true, "previousMinor": true }, { - "version": "7.17.20", + "version": "7.17.21", "branch": "7.17", "previousMajor": true } diff --git a/x-pack/.i18nrc.json b/x-pack/.i18nrc.json index 98a4912804d1e..2e1f2d5855ddc 100644 --- a/x-pack/.i18nrc.json +++ b/x-pack/.i18nrc.json @@ -48,6 +48,7 @@ ], "xpack.grokDebugger": "plugins/grokdebugger", "xpack.idxMgmt": "plugins/index_management", + "xpack.idxMgmtPackage": "packages/index-management", "xpack.indexLifecycleMgmt": "plugins/index_lifecycle_management", "xpack.infra": "plugins/observability_solution/infra", "xpack.logsExplorer": "plugins/observability_solution/logs_explorer", diff --git a/x-pack/packages/index-management/README.md b/x-pack/packages/index-management/README.md new file mode 100644 index 0000000000000..438a6b4393892 --- /dev/null +++ b/x-pack/packages/index-management/README.md @@ -0,0 +1,3 @@ +# @kbn/index-management + +Contains types and functions used and exported by the index management plugin. Primarily used to avoid cyclical dependencies. diff --git a/x-pack/packages/index-management/index.ts b/x-pack/packages/index-management/index.ts new file mode 100644 index 0000000000000..d89dd466bd272 --- /dev/null +++ b/x-pack/packages/index-management/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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export * from './src/types'; +export * from './src/home_sections'; +export * from './src/services'; diff --git a/x-pack/packages/index-management/jest.config.js b/x-pack/packages/index-management/jest.config.js new file mode 100644 index 0000000000000..0d2b7feaaf550 --- /dev/null +++ b/x-pack/packages/index-management/jest.config.js @@ -0,0 +1,12 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +module.exports = { + preset: '@kbn/test', + rootDir: '../../..', + roots: ['/x-pack/packages/index-management'], +}; diff --git a/x-pack/packages/index-management/kibana.jsonc b/x-pack/packages/index-management/kibana.jsonc new file mode 100644 index 0000000000000..dc4e61342c6bc --- /dev/null +++ b/x-pack/packages/index-management/kibana.jsonc @@ -0,0 +1,5 @@ +{ + "type": "shared-common", + "id": "@kbn/index-management", + "owner": "@elastic/kibana-management" +} diff --git a/x-pack/packages/index-management/package.json b/x-pack/packages/index-management/package.json new file mode 100644 index 0000000000000..c1f7664895348 --- /dev/null +++ b/x-pack/packages/index-management/package.json @@ -0,0 +1,6 @@ +{ + "name": "@kbn/index-management", + "private": true, + "version": "1.0.0", + "license": "Elastic License 2.0" +} diff --git a/x-pack/plugins/index_management/common/constants/home_sections.ts b/x-pack/packages/index-management/src/home_sections.ts similarity index 97% rename from x-pack/plugins/index_management/common/constants/home_sections.ts rename to x-pack/packages/index-management/src/home_sections.ts index d44e64acbbad8..aa69f3c034303 100644 --- a/x-pack/plugins/index_management/common/constants/home_sections.ts +++ b/x-pack/packages/index-management/src/home_sections.ts @@ -8,7 +8,7 @@ import { FunctionComponent, ReactNode } from 'react'; import { ApplicationStart } from '@kbn/core-application-browser'; import { EuiBreadcrumb } from '@elastic/eui'; -import { Index } from '../types'; +import { Index } from './types'; export enum Section { Indices = 'indices', diff --git a/x-pack/packages/index-management/src/services/extensions_service.ts b/x-pack/packages/index-management/src/services/extensions_service.ts new file mode 100644 index 0000000000000..047c290ba06ec --- /dev/null +++ b/x-pack/packages/index-management/src/services/extensions_service.ts @@ -0,0 +1,71 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { FunctionComponent, ReactNode } from 'react'; +import { ApplicationStart } from '@kbn/core-application-browser'; +import { EuiBadgeProps } from '@elastic/eui'; +import { IndexDetailsTab } from '../home_sections'; +import { Index } from '../types'; + +export interface IndexContent { + renderContent: (args: { + index: Index; + getUrlForApp: ApplicationStart['getUrlForApp']; + }) => ReturnType; +} + +export interface IndexToggle { + matchIndex: (index: Index) => boolean; + label: string; + name: string; +} +export interface IndexBadge { + matchIndex: (index: Index) => boolean; + label: string; + // a parseable search bar filter expression, for example "isFollowerIndex:true" + filterExpression?: string; + color: EuiBadgeProps['color']; +} + +export interface EmptyListContent { + renderContent: (args: { + // the button to open the "create index" modal + createIndexButton: ReturnType; + }) => ReturnType; +} + +export interface IndicesListColumn { + fieldName: string; + label: string; + order: number; + render?: (index: Index) => ReactNode; + // return a value used for sorting (only if the value is different from the original value at index[fieldName]) + sort?: (index: Index) => any; +} + +export interface ExtensionsSetup { + // adds an option to the "manage index" menu + addAction(action: any): void; + // adds a banner to the indices list + addBanner(banner: any): void; + // adds a filter to the indices list + addFilter(filter: any): void; + // adds a badge to the index name + addBadge(badge: IndexBadge): void; + // adds a toggle to the indices list + addToggle(toggle: IndexToggle): void; + // adds a column to display additional information added via a data enricher + addColumn(column: IndicesListColumn): void; + // set the content to render when the indices list is empty + setEmptyListContent(content: EmptyListContent): void; + // adds a tab to the index details page + addIndexDetailsTab(tab: IndexDetailsTab): void; + // sets content to render instead of the code block on the overview tab of the index page + setIndexOverviewContent(content: IndexContent): void; + // sets content to render below the docs link on the mappings tab of the index page + setIndexMappingsContent(content: IndexContent): void; +} diff --git a/x-pack/packages/index-management/src/services/index.ts b/x-pack/packages/index-management/src/services/index.ts new file mode 100644 index 0000000000000..1a3d90ef568e2 --- /dev/null +++ b/x-pack/packages/index-management/src/services/index.ts @@ -0,0 +1,8 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +export * from './extensions_service'; +export * from './public_api_service'; diff --git a/x-pack/packages/index-management/src/services/public_api_service.ts b/x-pack/packages/index-management/src/services/public_api_service.ts new file mode 100644 index 0000000000000..d09bda320c9f0 --- /dev/null +++ b/x-pack/packages/index-management/src/services/public_api_service.ts @@ -0,0 +1,22 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { EnrichPolicyType } from '@elastic/elasticsearch/lib/api/types'; +import { SendRequestResponse } from '../types'; + +export interface SerializedEnrichPolicy { + type: EnrichPolicyType; + name: string; + sourceIndices: string[]; + matchField: string; + enrichFields: string[]; + query?: Record; +} + +export interface PublicApiServiceSetup { + getAllEnrichPolicies(): Promise>; +} diff --git a/x-pack/packages/index-management/src/types.ts b/x-pack/packages/index-management/src/types.ts new file mode 100644 index 0000000000000..046693303cddf --- /dev/null +++ b/x-pack/packages/index-management/src/types.ts @@ -0,0 +1,85 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { + IlmExplainLifecycleLifecycleExplain, + HealthStatus, + IndicesStatsIndexMetadataState, + Uuid, +} from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import type { UsageCollectionSetup } from '@kbn/usage-collection-plugin/public'; +import type { ManagementSetup } from '@kbn/management-plugin/public'; +import type { SharePluginSetup, SharePluginStart } from '@kbn/share-plugin/public'; +import type { CloudSetup } from '@kbn/cloud-plugin/public'; +import type { ConsolePluginStart } from '@kbn/console-plugin/public'; +import type { ScopedHistory } from '@kbn/core-application-browser'; +import { ExtensionsSetup } from './services/extensions_service'; +import { PublicApiServiceSetup } from './services/public_api_service'; + +export interface IndexManagementPluginSetup { + apiService: PublicApiServiceSetup; + extensionsService: ExtensionsSetup; +} + +export interface IndexManagementPluginStart { + extensionsService: ExtensionsSetup; + getIndexMappingComponent: (deps: { + history: ScopedHistory; + }) => React.FC; +} + +export interface SetupDependencies { + fleet?: unknown; + usageCollection: UsageCollectionSetup; + management: ManagementSetup; + share: SharePluginSetup; + cloud?: CloudSetup; +} + +export interface StartDependencies { + cloud?: CloudSetup; + console?: ConsolePluginStart; + share: SharePluginStart; + fleet?: unknown; + usageCollection: UsageCollectionSetup; + management: ManagementSetup; +} + +export interface Index { + name: string; + primary?: number | string; + replica?: number | string; + isFrozen: boolean; + hidden: boolean; + aliases: string | string[]; + data_stream?: string; + + // The types below are added by extension services if corresponding plugins are enabled (ILM, Rollup, CCR) + isRollupIndex?: boolean; + ilm?: IlmExplainLifecycleLifecycleExplain; + isFollowerIndex?: boolean; + + // The types from here below represent information returned from the index stats API; + // treated optional as the stats API is not available on serverless + health?: HealthStatus; + status?: IndicesStatsIndexMetadataState; + uuid?: Uuid; + documents?: number; + size?: string; + primary_size?: string; + documents_deleted?: number; +} + +export interface IndexMappingProps { + index?: Index; + showAboutMappings?: boolean; +} + +export interface SendRequestResponse { + data: D | null; + error: E | null; +} diff --git a/x-pack/packages/index-management/tsconfig.json b/x-pack/packages/index-management/tsconfig.json new file mode 100644 index 0000000000000..6531510aba657 --- /dev/null +++ b/x-pack/packages/index-management/tsconfig.json @@ -0,0 +1,26 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "outDir": "target/types", + "types": [ + "jest", + "node", + "react" + ] + }, + "include": [ + "**/*.ts", + "**/*.tsx", + ], + "exclude": [ + "target/**/*" + ], + "kbn_references": [ + "@kbn/core-application-browser", + "@kbn/usage-collection-plugin", + "@kbn/management-plugin", + "@kbn/share-plugin", + "@kbn/cloud-plugin", + "@kbn/console-plugin", + ] +} diff --git a/x-pack/packages/kbn-elastic-assistant-common/constants.ts b/x-pack/packages/kbn-elastic-assistant-common/constants.ts index dba89d807961b..67a20011dffd9 100755 --- a/x-pack/packages/kbn-elastic-assistant-common/constants.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/constants.ts @@ -5,7 +5,6 @@ * 2.0. */ -export const ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION = '2023-10-31'; export const ELASTIC_AI_ASSISTANT_INTERNAL_API_VERSION = '1'; export const ELASTIC_AI_ASSISTANT_URL = '/api/elastic_assistant'; diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/get_anonymized_data/index.test.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/get_anonymized_data/index.test.ts index abfb627376fc3..4962afc4f6f95 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/get_anonymized_data/index.test.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/get_anonymized_data/index.test.ts @@ -19,8 +19,32 @@ describe('getAnonymizedData', () => { }; const commonArgs = { - allow: ['doNotReplace', 'empty', 'host.ip', 'host.name'], - allowReplacement: ['empty', 'host.ip', 'host.name'], + anonymizationFields: [ + { + id: 'doNotReplace', + field: 'doNotReplace', + anonymized: false, + allowed: true, + }, + { + id: 'empty', + field: 'empty', + anonymized: true, + allowed: true, + }, + { + id: 'host.ip', + field: 'host.ip', + anonymized: true, + allowed: true, + }, + { + id: 'host.name', + field: 'host.name', + anonymized: true, + allowed: true, + }, + ], currentReplacements: {}, rawData, getAnonymizedValue: mockGetAnonymizedValue, diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/get_anonymized_data/index.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/get_anonymized_data/index.ts index d70bc86ab303d..071132193af1e 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/get_anonymized_data/index.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/get_anonymized_data/index.ts @@ -4,20 +4,18 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - +import { AnonymizationFieldResponse } from '../../schemas/anonymization_fields/bulk_crud_anonymization_fields_route.gen'; import { isAllowed } from '../helpers'; import type { AnonymizedData, GetAnonymizedValues } from '../types'; export const getAnonymizedData = ({ - allow, - allowReplacement, + anonymizationFields, currentReplacements, getAnonymizedValue, getAnonymizedValues, rawData, }: { - allow: string[]; - allowReplacement: string[]; + anonymizationFields?: AnonymizationFieldResponse[]; currentReplacements: Record | undefined; getAnonymizedValue: ({ currentReplacements, @@ -31,13 +29,9 @@ export const getAnonymizedData = ({ }): AnonymizedData => Object.keys(rawData).reduce( (acc, field) => { - const allowReplacementSet = new Set(allowReplacement); - const allowSet = new Set(allow); - - if (isAllowed({ allowSet, field })) { + if (isAllowed({ anonymizationFields: anonymizationFields ?? [], field })) { const { anonymizedValues, replacements } = getAnonymizedValues({ - allowReplacementSet, - allowSet, + anonymizationFields, currentReplacements, field, getAnonymizedValue, diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/get_anonymized_values/index.test.tsx b/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/get_anonymized_values/index.test.tsx index 24e95ca0f0bb0..add8a1811c04e 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/get_anonymized_values/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/get_anonymized_values/index.test.tsx @@ -11,8 +11,7 @@ import { mockGetAnonymizedValue } from '../../mock/get_anonymized_value'; describe('getAnonymizedValues', () => { it('returns empty anonymizedValues and replacements when provided with empty raw data', () => { const result = getAnonymizedValues({ - allowReplacementSet: new Set(), - allowSet: new Set(), + anonymizationFields: [], currentReplacements: {}, field: 'test.field', getAnonymizedValue: jest.fn(), @@ -31,8 +30,9 @@ describe('getAnonymizedValues', () => { }; const result = getAnonymizedValues({ - allowReplacementSet: new Set(['test.field']), - allowSet: new Set(['test.field']), + anonymizationFields: [ + { id: 'test.field', field: 'test.field', allowed: true, anonymized: true }, + ], currentReplacements: {}, field: 'test.field', getAnonymizedValue: mockGetAnonymizedValue, @@ -48,8 +48,9 @@ describe('getAnonymizedValues', () => { }; const result = getAnonymizedValues({ - allowReplacementSet: new Set(['test.field']), - allowSet: new Set(['test.field']), + anonymizationFields: [ + { id: 'test.field', field: 'test.field', allowed: true, anonymized: true }, + ], currentReplacements: {}, field: 'test.field', getAnonymizedValue: mockGetAnonymizedValue, @@ -68,8 +69,9 @@ describe('getAnonymizedValues', () => { }; const result = getAnonymizedValues({ - allowReplacementSet: new Set(), // does NOT include `test.field` - allowSet: new Set(['test.field']), + anonymizationFields: [ + { id: 'test.field', field: 'test.field', allowed: true, anonymized: false }, + ], currentReplacements: {}, field: 'test.field', getAnonymizedValue: mockGetAnonymizedValue, @@ -85,8 +87,9 @@ describe('getAnonymizedValues', () => { }; const result = getAnonymizedValues({ - allowReplacementSet: new Set(['test.field']), - allowSet: new Set(), // does NOT include `test.field` + anonymizationFields: [ + { id: 'test.field', field: 'test.field', allowed: false, anonymized: true }, + ], currentReplacements: {}, field: 'test.field', getAnonymizedValue: mockGetAnonymizedValue, diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/get_anonymized_values/index.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/get_anonymized_values/index.ts index f6ecf0725c801..1df74bd947cd8 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/get_anonymized_values/index.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/get_anonymized_values/index.ts @@ -9,8 +9,7 @@ import { isAllowed, isAnonymized } from '../helpers'; import { AnonymizedValues, GetAnonymizedValues } from '../types'; export const getAnonymizedValues: GetAnonymizedValues = ({ - allowSet, - allowReplacementSet, + anonymizationFields = [], currentReplacements, field, getAnonymizedValue, @@ -22,7 +21,10 @@ export const getAnonymizedValues: GetAnonymizedValues = ({ (acc, rawValue) => { const stringValue = `${rawValue}`; - if (isAllowed({ allowSet, field }) && isAnonymized({ allowReplacementSet, field })) { + if ( + isAllowed({ anonymizationFields, field }) && + isAnonymized({ anonymizationFields, field }) + ) { const anonymizedValue = `${getAnonymizedValue({ currentReplacements, rawValue: stringValue, @@ -35,7 +37,7 @@ export const getAnonymizedValues: GetAnonymizedValues = ({ [anonymizedValue]: stringValue, }, }; - } else if (isAllowed({ allowSet, field })) { + } else if (isAllowed({ anonymizationFields, field })) { return { anonymizedValues: [...acc.anonymizedValues, stringValue], // no anonymization for this value replacements: { diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/helpers/index.test.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/helpers/index.test.ts index 4dc8925bfab4e..58f08d8e50f89 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/helpers/index.test.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/helpers/index.test.ts @@ -7,6 +7,12 @@ import { isAllowed, isAnonymized, isDenied, getIsDataAnonymizable } from '.'; +const anonymizationFields = [ + { id: 'fieldName1', field: 'fieldName1', allowed: true, anonymized: false }, + { id: 'fieldName2', field: 'fieldName2', allowed: false, anonymized: false }, + { id: 'fieldName3', field: 'fieldName3', allowed: false, anonymized: false }, +]; + describe('helpers', () => { beforeEach(() => jest.clearAllMocks()); @@ -30,68 +36,59 @@ describe('helpers', () => { describe('isAllowed', () => { it('returns true when the field is present in the allowSet', () => { - const allowSet = new Set(['fieldName1', 'fieldName2', 'fieldName3']); - - expect(isAllowed({ allowSet, field: 'fieldName1' })).toBe(true); + expect(isAllowed({ anonymizationFields, field: 'fieldName1' })).toBe(true); }); it('returns false when the field is NOT present in the allowSet', () => { - const allowSet = new Set(['fieldName1', 'fieldName2', 'fieldName3']); - - expect(isAllowed({ allowSet, field: 'nonexistentField' })).toBe(false); + expect(isAllowed({ anonymizationFields, field: 'nonexistentField' })).toBe(false); }); }); describe('isDenied', () => { it('returns true when the field is NOT in the allowSet', () => { - const allowSet = new Set(['field1', 'field2']); - const field = 'field3'; - - expect(isDenied({ allowSet, field })).toBe(true); + expect(isDenied({ anonymizationFields, field: 'field3' })).toBe(true); }); it('returns false when the field is in the allowSet', () => { - const allowSet = new Set(['field1', 'field2']); - const field = 'field1'; - - expect(isDenied({ allowSet, field })).toBe(false); + expect(isDenied({ anonymizationFields, field: 'fieldName1' })).toBe(false); }); it('returns true for an empty allowSet', () => { - const allowSet = new Set(); - const field = 'field1'; - - expect(isDenied({ allowSet, field })).toBe(true); + expect(isDenied({ anonymizationFields: [], field: 'field1' })).toBe(true); }); it('returns false when the field is an empty string and allowSet contains the empty string', () => { - const allowSet = new Set(['', 'field1']); - const field = ''; - - expect(isDenied({ allowSet, field })).toBe(false); + expect( + isDenied({ + anonymizationFields: [ + ...anonymizationFields, + { id: '', field: '', allowed: true, anonymized: false }, + ], + field: '', + }) + ).toBe(false); }); }); describe('isAnonymized', () => { - const allowReplacementSet = new Set(['user.name', 'host.name']); - it('returns true when the field is in the allowReplacementSet', () => { - const field = 'user.name'; - - expect(isAnonymized({ allowReplacementSet, field })).toBe(true); + expect( + isAnonymized({ + anonymizationFields: [ + ...anonymizationFields, + { id: 'user.name', field: 'user.name', allowed: false, anonymized: true }, + ], + field: 'user.name', + }) + ).toBe(true); }); it('returns false when the field is NOT in the allowReplacementSet', () => { - const field = 'foozle'; - - expect(isAnonymized({ allowReplacementSet, field })).toBe(false); + expect(isAnonymized({ anonymizationFields, field: 'foozle' })).toBe(false); }); it('returns false when allowReplacementSet is empty', () => { - const emptySet = new Set(); - const field = 'user.name'; - - expect(isAnonymized({ allowReplacementSet: emptySet, field })).toBe(false); + expect(isAnonymized({ anonymizationFields: [], field: 'user.name' })).toBe(false); }); }); }); diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/helpers/index.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/helpers/index.ts index 8989d766e78c7..b6bdb50093645 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/helpers/index.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/helpers/index.ts @@ -6,23 +6,34 @@ */ import { Replacements } from '../../schemas'; +import { AnonymizationFieldResponse } from '../../schemas/anonymization_fields/bulk_crud_anonymization_fields_route.gen'; export const getIsDataAnonymizable = (rawData: string | Record): boolean => typeof rawData !== 'string'; -export const isAllowed = ({ allowSet, field }: { allowSet: Set; field: string }): boolean => - allowSet.has(field); +export const isAllowed = ({ + anonymizationFields, + field, +}: { + anonymizationFields: AnonymizationFieldResponse[]; + field: string; +}): boolean => anonymizationFields.find((a) => a.field === field)?.allowed ?? false; -export const isDenied = ({ allowSet, field }: { allowSet: Set; field: string }): boolean => - !allowSet.has(field); +export const isDenied = ({ + anonymizationFields, + field, +}: { + anonymizationFields: AnonymizationFieldResponse[]; + field: string; +}): boolean => !(anonymizationFields.find((a) => a.field === field)?.allowed ?? false); export const isAnonymized = ({ - allowReplacementSet, + anonymizationFields, field, }: { - allowReplacementSet: Set; + anonymizationFields: AnonymizationFieldResponse[]; field: string; -}): boolean => allowReplacementSet.has(field); +}): boolean => anonymizationFields.find((a) => a.field === field)?.anonymized ?? false; export const replaceAnonymizedValuesWithOriginalValues = ({ messageContent, diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/transform_raw_data/index.test.tsx b/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/transform_raw_data/index.test.tsx index fb8b1c5b42f6b..ac66d2926e41c 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/transform_raw_data/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/transform_raw_data/index.test.tsx @@ -10,16 +10,18 @@ import { transformRawData } from '.'; describe('transformRawData', () => { it('returns non-anonymized data when rawData is a string', () => { + const anonymizationFields = [ + { id: 'field1', field: 'field1', allowed: true, anonymized: true }, + { id: 'field2', field: 'field2', allowed: false, anonymized: true }, + ]; const inputRawData = { - allow: ['field1'], - allowReplacement: ['field1', 'field2'], + anonymizationFields, promptContextId: 'abcd', rawData: 'this will not be anonymized', }; const result = transformRawData({ - allow: inputRawData.allow, - allowReplacement: inputRawData.allowReplacement, + anonymizationFields: inputRawData.anonymizationFields, currentReplacements: {}, getAnonymizedValue: mockGetAnonymizedValue, onNewReplacements: () => {}, @@ -30,9 +32,14 @@ describe('transformRawData', () => { }); it('calls onNewReplacements with the expected replacements', () => { + const anonymizationFields = { + total: 2, + page: 1, + perPage: 1000, + data: [{ id: 'field1', field: 'field1', allowed: true, anonymized: true }], + }; const inputRawData = { - allow: ['field1'], - allowReplacement: ['field1'], + anonymizationFields, promptContextId: 'abcd', rawData: { field1: ['value1'] }, }; @@ -40,8 +47,7 @@ describe('transformRawData', () => { const onNewReplacements = jest.fn(); transformRawData({ - allow: inputRawData.allow, - allowReplacement: inputRawData.allowReplacement, + anonymizationFields: inputRawData.anonymizationFields.data, currentReplacements: {}, getAnonymizedValue: mockGetAnonymizedValue, onNewReplacements, @@ -52,16 +58,23 @@ describe('transformRawData', () => { }); it('returns the expected mix of anonymized and non-anonymized data as a CSV string', () => { + const anonymizationFields = { + total: 2, + page: 1, + perPage: 1000, + data: [ + { id: 'field1', field: 'field1', allowed: true, anonymized: true }, + { id: 'field2', field: 'field2', allowed: true, anonymized: false }, + ], + }; const inputRawData = { - allow: ['field1', 'field2'], - allowReplacement: ['field1'], // only field 1 will be anonymized + anonymizationFields, // only field 1 will be anonymized promptContextId: 'abcd', rawData: { field1: ['value1', 'value2'], field2: ['value3', 'value4'] }, }; const result = transformRawData({ - allow: inputRawData.allow, - allowReplacement: inputRawData.allowReplacement, + anonymizationFields: inputRawData.anonymizationFields.data, currentReplacements: {}, getAnonymizedValue: mockGetAnonymizedValue, onNewReplacements: () => {}, @@ -72,9 +85,18 @@ describe('transformRawData', () => { }); it('omits fields that are not included in the `allow` list, even if they are members of `allowReplacement`', () => { + const anonymizationFields = { + total: 2, + page: 1, + perPage: 1000, + data: [ + { id: 'field1', field: 'field1', allowed: true, anonymized: true }, + { id: 'field2', field: 'field2', allowed: true, anonymized: false }, + { id: 'field3', field: 'field3', allowed: false, anonymized: true }, + ], + }; const inputRawData = { - allow: ['field1', 'field2'], // field3 is NOT allowed - allowReplacement: ['field1', 'field3'], // field3 is requested to be anonymized + anonymizationFields, // field3 is requested to be anonymized promptContextId: 'abcd', rawData: { field1: ['value1', 'value2'], @@ -84,8 +106,7 @@ describe('transformRawData', () => { }; const result = transformRawData({ - allow: inputRawData.allow, - allowReplacement: inputRawData.allowReplacement, + anonymizationFields: inputRawData.anonymizationFields.data, currentReplacements: {}, getAnonymizedValue: mockGetAnonymizedValue, onNewReplacements: () => {}, diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/transform_raw_data/index.tsx b/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/transform_raw_data/index.tsx index 8b4040f7b277a..ba9376a120821 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/transform_raw_data/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/transform_raw_data/index.tsx @@ -6,20 +6,19 @@ */ import { Replacements } from '../../schemas'; +import { AnonymizationFieldResponse } from '../../schemas/anonymization_fields/bulk_crud_anonymization_fields_route.gen'; import { getAnonymizedData } from '../get_anonymized_data'; import { getAnonymizedValues } from '../get_anonymized_values'; import { getCsvFromData } from '../get_csv_from_data'; export const transformRawData = ({ - allow, - allowReplacement, + anonymizationFields, currentReplacements, getAnonymizedValue, onNewReplacements, rawData, }: { - allow: string[]; - allowReplacement: string[]; + anonymizationFields?: AnonymizationFieldResponse[]; currentReplacements: Replacements | undefined; getAnonymizedValue: ({ currentReplacements, @@ -36,8 +35,7 @@ export const transformRawData = ({ } const anonymizedData = getAnonymizedData({ - allow, - allowReplacement, + anonymizationFields, currentReplacements, rawData, getAnonymizedValue, diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/types.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/types.ts index cc3d9a8ab1ccf..b39b5ecef3af8 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/types.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/data_anonymization/types.ts @@ -5,6 +5,8 @@ * 2.0. */ +import { AnonymizationFieldResponse } from '../schemas/anonymization_fields/bulk_crud_anonymization_fields_route.gen'; + export interface AnonymizedValues { /** The original values were transformed to these anonymized values */ anonymizedValues: string[]; @@ -22,15 +24,13 @@ export interface AnonymizedData { } export type GetAnonymizedValues = ({ - allowReplacementSet, - allowSet, + anonymizationFields, currentReplacements, field, getAnonymizedValue, rawData, }: { - allowReplacementSet: Set; - allowSet: Set; + anonymizationFields?: AnonymizationFieldResponse[]; currentReplacements: Record | undefined; field: string; getAnonymizedValue: ({ diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/llm/actions_client_llm.test.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/llm/actions_client_llm.test.ts similarity index 93% rename from x-pack/plugins/elastic_assistant/server/lib/langchain/llm/actions_client_llm.test.ts rename to x-pack/packages/kbn-elastic-assistant-common/impl/llm/actions_client_llm.test.ts index c71a658322748..9a0b98c02586e 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/llm/actions_client_llm.test.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/llm/actions_client_llm.test.ts @@ -10,8 +10,7 @@ import type { PluginStartContract as ActionsPluginStart } from '@kbn/actions-plu import { loggerMock } from '@kbn/logging-mocks'; import { ActionsClientLlm } from './actions_client_llm'; -import { mockActionResponse } from '../../../__mocks__/action_result_data'; -import { ExecuteConnectorRequestBody } from '@kbn/elastic-assistant-common'; +import { mockActionResponse } from '../mock/mock_action_response'; const connectorId = 'mock-connector-id'; @@ -30,14 +29,14 @@ const mockActions = { const prompt = 'Do you know my name?'; -const mockRequest: KibanaRequest = { +const mockRequest: KibanaRequest = { params: { connectorId }, body: { message: prompt, subAction: 'invokeAI', isEnabledKnowledgeBase: true, }, -} as KibanaRequest; +} as KibanaRequest; describe('ActionsClientLlm', () => { beforeEach(() => { diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/llm/actions_client_llm.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/llm/actions_client_llm.ts similarity index 91% rename from x-pack/plugins/elastic_assistant/server/lib/langchain/llm/actions_client_llm.ts rename to x-pack/packages/kbn-elastic-assistant-common/impl/llm/actions_client_llm.ts index 7b022c52434ce..7dd11097eb661 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/llm/actions_client_llm.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/llm/actions_client_llm.ts @@ -11,8 +11,7 @@ import type { PluginStartContract as ActionsPluginStart } from '@kbn/actions-plu import { LLM } from '@langchain/core/language_models/llms'; import { get } from 'lodash/fp'; -import { ExecuteConnectorRequestBody } from '@kbn/elastic-assistant-common'; -import { getMessageContentAndRole } from '../helpers'; +import { getMessageContentAndRole } from './helpers'; const LLM_TYPE = 'ActionsClientLlm'; @@ -21,7 +20,8 @@ interface ActionsClientLlmParams { connectorId: string; llmType?: string; logger: Logger; - request: KibanaRequest; + request: KibanaRequest; + model?: string; traceId?: string; } @@ -29,19 +29,22 @@ export class ActionsClientLlm extends LLM { #actions: ActionsPluginStart; #connectorId: string; #logger: Logger; - #request: KibanaRequest; + #request: KibanaRequest; #traceId: string; // Local `llmType` as it can change and needs to be accessed by abstract `_llmType()` method // Not using getter as `this._llmType()` is called in the constructor via `super({})` protected llmType: string; + model?: string; + constructor({ actions, connectorId, traceId = uuidv4(), llmType, logger, + model, request, }: ActionsClientLlmParams) { super({}); @@ -52,6 +55,7 @@ export class ActionsClientLlm extends LLM { this.llmType = llmType ?? LLM_TYPE; this.#logger = logger; this.#request = request; + this.model = model; } _llmType() { @@ -80,7 +84,7 @@ export class ActionsClientLlm extends LLM { // hard code to non-streaming subaction as this class only supports non-streaming subAction: 'invokeAI', subActionParams: { - model: this.#request.body.model, + model: this.model, messages: [assistantMessage], // the assistant message ...(this.llmType === 'openai' ? { n: 1, stop: null, temperature: 0.2 } diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/llm/helpers.test.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/llm/helpers.test.ts new file mode 100644 index 0000000000000..c98300aa64c78 --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/llm/helpers.test.ts @@ -0,0 +1,27 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { Message } from '../schemas'; +import { getMessageContentAndRole } from './helpers'; + +describe('helpers', () => { + describe('getMessageContentAndRole', () => { + const testCases: Array<[string, Pick]> = [ + ['Prompt 1', { content: 'Prompt 1', role: 'user' }], + ['Prompt 2', { content: 'Prompt 2', role: 'user' }], + ['', { content: '', role: 'user' }], + ]; + + testCases.forEach(([prompt, expectedOutput]) => { + test(`Given the prompt "${prompt}", it returns the prompt as content with a "user" role`, () => { + const result = getMessageContentAndRole(prompt); + + expect(result).toEqual(expectedOutput); + }); + }); + }); +}); diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/llm/helpers.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/llm/helpers.ts new file mode 100644 index 0000000000000..4688ab122c4f3 --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/llm/helpers.ts @@ -0,0 +1,13 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { Message } from '../schemas'; + +export const getMessageContentAndRole = (prompt: string): Pick => ({ + content: prompt, + role: 'user', +}); diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/llm/index.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/llm/index.ts new file mode 100644 index 0000000000000..07015185eb5bb --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/llm/index.ts @@ -0,0 +1,9 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export { ActionsClientChatOpenAI } from './openai'; +export { ActionsClientLlm } from './actions_client_llm'; diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/llm/openai.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/llm/openai.ts similarity index 95% rename from x-pack/plugins/elastic_assistant/server/lib/langchain/llm/openai.ts rename to x-pack/packages/kbn-elastic-assistant-common/impl/llm/openai.ts index c5ad258ba6eb4..0e81cd1af155e 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/llm/openai.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/llm/openai.ts @@ -4,6 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ + import { v4 as uuidv4 } from 'uuid'; import { KibanaRequest, Logger } from '@kbn/core/server'; import type { PluginStartContract as ActionsPluginStart } from '@kbn/actions-plugin/server'; @@ -17,8 +18,7 @@ import { ChatCompletionCreateParamsStreaming, ChatCompletionCreateParamsNonStreaming, } from 'openai/resources/chat/completions'; -import { ExecuteConnectorRequestBody } from '@kbn/elastic-assistant-common'; -import { InvokeAIActionParamsSchema } from '../types'; +import { InvokeAIActionParamsSchema } from './types'; const LLM_TYPE = 'ActionsClientChatOpenAI'; @@ -27,10 +27,11 @@ interface ActionsClientChatOpenAIParams { connectorId: string; llmType?: string; logger: Logger; - request: KibanaRequest; + request: KibanaRequest; streaming?: boolean; traceId?: string; maxRetries?: number; + model?: string; signal?: AbortSignal; } @@ -51,12 +52,13 @@ export class ActionsClientChatOpenAI extends ChatOpenAI { // ChatOpenAI class needs these, but they do not matter as we override the openai client with the actions client azureOpenAIApiKey = ''; openAIApiKey = ''; + model?: string; // Kibana variables #actions: ActionsPluginStart; #connectorId: string; #logger: Logger; - #request: KibanaRequest; + #request: KibanaRequest; #actionResultData: string; #traceId: string; #signal?: AbortSignal; @@ -68,6 +70,7 @@ export class ActionsClientChatOpenAI extends ChatOpenAI { logger, request, maxRetries, + model, signal, }: ActionsClientChatOpenAIParams) { super({ @@ -90,6 +93,7 @@ export class ActionsClientChatOpenAI extends ChatOpenAI { this.#actionResultData = ''; this.streaming = true; this.#signal = signal; + this.model = model; } getActionResultData(): string { @@ -173,7 +177,7 @@ export class ActionsClientChatOpenAI extends ChatOpenAI { temperature: completionRequest.temperature, functions: completionRequest.functions, // possible client model override - model: this.#request.body.model ?? completionRequest.model, + model: this.model ?? completionRequest.model, // ensure we take the messages from the completion request, not the client request messages: completionRequest.messages.map((message) => ({ role: message.role, diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/llm/types.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/llm/types.ts new file mode 100644 index 0000000000000..85c970b1b948a --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/llm/types.ts @@ -0,0 +1,40 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { + ChatCompletionContentPart, + ChatCompletionCreateParamsNonStreaming, +} from 'openai/resources/chat/completions'; + +export interface InvokeAIActionParamsSchema { + messages: Array<{ + role: string; + content: string | ChatCompletionContentPart[]; + name?: string; + function_call?: { + arguments: string; + name: string; + }; + tool_calls?: Array<{ + id: string; + + function: { + arguments: string; + name: string; + }; + + type: string; + }>; + tool_call_id?: string; + }>; + model?: ChatCompletionCreateParamsNonStreaming['model']; + n?: ChatCompletionCreateParamsNonStreaming['n']; + stop?: ChatCompletionCreateParamsNonStreaming['stop']; + temperature?: ChatCompletionCreateParamsNonStreaming['temperature']; + functions?: ChatCompletionCreateParamsNonStreaming['functions']; + signal?: AbortSignal; +} diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/mock/mock_action_response/index.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/mock/mock_action_response/index.ts new file mode 100644 index 0000000000000..dbc095a334cea --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/mock/mock_action_response/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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export const mockActionResponse = { + message: 'Yes, your name is Andrew. How can I assist you further, Andrew?', + usage: { prompt_tokens: 4, completion_tokens: 10, total_tokens: 14 }, +}; diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts index de718cbb1a2c7..be9ed538cda7f 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen.ts @@ -41,6 +41,8 @@ export const ExecuteConnectorRequestBody = z.object({ isEnabledRAGAlerts: z.boolean().optional(), replacements: Replacements, size: z.number().optional(), + langSmithProject: z.string().optional(), + langSmithApiKey: z.string().optional(), }); export type ExecuteConnectorRequestBodyInput = z.input; diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.schema.yaml b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.schema.yaml index aa572d7e4b38e..d8bb1396746ed 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.schema.yaml +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.schema.yaml @@ -61,6 +61,10 @@ paths: $ref: '../conversations/common_attributes.schema.yaml#/components/schemas/Replacements' size: type: number + langSmithProject: + type: string + langSmithApiKey: + type: string responses: '200': description: Successful static response diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.gen.ts index f9f7900f62f24..bc2cb93bb30c3 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.gen.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.gen.ts @@ -16,7 +16,7 @@ import { z } from 'zod'; * version: 2023-10-31 */ -import { UUID, NonEmptyString, User } from '../conversations/common_attributes.gen'; +import { UUID, NonEmptyString } from '../conversations/common_attributes.gen'; export type BulkActionSkipReason = z.infer; export const BulkActionSkipReason = z.literal('ANONYMIZATION_FIELD_NOT_MODIFIED'); @@ -47,13 +47,12 @@ export const AnonymizationFieldResponse = z.object({ id: UUID, timestamp: NonEmptyString.optional(), field: z.string(), - defaultAllow: z.boolean().optional(), - defaultAllowReplacement: z.boolean().optional(), + allowed: z.boolean().optional(), + anonymized: z.boolean().optional(), updatedAt: z.string().optional(), updatedBy: z.string().optional(), createdAt: z.string().optional(), createdBy: z.string().optional(), - users: z.array(User).optional(), /** * Kibana space */ @@ -104,15 +103,15 @@ export const BulkActionBase = z.object({ export type AnonymizationFieldCreateProps = z.infer; export const AnonymizationFieldCreateProps = z.object({ field: z.string(), - defaultAllow: z.boolean().optional(), - defaultAllowReplacement: z.boolean().optional(), + allowed: z.boolean().optional(), + anonymized: z.boolean().optional(), }); export type AnonymizationFieldUpdateProps = z.infer; export const AnonymizationFieldUpdateProps = z.object({ id: z.string(), - defaultAllow: z.boolean().optional(), - defaultAllowReplacement: z.boolean().optional(), + allowed: z.boolean().optional(), + anonymized: z.boolean().optional(), }); export type PerformBulkActionRequestBody = z.infer; diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.schema.yaml b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.schema.yaml index 5df94fb538ace..e07e492b5fdbe 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.schema.yaml +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.schema.yaml @@ -108,9 +108,9 @@ components: $ref: '../conversations/common_attributes.schema.yaml#/components/schemas/NonEmptyString' field: type: string - defaultAllow: + allowed: type: boolean - defaultAllowReplacement: + anonymized: type: boolean updatedAt: type: string @@ -120,10 +120,6 @@ components: type: string createdBy: type: string - users: - type: array - items: - $ref: '../conversations/common_attributes.schema.yaml#/components/schemas/User' namespace: type: string description: Kibana space @@ -220,9 +216,9 @@ components: properties: field: type: string - defaultAllow: + allowed: type: boolean - defaultAllowReplacement: + anonymized: type: boolean AnonymizationFieldUpdateProps: @@ -232,8 +228,8 @@ components: properties: id: type: string - defaultAllow: + allowed: type: boolean - defaultAllowReplacement: + anonymized: type: boolean \ No newline at end of file diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.gen.ts b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.gen.ts index 58a1395c54a03..a0c83a6594fad 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.gen.ts +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.gen.ts @@ -22,8 +22,9 @@ import { AnonymizationFieldResponse } from './bulk_crud_anonymization_fields_rou export type FindAnonymizationFieldsSortField = z.infer; export const FindAnonymizationFieldsSortField = z.enum([ 'created_at', - 'is_default', - 'title', + 'anonymized', + 'allowed', + 'field', 'updated_at', ]); export type FindAnonymizationFieldsSortFieldEnum = typeof FindAnonymizationFieldsSortField.enum; diff --git a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.schema.yaml b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.schema.yaml index 3782fb2e4876a..4861d267ce5c8 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.schema.yaml +++ b/x-pack/packages/kbn-elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.schema.yaml @@ -97,8 +97,9 @@ components: type: string enum: - 'created_at' - - 'is_default' - - 'title' + - 'anonymized' + - 'allowed' + - 'field' - 'updated_at' SortOrder: diff --git a/x-pack/packages/kbn-elastic-assistant-common/tsconfig.json b/x-pack/packages/kbn-elastic-assistant-common/tsconfig.json index d4d082d9c13e5..73f57730b9a67 100644 --- a/x-pack/packages/kbn-elastic-assistant-common/tsconfig.json +++ b/x-pack/packages/kbn-elastic-assistant-common/tsconfig.json @@ -19,5 +19,7 @@ "@kbn/zod-helpers", "@kbn/securitysolution-io-ts-utils", "@kbn/core", + "@kbn/actions-plugin", + "@kbn/logging-mocks", ] } diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/anonymization_fields/bulk_update_anonymization_fields.test.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/anonymization_fields/bulk_update_anonymization_fields.test.ts new file mode 100644 index 0000000000000..88e9c0febba13 --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/anonymization_fields/bulk_update_anonymization_fields.test.ts @@ -0,0 +1,153 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { + API_VERSIONS, + ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_BULK_ACTION, +} from '@kbn/elastic-assistant-common'; +import { httpServiceMock } from '@kbn/core-http-browser-mocks'; +import { IToasts } from '@kbn/core-notifications-browser'; +import { bulkUpdateAnonymizationFields } from './bulk_update_anonymization_fields'; + +const anonymizationField1 = { + id: 'field1', + field: 'Anonymization field 1', + anonymized: true, + allowed: true, +}; +const anonymizationField2 = { + ...anonymizationField1, + id: 'field2', + field: 'field 2', +}; +const toasts = { + addError: jest.fn(), +}; +describe('bulkUpdateAnonymizationFields', () => { + 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 anonymizationFieldsActions = { + create: [], + update: [], + delete: { ids: [] }, + }; + + await bulkUpdateAnonymizationFields(httpMock, anonymizationFieldsActions); + + expect(httpMock.fetch).toHaveBeenCalledWith( + ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_BULK_ACTION, + { + method: 'POST', + version: API_VERSIONS.public.v1, + body: JSON.stringify({ + create: [], + update: [], + delete: { ids: [] }, + }), + } + ); + }); + + it('should transform the anonymization field dictionary to an array of fields to create', async () => { + const anonymizationFieldsActions = { + create: [anonymizationField1, anonymizationField2], + update: [], + delete: { ids: [] }, + }; + + await bulkUpdateAnonymizationFields(httpMock, anonymizationFieldsActions); + + expect(httpMock.fetch).toHaveBeenCalledWith( + ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_BULK_ACTION, + { + method: 'POST', + version: API_VERSIONS.public.v1, + body: JSON.stringify({ + create: [anonymizationField1, anonymizationField2], + update: [], + delete: { ids: [] }, + }), + } + ); + }); + + it('should transform the anonymization field dictionary to an array of fields to update', async () => { + const anonymizationFieldsActions = { + update: [anonymizationField1, anonymizationField2], + delete: { ids: [] }, + }; + + await bulkUpdateAnonymizationFields(httpMock, anonymizationFieldsActions); + + expect(httpMock.fetch).toHaveBeenCalledWith( + ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_BULK_ACTION, + { + method: 'POST', + version: API_VERSIONS.public.v1, + body: JSON.stringify({ + update: [anonymizationField1, anonymizationField2], + 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 anonymization field', + anonymization_fields: [{ id: anonymizationField1.id, name: anonymizationField1.field }], + }, + ], + }, + }); + const anonymizationFieldsActions = { + create: [], + update: [anonymizationField1], + delete: { ids: [] }, + }; + await bulkUpdateAnonymizationFields( + httpMock, + anonymizationFieldsActions, + toasts as unknown as IToasts + ); + expect(toasts.addError.mock.calls[0][0]).toEqual( + new Error( + 'Error message: Error updating anonymization field for anonymization field Anonymization field 1' + ) + ); + }); + + it('should handle cases where result.attributes.errors is undefined', async () => { + httpMock.fetch.mockResolvedValue({ + success: false, + attributes: {}, + }); + const anonymizationFieldsActions = { + create: [], + update: [], + delete: { ids: [] }, + }; + + await bulkUpdateAnonymizationFields( + httpMock, + anonymizationFieldsActions, + 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/anonymization_fields/bulk_update_anonymization_fields.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/anonymization_fields/bulk_update_anonymization_fields.ts new file mode 100644 index 0000000000000..9745e7ce38662 --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/anonymization_fields/bulk_update_anonymization_fields.ts @@ -0,0 +1,57 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license 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_ANONYMIZATION_FIELDS_URL_BULK_ACTION, + API_VERSIONS, +} from '@kbn/elastic-assistant-common'; +import { + PerformBulkActionRequestBody, + PerformBulkActionResponse, +} from '@kbn/elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.gen'; + +export const bulkUpdateAnonymizationFields = async ( + http: HttpSetup, + anonymizationFieldsActions: PerformBulkActionRequestBody, + toasts?: IToasts +) => { + try { + const result = await http.fetch( + ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_BULK_ACTION, + { + method: 'POST', + version: API_VERSIONS.public.v1, + body: JSON.stringify(anonymizationFieldsActions), + } + ); + + if (!result.success) { + const serverError = result.attributes.errors + ?.map( + (e) => + `${e.status_code ? `Error code: ${e.status_code}. ` : ''}Error message: ${ + e.message + } for anonymization field ${e.anonymization_fields.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.anonymizationFields.bulkActionsAnonymizationFieldsError', + { + defaultMessage: 'Error updating anonymization fields {error}', + values: { error }, + } + ), + }); + } +}; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/anonymization_fields/use_fetch_anonymization_fields.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/anonymization_fields/use_fetch_anonymization_fields.test.tsx new file mode 100644 index 0000000000000..ce6fbe6e46bcc --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/anonymization_fields/use_fetch_anonymization_fields.test.tsx @@ -0,0 +1,63 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { act, renderHook } from '@testing-library/react-hooks'; + +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import type { ReactNode } from 'react'; +import React from 'react'; +import { + UseFetchAnonymizationFieldsParams, + useFetchAnonymizationFields, +} from './use_fetch_anonymization_fields'; +import { HttpSetup } from '@kbn/core-http-browser'; + +const statusResponse = { assistantModelEvaluation: true, assistantStreamingEnabled: false }; + +const http = { + fetch: jest.fn().mockResolvedValue(statusResponse), +} as unknown as HttpSetup; + +const defaultProps = { + http, + isAssistantEnabled: true, +} as unknown as UseFetchAnonymizationFieldsParams; + +const createWrapper = () => { + const queryClient = new QueryClient(); + // eslint-disable-next-line react/display-name + return ({ children }: { children: ReactNode }) => ( + {children} + ); +}; + +describe('useFetchAnonymizationFields', () => { + it(`should make http request to fetch anonymization fields`, async () => { + renderHook(() => useFetchAnonymizationFields(defaultProps), { + wrapper: createWrapper(), + }); + + await act(async () => { + const { waitForNextUpdate } = renderHook(() => useFetchAnonymizationFields(defaultProps)); + await waitForNextUpdate(); + expect(defaultProps.http.fetch).toHaveBeenCalledWith( + '/api/elastic_assistant/anonymization_fields/_find', + { + method: 'GET', + query: { + page: 1, + per_page: 1000, + }, + version: '2023-10-31', + signal: undefined, + } + ); + + expect(defaultProps.http.fetch).toHaveBeenCalled(); + }); + }); +}); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/anonymization_fields/use_fetch_anonymization_fields.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/anonymization_fields/use_fetch_anonymization_fields.ts new file mode 100644 index 0000000000000..4da76876eccf4 --- /dev/null +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/anonymization_fields/use_fetch_anonymization_fields.ts @@ -0,0 +1,63 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { FindAnonymizationFieldsResponse } from '@kbn/elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.gen'; +import { HttpSetup } from '@kbn/core/public'; +import { useQuery } from '@tanstack/react-query'; +import { + API_VERSIONS, + ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_FIND, +} from '@kbn/elastic-assistant-common'; + +export interface UseFetchAnonymizationFieldsParams { + http: HttpSetup; + isAssistantEnabled: boolean; + signal?: AbortSignal | undefined; +} + +/** + * API call for fetching anonymization fields for current spaceId + * + * @param {Object} options - The options object. + * @param {HttpSetup} options.http - HttpSetup + * @param {AbortSignal} [options.signal] - AbortSignal + * + * @returns {useQuery} hook for getting the status of the anonymization fields + */ +export const useFetchAnonymizationFields = ({ + http, + signal, + isAssistantEnabled, +}: UseFetchAnonymizationFieldsParams) => { + const query = { + page: 1, + per_page: 1000, // Continue use in-memory paging till the new design will be ready + }; + + const cachingKeys = [ + ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_FIND, + query.page, + query.per_page, + API_VERSIONS.public.v1, + ]; + + return useQuery([cachingKeys, query], async () => { + if (!isAssistantEnabled) { + return { page: 0, perPage: 0, total: 0, data: [] }; + } + const res = await http.fetch( + ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_FIND, + { + method: 'GET', + version: API_VERSIONS.public.v1, + query, + signal, + } + ); + return res; + }); +}; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.test.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/bulk_update_actions_conversations.test.ts similarity index 85% rename from x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.test.ts rename to x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/bulk_update_actions_conversations.test.ts index c1a69804e296f..99cea460fe7d2 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.test.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/bulk_update_actions_conversations.test.ts @@ -5,10 +5,10 @@ * 2.0. */ -import { bulkChangeConversations } from './use_bulk_actions_conversations'; +import { bulkUpdateConversations } from './bulk_update_actions_conversations'; import { + API_VERSIONS, ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BULK_ACTION, - ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, } from '@kbn/elastic-assistant-common'; import { httpServiceMock } from '@kbn/core-http-browser-mocks'; import { IToasts } from '@kbn/core-notifications-browser'; @@ -42,7 +42,7 @@ const conversation2 = { const toasts = { addError: jest.fn(), }; -describe('bulkChangeConversations', () => { +describe('bulkUpdateConversations', () => { let httpMock: ReturnType; beforeEach(() => { @@ -57,13 +57,13 @@ describe('bulkChangeConversations', () => { delete: { ids: [] }, }; - await bulkChangeConversations(httpMock, conversationsActions); + await bulkUpdateConversations(httpMock, conversationsActions); expect(httpMock.fetch).toHaveBeenCalledWith( ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BULK_ACTION, { method: 'POST', - version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + version: API_VERSIONS.public.v1, body: JSON.stringify({ update: [], create: [], @@ -83,13 +83,13 @@ describe('bulkChangeConversations', () => { delete: { ids: [] }, }; - await bulkChangeConversations(httpMock, conversationsActions); + await bulkUpdateConversations(httpMock, conversationsActions); expect(httpMock.fetch).toHaveBeenCalledWith( ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BULK_ACTION, { method: 'POST', - version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + version: API_VERSIONS.public.v1, body: JSON.stringify({ update: [], create: [conversation1, conversation2], @@ -108,13 +108,13 @@ describe('bulkChangeConversations', () => { delete: { ids: [] }, }; - await bulkChangeConversations(httpMock, conversationsActions); + await bulkUpdateConversations(httpMock, conversationsActions); expect(httpMock.fetch).toHaveBeenCalledWith( ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BULK_ACTION, { method: 'POST', - version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + version: API_VERSIONS.public.v1, body: JSON.stringify({ update: [conversation1, conversation2], delete: { ids: [] }, @@ -141,7 +141,7 @@ describe('bulkChangeConversations', () => { update: {}, delete: { ids: [] }, }; - await bulkChangeConversations(httpMock, conversationsActions, toasts as unknown as IToasts); + await bulkUpdateConversations(httpMock, conversationsActions, toasts as unknown as IToasts); expect(toasts.addError.mock.calls[0][0]).toEqual( new Error('Error message: Error updating conversations for conversation Conversation 1') ); @@ -158,7 +158,7 @@ describe('bulkChangeConversations', () => { delete: { ids: [] }, }; - await bulkChangeConversations(httpMock, conversationsActions, toasts as unknown as IToasts); + await bulkUpdateConversations(httpMock, conversationsActions, 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/conversations/use_bulk_actions_conversations.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/bulk_update_actions_conversations.ts similarity index 94% rename from x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts rename to x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/bulk_update_actions_conversations.ts index a0ae2475233ac..71ebdf50c251d 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_bulk_actions_conversations.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/bulk_update_actions_conversations.ts @@ -9,10 +9,10 @@ import { i18n } from '@kbn/i18n'; import { HttpSetup, IToasts } from '@kbn/core/public'; import { ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BULK_ACTION, - ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, ApiConfig, + API_VERSIONS, } from '@kbn/elastic-assistant-common'; -import { Conversation, Message } from '../../../assistant_context/types'; +import { Conversation, ClientMessage } from '../../../assistant_context/types'; export interface BulkActionSummary { failed: number; @@ -52,7 +52,7 @@ export interface BulkActionResponse { export interface ConversationUpdateParams { id?: string; title?: string; - messages?: Message[]; + messages?: ClientMessage[]; apiConfig?: ApiConfig; } @@ -92,7 +92,7 @@ const transformUpdateActions = ( [] ); -export const bulkChangeConversations = async ( +export const bulkUpdateConversations = async ( http: HttpSetup, conversationsActions: ConversationsBulkActions, toasts?: IToasts @@ -114,7 +114,7 @@ export const bulkChangeConversations = async ( ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BULK_ACTION, { method: 'POST', - version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + version: API_VERSIONS.public.v1, body: JSON.stringify({ update: conversationsToUpdate, create: conversationsToCreate, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/conversations.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/conversations.ts index c59c185c4334b..d96da147c1b3d 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/conversations.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/conversations.ts @@ -9,11 +9,11 @@ import { HttpSetup, IToasts } from '@kbn/core/public'; import { i18n } from '@kbn/i18n'; import { ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL, - ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, ApiConfig, Replacements, + API_VERSIONS, } from '@kbn/elastic-assistant-common'; -import { Conversation, Message } from '../../../assistant_context/types'; +import { Conversation, ClientMessage } from '../../../assistant_context/types'; export interface GetConversationByIdParams { http: HttpSetup; @@ -42,7 +42,7 @@ export const getConversationById = async ({ try { const response = await http.fetch(`${ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL}/${id}`, { method: 'GET', - version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + version: API_VERSIONS.public.v1, signal, }); @@ -85,7 +85,7 @@ export const createConversation = async ({ try { const response = await http.post(ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL, { body: JSON.stringify(conversation), - version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + version: API_VERSIONS.public.v1, signal, }); @@ -128,7 +128,7 @@ export const deleteConversation = async ({ try { const response = await http.fetch(`${ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL}/${id}`, { method: 'DELETE', - version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + version: API_VERSIONS.public.v1, signal, }); @@ -149,7 +149,7 @@ export interface PutConversationMessageParams { toasts?: IToasts; conversationId: string; title?: string; - messages?: Message[]; + messages?: ClientMessage[]; apiConfig?: ApiConfig; replacements?: Replacements; excludeFromLastConversationStorage?: boolean; @@ -197,7 +197,7 @@ export const updateConversation = async ({ headers: { 'Content-Type': 'application/json', }, - version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + version: API_VERSIONS.public.v1, signal, } ); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/index.tsx index 606574b12233b..95511879779b4 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/index.tsx @@ -6,5 +6,5 @@ */ export * from './conversations'; -export * from './use_bulk_actions_conversations'; +export * from './bulk_update_actions_conversations'; export * from './use_fetch_current_user_conversations'; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_fetch_current_user_conversations.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_fetch_current_user_conversations.test.tsx index b890fe57247fe..86b39f5ea43be 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_fetch_current_user_conversations.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_fetch_current_user_conversations.test.tsx @@ -22,7 +22,11 @@ const http = { }; const onFetch = jest.fn(); -const defaultProps = { http, onFetch } as unknown as UseFetchCurrentUserConversationsParams; +const defaultProps = { + http, + onFetch, + isAssistantEnabled: true, +} as unknown as UseFetchCurrentUserConversationsParams; const createWrapper = () => { const queryClient = new QueryClient(); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_fetch_current_user_conversations.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_fetch_current_user_conversations.ts index 430a24f68b2b7..40ccd2d20aa2d 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_fetch_current_user_conversations.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/conversations/use_fetch_current_user_conversations.ts @@ -8,8 +8,8 @@ import { HttpSetup } from '@kbn/core/public'; import { useQuery } from '@tanstack/react-query'; import { + API_VERSIONS, ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_FIND, - ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, } from '@kbn/elastic-assistant-common'; import { Conversation } from '../../../assistant_context/types'; @@ -25,6 +25,7 @@ export interface UseFetchCurrentUserConversationsParams { onFetch: (result: FetchConversationsResponse) => Record; signal?: AbortSignal | undefined; refetchOnWindowFocus?: boolean; + isAssistantEnabled: boolean; } /** @@ -42,6 +43,7 @@ export const useFetchCurrentUserConversations = ({ onFetch, signal, refetchOnWindowFocus = true, + isAssistantEnabled, }: UseFetchCurrentUserConversationsParams) => { const query = { page: 1, @@ -52,17 +54,20 @@ export const useFetchCurrentUserConversations = ({ ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_FIND, query.page, query.perPage, - ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + API_VERSIONS.public.v1, ]; return useQuery( [cachingKeys, query], async () => { + if (!isAssistantEnabled) { + return {}; + } const res = await http.fetch( ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_FIND, { method: 'GET', - version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + version: API_VERSIONS.public.v1, query, signal, } diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.test.tsx index e799e431730be..925ea47ac6ad8 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.test.tsx @@ -154,8 +154,6 @@ describe('API tests', () => { isEnabledRAGAlerts: true, assistantStreamingEnabled: false, alertsIndexPattern: '.alerts-security.alerts-default', - allow: ['a', 'b', 'c'], - allowReplacement: ['b', 'c'], replacements: { auuid: 'real.hostname' }, size: 30, }; @@ -166,7 +164,7 @@ describe('API tests', () => { '/internal/elastic_assistant/actions/connector/foo/_execute', { ...staticDefaults, - body: '{"model":"gpt-4","message":"This is a test","subAction":"invokeAI","conversationId":"test","actionTypeId":".gen-ai","replacements":{"auuid":"real.hostname"},"isEnabledKnowledgeBase":true,"isEnabledRAGAlerts":true,"alertsIndexPattern":".alerts-security.alerts-default","allow":["a","b","c"],"allowReplacement":["b","c"],"size":30}', + body: '{"model":"gpt-4","message":"This is a test","subAction":"invokeAI","conversationId":"test","actionTypeId":".gen-ai","replacements":{"auuid":"real.hostname"},"isEnabledKnowledgeBase":true,"isEnabledRAGAlerts":true,"alertsIndexPattern":".alerts-security.alerts-default","size":30}', } ); }); 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 cf577d7ad516e..ae465cdf27ba9 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 @@ -7,17 +7,16 @@ import { HttpSetup } from '@kbn/core/public'; import { IHttpFetchError } from '@kbn/core-http-browser'; -import { ApiConfig, Replacements } from '@kbn/elastic-assistant-common'; +import { API_VERSIONS, ApiConfig, Replacements } from '@kbn/elastic-assistant-common'; import { API_ERROR } from '../translations'; import { getOptionalRequestParams } from '../helpers'; +import { TraceOptions } from '../types'; export * from './conversations'; export interface FetchConnectorExecuteAction { conversationId: string; isEnabledRAGAlerts: boolean; alertsIndexPattern?: string; - allow?: string[]; - allowReplacement?: string[]; isEnabledKnowledgeBase: boolean; assistantStreamingEnabled: boolean; apiConfig: ApiConfig; @@ -26,6 +25,7 @@ export interface FetchConnectorExecuteAction { replacements: Replacements; signal?: AbortSignal | undefined; size?: number; + traceOptions?: TraceOptions; } export interface FetchConnectorExecuteResponse { @@ -42,8 +42,6 @@ export const fetchConnectorExecuteAction = async ({ conversationId, isEnabledRAGAlerts, alertsIndexPattern, - allow, - allowReplacement, isEnabledKnowledgeBase, assistantStreamingEnabled, http, @@ -52,6 +50,7 @@ export const fetchConnectorExecuteAction = async ({ apiConfig, signal, size, + traceOptions, }: FetchConnectorExecuteAction): Promise => { const isStream = assistantStreamingEnabled && @@ -63,8 +62,6 @@ export const fetchConnectorExecuteAction = async ({ const optionalRequestParams = getOptionalRequestParams({ isEnabledRAGAlerts, alertsIndexPattern, - allow, - allowReplacement, size, }); @@ -77,6 +74,10 @@ export const fetchConnectorExecuteAction = async ({ replacements, isEnabledKnowledgeBase, isEnabledRAGAlerts, + langSmithProject: + traceOptions?.langSmithProject === '' ? undefined : traceOptions?.langSmithProject, + langSmithApiKey: + traceOptions?.langSmithApiKey === '' ? undefined : traceOptions?.langSmithApiKey, ...optionalRequestParams, }; @@ -90,7 +91,7 @@ export const fetchConnectorExecuteAction = async ({ signal, asResponse: true, rawResponse: true, - version: '1', + version: API_VERSIONS.internal.v1, } ); @@ -125,7 +126,7 @@ export const fetchConnectorExecuteAction = async ({ body: JSON.stringify(requestBody), headers: { 'Content-Type': 'application/json' }, signal, - version: '1', + version: API_VERSIONS.internal.v1, }); if (response.status !== 'ok' || !response.data) { @@ -212,7 +213,7 @@ export const getKnowledgeBaseStatus = async ({ const response = await http.fetch(path, { method: 'GET', signal, - version: '1', + version: API_VERSIONS.internal.v1, }); return response as GetKnowledgeBaseStatusResponse; @@ -251,7 +252,7 @@ export const postKnowledgeBase = async ({ const response = await http.fetch(path, { method: 'POST', signal, - version: '1', + version: API_VERSIONS.internal.v1, }); return response as PostKnowledgeBaseResponse; @@ -290,7 +291,7 @@ export const deleteKnowledgeBase = async ({ const response = await http.fetch(path, { method: 'DELETE', signal, - version: '1', + version: API_VERSIONS.internal.v1, }); return response as DeleteKnowledgeBaseResponse; 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 47b4f11629a9c..def8a5157d908 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 @@ -37,6 +37,8 @@ const testProps = { showAnonymizedValues: false, conversations: mockConversations, refetchConversationsState: jest.fn(), + anonymizationFields: { total: 0, page: 1, perPage: 1000, data: [] }, + refetchAnonymizationFieldsResults: jest.fn(), }; 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 8dc9aa56990c7..adf8b003e7af6 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 @@ -17,6 +17,7 @@ import { } from '@elastic/eui'; import { css } from '@emotion/react'; import { DocLinksStart } from '@kbn/core-doc-links-browser'; +import { FindAnonymizationFieldsResponse } from '@kbn/elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.gen'; import { AIConnector } from '../../connectorland/connector_selector'; import { Conversation } from '../../..'; import { AssistantTitle } from '../assistant_title'; @@ -40,6 +41,8 @@ interface OwnProps { title: string | JSX.Element; conversations: Record; refetchConversationsState: () => Promise; + anonymizationFields: FindAnonymizationFieldsResponse; + refetchAnonymizationFieldsResults: () => Promise; } type Props = OwnProps; @@ -64,6 +67,8 @@ export const AssistantHeader: React.FC = ({ setCurrentConversation, conversations, refetchConversationsState, + anonymizationFields, + refetchAnonymizationFieldsResults, }) => { const showAnonymizedValuesChecked = useMemo( () => @@ -147,6 +152,8 @@ export const AssistantHeader: React.FC = ({ onConversationSelected={onConversationSelected} conversations={conversations} refetchConversationsState={refetchConversationsState} + anonymizationFields={anonymizationFields} + refetchAnonymizationFieldsResults={refetchAnonymizationFieldsResults} /> 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 8f7b31bbe141e..157e3e2579b6a 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,11 +8,12 @@ import React, { useCallback } from 'react'; import { HttpSetup } from '@kbn/core-http-browser'; import { i18n } from '@kbn/i18n'; +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, Message, Prompt, useAssistantContext } from '../../..'; +import { Conversation, Prompt, useAssistantContext } from '../../..'; import { getMessageFromRawResponse } from '../helpers'; import { getDefaultSystemPrompt } from '../use_conversation/helpers'; @@ -126,7 +127,7 @@ export const useChatSend = ({ isEnabledRAGAlerts, }); - const responseMessage: Message = getMessageFromRawResponse(rawResponse); + const responseMessage: ClientMessage = getMessageFromRawResponse(rawResponse); setCurrentConversation({ ...currentConversation, @@ -184,7 +185,7 @@ export const useChatSend = ({ replacements: {}, }); - const responseMessage: Message = getMessageFromRawResponse(rawResponse); + const responseMessage: ClientMessage = getMessageFromRawResponse(rawResponse); setCurrentConversation({ ...currentConversation, messages: [...updatedMessages, responseMessage], diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/context_pills/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/context_pills/index.test.tsx index 88f90c2c0fa6b..da2dd3008a1b0 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/context_pills/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/context_pills/index.test.tsx @@ -31,8 +31,7 @@ const mockPromptContexts: Record = { }; const defaultProps = { - defaultAllow: [], - defaultAllowReplacement: [], + anonymizationFields: { total: 0, page: 1, perPage: 1000, data: [] }, promptContexts: mockPromptContexts, }; @@ -79,8 +78,7 @@ describe('ContextPills', () => { it('it does NOT invoke setSelectedPromptContexts() when the prompt is already selected', async () => { const context = mockPromptContexts.context1; const mockSelectedPromptContext: SelectedPromptContext = { - allow: [], - allowReplacement: [], + contextAnonymizationFields: { total: 0, page: 1, perPage: 100, data: [] }, promptContextId: context.id, rawData: 'test-raw-data', }; @@ -109,8 +107,7 @@ describe('ContextPills', () => { it('disables selected context pills', () => { const context = mockPromptContexts.context1; const mockSelectedPromptContext: SelectedPromptContext = { - allow: [], - allowReplacement: [], + contextAnonymizationFields: { total: 0, page: 1, perPage: 100, data: [] }, promptContextId: context.id, rawData: 'test-raw-data', }; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/context_pills/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/context_pills/index.tsx index 89aef125b5d0e..faaa31201991b 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/context_pills/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/context_pills/index.tsx @@ -11,6 +11,7 @@ import React, { useCallback, useMemo } from 'react'; // eslint-disable-next-line @kbn/eslint/module_migration import styled from 'styled-components'; +import { FindAnonymizationFieldsResponse } from '@kbn/elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.gen'; import { getNewSelectedPromptContext } from '../../data_anonymization/get_new_selected_prompt_context'; import type { PromptContext, SelectedPromptContext } from '../prompt_context/types'; @@ -19,8 +20,7 @@ const PillButton = styled(EuiButton)` `; interface Props { - defaultAllow: string[]; - defaultAllowReplacement: string[]; + anonymizationFields: FindAnonymizationFieldsResponse; promptContexts: Record; selectedPromptContexts: Record; setSelectedPromptContexts: React.Dispatch< @@ -29,8 +29,7 @@ interface Props { } const ContextPillsComponent: React.FC = ({ - defaultAllow, - defaultAllowReplacement, + anonymizationFields, promptContexts, selectedPromptContexts, setSelectedPromptContexts, @@ -44,8 +43,7 @@ const ContextPillsComponent: React.FC = ({ async (id: string) => { if (selectedPromptContexts[id] == null && promptContexts[id] != null) { const newSelectedPromptContext = await getNewSelectedPromptContext({ - defaultAllow, - defaultAllowReplacement, + anonymizationFields, promptContext: promptContexts[id], }); @@ -55,13 +53,7 @@ const ContextPillsComponent: React.FC = ({ })); } }, - [ - defaultAllow, - defaultAllowReplacement, - promptContexts, - selectedPromptContexts, - setSelectedPromptContexts, - ] + [anonymizationFields, promptContexts, selectedPromptContexts, setSelectedPromptContexts] ); return ( diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/helpers.test.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/helpers.test.ts index 100819ef52184..690d48f0131bc 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/helpers.test.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/helpers.test.ts @@ -167,8 +167,6 @@ describe('helpers', () => { const params = { isEnabledRAGAlerts: false, // <-- false alertsIndexPattern: 'indexPattern', - allow: ['a', 'b', 'c'], - allowReplacement: ['b', 'c'], size: 10, }; @@ -181,8 +179,6 @@ describe('helpers', () => { const params = { isEnabledRAGAlerts: true, alertsIndexPattern: 'indexPattern', - allow: ['a', 'b', 'c'], - allowReplacement: ['b', 'c'], size: 10, }; @@ -190,24 +186,9 @@ describe('helpers', () => { expect(result).toEqual({ alertsIndexPattern: 'indexPattern', - allow: ['a', 'b', 'c'], - allowReplacement: ['b', 'c'], size: 10, }); }); - - it('should return (only) the optional request params that are defined when some optional params are not provided', () => { - const params = { - isEnabledRAGAlerts: true, - allow: ['a', 'b', 'c'], // all the others are undefined - }; - - const result = getOptionalRequestParams(params); - - expect(result).toEqual({ - allow: ['a', 'b', 'c'], - }); - }); }); describe('mergeBaseWithPersistedConversations', () => { diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/helpers.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/helpers.ts index 7ef52835544b6..f5990d6e6df98 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/helpers.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/helpers.ts @@ -9,10 +9,12 @@ import { merge } from 'lodash/fp'; import { AIConnector } from '../connectorland/connector_selector'; import { FetchConnectorExecuteResponse, FetchConversationsResponse } from './api'; import { Conversation } from '../..'; -import type { Message } from '../assistant_context/types'; +import type { ClientMessage } from '../assistant_context/types'; import { enterpriseMessaging, WELCOME_CONVERSATION } from './use_conversation/sample_conversations'; -export const getMessageFromRawResponse = (rawResponse: FetchConnectorExecuteResponse): Message => { +export const getMessageFromRawResponse = ( + rawResponse: FetchConnectorExecuteResponse +): ClientMessage => { const { response, isStream, isError } = rawResponse; const dateTimeString = new Date().toLocaleString(); // TODO: Pull from response if (rawResponse) { @@ -83,27 +85,19 @@ export const getDefaultConnector = ( interface OptionalRequestParams { alertsIndexPattern?: string; - allow?: string[]; - allowReplacement?: string[]; size?: number; } export const getOptionalRequestParams = ({ isEnabledRAGAlerts, alertsIndexPattern, - allow, - allowReplacement, size, }: { isEnabledRAGAlerts: boolean; alertsIndexPattern?: string; - allow?: string[]; - allowReplacement?: string[]; size?: number; }): OptionalRequestParams => { const optionalAlertsIndexPattern = alertsIndexPattern ? { alertsIndexPattern } : undefined; - const optionalAllow = allow ? { allow } : undefined; - const optionalAllowReplacement = allowReplacement ? { allowReplacement } : undefined; const optionalSize = size ? { size } : undefined; // the settings toggle must be enabled: @@ -113,8 +107,6 @@ export const getOptionalRequestParams = ({ return { ...optionalAlertsIndexPattern, - ...optionalAllow, - ...optionalAllowReplacement, ...optionalSize, }; }; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.test.tsx index 1ac6c10b55e3c..89f6d3de94982 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.test.tsx @@ -17,7 +17,7 @@ import { useConnectorSetup } from '../connectorland/connector_setup'; import { UseQueryResult } from '@tanstack/react-query'; import { WELCOME_CONVERSATION_TITLE } from './use_conversation/translations'; -import { useLocalStorage } from 'react-use'; +import { useLocalStorage, useSessionStorage } from 'react-use'; import { PromptEditor } from './prompt_editor'; import { QuickPrompts } from './quick_prompts/quick_prompts'; import { mockAssistantAvailability, TestProviders } from '../mock/test_providers/test_providers'; @@ -108,16 +108,23 @@ describe('Assistant', () => { }); let persistToLocalStorage: jest.Mock; + let persistToSessionStorage: jest.Mock; beforeEach(() => { jest.clearAllMocks(); persistToLocalStorage = jest.fn(); + persistToSessionStorage = jest.fn(); jest .mocked(useLocalStorage) .mockReturnValue([undefined, persistToLocalStorage] as unknown as ReturnType< typeof useLocalStorage >); + jest + .mocked(useSessionStorage) + .mockReturnValue([undefined, persistToSessionStorage] as unknown as ReturnType< + typeof useSessionStorage + >); }); describe('persistent storage', () => { 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 b88948c7433e0..01afeba81d517 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.tsx @@ -29,6 +29,7 @@ import { import { createPortal } from 'react-dom'; import { css } from '@emotion/react'; +import { FindAnonymizationFieldsResponse } from '@kbn/elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.gen'; import { useChatSend } from './chat_send/use_chat_send'; import { ChatSend } from './chat_send'; import { BlockBotCallToAction } from './block_bot/cta'; @@ -57,6 +58,7 @@ import { } from './api/conversations/use_fetch_current_user_conversations'; import { Conversation } from '../assistant_context/types'; import { clearPresentationData } from '../connectorland/connector_setup/helpers'; +import { useFetchAnonymizationFields } from './api/anonymization_fields/use_fetch_anonymization_fields'; export interface Props { conversationTitle?: string; @@ -83,8 +85,6 @@ const AssistantComponent: React.FC = ({ assistantTelemetry, augmentMessageCodeBlocks, assistantAvailability: { isAssistantEnabled }, - defaultAllow, - defaultAllowReplacement, docLinks, getComments, http, @@ -124,8 +124,36 @@ const AssistantComponent: React.FC = ({ http, onFetch: onFetchedConversations, refetchOnWindowFocus: !isStreaming, + isAssistantEnabled, }); + const [anonymizationFields, setAnonymizationFields] = useState({ + data: [], + page: 1, + perPage: 5, + total: 0, + }); + const { + data: anonymizationData, + isLoading: isLoadingAnonymizationFields, + isError: isErrorAnonymizationFields, + refetch: refetchAnonymizationFields, + } = useFetchAnonymizationFields({ http, isAssistantEnabled }); + + const refetchAnonymizationFieldsResults = useCallback(async () => { + const updatedAnonymizationFields = await refetchAnonymizationFields(); + if (!updatedAnonymizationFields.isLoading && !updatedAnonymizationFields.isError) { + setAnonymizationFields(updatedAnonymizationFields.data); + return updatedAnonymizationFields.data as FindAnonymizationFieldsResponse; + } + }, [refetchAnonymizationFields]); + + useEffect(() => { + if (!isLoadingAnonymizationFields && !isErrorAnonymizationFields) { + setAnonymizationFields(anonymizationData); + } + }, [anonymizationData, isErrorAnonymizationFields, isLoadingAnonymizationFields]); + useEffect(() => { if (!isLoading && !isError) { setConversations(conversationsData ?? {}); @@ -382,14 +410,18 @@ const AssistantComponent: React.FC = ({ } const promptContext: PromptContext | undefined = promptContexts[promptContextId]; - if (promptContext != null) { + if ( + promptContext != null && + !isLoadingAnonymizationFields && + !isErrorAnonymizationFields && + anonymizationData + ) { setAutoPopulatedOnce(true); if (!Object.keys(selectedPromptContexts).includes(promptContext.id)) { const addNewSelectedPromptContext = async () => { const newSelectedPromptContext = await getNewSelectedPromptContext({ - defaultAllow, - defaultAllowReplacement, + anonymizationFields: anonymizationData, promptContext, }); @@ -414,8 +446,9 @@ const AssistantComponent: React.FC = ({ selectedConversationTitle, selectedPromptContexts, autoPopulatedOnce, - defaultAllow, - defaultAllowReplacement, + isLoadingAnonymizationFields, + isErrorAnonymizationFields, + anonymizationData, ]); // Show missing connector callout if no connectors are configured @@ -583,17 +616,18 @@ const AssistantComponent: React.FC = ({ conversations={conversations} onConversationDeleted={handleOnConversationDeleted} refetchConversationsState={refetchConversationsState} + anonymizationFields={anonymizationFields} + refetchAnonymizationFieldsResults={refetchAnonymizationFieldsResults} /> )} {/* Create portals for each EuiCodeBlock to add the `Investigate in Timeline` action */} {createCodeBlockPortals()} - {!isDisabled && ( + {!isDisabled && !isLoadingAnonymizationFields && !isErrorAnonymizationFields && ( <> { }); describe('when isNewChat is true and selectedSystemPrompt is defined', () => { - let result: Message[]; + let result: ClientMessage[]; beforeEach(() => { result = getSystemMessages({ isNewChat: true, selectedSystemPrompt: mockSystemPrompt }); @@ -63,7 +62,7 @@ describe('helpers', () => { describe('getCombinedMessage', () => { it('returns correct content for a new chat with a system prompt', async () => { - const message: Message = await getCombinedMessage({ + const message: ClientMessage = await getCombinedMessage({ currentReplacements: {}, isNewChat: true, promptText: 'User prompt text', @@ -85,7 +84,7 @@ User prompt text`); }); it('returns correct content for a new chat WITHOUT a system prompt', async () => { - const message: Message = await getCombinedMessage({ + const message: ClientMessage = await getCombinedMessage({ currentReplacements: {}, isNewChat: true, promptText: 'User prompt text', @@ -106,7 +105,7 @@ User prompt text`); }); it('returns the correct content for an existing chat', async () => { - const message: Message = await getCombinedMessage({ + const message: ClientMessage = await getCombinedMessage({ currentReplacements: {}, isNewChat: false, promptText: 'User prompt text', @@ -125,7 +124,7 @@ User prompt text`); }); it('returns the expected role', async () => { - const message: Message = await getCombinedMessage({ + const message: ClientMessage = await getCombinedMessage({ currentReplacements: {}, isNewChat: true, promptText: 'User prompt text', @@ -139,7 +138,7 @@ User prompt text`); }); it('returns a valid timestamp', async () => { - const message: Message = await getCombinedMessage({ + const message: ClientMessage = await getCombinedMessage({ currentReplacements: {}, isNewChat: true, promptText: 'User prompt text', @@ -152,8 +151,25 @@ User prompt text`); describe('when there is data to anonymize', () => { const mockPromptContextWithDataToAnonymize: SelectedPromptContext = { - allow: ['field1', 'field2'], - allowReplacement: ['field1', 'field2'], + contextAnonymizationFields: { + total: 0, + page: 1, + perPage: 1000, + data: [ + { + id: 'field1', + field: 'field1', + anonymized: true, + allowed: true, + }, + { + id: 'field2', + field: 'field2', + anonymized: true, + allowed: true, + }, + ], + }, promptContextId: 'test-prompt-context-id', rawData: { field1: ['foo', 'bar', 'baz'], @@ -185,7 +201,7 @@ User prompt text`); it('returns the expected content when `isNewChat` is false', async () => { const isNewChat = false; // <-- not a new chat - const message: Message = await getCombinedMessage({ + const message: ClientMessage = await getCombinedMessage({ currentReplacements: {}, getAnonymizedValue: mockGetAnonymizedValue, isNewChat, 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 0266a4ae002c6..4ce75d3a3abae 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 @@ -6,8 +6,8 @@ */ import { Replacements, transformRawData } from '@kbn/elastic-assistant-common'; +import type { ClientMessage } from '../../assistant_context/types'; import { getAnonymizedValue as defaultGetAnonymizedValue } from '../get_anonymized_value'; -import type { Message } from '../../assistant_context/types'; import type { SelectedPromptContext } from '../prompt_context/types'; import type { Prompt } from '../types'; import { SYSTEM_PROMPT_CONTEXT_NON_I18N } from '../../content/prompts/system/translations'; @@ -18,12 +18,12 @@ export const getSystemMessages = ({ }: { isNewChat: boolean; selectedSystemPrompt: Prompt | undefined; -}): Message[] => { +}): ClientMessage[] => { if (!isNewChat || selectedSystemPrompt == null) { return []; } - const message: Message = { + const message: ClientMessage = { content: selectedSystemPrompt.content, role: 'system', timestamp: new Date().toLocaleString(), @@ -31,7 +31,9 @@ export const getSystemMessages = ({ return [message]; }; - +interface ClientMessageWithReplacements extends ClientMessage { + replacements: Replacements; +} export function getCombinedMessage({ currentReplacements, getAnonymizedValue = defaultGetAnonymizedValue, @@ -52,7 +54,7 @@ export function getCombinedMessage({ promptText: string; selectedPromptContexts: Record; selectedSystemPrompt: Prompt | undefined; -}): Message { +}): ClientMessageWithReplacements { let replacements: Replacements = currentReplacements ?? {}; const onNewReplacements = (newReplacements: Replacements) => { replacements = { ...replacements, ...newReplacements }; @@ -62,8 +64,7 @@ export function getCombinedMessage({ .sort() .map((id) => { const promptContextData = transformRawData({ - allow: selectedPromptContexts[id].allow, - allowReplacement: selectedPromptContexts[id].allowReplacement, + anonymizationFields: selectedPromptContexts[id].contextAnonymizationFields?.data ?? [], currentReplacements, getAnonymizedValue, onNewReplacements, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_context/types.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_context/types.ts index 4e821c5c44bfa..330fc12c2c78f 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_context/types.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_context/types.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { FindAnonymizationFieldsResponse } from '@kbn/elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.gen'; import type { ReactNode } from 'react'; /** @@ -68,10 +69,8 @@ export interface PromptContext { * A prompt context that was added from the pills to the current conversation, but not yet sent */ export interface SelectedPromptContext { - /** fields allowed to be included in a conversation */ - allow: string[]; - /** fields that will be anonymized */ - allowReplacement: string[]; + /** anonymization fields to be included in a conversation */ + contextAnonymizationFields?: FindAnonymizationFieldsResponse; /** unique id of the selected `PromptContext` */ promptContextId: string; /** this data is not anonymized */ 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 96abbd4dbb516..e6a9f7619bbde 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 @@ -14,15 +14,13 @@ import { SelectedPromptContext } from '../prompt_context/types'; import { PromptEditor, Props } from '.'; const mockSelectedAlertPromptContext: SelectedPromptContext = { - allow: [], - allowReplacement: [], + contextAnonymizationFields: { total: 0, page: 1, perPage: 1000, data: [] }, promptContextId: mockAlertPromptContext.id, rawData: 'alert data', }; const mockSelectedEventPromptContext: SelectedPromptContext = { - allow: [], - allowReplacement: [], + contextAnonymizationFields: { total: 0, page: 1, perPage: 1000, data: [] }, promptContextId: mockEventPromptContext.id, rawData: 'event data', }; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/selected_prompt_contexts/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/selected_prompt_contexts/index.test.tsx index 8b71d45d3bc21..d044ccb4b2bd3 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/selected_prompt_contexts/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/selected_prompt_contexts/index.test.tsx @@ -25,15 +25,13 @@ const defaultProps: Props = { }; const mockSelectedAlertPromptContext: SelectedPromptContext = { - allow: [], - allowReplacement: [], + contextAnonymizationFields: { total: 0, page: 1, perPage: 1000, data: [] }, promptContextId: mockAlertPromptContext.id, rawData: 'test-raw-data', }; const mockSelectedEventPromptContext: SelectedPromptContext = { - allow: [], - allowReplacement: [], + contextAnonymizationFields: { total: 0, page: 1, perPage: 1000, data: [] }, promptContextId: mockEventPromptContext.id, rawData: 'test-raw-data', }; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings.test.tsx index f01f45b47c601..498889e8deaf8 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings.test.tsx @@ -52,6 +52,8 @@ const testProps = { onSave, onConversationSelected, conversations: {}, + anonymizationFields: { total: 0, page: 1, perPage: 1000, data: [] }, + refetchAnonymizationFieldsResults: jest.fn(), }; jest.mock('../../assistant_context'); 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 b9224aa50153b..027c6bcb2a30f 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,6 +23,7 @@ import { // eslint-disable-next-line @kbn/eslint/module_migration import styled from 'styled-components'; import { css } from '@emotion/react'; +import { FindAnonymizationFieldsResponse } from '@kbn/elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.gen'; import { AIConnector } from '../../connectorland/connector_selector'; import { Conversation, Prompt, QuickPrompt } from '../../..'; import * as i18n from './translations'; @@ -66,6 +67,8 @@ interface Props { selectedConversation: Conversation; onConversationSelected: ({ cId, cTitle }: { cId: string; cTitle: string }) => void; conversations: Record; + anonymizationFields: FindAnonymizationFieldsResponse; + refetchAnonymizationFieldsResults: () => Promise; } /** @@ -80,6 +83,8 @@ export const AssistantSettings: React.FC = React.memo( selectedConversation: defaultSelectedConversation, onConversationSelected, conversations, + anonymizationFields, + refetchAnonymizationFieldsResults, }) => { const { actionTypeRegistry, @@ -92,22 +97,22 @@ export const AssistantSettings: React.FC = React.memo( const { conversationSettings, setConversationSettings, - defaultAllow, - defaultAllowReplacement, knowledgeBase, quickPromptSettings, systemPromptSettings, assistantStreamingEnabled, setUpdatedAssistantStreamingEnabled, - setUpdatedDefaultAllow, - setUpdatedDefaultAllowReplacement, setUpdatedKnowledgeBaseSettings, setUpdatedQuickPromptSettings, setUpdatedSystemPromptSettings, saveSettings, conversationsSettingsBulkActions, + updatedAnonymizationData, setConversationsSettingsBulkActions, - } = useSettingsUpdater(conversations); + anonymizationFieldsBulkActions, + setAnonymizationFieldsBulkActions, + setUpdatedAnonymizationData, + } = useSettingsUpdater(conversations, anonymizationFields); // Local state for saving previously selected items so tab switching is friendlier // Conversation Selection State @@ -162,12 +167,21 @@ export const AssistantSettings: React.FC = React.memo( }); } const saveResult = await saveSettings(); - await onSave(saveResult); + if ( + (anonymizationFieldsBulkActions?.create?.length ?? 0) > 0 || + (anonymizationFieldsBulkActions?.update?.length ?? 0) > 0 || + (anonymizationFieldsBulkActions?.delete?.ids?.length ?? 0) > 0 + ) { + refetchAnonymizationFieldsResults(); + } + onSave(saveResult); }, [ + anonymizationFieldsBulkActions, conversationSettings, defaultSelectedConversation.title, onConversationSelected, onSave, + refetchAnonymizationFieldsResults, saveSettings, ]); @@ -330,11 +344,11 @@ export const AssistantSettings: React.FC = React.memo( )} {selectedSettingsTab === ANONYMIZATION_TAB && ( )} {selectedSettingsTab === KNOWLEDGE_BASE_TAB && ( diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_button.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_button.test.tsx index 9c1edbfb896c8..e8a75bf1c6e1a 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_button.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/assistant_settings_button.test.tsx @@ -25,6 +25,8 @@ const testProps = { onConversationSelected, conversations: {}, refetchConversationsState: jest.fn(), + anonymizationFields: { total: 0, page: 1, perPage: 1000, data: [] }, + refetchAnonymizationFieldsResults: jest.fn(), }; const setSelectedSettingsTab = jest.fn(); const mockUseAssistantContext = { 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 a27ecf8c2b768..4e52ef3444e4d 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 { FindAnonymizationFieldsResponse } from '@kbn/elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.gen'; import { AIConnector } from '../../connectorland/connector_selector'; import { Conversation } from '../../..'; import { AssistantSettings, CONVERSATIONS_TAB } from './assistant_settings'; @@ -23,6 +24,8 @@ interface Props { isDisabled?: boolean; conversations: Record; refetchConversationsState: () => Promise; + anonymizationFields: FindAnonymizationFieldsResponse; + refetchAnonymizationFieldsResults: () => Promise; } /** @@ -38,6 +41,8 @@ export const AssistantSettingsButton: React.FC = React.memo( onConversationSelected, conversations, refetchConversationsState, + anonymizationFields, + refetchAnonymizationFieldsResults, }) => { const { toasts, setSelectedSettingsTab } = useAssistantContext(); @@ -90,6 +95,8 @@ export const AssistantSettingsButton: React.FC = React.memo( onClose={handleCloseModal} onSave={handleSave} conversations={conversations} + anonymizationFields={anonymizationFields} + refetchAnonymizationFieldsResults={refetchAnonymizationFieldsResults} /> )} diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/evaluation_settings/evaluation_settings.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/evaluation_settings/evaluation_settings.tsx index 09cdf6717ca6c..fe4d75be04004 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/evaluation_settings/evaluation_settings.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/evaluation_settings/evaluation_settings.tsx @@ -52,7 +52,8 @@ interface Props { * Evaluation Settings -- development-only feature for evaluating models */ export const EvaluationSettings: React.FC = React.memo(({ onEvaluationSettingsChange }) => { - const { actionTypeRegistry, basePath, http } = useAssistantContext(); + const { actionTypeRegistry, basePath, http, setTraceOptions, traceOptions } = + useAssistantContext(); const { data: connectors } = useLoadConnectors({ http }); const { data: evalResponse, @@ -92,7 +93,27 @@ export const EvaluationSettings: React.FC = React.memo(({ onEvaluationSet }, [setOutputIndex] ); - // Dataset + /** Trace Options **/ + const [showTraceOptions, setShowTraceOptions] = useState(false); + const onApmUrlChange = useCallback( + (e) => { + setTraceOptions({ ...traceOptions, apmUrl: e.target.value }); + }, + [setTraceOptions, traceOptions] + ); + const onLangSmithProjectChange = useCallback( + (e) => { + setTraceOptions({ ...traceOptions, langSmithProject: e.target.value }); + }, + [setTraceOptions, traceOptions] + ); + const onLangSmithApiKeyChange = useCallback( + (e) => { + setTraceOptions({ ...traceOptions, langSmithApiKey: e.target.value }); + }, + [setTraceOptions, traceOptions] + ); + /** Dataset **/ const [useLangSmithDataset, setUseLangSmithDataset] = useState(true); const datasetToggleButton = useMemo(() => { return ( @@ -423,6 +444,59 @@ export const EvaluationSettings: React.FC = React.memo(({ onEvaluationSet aria-label="evaluation-output-index-textfield" /> + + setShowTraceOptions(!showTraceOptions)}> + {i18n.SHOW_TRACE_OPTIONS} + + + {showTraceOptions && ( + <> + + + + + + + + + + + )} {/* Prediction Details*/} diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/evaluation_settings/translations.ts b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/evaluation_settings/translations.ts index 305090d766788..1b670384696c3 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/evaluation_settings/translations.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/settings/evaluation_settings/translations.ts @@ -193,6 +193,57 @@ export const EVALUATOR_OUTPUT_INDEX_DESCRIPTION = i18n.translate( } ); +export const SHOW_TRACE_OPTIONS = i18n.translate( + 'xpack.elasticAssistant.assistant.settings.evaluationSettings.showTraceOptionsLabel', + { + defaultMessage: 'Show Trace Options (for internal use only)', + } +); + +export const APM_URL_LABEL = i18n.translate( + 'xpack.elasticAssistant.assistant.settings.evaluationSettings.apmUrlLabel', + { + defaultMessage: 'APM URL', + } +); + +export const APM_URL_DESCRIPTION = i18n.translate( + 'xpack.elasticAssistant.assistant.settings.evaluationSettings.apmUrlDescription', + { + defaultMessage: + 'URL for the Kibana APM app. Used to link to APM traces for evaluation results. Defaults to "$\\{basePath\\}/app/apm"', + } +); + +export const LANGSMITH_PROJECT_LABEL = i18n.translate( + 'xpack.elasticAssistant.assistant.settings.evaluationSettings.langSmithProjectLabel', + { + defaultMessage: 'LangSmith Project', + } +); + +export const LANGSMITH_PROJECT_DESCRIPTION = i18n.translate( + 'xpack.elasticAssistant.assistant.settings.evaluationSettings.langSmithProjectDescription', + { + defaultMessage: 'LangSmith Project to write traces to', + } +); + +export const LANGSMITH_API_KEY_LABEL = i18n.translate( + 'xpack.elasticAssistant.assistant.settings.evaluationSettings.langSmithApiKeyLabel', + { + defaultMessage: 'LangSmith API Key', + } +); + +export const LANGSMITH_API_KEY_DESCRIPTION = i18n.translate( + 'xpack.elasticAssistant.assistant.settings.evaluationSettings.langSmithApiKeyDescription', + { + defaultMessage: + 'API Key for writing traces to LangSmith. Stored in Session Storage. Close tab to clear session.', + } +); + export const EVALUATOR_DATASET_LABEL = i18n.translate( 'xpack.elasticAssistant.assistant.settings.evaluationSettings.evaluatorDatasetLabel', { 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 83f5627648d7b..73e9c8ddf3492 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 @@ -29,24 +29,28 @@ const mockHttp = { const mockSystemPrompts: Prompt[] = [mockSystemPrompt]; const mockQuickPrompts: Prompt[] = [defaultSystemPrompt]; -const initialDefaultAllow = ['allow1']; -const initialDefaultAllowReplacement = ['replacement1']; +const anonymizationFields = { + total: 2, + page: 1, + perPage: 1000, + data: [ + { id: 'allow1', field: 'allow1', allowed: true, anonymized: false }, + { id: 'replacement1', field: 'replacement1', allowed: false, anonymized: true }, + ], +}; const setAllQuickPromptsMock = jest.fn(); const setAllSystemPromptsMock = jest.fn(); -const setDefaultAllowMock = jest.fn(); const setAssistantStreamingEnabled = jest.fn(); -const setDefaultAllowReplacementMock = jest.fn(); const setKnowledgeBaseMock = jest.fn(); const reportAssistantSettingToggled = jest.fn(); +const setUpdatedAnonymizationData = jest.fn(); const mockValues = { assistantStreamingEnabled: true, setAssistantStreamingEnabled, assistantTelemetry: { reportAssistantSettingToggled }, allSystemPrompts: mockSystemPrompts, allQuickPrompts: mockQuickPrompts, - defaultAllow: initialDefaultAllow, - defaultAllowReplacement: initialDefaultAllowReplacement, knowledgeBase: { isEnabledRAGAlerts: true, isEnabledKnowledgeBase: true, @@ -55,18 +59,24 @@ const mockValues = { baseConversations: {}, setAllQuickPrompts: setAllQuickPromptsMock, setAllSystemPrompts: setAllSystemPromptsMock, - setDefaultAllow: setDefaultAllowMock, - setDefaultAllowReplacement: setDefaultAllowReplacementMock, setKnowledgeBase: setKnowledgeBaseMock, http: mockHttp, + anonymizationFieldsBulkActions: {}, }; const updatedValues = { conversations: { [customConvo.title]: customConvo }, allSystemPrompts: [mockSuperheroSystemPrompt], allQuickPrompts: [{ title: 'Prompt 2', prompt: 'Prompt 2', color: 'red' }], - defaultAllow: ['allow2'], - defaultAllowReplacement: ['replacement2'], + updatedAnonymizationData: { + total: 2, + page: 1, + perPage: 1000, + data: [ + { id: 'allow2', field: 'allow2', allowed: true, anonymized: false }, + { id: 'replacement2', field: 'replacement2', allowed: false, anonymized: true }, + ], + }, knowledgeBase: { isEnabledRAGAlerts: false, isEnabledKnowledgeBase: false, @@ -89,15 +99,15 @@ 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)); + const { result, waitForNextUpdate } = renderHook(() => + useSettingsUpdater(mockConversations, anonymizationFields) + ); await waitForNextUpdate(); const { setConversationSettings, setConversationsSettingsBulkActions, setUpdatedQuickPromptSettings, setUpdatedSystemPromptSettings, - setUpdatedDefaultAllow, - setUpdatedDefaultAllowReplacement, setUpdatedKnowledgeBaseSettings, setUpdatedAssistantStreamingEnabled, resetSettings, @@ -107,16 +117,14 @@ describe('useSettingsUpdater', () => { setConversationsSettingsBulkActions({}); setUpdatedQuickPromptSettings(updatedValues.allQuickPrompts); setUpdatedSystemPromptSettings(updatedValues.allSystemPrompts); - setUpdatedDefaultAllow(updatedValues.defaultAllow); - setUpdatedDefaultAllowReplacement(updatedValues.defaultAllowReplacement); + setUpdatedAnonymizationData(updatedValues.updatedAnonymizationData); setUpdatedKnowledgeBaseSettings(updatedValues.knowledgeBase); setUpdatedAssistantStreamingEnabled(updatedValues.assistantStreamingEnabled); expect(result.current.conversationSettings).toEqual(updatedValues.conversations); expect(result.current.quickPromptSettings).toEqual(updatedValues.allQuickPrompts); expect(result.current.systemPromptSettings).toEqual(updatedValues.allSystemPrompts); - expect(result.current.defaultAllow).toEqual(updatedValues.defaultAllow); - expect(result.current.defaultAllowReplacement).toEqual(updatedValues.defaultAllowReplacement); + expect(result.current.updatedAnonymizationData).toEqual(anonymizationFields); expect(result.current.knowledgeBase).toEqual(updatedValues.knowledgeBase); expect(result.current.assistantStreamingEnabled).toEqual( updatedValues.assistantStreamingEnabled @@ -127,8 +135,9 @@ describe('useSettingsUpdater', () => { expect(result.current.conversationSettings).toEqual(mockConversations); expect(result.current.quickPromptSettings).toEqual(mockValues.allQuickPrompts); expect(result.current.systemPromptSettings).toEqual(mockValues.allSystemPrompts); - expect(result.current.defaultAllow).toEqual(mockValues.defaultAllow); - expect(result.current.defaultAllowReplacement).toEqual(mockValues.defaultAllowReplacement); + expect(result.current.anonymizationFieldsBulkActions).toEqual( + mockValues.anonymizationFieldsBulkActions + ); expect(result.current.knowledgeBase).toEqual(mockValues.knowledgeBase); expect(result.current.assistantStreamingEnabled).toEqual( mockValues.assistantStreamingEnabled @@ -138,24 +147,25 @@ 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)); + const { result, waitForNextUpdate } = renderHook(() => + useSettingsUpdater(mockConversations, anonymizationFields) + ); await waitForNextUpdate(); const { setConversationSettings, setConversationsSettingsBulkActions, setUpdatedQuickPromptSettings, setUpdatedSystemPromptSettings, - setUpdatedDefaultAllow, - setUpdatedDefaultAllowReplacement, + setAnonymizationFieldsBulkActions, setUpdatedKnowledgeBaseSettings, } = result.current; setConversationSettings(updatedValues.conversations); setConversationsSettingsBulkActions({ delete: { ids: ['1'] } }); + setAnonymizationFieldsBulkActions({ delete: { ids: ['1'] } }); setUpdatedQuickPromptSettings(updatedValues.allQuickPrompts); setUpdatedSystemPromptSettings(updatedValues.allSystemPrompts); - setUpdatedDefaultAllow(updatedValues.defaultAllow); - setUpdatedDefaultAllowReplacement(updatedValues.defaultAllowReplacement); + setUpdatedAnonymizationData(updatedValues.updatedAnonymizationData); setUpdatedKnowledgeBaseSettings(updatedValues.knowledgeBase); await result.current.saveSettings(); @@ -170,16 +180,17 @@ describe('useSettingsUpdater', () => { ); expect(setAllQuickPromptsMock).toHaveBeenCalledWith(updatedValues.allQuickPrompts); expect(setAllSystemPromptsMock).toHaveBeenCalledWith(updatedValues.allSystemPrompts); - expect(setDefaultAllowMock).toHaveBeenCalledWith(updatedValues.defaultAllow); - expect(setDefaultAllowReplacementMock).toHaveBeenCalledWith( - updatedValues.defaultAllowReplacement + expect(setUpdatedAnonymizationData).toHaveBeenCalledWith( + updatedValues.updatedAnonymizationData ); expect(setKnowledgeBaseMock).toHaveBeenCalledWith(updatedValues.knowledgeBase); }); }); it('should track which toggles have been updated when saveSettings is called', async () => { await act(async () => { - const { result, waitForNextUpdate } = renderHook(() => useSettingsUpdater(mockConversations)); + const { result, waitForNextUpdate } = renderHook(() => + useSettingsUpdater(mockConversations, anonymizationFields) + ); await waitForNextUpdate(); const { setUpdatedKnowledgeBaseSettings } = result.current; @@ -194,7 +205,9 @@ describe('useSettingsUpdater', () => { }); it('should track only toggles that updated', async () => { await act(async () => { - const { result, waitForNextUpdate } = renderHook(() => useSettingsUpdater(mockConversations)); + const { result, waitForNextUpdate } = renderHook(() => + useSettingsUpdater(mockConversations, anonymizationFields) + ); await waitForNextUpdate(); const { setUpdatedKnowledgeBaseSettings } = result.current; @@ -210,7 +223,9 @@ describe('useSettingsUpdater', () => { }); it('if no toggles update, do not track anything', async () => { await act(async () => { - const { result, waitForNextUpdate } = renderHook(() => useSettingsUpdater(mockConversations)); + const { result, waitForNextUpdate } = renderHook(() => + useSettingsUpdater(mockConversations, 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 27db5eadc7d9c..8673059cdfd33 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 @@ -6,30 +6,37 @@ */ import React, { useCallback, 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 { useAssistantContext } from '../../../assistant_context'; import type { KnowledgeBaseConfig } from '../../types'; import { ConversationsBulkActions, - bulkChangeConversations, -} from '../../api/conversations/use_bulk_actions_conversations'; + bulkUpdateConversations, +} from '../../api/conversations/bulk_update_actions_conversations'; +import { bulkUpdateAnonymizationFields } from '../../api/anonymization_fields/bulk_update_anonymization_fields'; interface UseSettingsUpdater { assistantStreamingEnabled: boolean; conversationSettings: Record; conversationsSettingsBulkActions: ConversationsBulkActions; - defaultAllow: string[]; - defaultAllowReplacement: string[]; + updatedAnonymizationData: FindAnonymizationFieldsResponse; knowledgeBase: KnowledgeBaseConfig; quickPromptSettings: QuickPrompt[]; resetSettings: () => void; systemPromptSettings: Prompt[]; - setUpdatedDefaultAllow: React.Dispatch>; - setUpdatedDefaultAllowReplacement: React.Dispatch>; + setUpdatedAnonymizationData: React.Dispatch< + React.SetStateAction + >; setConversationSettings: React.Dispatch>>; setConversationsSettingsBulkActions: React.Dispatch< React.SetStateAction >; + anonymizationFieldsBulkActions: PerformBulkActionRequestBody; + setAnonymizationFieldsBulkActions: React.Dispatch< + React.SetStateAction + >; setUpdatedKnowledgeBaseSettings: React.Dispatch>; setUpdatedQuickPromptSettings: React.Dispatch>; setUpdatedSystemPromptSettings: React.Dispatch>; @@ -38,20 +45,17 @@ interface UseSettingsUpdater { } export const useSettingsUpdater = ( - conversations: Record + conversations: Record, + anonymizationFields: FindAnonymizationFieldsResponse ): UseSettingsUpdater => { // Initial state from assistant context const { allQuickPrompts, allSystemPrompts, assistantTelemetry, - defaultAllow, - defaultAllowReplacement, knowledgeBase, setAllQuickPrompts, setAllSystemPrompts, - setDefaultAllow, - setDefaultAllowReplacement, assistantStreamingEnabled, setAssistantStreamingEnabled, setKnowledgeBase, @@ -74,9 +78,10 @@ export const useSettingsUpdater = ( const [updatedSystemPromptSettings, setUpdatedSystemPromptSettings] = useState(allSystemPrompts); // Anonymization - const [updatedDefaultAllow, setUpdatedDefaultAllow] = useState(defaultAllow); - const [updatedDefaultAllowReplacement, setUpdatedDefaultAllowReplacement] = - useState(defaultAllowReplacement); + const [anonymizationFieldsBulkActions, setAnonymizationFieldsBulkActions] = + useState({}); + const [updatedAnonymizationData, setUpdatedAnonymizationData] = + useState(anonymizationFields); const [updatedAssistantStreamingEnabled, setUpdatedAssistantStreamingEnabled] = useState(assistantStreamingEnabled); // Knowledge Base @@ -93,15 +98,13 @@ export const useSettingsUpdater = ( setUpdatedKnowledgeBaseSettings(knowledgeBase); setUpdatedAssistantStreamingEnabled(assistantStreamingEnabled); setUpdatedSystemPromptSettings(allSystemPrompts); - setUpdatedDefaultAllow(defaultAllow); - setUpdatedDefaultAllowReplacement(defaultAllowReplacement); + setUpdatedAnonymizationData(anonymizationFields); }, [ allQuickPrompts, allSystemPrompts, + anonymizationFields, assistantStreamingEnabled, conversations, - defaultAllow, - defaultAllowReplacement, knowledgeBase, ]); @@ -117,7 +120,7 @@ export const useSettingsUpdater = ( conversationsSettingsBulkActions.update || conversationsSettingsBulkActions.delete; const bulkResult = hasBulkConversations - ? await bulkChangeConversations(http, conversationsSettingsBulkActions, toasts) + ? await bulkUpdateConversations(http, conversationsSettingsBulkActions, toasts) : undefined; const didUpdateKnowledgeBase = @@ -141,17 +144,22 @@ export const useSettingsUpdater = ( } setAssistantStreamingEnabled(updatedAssistantStreamingEnabled); setKnowledgeBase(updatedKnowledgeBaseSettings); - setDefaultAllow(updatedDefaultAllow); - setDefaultAllowReplacement(updatedDefaultAllowReplacement); + const hasBulkAnonymizationFields = + anonymizationFieldsBulkActions.create || + anonymizationFieldsBulkActions.update || + anonymizationFieldsBulkActions.delete; + const bulkAnonymizationFieldsResult = hasBulkAnonymizationFields + ? await bulkUpdateAnonymizationFields(http, anonymizationFieldsBulkActions, toasts) + : undefined; - return bulkResult?.success ?? true; + return (bulkResult?.success ?? true) && (bulkAnonymizationFieldsResult?.success ?? true); }, [ setAllQuickPrompts, updatedQuickPromptSettings, setAllSystemPrompts, updatedSystemPromptSettings, - http, conversationsSettingsBulkActions, + http, toasts, knowledgeBase.isEnabledKnowledgeBase, knowledgeBase.isEnabledRAGAlerts, @@ -160,26 +168,23 @@ export const useSettingsUpdater = ( assistantStreamingEnabled, setAssistantStreamingEnabled, setKnowledgeBase, - setDefaultAllow, - updatedDefaultAllow, - setDefaultAllowReplacement, - updatedDefaultAllowReplacement, + anonymizationFieldsBulkActions, assistantTelemetry, ]); return { conversationSettings, conversationsSettingsBulkActions, - defaultAllow: updatedDefaultAllow, - defaultAllowReplacement: updatedDefaultAllowReplacement, knowledgeBase: updatedKnowledgeBaseSettings, assistantStreamingEnabled: updatedAssistantStreamingEnabled, quickPromptSettings: updatedQuickPromptSettings, resetSettings, systemPromptSettings: updatedSystemPromptSettings, saveSettings, - setUpdatedDefaultAllow, - setUpdatedDefaultAllowReplacement, + updatedAnonymizationData, + setUpdatedAnonymizationData, + anonymizationFieldsBulkActions, + setAnonymizationFieldsBulkActions, setUpdatedKnowledgeBaseSettings, setUpdatedAssistantStreamingEnabled, setUpdatedQuickPromptSettings, 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 e7cb6f79f243a..e0251c324ed1b 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/types.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/types.ts @@ -21,3 +21,9 @@ export interface KnowledgeBaseConfig { isEnabledKnowledgeBase: boolean; latestAlerts: number; } + +export interface TraceOptions { + apmUrl: string; + langSmithProject: string; + langSmithApiKey: string; +} diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/index.test.tsx index 8623cf221ace8..0cc7ddb8aed1e 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/index.test.tsx @@ -9,7 +9,7 @@ import { useConversation } from '.'; import { act, renderHook } from '@testing-library/react-hooks'; import { TestProviders } from '../../mock/test_providers/test_providers'; import React from 'react'; -import { ConversationRole } from '../../assistant_context/types'; +import { MessageRole } from '@kbn/elastic-assistant-common'; import { httpServiceMock } from '@kbn/core/public/mocks'; import { WELCOME_CONVERSATION } from './sample_conversations'; import { @@ -21,12 +21,12 @@ import { jest.mock('../api/conversations'); const message = { content: 'You are a robot', - role: 'user' as ConversationRole, + role: 'user' as MessageRole, timestamp: '10/04/2023, 1:00:36 PM', }; const anotherMessage = { content: 'I am a robot', - role: 'assistant' as ConversationRole, + role: 'assistant' as MessageRole, timestamp: '10/04/2023, 1:00:46 PM', }; 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 b39ea430d9994..d8740937b8f3e 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 @@ -9,7 +9,7 @@ import { useCallback } from 'react'; import { ApiConfig } from '@kbn/elastic-assistant-common'; import { useAssistantContext } from '../../assistant_context'; -import { Conversation, Message } from '../../assistant_context/types'; +import { Conversation, ClientMessage } from '../../assistant_context/types'; import * as i18n from './translations'; import { getDefaultSystemPrompt } from './helpers'; import { @@ -30,7 +30,7 @@ export const DEFAULT_CONVERSATION_STATE: Conversation = { interface CreateConversationProps { cTitle: string; - messages?: Message[]; + messages?: ClientMessage[]; } interface SetApiConfigProps { @@ -42,7 +42,7 @@ interface UseConversation { clearConversation: (conversation: Conversation) => Promise; getDefaultConversation: ({ cTitle, messages }: CreateConversationProps) => Conversation; deleteConversation: (conversationId: string) => void; - removeLastMessage: (conversationId: string) => Promise; + removeLastMessage: (conversationId: string) => Promise; setApiConfig: ({ conversation, apiConfig, @@ -66,7 +66,7 @@ export const useConversation = (): UseConversation => { */ const removeLastMessage = useCallback( async (conversationId: string) => { - let messages: Message[] = []; + let messages: ClientMessage[] = []; const prevConversation = await getConversationById({ http, id: conversationId, toasts }); if (prevConversation != null) { messages = prevConversation.messages.slice(0, prevConversation.messages.length - 1); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/sample_conversations.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/sample_conversations.tsx index 397d8b4795592..16e4d09e0dd2d 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/sample_conversations.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_conversation/sample_conversations.tsx @@ -5,7 +5,7 @@ * 2.0. */ -import { Conversation, Message } from '../../assistant_context/types'; +import { Conversation, ClientMessage } from '../../assistant_context/types'; import * as i18n from '../../content/prompts/welcome/translations'; import { WELCOME_CONVERSATION_TITLE } from './translations'; @@ -45,7 +45,7 @@ export const WELCOME_CONVERSATION: Conversation = { replacements: {}, }; -export const enterpriseMessaging: Message[] = [ +export const enterpriseMessaging: ClientMessage[] = [ { role: 'assistant', content: i18n.ENTERPRISE, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_send_message/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_send_message/index.tsx index 389f5bc9cca14..77e9ee8e6a45e 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_send_message/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/use_send_message/index.tsx @@ -12,8 +12,6 @@ import { useAssistantContext } from '../../assistant_context'; import { fetchConnectorExecuteAction, FetchConnectorExecuteResponse } from '../api'; interface SendMessageProps { - allow?: string[]; - allowReplacement?: string[]; apiConfig: ApiConfig; http: HttpSetup; message?: string; @@ -32,13 +30,8 @@ interface UseSendMessage { } export const useSendMessage = (): UseSendMessage => { - const { - alertsIndexPattern, - assistantStreamingEnabled, - defaultAllow, - defaultAllowReplacement, - knowledgeBase, - } = useAssistantContext(); + const { alertsIndexPattern, assistantStreamingEnabled, knowledgeBase, traceOptions } = + useAssistantContext(); const [isLoading, setIsLoading] = useState(false); const abortController = useRef(new AbortController()); const sendMessage = useCallback( @@ -50,8 +43,6 @@ export const useSendMessage = (): UseSendMessage => { conversationId, isEnabledRAGAlerts: knowledgeBase.isEnabledRAGAlerts, // settings toggle alertsIndexPattern, - allow: defaultAllow, - allowReplacement: defaultAllowReplacement, apiConfig, isEnabledKnowledgeBase: knowledgeBase.isEnabledKnowledgeBase, assistantStreamingEnabled, @@ -60,6 +51,7 @@ export const useSendMessage = (): UseSendMessage => { replacements, signal: abortController.current.signal, size: knowledgeBase.latestAlerts, + traceOptions, }); } finally { setIsLoading(false); @@ -68,11 +60,10 @@ export const useSendMessage = (): UseSendMessage => { [ alertsIndexPattern, assistantStreamingEnabled, - defaultAllow, - defaultAllowReplacement, knowledgeBase.isEnabledRAGAlerts, knowledgeBase.isEnabledKnowledgeBase, knowledgeBase.latestAlerts, + traceOptions, ] ); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant_context/constants.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant_context/constants.tsx index b6c95a1cc0d11..8271be45db361 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant_context/constants.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant_context/constants.tsx @@ -13,6 +13,7 @@ export const SYSTEM_PROMPT_LOCAL_STORAGE_KEY = 'systemPrompts'; export const LAST_CONVERSATION_TITLE_LOCAL_STORAGE_KEY = 'lastConversationTitle'; export const KNOWLEDGE_BASE_LOCAL_STORAGE_KEY = 'knowledgeBase'; export const STREAMING_LOCAL_STORAGE_KEY = 'streaming'; +export const TRACE_OPTIONS_SESSION_STORAGE_KEY = 'traceOptions'; /** The default `n` latest alerts, ordered by risk score, sent as context to the assistant */ export const DEFAULT_LATEST_ALERTS = 20; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant_context/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant_context/index.test.tsx index b2a41b9179c98..d48dc6bb38951 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant_context/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant_context/index.test.tsx @@ -13,6 +13,7 @@ import { TestProviders } from '../mock/test_providers/test_providers'; jest.mock('react-use', () => ({ useLocalStorage: jest.fn().mockReturnValue(['456', jest.fn()]), + useSessionStorage: jest.fn().mockReturnValue(['456', jest.fn()]), })); describe('AssistantContext', () => { 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 5a7cc593679c4..8b36d50c0ce87 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 @@ -7,11 +7,11 @@ import { EuiCommentProps } from '@elastic/eui'; import type { HttpSetup } from '@kbn/core-http-browser'; -import { omit, uniq } from 'lodash/fp'; +import { omit } from 'lodash/fp'; import React, { useCallback, useMemo, useState } from 'react'; import type { IToasts } from '@kbn/core-notifications-browser'; import { ActionTypeRegistryContract } from '@kbn/triggers-actions-ui-plugin/public'; -import { useLocalStorage } from 'react-use'; +import { useLocalStorage, useSessionStorage } from 'react-use'; import type { DocLinksStart } from '@kbn/core-doc-links-browser'; import { defaultAssistantFeatures } from '@kbn/elastic-assistant-common'; import { updatePromptContexts } from './helpers'; @@ -25,7 +25,7 @@ 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 type { KnowledgeBaseConfig, Prompt } from '../assistant/types'; +import { KnowledgeBaseConfig, Prompt, TraceOptions } from '../assistant/types'; import { BASE_SYSTEM_PROMPTS } from '../content/prompts/system'; import { DEFAULT_ASSISTANT_NAMESPACE, @@ -35,6 +35,7 @@ import { QUICK_PROMPT_LOCAL_STORAGE_KEY, STREAMING_LOCAL_STORAGE_KEY, SYSTEM_PROMPT_LOCAL_STORAGE_KEY, + TRACE_OPTIONS_SESSION_STORAGE_KEY, } from './constants'; import { CONVERSATIONS_TAB, SettingsTabs } from '../assistant/settings/assistant_settings'; import { AssistantAvailability, AssistantTelemetry } from './types'; @@ -61,10 +62,6 @@ export interface AssistantProviderProps { currentConversation: Conversation, showAnonymizedValues: boolean ) => CodeBlockDetails[][]; - baseAllow: string[]; - baseAllowReplacement: string[]; - defaultAllow: string[]; - defaultAllowReplacement: string[]; basePath: string; basePromptContexts?: PromptContextTemplate[]; baseQuickPrompts?: QuickPrompt[]; @@ -84,8 +81,6 @@ export interface AssistantProviderProps { http: HttpSetup; baseConversations: Record; nameSpace?: string; - setDefaultAllow: React.Dispatch>; - setDefaultAllowReplacement: React.Dispatch>; title?: string; toasts?: IToasts; } @@ -102,11 +97,7 @@ export interface UseAssistantContext { ) => CodeBlockDetails[][]; allQuickPrompts: QuickPrompt[]; allSystemPrompts: Prompt[]; - baseAllow: string[]; - baseAllowReplacement: string[]; docLinks: Omit; - defaultAllow: string[]; - defaultAllowReplacement: string[]; basePath: string; basePromptContexts: PromptContextTemplate[]; baseQuickPrompts: QuickPrompt[]; @@ -132,16 +123,20 @@ export interface UseAssistantContext { selectedSettingsTab: SettingsTabs; setAllQuickPrompts: React.Dispatch>; setAllSystemPrompts: React.Dispatch>; - setDefaultAllow: React.Dispatch>; - setDefaultAllowReplacement: React.Dispatch>; setAssistantStreamingEnabled: React.Dispatch>; setKnowledgeBase: React.Dispatch>; setLastConversationTitle: React.Dispatch>; setSelectedSettingsTab: React.Dispatch>; setShowAssistantOverlay: (showAssistantOverlay: ShowAssistantOverlay) => void; showAssistantOverlay: ShowAssistantOverlay; + setTraceOptions: (traceOptions: { + apmUrl: string; + langSmithProject: string; + langSmithApiKey: string; + }) => void; title: string; toasts: IToasts | undefined; + traceOptions: TraceOptions; unRegisterPromptContext: UnRegisterPromptContext; } @@ -153,10 +148,6 @@ export const AssistantProvider: React.FC = ({ assistantAvailability, assistantTelemetry, augmentMessageCodeBlocks, - baseAllow, - baseAllowReplacement, - defaultAllow, - defaultAllowReplacement, docLinks, basePath, basePromptContexts = [], @@ -167,11 +158,23 @@ export const AssistantProvider: React.FC = ({ http, baseConversations, nameSpace = DEFAULT_ASSISTANT_NAMESPACE, - setDefaultAllow, - setDefaultAllowReplacement, title = DEFAULT_ASSISTANT_TITLE, toasts, }) => { + /** + * Session storage for traceOptions, including APM URL and LangSmith Project/API Key + */ + const defaultTraceOptions: TraceOptions = { + apmUrl: `${http.basePath.serverBasePath}/app/apm`, + langSmithProject: '', + langSmithApiKey: '', + }; + const [sessionStorageTraceOptions = defaultTraceOptions, setSessionStorageTraceOptions] = + useSessionStorage( + `${nameSpace}.${TRACE_OPTIONS_SESSION_STORAGE_KEY}`, + defaultTraceOptions + ); + /** * Local storage for all quick prompts, prefixed by assistant nameSpace */ @@ -276,14 +279,10 @@ export const AssistantProvider: React.FC = ({ augmentMessageCodeBlocks, allQuickPrompts: localStorageQuickPrompts ?? [], allSystemPrompts: localStorageSystemPrompts ?? [], - baseAllow: uniq(baseAllow), - baseAllowReplacement: uniq(baseAllowReplacement), basePath, basePromptContexts, baseQuickPrompts, baseSystemPrompts, - defaultAllow: uniq(defaultAllow), - defaultAllowReplacement: uniq(defaultAllowReplacement), docLinks, getComments, http, @@ -298,14 +297,14 @@ export const AssistantProvider: React.FC = ({ setAssistantStreamingEnabled: setLocalStorageStreaming, setAllQuickPrompts: setLocalStorageQuickPrompts, setAllSystemPrompts: setLocalStorageSystemPrompts, - setDefaultAllow, - setDefaultAllowReplacement, setKnowledgeBase: setLocalStorageKnowledgeBase, setSelectedSettingsTab, setShowAssistantOverlay, + setTraceOptions: setSessionStorageTraceOptions, showAssistantOverlay, title, toasts, + traceOptions: sessionStorageTraceOptions, unRegisterPromptContext, getLastConversationTitle, setLastConversationTitle: setLocalStorageLastConversationTitle, @@ -319,14 +318,10 @@ export const AssistantProvider: React.FC = ({ augmentMessageCodeBlocks, localStorageQuickPrompts, localStorageSystemPrompts, - baseAllow, - baseAllowReplacement, basePath, basePromptContexts, baseQuickPrompts, baseSystemPrompts, - defaultAllow, - defaultAllowReplacement, docLinks, getComments, http, @@ -340,12 +335,12 @@ export const AssistantProvider: React.FC = ({ setLocalStorageStreaming, setLocalStorageQuickPrompts, setLocalStorageSystemPrompts, - setDefaultAllow, - setDefaultAllowReplacement, setLocalStorageKnowledgeBase, + setSessionStorageTraceOptions, showAssistantOverlay, title, toasts, + sessionStorageTraceOptions, unRegisterPromptContext, getLastConversationTitle, setLocalStorageLastConversationTitle, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx index 62d039f977195..6f0f978282425 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant_context/types.tsx @@ -5,27 +5,19 @@ * 2.0. */ -import { ApiConfig, Replacements } from '@kbn/elastic-assistant-common'; - -export type ConversationRole = 'system' | 'user' | 'assistant'; +import { ApiConfig, Message, Replacements } from '@kbn/elastic-assistant-common'; export interface MessagePresentation { delay?: number; stream?: boolean; } -export interface Message { - role: ConversationRole; +// The ClientMessage is different from the Message in that it content +// can be undefined and reader is the correct type which is unavailable in Zod +export interface ClientMessage extends Omit { reader?: ReadableStreamDefaultReader; - replacements?: Replacements; content?: string; - timestamp: string; - isError?: boolean; presentation?: MessagePresentation; - traceData?: { - transactionId: string; - traceId: string; - }; } export interface ConversationTheme { @@ -59,7 +51,7 @@ export interface Conversation { category: string; id: string; title: string; - messages: Message[]; + messages: ClientMessage[]; updatedAt?: Date; createdAt?: Date; replacements: Replacements; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_setup/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_setup/index.tsx index e570dd7c6507c..670ef817aeb4c 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_setup/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/connectorland/connector_setup/index.tsx @@ -15,7 +15,7 @@ import { ActionConnector } from '@kbn/triggers-actions-ui-plugin/public/common/c import { ActionType } from '@kbn/triggers-actions-ui-plugin/public'; import { AddConnectorModal } from '../add_connector_modal'; import { WELCOME_CONVERSATION } from '../../assistant/use_conversation/sample_conversations'; -import { Conversation, Message } from '../../..'; +import { Conversation, ClientMessage } from '../../..'; import { useLoadActionTypes } from '../use_load_action_types'; import { StreamingText } from '../../assistant/streaming_text'; import { ConnectorButton } from '../connector_button'; @@ -111,7 +111,7 @@ export const useConnectorSetup = ({ // Create EuiCommentProps[] from conversation messages const commentBody = useCallback( - (message: Message, index: number, length: number) => { + (message: ClientMessage, index: number, length: number) => { // If timestamp is not set, set it to current time (will update conversation at end of setup) if ( conversation.messages[index].timestamp == null || diff --git a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization/get_new_selected_prompt_context/index.test.ts b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization/get_new_selected_prompt_context/index.test.ts index fb2577c91d097..2f39bd4adfb1c 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization/get_new_selected_prompt_context/index.test.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization/get_new_selected_prompt_context/index.test.ts @@ -10,8 +10,17 @@ import { mockAlertPromptContext } from '../../mock/prompt_context'; import { getNewSelectedPromptContext } from '.'; describe('getNewSelectedPromptContext', () => { - const defaultAllow = ['field1', 'field2']; - const defaultAllowReplacement = ['field3', 'field4']; + const anonymizationFields = { + total: 4, + page: 1, + perPage: 1000, + data: [ + { field: 'field1', id: 'field1', allowed: true, anonymized: false }, + { field: 'field2', id: 'field2', allowed: true, anonymized: false }, + { field: 'field3', id: 'field3', allowed: false, anonymized: true }, + { field: 'field4', id: 'field4', allowed: false, anonymized: true }, + ], + }; it("returns empty `allow` and `allowReplacement` for string `rawData`, because it's not anonymized", async () => { const promptContext: PromptContext = { @@ -20,14 +29,12 @@ describe('getNewSelectedPromptContext', () => { }; const result = await getNewSelectedPromptContext({ - defaultAllow, - defaultAllowReplacement, + anonymizationFields, promptContext, }); const excepted: SelectedPromptContext = { - allow: [], - allowReplacement: [], + contextAnonymizationFields: undefined, promptContextId: promptContext.id, rawData: 'string data', }; @@ -42,15 +49,21 @@ describe('getNewSelectedPromptContext', () => { }; const excepted: SelectedPromptContext = { - allow: [...defaultAllow], - allowReplacement: [...defaultAllowReplacement], + contextAnonymizationFields: { + total: 2, + page: 1, + perPage: 1000, + data: [ + { field: 'field1', id: 'field1', allowed: true, anonymized: false }, + { field: 'field2', id: 'field2', allowed: true, anonymized: false }, + ], + }, promptContextId: promptContext.id, rawData: { field1: ['value1'], field2: ['value2'] }, }; const result = await getNewSelectedPromptContext({ - defaultAllow, - defaultAllowReplacement, + anonymizationFields, promptContext, }); @@ -64,8 +77,7 @@ describe('getNewSelectedPromptContext', () => { }; await getNewSelectedPromptContext({ - defaultAllow, - defaultAllowReplacement, + anonymizationFields, promptContext, }); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization/get_new_selected_prompt_context/index.ts b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization/get_new_selected_prompt_context/index.ts index daf64ee590ae0..8c524c2f8d341 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization/get_new_selected_prompt_context/index.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization/get_new_selected_prompt_context/index.ts @@ -5,30 +5,49 @@ * 2.0. */ +import type { FindAnonymizationFieldsResponse } from '@kbn/elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.gen'; +import { isAllowed, isAnonymized } from '@kbn/elastic-assistant-common'; +import { AnonymizationFieldResponse } from '@kbn/elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.gen'; import type { PromptContext, SelectedPromptContext } from '../../assistant/prompt_context/types'; export async function getNewSelectedPromptContext({ - defaultAllow, - defaultAllowReplacement, + anonymizationFields, promptContext, }: { - defaultAllow: string[]; - defaultAllowReplacement: string[]; + anonymizationFields?: FindAnonymizationFieldsResponse; promptContext: PromptContext; }): Promise { const rawData = await promptContext.getPromptContext(); if (typeof rawData === 'string') { return { - allow: [], - allowReplacement: [], + contextAnonymizationFields: undefined, promptContextId: promptContext.id, rawData, }; } else { + const extendedAnonymizationData = Object.keys(rawData).reduce( + (acc, field) => [ + ...acc, + { + id: field, + field, + allowed: isAllowed({ anonymizationFields: anonymizationFields?.data ?? [], field }), + anonymized: isAnonymized({ + anonymizationFields: anonymizationFields?.data ?? [], + field, + }), + }, + ], + [] + ); return { - allow: [...defaultAllow], - allowReplacement: [...defaultAllowReplacement], + contextAnonymizationFields: { + page: 1, + perPage: 1000, + total: extendedAnonymizationData.length, + data: extendedAnonymizationData, + }, promptContextId: promptContext.id, rawData, }; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization/settings/anonymization_settings/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization/settings/anonymization_settings/index.test.tsx index 6bc8e93e3d5e2..6a61295ac6725 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization/settings/anonymization_settings/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization/settings/anonymization_settings/index.test.tsx @@ -6,18 +6,56 @@ */ import React from 'react'; -import { render, fireEvent } from '@testing-library/react'; +import { render } from '@testing-library/react'; import { TestProviders } from '../../../mock/test_providers/test_providers'; import { AnonymizationSettings } from '.'; import type { Props } from '.'; const props: Props = { - defaultAllow: ['foo', 'bar', 'baz', '@baz'], - defaultAllowReplacement: ['bar'], - pageSize: 5, - setUpdatedDefaultAllow: jest.fn(), - setUpdatedDefaultAllowReplacement: jest.fn(), + defaultPageSize: 5, + anonymizationFields: { + total: 4, + page: 1, + perPage: 1000, + data: [ + { + field: 'foo', + id: 'test', + allowed: true, + anonymized: false, + createdAt: '', + timestamp: '', + }, + { + field: 'bar', + id: 'test1', + allowed: true, + anonymized: true, + createdAt: '', + timestamp: '', + }, + { + field: 'baz', + id: 'test2', + allowed: true, + anonymized: false, + createdAt: '', + timestamp: '', + }, + { + field: '@baz', + id: 'test3', + allowed: true, + anonymized: false, + createdAt: '', + timestamp: '', + }, + ], + }, + setAnonymizationFieldsBulkActions: jest.fn(), + setUpdatedAnonymizationData: jest.fn(), + anonymizationFieldsBulkActions: {}, }; const mockUseAssistantContext = { @@ -68,30 +106,6 @@ describe('AnonymizationSettings', () => { expect(getByTestId('contextEditor')).toBeInTheDocument(); }); - it('does NOT call `setDefaultAllow` when `Reset` is clicked, because only local state is reset until the user clicks save', () => { - const { getByTestId } = render( - - - - ); - - fireEvent.click(getByTestId('resetFields')); - - expect(mockUseAssistantContext.setDefaultAllow).not.toHaveBeenCalled(); - }); - - it('does NOT call `setDefaultAllowReplacement` when `Reset` is clicked, because only local state is reset until the user clicks save', () => { - const { getByTestId } = render( - - - - ); - - fireEvent.click(getByTestId('resetFields')); - - expect(mockUseAssistantContext.setDefaultAllowReplacement).not.toHaveBeenCalled(); - }); - it('renders the expected allowed stat content', () => { const { getByTestId } = render( diff --git a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization/settings/anonymization_settings/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization/settings/anonymization_settings/index.tsx index 31420e0452b1b..e03a965f6c98c 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization/settings/anonymization_settings/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization/settings/anonymization_settings/index.tsx @@ -5,76 +5,68 @@ * 2.0. */ -import { - EuiFlexGroup, - EuiFlexItem, - EuiHorizontalRule, - EuiSpacer, - EuiText, - EuiTitle, -} from '@elastic/eui'; -import React, { useCallback, useMemo } from 'react'; -// eslint-disable-next-line @kbn/eslint/module_migration -import styled from 'styled-components'; +import { EuiFlexGroup, EuiHorizontalRule, EuiSpacer, EuiText, EuiTitle } from '@elastic/eui'; +import React, { useCallback } from 'react'; -import { useAssistantContext } from '../../../assistant_context'; +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 { Stats } from '../../../data_anonymization_editor/stats'; import { ContextEditor } from '../../../data_anonymization_editor/context_editor'; import type { BatchUpdateListItem } from '../../../data_anonymization_editor/context_editor/types'; -import { updateDefaults } from '../../../data_anonymization_editor/helpers'; -import { AllowedStat } from '../../../data_anonymization_editor/stats/allowed_stat'; -import { AnonymizedStat } from '../../../data_anonymization_editor/stats/anonymized_stat'; import * as i18n from './translations'; -const StatFlexItem = styled(EuiFlexItem)` - margin-right: ${({ theme }) => theme.eui.euiSizeL}; -`; - export interface Props { - defaultAllow: string[]; - defaultAllowReplacement: string[]; - pageSize?: number; - setUpdatedDefaultAllow: React.Dispatch>; - setUpdatedDefaultAllowReplacement: React.Dispatch>; + defaultPageSize?: number; + anonymizationFields: FindAnonymizationFieldsResponse; + anonymizationFieldsBulkActions: PerformBulkActionRequestBody; + setAnonymizationFieldsBulkActions: React.Dispatch< + React.SetStateAction + >; + setUpdatedAnonymizationData: React.Dispatch< + React.SetStateAction + >; } const AnonymizationSettingsComponent: React.FC = ({ - defaultAllow, - defaultAllowReplacement, - pageSize, - setUpdatedDefaultAllow, - setUpdatedDefaultAllowReplacement, + defaultPageSize, + anonymizationFields, + anonymizationFieldsBulkActions, + setAnonymizationFieldsBulkActions, + setUpdatedAnonymizationData, }) => { - const { baseAllow, baseAllowReplacement } = useAssistantContext(); - const onListUpdated = useCallback( - (updates: BatchUpdateListItem[]) => { - updateDefaults({ - defaultAllow, - defaultAllowReplacement, - setDefaultAllow: setUpdatedDefaultAllow, - setDefaultAllowReplacement: setUpdatedDefaultAllowReplacement, - updates, + async (updates: BatchUpdateListItem[]) => { + const updatedFieldsKeys = updates.map((u) => u.field); + + const updatedFields = updates.map((u) => ({ + ...(anonymizationFields.data.find((f) => f.field === u.field) ?? { id: '', field: '' }), + ...(u.update === 'allow' || u.update === 'defaultAllow' + ? { allowed: u.operation === 'add' } + : {}), + ...(u.update === 'allowReplacement' || u.update === 'defaultAllowReplacement' + ? { anonymized: u.operation === 'add' } + : {}), + })); + setAnonymizationFieldsBulkActions({ + ...anonymizationFieldsBulkActions, + // Only update makes sense now, as long as we don't have an add new field design/UX + update: [...(anonymizationFieldsBulkActions?.update ?? []), ...updatedFields], + }); + setUpdatedAnonymizationData({ + ...anonymizationFields, + data: [ + ...anonymizationFields.data.filter((f) => !updatedFieldsKeys.includes(f.field)), + ...updatedFields, + ], }); }, [ - defaultAllow, - defaultAllowReplacement, - setUpdatedDefaultAllow, - setUpdatedDefaultAllowReplacement, + anonymizationFields, + anonymizationFieldsBulkActions, + setAnonymizationFieldsBulkActions, + setUpdatedAnonymizationData, ] ); - - const onReset = useCallback(() => { - setUpdatedDefaultAllow(baseAllow); - setUpdatedDefaultAllowReplacement(baseAllowReplacement); - }, [baseAllow, baseAllowReplacement, setUpdatedDefaultAllow, setUpdatedDefaultAllowReplacement]); - - const anonymized: number = useMemo(() => { - const allowSet = new Set(defaultAllow); - - return defaultAllowReplacement.reduce((acc, field) => (allowSet.has(field) ? acc + 1 : acc), 0); - }, [defaultAllow, defaultAllowReplacement]); - return ( <> @@ -86,24 +78,16 @@ const AnonymizationSettingsComponent: React.FC = ({ - - - - - - - + ); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/bulk_actions/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/bulk_actions/index.test.tsx index ec2f276f6f4bd..658d05369be11 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/bulk_actions/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/bulk_actions/index.test.tsx @@ -86,54 +86,4 @@ describe('BulkActions', () => { { field: 'user.name', operation: 'remove', update: 'allowReplacement' }, ]); }); - - it('calls onListUpdated with the expected updates when Deny by default is clicked', () => { - const { getByTestId, getByText } = render( - - ); - - userEvent.click(getByTestId('bulkActionsButton')); - fireEvent.click(getByText(/^Deny by default$/)); - - expect(defaultProps.onListUpdated).toBeCalledWith([ - { field: 'process.args', operation: 'remove', update: 'allow' }, - { field: 'user.name', operation: 'remove', update: 'allow' }, - { field: 'process.args', operation: 'remove', update: 'defaultAllow' }, - { field: 'user.name', operation: 'remove', update: 'defaultAllow' }, - ]); - }); - - it('calls onListUpdated with the expected updates when Anonymize by default is clicked', () => { - const { getByTestId, getByText } = render( - - ); - - userEvent.click(getByTestId('bulkActionsButton')); - fireEvent.click(getByText(/^Defaults$/)); - fireEvent.click(getByText(/^Anonymize by default$/)); - - expect(defaultProps.onListUpdated).toBeCalledWith([ - { field: 'process.args', operation: 'add', update: 'allowReplacement' }, - { field: 'user.name', operation: 'add', update: 'allowReplacement' }, - { field: 'process.args', operation: 'add', update: 'defaultAllowReplacement' }, - { field: 'user.name', operation: 'add', update: 'defaultAllowReplacement' }, - ]); - }); - - it('calls onListUpdated with the expected updates when Unanonymize by default is clicked', () => { - const { getByTestId, getByText } = render( - - ); - - userEvent.click(getByTestId('bulkActionsButton')); - fireEvent.click(getByText(/^Defaults$/)); - fireEvent.click(getByText(/^Unanonymize by default$/)); - - expect(defaultProps.onListUpdated).toBeCalledWith([ - { field: 'process.args', operation: 'remove', update: 'allowReplacement' }, - { field: 'user.name', operation: 'remove', update: 'allowReplacement' }, - { field: 'process.args', operation: 'remove', update: 'defaultAllowReplacement' }, - { field: 'user.name', operation: 'remove', update: 'defaultAllowReplacement' }, - ]); - }); }); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/bulk_actions/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/bulk_actions/index.tsx index 3511ee2118a89..a911322bcca41 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/bulk_actions/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/bulk_actions/index.tsx @@ -27,7 +27,6 @@ export interface Props { disableDeny?: boolean; disableUnanonymize?: boolean; onListUpdated: (updates: BatchUpdateListItem[]) => void; - onlyDefaults: boolean; selected: ContextEditorRow[]; } @@ -39,7 +38,6 @@ const BulkActionsComponent: React.FC = ({ disableDeny = false, disableUnanonymize = false, onListUpdated, - onlyDefaults, selected, }) => { const [isPopoverOpen, setPopover] = useState(false); @@ -79,7 +77,6 @@ const BulkActionsComponent: React.FC = ({ disableUnanonymize, closePopover, onListUpdated, - onlyDefaults, selected, }), [ @@ -89,7 +86,6 @@ const BulkActionsComponent: React.FC = ({ disableDeny, disableUnanonymize, onListUpdated, - onlyDefaults, selected, ] ); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/get_columns/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/get_columns/index.test.tsx index b38b026d37112..22610f5936c25 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/get_columns/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/get_columns/index.test.tsx @@ -133,7 +133,7 @@ describe('getColumns', () => { fireEvent.click(getByTestId('allowed')); expect(onListUpdated).toBeCalledWith([ - { field: 'event.category', operation: 'remove', update: 'defaultAllowReplacement' }, + { field: 'event.category', operation: 'remove', update: 'allow' }, ]); }); }); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/get_columns/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/get_columns/index.tsx index 75fd3e6d633eb..ef07cafdee2b5 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/get_columns/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/get_columns/index.tsx @@ -38,7 +38,6 @@ export const getColumns = ({ disableAnonymize={!row.allowed || (row.allowed && row.anonymized)} disableUnanonymize={!row.allowed || (row.allowed && !row.anonymized)} onListUpdated={onListUpdated} - onlyDefaults={rawData == null} selected={[row]} /> ); @@ -74,17 +73,6 @@ export const getColumns = ({ update: rawData == null ? 'defaultAllow' : 'allow', }, ]); - - if (rawData == null && allowed) { - // when editing defaults, remove the default replacement if the field is no longer allowed - onListUpdated([ - { - field, - operation: 'remove', - update: 'defaultAllowReplacement', - }, - ]); - } }} /> ), diff --git a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/get_context_menu_panels/index.test.ts b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/get_context_menu_panels/index.test.ts index e5cc77e1cd759..df13dee94c72e 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/get_context_menu_panels/index.test.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/get_context_menu_panels/index.test.ts @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { getContextMenuPanels, PRIMARY_PANEL_ID, SECONDARY_PANEL_ID } from '.'; +import { getContextMenuPanels, PRIMARY_PANEL_ID } from '.'; import * as i18n from '../translations'; import { ContextEditorRow } from '../types'; @@ -23,9 +23,7 @@ describe('getContextMenuPanels', () => { beforeEach(() => jest.clearAllMocks()); - it('the first panel has a `primary-panel-id` when onlyDefaults is true', () => { - const onlyDefaults = true; - + it('the first panel has a `primary-panel-id`', () => { const panels = getContextMenuPanels({ disableAllow: false, disableAnonymize: false, @@ -34,287 +32,11 @@ describe('getContextMenuPanels', () => { closePopover, onListUpdated, selected, - onlyDefaults, }); expect(panels[0].id).toEqual(PRIMARY_PANEL_ID); }); - it('the first panel also has a `primary-panel-id` when onlyDefaults is false', () => { - const onlyDefaults = false; - - const panels = getContextMenuPanels({ - disableAllow: false, - disableAnonymize: false, - disableDeny: false, - disableUnanonymize: false, - closePopover, - onListUpdated, - selected, - onlyDefaults, - }); - - expect(panels[0].id).toEqual(PRIMARY_PANEL_ID); // first panel is always the primary panel - }); - - it('the second panel has a `secondary-panel-id` when onlyDefaults is false', () => { - const onlyDefaults = false; - - const panels = getContextMenuPanels({ - disableAllow: false, - disableAnonymize: false, - disableDeny: false, - disableUnanonymize: false, - closePopover, - onListUpdated, - selected, - onlyDefaults, - }); - - expect(panels[1].id).toEqual(SECONDARY_PANEL_ID); - }); - - it('the second panel is not rendered when onlyDefaults is true', () => { - const onlyDefaults = true; - - const panels = getContextMenuPanels({ - disableAllow: false, - disableAnonymize: false, - disableDeny: false, - disableUnanonymize: false, - closePopover, - onListUpdated, - selected, - onlyDefaults, - }); - - expect(panels.length).toEqual(1); - }); - - describe('allow by default', () => { - it('calls closePopover when allow by default is clicked', () => { - const panels = getContextMenuPanels({ - disableAllow: false, - disableAnonymize: false, - disableDeny: false, - disableUnanonymize: false, - closePopover, - onListUpdated, - selected, - onlyDefaults: false, - }); - - const allowByDefaultItem = panels[1].items?.find( - (item) => item.name === i18n.ALLOW_BY_DEFAULT - ); - - allowByDefaultItem?.onClick!( - new MouseEvent('click', { bubbles: true }) as unknown as React.MouseEvent< - HTMLHRElement, - MouseEvent - > - ); - - expect(closePopover).toHaveBeenCalled(); - }); - - it('calls onListUpdated to add the field to both the `allow` and `defaultAllow` lists', () => { - const panels = getContextMenuPanels({ - disableAllow: false, - disableAnonymize: false, - disableDeny: false, - disableUnanonymize: false, - closePopover, - onListUpdated, - selected, - onlyDefaults: false, - }); - - const allowByDefaultItem = panels[1].items?.find( - (item) => item.name === i18n.ALLOW_BY_DEFAULT - ); - - allowByDefaultItem?.onClick!( - new MouseEvent('click', { bubbles: true }) as unknown as React.MouseEvent< - HTMLHRElement, - MouseEvent - > - ); - - expect(onListUpdated).toHaveBeenCalledWith([ - { field: 'user.name', operation: 'add', update: 'allow' }, - { field: 'user.name', operation: 'add', update: 'defaultAllow' }, - ]); - }); - }); - - describe('deny by default', () => { - it('calls closePopover when deny by default is clicked', () => { - const panels = getContextMenuPanels({ - disableAllow: false, - disableAnonymize: false, - disableDeny: false, - disableUnanonymize: false, - closePopover, - onListUpdated, - selected, - onlyDefaults: false, - }); - - const denyByDefaultItem = panels[1].items?.find((item) => item.name === i18n.DENY_BY_DEFAULT); - - denyByDefaultItem?.onClick!( - new MouseEvent('click', { bubbles: true }) as unknown as React.MouseEvent< - HTMLHRElement, - MouseEvent - > - ); - - expect(closePopover).toHaveBeenCalled(); - }); - - it('calls onListUpdated to remove the field from both the `allow` and `defaultAllow` lists', () => { - const panels = getContextMenuPanels({ - disableAllow: false, - disableAnonymize: false, - disableDeny: false, - disableUnanonymize: false, - closePopover, - onListUpdated, - selected, - onlyDefaults: false, - }); - - const denyByDefaultItem = panels[1].items?.find((item) => item.name === i18n.DENY_BY_DEFAULT); - - denyByDefaultItem?.onClick!( - new MouseEvent('click', { bubbles: true }) as unknown as React.MouseEvent< - HTMLHRElement, - MouseEvent - > - ); - - expect(onListUpdated).toHaveBeenCalledWith([ - { field: 'user.name', operation: 'remove', update: 'allow' }, - { field: 'user.name', operation: 'remove', update: 'defaultAllow' }, - ]); - }); - }); - - describe('anonymize by default', () => { - it('calls closePopover when anonymize by default is clicked', () => { - const panels = getContextMenuPanels({ - disableAllow: false, - disableAnonymize: false, - disableDeny: false, - disableUnanonymize: false, - closePopover, - onListUpdated, - selected, - onlyDefaults: false, - }); - - const anonymizeByDefaultItem = panels[1].items?.find( - (item) => item.name === i18n.ANONYMIZE_BY_DEFAULT - ); - - anonymizeByDefaultItem?.onClick!( - new MouseEvent('click', { bubbles: true }) as unknown as React.MouseEvent< - HTMLHRElement, - MouseEvent - > - ); - - expect(closePopover).toHaveBeenCalled(); - }); - - it('calls onListUpdated to add the field to both the `allowReplacement` and `defaultAllowReplacement` lists', () => { - const panels = getContextMenuPanels({ - disableAllow: false, - disableAnonymize: false, - disableDeny: false, - disableUnanonymize: false, - closePopover, - onListUpdated, - selected, - onlyDefaults: false, - }); - - const anonymizeByDefaultItem = panels[1].items?.find( - (item) => item.name === i18n.ANONYMIZE_BY_DEFAULT - ); - - anonymizeByDefaultItem?.onClick!( - new MouseEvent('click', { bubbles: true }) as unknown as React.MouseEvent< - HTMLHRElement, - MouseEvent - > - ); - - expect(onListUpdated).toHaveBeenCalledWith([ - { field: 'user.name', operation: 'add', update: 'allowReplacement' }, - { field: 'user.name', operation: 'add', update: 'defaultAllowReplacement' }, - ]); - }); - }); - - describe('unanonymize by default', () => { - it('calls closePopover when unanonymize by default is clicked', () => { - const panels = getContextMenuPanels({ - disableAllow: false, - disableAnonymize: false, - disableDeny: false, - disableUnanonymize: false, - closePopover, - onListUpdated, - selected, - onlyDefaults: false, - }); - - const unAnonymizeByDefaultItem = panels[1].items?.find( - (item) => item.name === i18n.UNANONYMIZE_BY_DEFAULT - ); - - unAnonymizeByDefaultItem?.onClick!( - new MouseEvent('click', { bubbles: true }) as unknown as React.MouseEvent< - HTMLHRElement, - MouseEvent - > - ); - - expect(closePopover).toHaveBeenCalled(); - }); - - it('calls onListUpdated to remove the field from both the `allowReplacement` and `defaultAllowReplacement` lists', () => { - const panels = getContextMenuPanels({ - disableAllow: false, - disableAnonymize: false, - disableDeny: false, - disableUnanonymize: false, - closePopover, - onListUpdated, - selected, - onlyDefaults: false, - }); - - const unAnonymizeByDefaultItem = panels[1].items?.find( - (item) => item.name === i18n.UNANONYMIZE_BY_DEFAULT - ); - - unAnonymizeByDefaultItem?.onClick!( - new MouseEvent('click', { bubbles: true }) as unknown as React.MouseEvent< - HTMLHRElement, - MouseEvent - > - ); - - expect(onListUpdated).toHaveBeenCalledWith([ - { field: 'user.name', operation: 'remove', update: 'allowReplacement' }, - { field: 'user.name', operation: 'remove', update: 'defaultAllowReplacement' }, - ]); - }); - }); - describe('allow', () => { it('is disabled when `disableAlow` is true', () => { const disableAllow = true; @@ -327,7 +49,6 @@ describe('getContextMenuPanels', () => { closePopover, onListUpdated, selected, - onlyDefaults: false, }); const allowItem = panels[0].items?.find((item) => item.name === i18n.ALLOW); @@ -346,7 +67,6 @@ describe('getContextMenuPanels', () => { closePopover, onListUpdated, selected, - onlyDefaults: false, }); const allowItem = panels[0].items?.find((item) => item.name === i18n.ALLOW); @@ -363,7 +83,6 @@ describe('getContextMenuPanels', () => { closePopover, onListUpdated, selected, - onlyDefaults: false, }); const allowItem = panels[0].items?.find((item) => item.name === i18n.ALLOW); @@ -387,7 +106,6 @@ describe('getContextMenuPanels', () => { closePopover, onListUpdated, selected, - onlyDefaults: false, }); const allowItem = panels[0].items?.find((item) => item.name === i18n.ALLOW); @@ -417,7 +135,6 @@ describe('getContextMenuPanels', () => { closePopover, onListUpdated, selected, - onlyDefaults: false, }); const denyItem = panels[0].items?.find((item) => item.name === i18n.DENY); @@ -436,7 +153,6 @@ describe('getContextMenuPanels', () => { closePopover, onListUpdated, selected, - onlyDefaults: false, }); const denyItem = panels[0].items?.find((item) => item.name === i18n.DENY); @@ -453,7 +169,6 @@ describe('getContextMenuPanels', () => { closePopover, onListUpdated, selected, - onlyDefaults: false, }); const denyByDefaultItem = panels[0].items?.find((item) => item.name === i18n.DENY); @@ -477,7 +192,6 @@ describe('getContextMenuPanels', () => { closePopover, onListUpdated, selected, - onlyDefaults: false, }); const denyItem = panels[0].items?.find((item) => item.name === i18n.DENY); @@ -507,7 +221,6 @@ describe('getContextMenuPanels', () => { closePopover, onListUpdated, selected, - onlyDefaults: false, }); const anonymizeItem = panels[0].items?.find((item) => item.name === i18n.ANONYMIZE); @@ -526,7 +239,6 @@ describe('getContextMenuPanels', () => { closePopover, onListUpdated, selected, - onlyDefaults: false, }); const anonymizeItem = panels[0].items?.find((item) => item.name === i18n.ANONYMIZE); @@ -543,7 +255,6 @@ describe('getContextMenuPanels', () => { closePopover, onListUpdated, selected, - onlyDefaults: false, }); const anonymizeItem = panels[0].items?.find((item) => item.name === i18n.ANONYMIZE); @@ -567,7 +278,6 @@ describe('getContextMenuPanels', () => { closePopover, onListUpdated, selected, - onlyDefaults: false, }); const anonymizeItem = panels[0].items?.find((item) => item.name === i18n.ANONYMIZE); @@ -597,7 +307,6 @@ describe('getContextMenuPanels', () => { closePopover, onListUpdated, selected, - onlyDefaults: false, }); const unanonymizeItem = panels[0].items?.find((item) => item.name === i18n.UNANONYMIZE); @@ -616,7 +325,6 @@ describe('getContextMenuPanels', () => { closePopover, onListUpdated, selected, - onlyDefaults: false, }); const unanonymizeItem = panels[0].items?.find((item) => item.name === i18n.UNANONYMIZE); @@ -633,7 +341,6 @@ describe('getContextMenuPanels', () => { closePopover, onListUpdated, selected, - onlyDefaults: false, }); const unAnonymizeItem = panels[0].items?.find((item) => item.name === i18n.UNANONYMIZE); @@ -657,7 +364,6 @@ describe('getContextMenuPanels', () => { closePopover, onListUpdated, selected, - onlyDefaults: false, }); const unAnonymizeItem = panels[0].items?.find((item) => item.name === i18n.UNANONYMIZE); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/get_context_menu_panels/index.ts b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/get_context_menu_panels/index.ts index a6afe0984d6e3..c0365be5a89a9 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/get_context_menu_panels/index.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/get_context_menu_panels/index.ts @@ -11,7 +11,6 @@ import * as i18n from '../translations'; import { BatchUpdateListItem, ContextEditorRow } from '../types'; export const PRIMARY_PANEL_ID = 'primary-panel-id'; -export const SECONDARY_PANEL_ID = 'secondary-panel-id'; export const getContextMenuPanels = ({ disableAllow, @@ -20,7 +19,6 @@ export const getContextMenuPanels = ({ disableUnanonymize, closePopover, onListUpdated, - onlyDefaults, selected, }: { disableAllow: boolean; @@ -30,113 +28,8 @@ export const getContextMenuPanels = ({ closePopover: () => void; onListUpdated: (updates: BatchUpdateListItem[]) => void; selected: ContextEditorRow[]; - onlyDefaults: boolean; }): EuiContextMenuPanelDescriptor[] => { - const defaultsPanelId = onlyDefaults ? PRIMARY_PANEL_ID : SECONDARY_PANEL_ID; - const nonDefaultsPanelId = onlyDefaults ? SECONDARY_PANEL_ID : PRIMARY_PANEL_ID; - - const allowByDefault = [ - !onlyDefaults - ? { - icon: 'check', - name: i18n.ALLOW_BY_DEFAULT, - onClick: () => { - closePopover(); - - const updateAllow = selected.map(({ field }) => ({ - field, - operation: 'add', - update: 'allow', - })); - - const updateDefaultAllow = selected.map(({ field }) => ({ - field, - operation: 'add', - update: 'defaultAllow', - })); - - onListUpdated([...updateAllow, ...updateDefaultAllow]); - }, - } - : [], - ].flat(); - - const defaultsPanelItems: EuiContextMenuPanelDescriptor[] = [ - { - id: defaultsPanelId, - title: i18n.DEFAULTS, - items: [ - ...allowByDefault, - { - icon: 'cross', - name: i18n.DENY_BY_DEFAULT, - onClick: () => { - closePopover(); - - const updateAllow = selected.map(({ field }) => ({ - field, - operation: 'remove', - update: 'allow', - })); - - const updateDefaultAllow = selected.map(({ field }) => ({ - field, - operation: 'remove', - update: 'defaultAllow', - })); - - onListUpdated([...updateAllow, ...updateDefaultAllow]); - }, - }, - { - icon: 'eyeClosed', - name: i18n.ANONYMIZE_BY_DEFAULT, - onClick: () => { - closePopover(); - - const updateAllowReplacement = selected.map(({ field }) => ({ - field, - operation: 'add', - update: 'allowReplacement', - })); - - const updateDefaultAllowReplacement = selected.map( - ({ field }) => ({ - field, - operation: 'add', - update: 'defaultAllowReplacement', - }) - ); - - onListUpdated([...updateAllowReplacement, ...updateDefaultAllowReplacement]); - }, - }, - { - icon: 'eye', - name: i18n.UNANONYMIZE_BY_DEFAULT, - onClick: () => { - closePopover(); - - const updateAllowReplacement = selected.map(({ field }) => ({ - field, - operation: 'remove', - update: 'allowReplacement', - })); - - const updateDefaultAllowReplacement = selected.map( - ({ field }) => ({ - field, - operation: 'remove', - update: 'defaultAllowReplacement', - }) - ); - - onListUpdated([...updateAllowReplacement, ...updateDefaultAllowReplacement]); - }, - }, - ], - }, - ]; + const nonDefaultsPanelId = PRIMARY_PANEL_ID; const nonDefaultsPanelItems: EuiContextMenuPanelDescriptor[] = [ { @@ -210,14 +103,9 @@ export const getContextMenuPanels = ({ isSeparator: true, key: 'sep', }, - { - name: i18n.DEFAULTS, - panel: defaultsPanelId, - }, ], }, - ...defaultsPanelItems, ]; - return onlyDefaults ? defaultsPanelItems : nonDefaultsPanelItems; + return nonDefaultsPanelItems; }; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/get_rows/index.test.ts b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/get_rows/index.test.ts index c8c35767f1e54..6bf1eb82dd2ec 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/get_rows/index.test.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/get_rows/index.test.ts @@ -11,12 +11,48 @@ import { getRows } from '.'; describe('getRows', () => { const defaultArgs: { - allow: SelectedPromptContext['allow']; - allowReplacement: SelectedPromptContext['allowReplacement']; + anonymizationFields: SelectedPromptContext['contextAnonymizationFields']; rawData: Record | null; } = { - allow: ['event.action', 'user.name', 'other.field'], // other.field is not in the rawData - allowReplacement: ['user.name', 'host.ip'], // host.ip is not in the rawData + anonymizationFields: { + total: 4, + page: 1, + perPage: 1000, + data: [ + { + field: 'event.action', + id: 'test', + allowed: true, + anonymized: false, + createdAt: '', + timestamp: '', + }, + { + field: 'user.name', + id: 'test1', + allowed: true, + anonymized: true, + createdAt: '', + timestamp: '', + }, + { + field: 'other.field', + id: 'test2', + allowed: true, + anonymized: false, + createdAt: '', + timestamp: '', + }, + { + field: 'host.ip', + id: 'test3', + allowed: false, + anonymized: true, + createdAt: '', + timestamp: '', + }, + ], + }, rawData: { 'event.category': ['process'], // event.category is not in the allow list, nor is it in the allowReplacement list 'event.action': ['process_stopped', 'stop'], // event.action is in the allow list, but not the allowReplacement list @@ -25,33 +61,8 @@ describe('getRows', () => { }; it('returns only the allowed fields if no rawData is provided', () => { - const expected: ContextEditorRow[] = [ - { - allowed: true, - anonymized: false, - denied: false, - field: 'event.action', - rawValues: [], - }, - { - allowed: true, - anonymized: false, - denied: false, - field: 'other.field', - rawValues: [], - }, - { - allowed: true, - anonymized: true, - denied: false, - field: 'user.name', - rawValues: [], - }, - ]; - const nullRawData: { - allow: SelectedPromptContext['allow']; - allowReplacement: SelectedPromptContext['allowReplacement']; + anonymizationFields: SelectedPromptContext['contextAnonymizationFields']; rawData: Record | null; } = { ...defaultArgs, @@ -60,7 +71,9 @@ describe('getRows', () => { const rows = getRows(nullRawData); - expect(rows).toEqual(expected); + expect(JSON.stringify(rows)).toEqual( + '[{"field":"event.action","allowed":true,"anonymized":false,"denied":false,"rawValues":[]},{"field":"user.name","allowed":true,"anonymized":true,"denied":false,"rawValues":[]},{"field":"other.field","allowed":true,"anonymized":false,"denied":false,"rawValues":[]},{"field":"host.ip","allowed":false,"anonymized":true,"denied":true,"rawValues":[]}]' + ); }); it('returns the expected metadata and raw values', () => { diff --git a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/get_rows/index.ts b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/get_rows/index.ts index 1582783f9c8f7..d9f1b5b7b4fe2 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/get_rows/index.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/get_rows/index.ts @@ -5,23 +5,17 @@ * 2.0. */ +import { FindAnonymizationFieldsResponse } from '@kbn/elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.gen'; import { isAllowed, isAnonymized, isDenied } from '@kbn/elastic-assistant-common'; - -import { SelectedPromptContext } from '../../../assistant/prompt_context/types'; import { ContextEditorRow } from '../types'; export const getRows = ({ - allow, - allowReplacement, + anonymizationFields, rawData, }: { - allow: SelectedPromptContext['allow']; - allowReplacement: SelectedPromptContext['allowReplacement']; + anonymizationFields?: FindAnonymizationFieldsResponse; rawData: Record | null; }): ContextEditorRow[] => { - const allowReplacementSet = new Set(allowReplacement); - const allowSet = new Set(allow); - if (rawData !== null && typeof rawData === 'object') { const rawFields = Object.keys(rawData).sort(); @@ -30,27 +24,21 @@ export const getRows = ({ ...acc, { field, - allowed: isAllowed({ allowSet, field }), - anonymized: isAnonymized({ allowReplacementSet, field }), - denied: isDenied({ allowSet, field }), + allowed: isAllowed({ anonymizationFields: anonymizationFields?.data ?? [], field }), + anonymized: isAnonymized({ anonymizationFields: anonymizationFields?.data ?? [], field }), + denied: isDenied({ anonymizationFields: anonymizationFields?.data ?? [], field }), rawValues: rawData[field], }, ], [] ); } else { - return allow.sort().reduce( - (acc, field) => [ - ...acc, - { - field, - allowed: true, - anonymized: allowReplacementSet.has(field), - denied: false, - rawValues: [], - }, - ], - [] - ); + return (anonymizationFields?.data ?? []).map((anonymizationField) => ({ + field: anonymizationField.field, + allowed: anonymizationField.allowed ?? false, + anonymized: anonymizationField.anonymized ?? false, + denied: !(anonymizationField.allowed ?? false), + rawValues: [], + })); } }; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/index.test.tsx index fb52041632718..a0488610f3dbc 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/index.test.tsx @@ -13,7 +13,12 @@ import { ContextEditor } from '.'; describe('ContextEditor', () => { const allow = Array.from({ length: 20 }, (_, i) => `field${i + 1}`); - const allowReplacement = ['field1']; + const anonymizationFields = { + total: 20, + page: 1, + perPage: 1000, + data: allow.map((f) => ({ id: f, field: f, allowed: true, anonymized: f === 'field1' })), + }; const rawData = allow.reduce( (acc, field, index) => ({ ...acc, [field]: [`value${index + 1}`] }), {} @@ -26,8 +31,7 @@ describe('ContextEditor', () => { render( diff --git a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/index.tsx index e0b19fe26d672..ea62b43b85635 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/index.tsx @@ -9,6 +9,7 @@ import { EuiInMemoryTable } from '@elastic/eui'; import type { EuiSearchBarProps, EuiTableSelectionType } from '@elastic/eui'; import React, { useCallback, useMemo, useState, useRef } from 'react'; +import { FindAnonymizationFieldsResponse } from '@kbn/elastic-assistant-common/impl/schemas/anonymization_fields/find_anonymization_fields_route.gen'; import { getColumns } from './get_columns'; import { getRows } from './get_rows'; import { Toolbar } from './toolbar'; @@ -19,16 +20,14 @@ export const DEFAULT_PAGE_SIZE = 10; const defaultSort: SortConfig = { sort: { - direction: 'desc', - field: FIELDS.ALLOWED, + direction: 'asc', + field: FIELDS.FIELD, }, }; export interface Props { - allow: string[]; - allowReplacement: string[]; + anonymizationFields: FindAnonymizationFieldsResponse; onListUpdated: (updates: BatchUpdateListItem[]) => void; - onReset?: () => void; rawData: Record | null; pageSize?: number; } @@ -52,10 +51,8 @@ const search: EuiSearchBarProps = { }; const ContextEditorComponent: React.FC = ({ - allow, - allowReplacement, + anonymizationFields, onListUpdated, - onReset, rawData, pageSize = DEFAULT_PAGE_SIZE, }) => { @@ -84,11 +81,10 @@ const ContextEditorComponent: React.FC = ({ const rows = useMemo( () => getRows({ - allow, - allowReplacement, + anonymizationFields, rawData, }), - [allow, allowReplacement, rawData] + [anonymizationFields, rawData] ); const onSelectAll = useCallback(() => { @@ -107,14 +103,12 @@ const ContextEditorComponent: React.FC = ({ () => ( ), - [onListUpdated, onReset, onSelectAll, rawData, rows, selected] + [anonymizationFields.total, onListUpdated, onSelectAll, rawData, selected] ); return ( diff --git a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/toolbar/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/toolbar/index.test.tsx index fc2fce0cf1bed..11b2488c096ad 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/toolbar/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/toolbar/index.test.tsx @@ -40,7 +40,6 @@ describe('Toolbar', () => { const defaultProps = { onListUpdated: jest.fn(), onlyDefaults: false, - onReset: jest.fn(), onSelectAll: jest.fn(), selected: [], // no rows selected totalFields: 5, diff --git a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/toolbar/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/toolbar/index.tsx index 5a1568693e6f3..e54153c808a38 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/toolbar/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/context_editor/toolbar/index.tsx @@ -14,8 +14,6 @@ import { BatchUpdateListItem, ContextEditorRow } from '../types'; export interface Props { onListUpdated: (updates: BatchUpdateListItem[]) => void; - onlyDefaults: boolean; - onReset?: () => void; onSelectAll: () => void; selected: ContextEditorRow[]; totalFields: number; @@ -23,8 +21,6 @@ export interface Props { const ToolbarComponent: React.FC = ({ onListUpdated, - onlyDefaults, - onReset, onSelectAll, selected, totalFields, @@ -52,32 +48,9 @@ const ToolbarComponent: React.FC = ({ appliesTo="multipleRows" disabled={selected.length === 0} onListUpdated={onListUpdated} - onlyDefaults={onlyDefaults} selected={selected} /> - - {onReset != null && ( - - - - - {i18n.RESET} - - - - - )} ); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/get_stats/index.test.ts b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/get_stats/index.test.ts index 94d96cbbec685..26aa94530af52 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/get_stats/index.test.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/get_stats/index.test.ts @@ -5,16 +5,13 @@ * 2.0. */ -import { SelectedPromptContext } from '../../assistant/prompt_context/types'; import type { Stats } from '../helpers'; import { getStats } from '.'; describe('getStats', () => { it('returns ZERO_STATS for string rawData', () => { - const context: SelectedPromptContext = { - allow: [], - allowReplacement: [], - promptContextId: 'abcd', + const context = { + anonymizationFields: [], rawData: 'this will not be anonymized', }; @@ -29,10 +26,41 @@ describe('getStats', () => { }); it('returns the expected stats for object rawData', () => { - const context: SelectedPromptContext = { - allow: ['event.category', 'event.action', 'user.name'], - allowReplacement: ['user.name', 'host.ip'], // only user.name is allowed to be sent - promptContextId: 'abcd', + const context = { + anonymizationFields: [ + { + field: 'event.action', + id: 'test', + allowed: true, + anonymized: false, + createdAt: '', + timestamp: '', + }, + { + field: 'user.name', + id: 'test1', + allowed: true, + anonymized: true, + createdAt: '', + timestamp: '', + }, + { + field: 'event.category', + id: 'test2', + allowed: true, + anonymized: false, + createdAt: '', + timestamp: '', + }, + { + field: 'host.ip', + id: 'test3', + allowed: false, + anonymized: true, + createdAt: '', + timestamp: '', + }, + ], rawData: { 'event.category': ['process'], 'event.action': ['process_stopped'], diff --git a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/get_stats/index.ts b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/get_stats/index.ts index 995ea09674bb7..0aee90e7db5eb 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/get_stats/index.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/get_stats/index.ts @@ -7,10 +7,16 @@ import { isAllowed, isAnonymized, isDenied } from '@kbn/elastic-assistant-common'; -import type { SelectedPromptContext } from '../../assistant/prompt_context/types'; +import { AnonymizationFieldResponse } from '@kbn/elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.gen'; import { Stats } from '../helpers'; -export const getStats = ({ allow, allowReplacement, rawData }: SelectedPromptContext): Stats => { +export const getStats = ({ + anonymizationFields = [], + rawData, +}: { + anonymizationFields?: AnonymizationFieldResponse[]; + rawData?: string | Record; +}): Stats => { const ZERO_STATS = { allowed: 0, anonymized: 0, @@ -18,21 +24,30 @@ export const getStats = ({ allow, allowReplacement, rawData }: SelectedPromptCon total: 0, }; - if (typeof rawData === 'string') { + if (!rawData) { + return { + allowed: anonymizationFields.reduce((acc, data) => (data.allowed ? acc + 1 : acc), 0), + anonymized: anonymizationFields.reduce((acc, data) => (data.anonymized ? acc + 1 : acc), 0), + denied: anonymizationFields.reduce( + (acc, data) => (data.allowed === false ? acc + 1 : acc), + 0 + ), + total: anonymizationFields.length, + }; + } else if (typeof rawData === 'string') { return ZERO_STATS; } else { const rawFields = Object.keys(rawData); - const allowReplacementSet = new Set(allowReplacement); - const allowSet = new Set(allow); - return rawFields.reduce( (acc, field) => ({ - allowed: acc.allowed + (isAllowed({ allowSet, field }) ? 1 : 0), + allowed: acc.allowed + (isAllowed({ anonymizationFields, field }) ? 1 : 0), anonymized: acc.anonymized + - (isAllowed({ allowSet, field }) && isAnonymized({ allowReplacementSet, field }) ? 1 : 0), - denied: acc.denied + (isDenied({ allowSet, field }) ? 1 : 0), + (isAllowed({ anonymizationFields, field }) && isAnonymized({ anonymizationFields, field }) + ? 1 + : 0), + denied: acc.denied + (isDenied({ anonymizationFields, field }) ? 1 : 0), total: acc.total + 1, }), ZERO_STATS diff --git a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/helpers/index.test.ts b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/helpers/index.test.ts index 77031bccdf8ae..ff8d8db2d5cf6 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/helpers/index.test.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/helpers/index.test.ts @@ -5,18 +5,9 @@ * 2.0. */ +import { isAllowed, isAnonymized, isDenied } from '@kbn/elastic-assistant-common'; +import { getIsDataAnonymizable, updateSelectedPromptContext } from '.'; import { SelectedPromptContext } from '../../assistant/prompt_context/types'; -import { - isAllowed, - isAnonymized, - isDenied, - getIsDataAnonymizable, - updateDefaultList, - updateDefaults, - updateList, - updateSelectedPromptContext, -} from '.'; -import { BatchUpdateListItem } from '../context_editor/types'; describe('helpers', () => { beforeEach(() => jest.clearAllMocks()); @@ -41,117 +32,227 @@ describe('helpers', () => { describe('isAllowed', () => { it('returns true when the field is present in the allowSet', () => { - const allowSet = new Set(['fieldName1', 'fieldName2', 'fieldName3']); - - expect(isAllowed({ allowSet, field: 'fieldName1' })).toBe(true); + const anonymizationFields = { + total: 3, + page: 1, + perPage: 1000, + data: [ + { + id: 'fieldName1', + field: 'fieldName1', + anonymized: false, + allowed: true, + }, + { + id: 'fieldName2', + field: 'fieldName2', + anonymized: false, + allowed: true, + }, + { + id: 'fieldName3', + field: 'fieldName3', + anonymized: false, + allowed: true, + }, + ], + }; + + expect( + isAllowed({ anonymizationFields: anonymizationFields.data, field: 'fieldName1' }) + ).toBe(true); }); it('returns false when the field is NOT present in the allowSet', () => { - const allowSet = new Set(['fieldName1', 'fieldName2', 'fieldName3']); - - expect(isAllowed({ allowSet, field: 'nonexistentField' })).toBe(false); + const anonymizationFields = { + total: 3, + page: 1, + perPage: 1000, + data: [ + { + id: 'fieldName1', + field: 'fieldName1', + anonymized: false, + allowed: true, + }, + { + id: 'fieldName2', + field: 'fieldName2', + anonymized: false, + allowed: true, + }, + { + id: 'fieldName3', + field: 'fieldName3', + anonymized: false, + allowed: true, + }, + ], + }; + + expect( + isAllowed({ anonymizationFields: anonymizationFields.data, field: 'nonexistentField' }) + ).toBe(false); }); }); describe('isDenied', () => { it('returns true when the field is NOT in the allowSet', () => { - const allowSet = new Set(['field1', 'field2']); + const anonymizationFields = { + total: 2, + page: 1, + perPage: 1000, + data: [ + { + id: 'field1', + field: 'field1', + anonymized: false, + allowed: true, + }, + { + id: 'field2', + field: 'field2', + anonymized: false, + allowed: true, + }, + ], + }; + const field = 'field3'; - expect(isDenied({ allowSet, field })).toBe(true); + expect(isDenied({ anonymizationFields: anonymizationFields.data, field })).toBe(true); }); it('returns false when the field is in the allowSet', () => { - const allowSet = new Set(['field1', 'field2']); + const anonymizationFields = { + total: 2, + page: 1, + perPage: 1000, + data: [ + { + id: 'field1', + field: 'field1', + anonymized: false, + allowed: true, + }, + { + id: 'field2', + field: 'field2', + anonymized: false, + allowed: true, + }, + ], + }; const field = 'field1'; - expect(isDenied({ allowSet, field })).toBe(false); + expect(isDenied({ anonymizationFields: anonymizationFields.data, field })).toBe(false); }); it('returns true for an empty allowSet', () => { - const allowSet = new Set(); + const anonymizationFields = { + total: 0, + page: 1, + perPage: 1000, + data: [], + }; const field = 'field1'; - expect(isDenied({ allowSet, field })).toBe(true); + expect(isDenied({ anonymizationFields: anonymizationFields.data, field })).toBe(true); }); it('returns false when the field is an empty string and allowSet contains the empty string', () => { - const allowSet = new Set(['', 'field1']); + const anonymizationFields = { + total: 2, + page: 1, + perPage: 1000, + data: [ + { + id: 'field1', + field: 'field1', + anonymized: false, + allowed: true, + }, + { + id: '', + field: '', + anonymized: false, + allowed: true, + }, + ], + }; const field = ''; - expect(isDenied({ allowSet, field })).toBe(false); + expect(isDenied({ anonymizationFields: anonymizationFields.data, field })).toBe(false); }); }); describe('isAnonymized', () => { - const allowReplacementSet = new Set(['user.name', 'host.name']); + const anonymizationFields = { + total: 2, + page: 1, + perPage: 1000, + data: [ + { + id: 'user.name', + field: 'user.name', + anonymized: true, + allowed: true, + }, + { + id: 'host.name', + field: 'host.name', + anonymized: true, + allowed: true, + }, + ], + }; it('returns true when the field is in the allowReplacementSet', () => { const field = 'user.name'; - expect(isAnonymized({ allowReplacementSet, field })).toBe(true); + expect(isAnonymized({ anonymizationFields: anonymizationFields.data, field })).toBe(true); }); it('returns false when the field is NOT in the allowReplacementSet', () => { const field = 'foozle'; - expect(isAnonymized({ allowReplacementSet, field })).toBe(false); + expect(isAnonymized({ anonymizationFields: anonymizationFields.data, field })).toBe(false); }); it('returns false when allowReplacementSet is empty', () => { - const emptySet = new Set(); const field = 'user.name'; - expect(isAnonymized({ allowReplacementSet: emptySet, field })).toBe(false); - }); - }); - - describe('updateList', () => { - it('adds a new field to the list when the operation is `add`', () => { - const result = updateList({ - field: 'newField', - list: ['field1', 'field2'], - operation: 'add', - }); - - expect(result).toEqual(['field1', 'field2', 'newField']); - }); - - it('does NOT add a duplicate field to the list when the operation is `add`', () => { - const result = updateList({ - field: 'field1', - list: ['field1', 'field2'], - operation: 'add', - }); - - expect(result).toEqual(['field1', 'field2']); - }); - - it('removes an existing field from the list when the operation is `remove`', () => { - const result = updateList({ - field: 'field1', - list: ['field1', 'field2'], - operation: 'remove', - }); - - expect(result).toEqual(['field2']); - }); - - it('should NOT modify the list when removing a non-existent field', () => { - const result = updateList({ - field: 'host.name', - list: ['field1', 'field2'], - operation: 'remove', - }); - - expect(result).toEqual(['field1', 'field2']); + expect(isAnonymized({ anonymizationFields: [], field })).toBe(false); }); }); describe('updateSelectedPromptContext', () => { const selectedPromptContext: SelectedPromptContext = { - allow: ['user.name', 'event.category'], - allowReplacement: ['user.name'], + contextAnonymizationFields: { + total: 2, + page: 1, + perPage: 1000, + data: [ + { + id: 'user.name', + field: 'user.name', + anonymized: true, + allowed: true, + }, + { + id: 'event.category', + field: 'event.category', + anonymized: true, + allowed: false, + }, + { + id: 'event.action', + field: 'event.action', + anonymized: false, + allowed: true, + }, + ], + }, promptContextId: 'testId', rawData: {}, }; @@ -164,7 +265,13 @@ describe('helpers', () => { update: 'allow', }); - expect(result.allow).toEqual(['user.name', 'event.category', 'event.action']); + expect( + result.contextAnonymizationFields?.data.sort((a, b) => (a.field > b.field ? -1 : 1)) + ).toEqual([ + { id: 'user.name', field: 'user.name', anonymized: true, allowed: true }, + { id: 'event.category', field: 'event.category', anonymized: true, allowed: false }, + { id: 'event.action', field: 'event.action', anonymized: false, allowed: true }, + ]); }); it('updates the allow list when update is `allow` and the operation is `remove`', () => { @@ -175,17 +282,29 @@ describe('helpers', () => { update: 'allow', }); - expect(result.allow).toEqual(['event.category']); + expect( + result.contextAnonymizationFields?.data.sort((a, b) => (a.field > b.field ? -1 : 1)) + ).toEqual([ + { allowed: false, anonymized: true, field: 'user.name', id: 'user.name' }, + { allowed: false, anonymized: true, field: 'event.category', id: 'event.category' }, + { allowed: true, anonymized: false, field: 'event.action', id: 'event.action' }, + ]); }); it('updates the allowReplacement list when update is `allowReplacement` and the operation is `add`', () => { const result = updateSelectedPromptContext({ - field: 'event.type', + field: 'event.category', operation: 'add', selectedPromptContext, update: 'allowReplacement', }); - expect(result.allowReplacement).toEqual(['user.name', 'event.type']); + expect( + result.contextAnonymizationFields?.data.sort((a, b) => (a.field > b.field ? -1 : 1)) + ).toEqual([ + { allowed: true, anonymized: true, field: 'user.name', id: 'user.name' }, + { allowed: false, anonymized: true, field: 'event.category', id: 'event.category' }, + { allowed: true, anonymized: false, field: 'event.action', id: 'event.action' }, + ]); }); it('updates the allowReplacement list when update is `allowReplacement` and the operation is `remove`', () => { @@ -195,7 +314,16 @@ describe('helpers', () => { selectedPromptContext, update: 'allowReplacement', }); - expect(result.allowReplacement).toEqual([]); + expect(result.contextAnonymizationFields).toEqual({ + data: [ + { allowed: false, anonymized: true, field: 'event.category', id: 'event.category' }, + { allowed: true, anonymized: false, field: 'event.action', id: 'event.action' }, + { allowed: true, anonymized: false, field: 'user.name', id: 'user.name' }, + ], + page: 1, + perPage: 1000, + total: 2, + }); }); it('does not update selectedPromptContext when update is not "allow" or "allowReplacement"', () => { @@ -209,96 +337,4 @@ describe('helpers', () => { expect(result).toEqual(selectedPromptContext); }); }); - - describe('updateDefaultList', () => { - it('updates the `defaultAllow` list to add a field when the operation is add', () => { - const currentList = ['test1', 'test2']; - const setDefaultList = jest.fn(); - const update = 'defaultAllow'; - const updates: BatchUpdateListItem[] = [{ field: 'test3', operation: 'add', update }]; - - updateDefaultList({ currentList, setDefaultList, update, updates }); - - expect(setDefaultList).toBeCalledWith([...currentList, 'test3']); - }); - - it('updates the `defaultAllow` list to remove a field when the operation is remove', () => { - const currentList = ['test1', 'test2']; - const setDefaultList = jest.fn(); - const update = 'defaultAllow'; - const updates: BatchUpdateListItem[] = [{ field: 'test1', operation: 'remove', update }]; - - updateDefaultList({ currentList, setDefaultList, update, updates }); - - expect(setDefaultList).toBeCalledWith(['test2']); - }); - - it('does NOT invoke `setDefaultList` when `update` does NOT match any of the batched `updates` types', () => { - const currentList = ['test1', 'test2']; - const setDefaultList = jest.fn(); - const update = 'allow'; - const updates: BatchUpdateListItem[] = [ - { field: 'test1', operation: 'remove', update: 'defaultAllow' }, // update does not match - ]; - - updateDefaultList({ currentList, setDefaultList, update, updates }); - - expect(setDefaultList).not.toBeCalled(); - }); - - it('does NOT invoke `setDefaultList` when `updates` is empty', () => { - const currentList = ['test1', 'test2']; - const setDefaultList = jest.fn(); - const update = 'defaultAllow'; - const updates: BatchUpdateListItem[] = []; // no updates - - updateDefaultList({ currentList, setDefaultList, update, updates }); - - expect(setDefaultList).not.toBeCalled(); - }); - }); - - describe('updateDefaults', () => { - const setDefaultAllow = jest.fn(); - const setDefaultAllowReplacement = jest.fn(); - - const defaultAllow = ['field1', 'field2']; - const defaultAllowReplacement = ['field2']; - const batchUpdateListItems: BatchUpdateListItem[] = [ - { - field: 'field1', - operation: 'remove', - update: 'defaultAllow', - }, - { - field: 'host.name', - operation: 'add', - update: 'defaultAllowReplacement', - }, - ]; - - it('updates defaultAllow with filtered updates', () => { - updateDefaults({ - defaultAllow, - defaultAllowReplacement, - setDefaultAllow, - setDefaultAllowReplacement, - updates: batchUpdateListItems, - }); - - expect(setDefaultAllow).toHaveBeenCalledWith(['field2']); - }); - - it('updates defaultAllowReplacement with filtered updates', () => { - updateDefaults({ - defaultAllow, - defaultAllowReplacement, - setDefaultAllow, - setDefaultAllowReplacement, - updates: batchUpdateListItems, - }); - - expect(setDefaultAllowReplacement).toHaveBeenCalledWith(['field2', 'host.name']); - }); - }); }); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/helpers/index.ts b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/helpers/index.ts index 389ba9ce421b7..8602682b8bbc0 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/helpers/index.ts +++ b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/helpers/index.ts @@ -4,9 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - import { SelectedPromptContext } from '../../assistant/prompt_context/types'; -import type { BatchUpdateListItem } from '../context_editor/types'; export const getIsDataAnonymizable = (rawData: string | Record): boolean => typeof rawData !== 'string'; @@ -18,36 +16,6 @@ export interface Stats { total: number; } -export const isAllowed = ({ allowSet, field }: { allowSet: Set; field: string }): boolean => - allowSet.has(field); - -export const isDenied = ({ allowSet, field }: { allowSet: Set; field: string }): boolean => - !allowSet.has(field); - -export const isAnonymized = ({ - allowReplacementSet, - field, -}: { - allowReplacementSet: Set; - field: string; -}): boolean => allowReplacementSet.has(field); - -export const updateList = ({ - field, - list, - operation, -}: { - field: string; - list: string[]; - operation: 'add' | 'remove'; -}): string[] => { - if (operation === 'add') { - return list.includes(field) ? list : [...list, field]; - } else { - return list.filter((x) => x !== field); - } -}; - export const updateSelectedPromptContext = ({ field, operation, @@ -65,71 +33,45 @@ export const updateSelectedPromptContext = ({ | 'deny' | 'denyReplacement'; }): SelectedPromptContext => { - const { allow, allowReplacement } = selectedPromptContext; + const { contextAnonymizationFields } = selectedPromptContext; + if (!contextAnonymizationFields) { + return selectedPromptContext; + } switch (update) { case 'allow': return { ...selectedPromptContext, - allow: updateList({ field, list: allow, operation }), + contextAnonymizationFields: { + ...contextAnonymizationFields, + data: [ + ...contextAnonymizationFields.data.filter((f) => f.field !== field), + + { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + ...contextAnonymizationFields.data.find((f) => f.field === field)!, + allowed: operation === 'add', + }, + ], + }, }; case 'allowReplacement': return { ...selectedPromptContext, - allowReplacement: updateList({ field, list: allowReplacement, operation }), + contextAnonymizationFields: { + ...contextAnonymizationFields, + data: [ + ...contextAnonymizationFields.data.filter((f) => f.field !== field), + + { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + ...contextAnonymizationFields.data.find((f) => f.field === field)!, + anonymized: operation === 'add', + }, + ], + }, }; default: return selectedPromptContext; } }; - -export const updateDefaultList = ({ - currentList, - setDefaultList, - update, - updates, -}: { - currentList: string[]; - setDefaultList: React.Dispatch>; - update: 'allow' | 'allowReplacement' | 'defaultAllow' | 'defaultAllowReplacement' | 'deny'; - updates: BatchUpdateListItem[]; -}): void => { - const filteredUpdates = updates.filter((x) => x.update === update); - - if (filteredUpdates.length > 0) { - const updatedList = filteredUpdates.reduce( - (acc, { field, operation }) => updateList({ field, list: acc, operation }), - currentList - ); - - setDefaultList(updatedList); - } -}; - -export const updateDefaults = ({ - defaultAllow, - defaultAllowReplacement, - setDefaultAllow, - setDefaultAllowReplacement, - updates, -}: { - defaultAllow: string[]; - defaultAllowReplacement: string[]; - setDefaultAllow: React.Dispatch>; - setDefaultAllowReplacement: React.Dispatch>; - updates: BatchUpdateListItem[]; -}): void => { - updateDefaultList({ - currentList: defaultAllow, - setDefaultList: setDefaultAllow, - update: 'defaultAllow', - updates, - }); - - updateDefaultList({ - currentList: defaultAllowReplacement, - setDefaultList: setDefaultAllowReplacement, - update: 'defaultAllowReplacement', - updates, - }); -}; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/index.test.tsx index 84a36b3fb8454..0a4b835686b2b 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/index.test.tsx @@ -15,8 +15,25 @@ import { DataAnonymizationEditor } from '.'; describe('DataAnonymizationEditor', () => { const mockSelectedPromptContext: SelectedPromptContext = { - allow: ['field1', 'field2'], - allowReplacement: ['field1'], + contextAnonymizationFields: { + total: 0, + page: 1, + perPage: 1000, + data: [ + { + id: 'field1', + field: 'field1', + anonymized: true, + allowed: true, + }, + { + id: 'field2', + field: 'field2', + anonymized: false, + allowed: true, + }, + ], + }, promptContextId: 'test-id', rawData: 'test-raw-data', }; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/index.tsx index 089e316f4795f..248ec88b0dccf 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/index.tsx @@ -10,11 +10,10 @@ import React, { useCallback, useMemo } from 'react'; // eslint-disable-next-line @kbn/eslint/module_migration import styled from 'styled-components'; -import { useAssistantContext } from '../assistant_context'; import type { SelectedPromptContext } from '../assistant/prompt_context/types'; import { ContextEditor } from './context_editor'; import { BatchUpdateListItem } from './context_editor/types'; -import { getIsDataAnonymizable, updateDefaults, updateSelectedPromptContext } from './helpers'; +import { getIsDataAnonymizable, updateSelectedPromptContext } from './helpers'; import { ReadOnlyContextViewer } from './read_only_context_viewer'; import { Stats } from './stats'; @@ -33,8 +32,6 @@ const DataAnonymizationEditorComponent: React.FC = ({ selectedPromptContext, setSelectedPromptContexts, }) => { - const { defaultAllow, defaultAllowReplacement, setDefaultAllow, setDefaultAllowReplacement } = - useAssistantContext(); const isDataAnonymizable = useMemo( () => getIsDataAnonymizable(selectedPromptContext.rawData), [selectedPromptContext] @@ -57,30 +54,16 @@ const DataAnonymizationEditorComponent: React.FC = ({ ...prev, [selectedPromptContext.promptContextId]: updatedPromptContext, })); - - updateDefaults({ - defaultAllow, - defaultAllowReplacement, - setDefaultAllow, - setDefaultAllowReplacement, - updates, - }); }, - [ - defaultAllow, - defaultAllowReplacement, - selectedPromptContext, - setDefaultAllow, - setDefaultAllowReplacement, - setSelectedPromptContexts, - ] + [selectedPromptContext, setSelectedPromptContexts] ); return ( @@ -89,8 +72,14 @@ const DataAnonymizationEditorComponent: React.FC = ({ ) : ( diff --git a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/stats/index.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/stats/index.test.tsx index c1980a55e410d..7a89c843b277a 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/stats/index.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/stats/index.test.tsx @@ -8,26 +8,38 @@ import React from 'react'; import { render, screen } from '@testing-library/react'; -import { SelectedPromptContext } from '../../assistant/prompt_context/types'; import { TestProviders } from '../../mock/test_providers/test_providers'; import { Stats } from '.'; describe('Stats', () => { - const selectedPromptContext: SelectedPromptContext = { - allow: ['field1', 'field2'], - allowReplacement: ['field1'], - promptContextId: 'abcd', - rawData: { - field1: ['value1', 'value2'], - field2: ['value3, value4', 'value5'], - field3: ['value6'], + const anonymizationFields = [ + { + id: 'field1', + field: 'field1', + anonymized: true, + allowed: true, }, + { + id: 'field2', + field: 'field2', + anonymized: false, + allowed: true, + }, + ]; + const rawData = { + field1: ['value1', 'value2'], + field2: ['value3, value4', 'value5'], + field3: ['value6'], }; it('renders the expected allowed stat content', () => { render( - + ); @@ -37,7 +49,11 @@ describe('Stats', () => { it('renders the expected anonymized stat content', () => { render( - + ); @@ -47,7 +63,11 @@ describe('Stats', () => { it('renders the expected available stat content', () => { render( - + ); @@ -57,7 +77,11 @@ describe('Stats', () => { it('should not display the allowed stat when isDataAnonymizable is false', () => { render( - + ); @@ -67,7 +91,11 @@ describe('Stats', () => { it('should not display the available stat when isDataAnonymizable is false', () => { render( - + ); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/stats/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/stats/index.tsx index b0a27e271cdf7..0c30859298448 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/stats/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/data_anonymization_editor/stats/index.tsx @@ -10,9 +10,9 @@ import React, { useMemo } from 'react'; // eslint-disable-next-line @kbn/eslint/module_migration import styled from 'styled-components'; +import { AnonymizationFieldResponse } from '@kbn/elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.gen'; import { AllowedStat } from './allowed_stat'; import { AnonymizedStat } from './anonymized_stat'; -import type { SelectedPromptContext } from '../../assistant/prompt_context/types'; import { getStats } from '../get_stats'; import { AvailableStat } from './available_stat'; @@ -22,13 +22,18 @@ const StatFlexItem = styled(EuiFlexItem)` interface Props { isDataAnonymizable: boolean; - selectedPromptContext: SelectedPromptContext; + anonymizationFields?: AnonymizationFieldResponse[]; + rawData?: string | Record; } -const StatsComponent: React.FC = ({ isDataAnonymizable, selectedPromptContext }) => { +const StatsComponent: React.FC = ({ isDataAnonymizable, anonymizationFields, rawData }) => { const { allowed, anonymized, total } = useMemo( - () => getStats(selectedPromptContext), - [selectedPromptContext] + () => + getStats({ + anonymizationFields, + rawData, + }), + [anonymizationFields, rawData] ); return ( 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 d44d5a62f69cb..b4698c989c34b 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 @@ -69,18 +69,12 @@ export const TestProvidersComponent: React.FC = ({ actionTypeRegistry={actionTypeRegistry} assistantAvailability={assistantAvailability} augmentMessageCodeBlocks={jest.fn().mockReturnValue([])} - baseAllow={[]} - baseAllowReplacement={[]} basePath={'https://localhost:5601/kbn'} - defaultAllow={[]} - defaultAllowReplacement={[]} docLinks={{ ELASTIC_WEBSITE_URL: 'https://www.elastic.co/', DOC_LINK_VERSION: 'current', }} getComments={mockGetComments} - setDefaultAllow={jest.fn()} - setDefaultAllowReplacement={jest.fn()} http={mockHttp} baseConversations={{}} {...providerContext} diff --git a/x-pack/packages/kbn-elastic-assistant/index.ts b/x-pack/packages/kbn-elastic-assistant/index.ts index 7f2355038170e..b65a1b4dfaa70 100644 --- a/x-pack/packages/kbn-elastic-assistant/index.ts +++ b/x-pack/packages/kbn-elastic-assistant/index.ts @@ -99,8 +99,8 @@ export type { AssistantTelemetry, /** Conversation Interface */ Conversation, - /** Message Interface */ - Message, + /** Message interface on the client */ + ClientMessage, } from './impl/assistant_context/types'; /** Interface for defining system/user prompts */ @@ -142,7 +142,7 @@ export type { GetKnowledgeBaseStatusResponse } from './impl/assistant/api'; export type { PostKnowledgeBaseResponse } from './impl/assistant/api'; export { useFetchCurrentUserConversations } from './impl/assistant/api/conversations/use_fetch_current_user_conversations'; -export * from './impl/assistant/api/conversations/use_bulk_actions_conversations'; +export * from './impl/assistant/api/conversations/bulk_update_actions_conversations'; export { getConversationById } from './impl/assistant/api/conversations/conversations'; export { mergeBaseWithPersistedConversations } from './impl/assistant/helpers'; diff --git a/x-pack/packages/observability/alert_details/src/hooks/use_alerts_history.test.tsx b/x-pack/packages/observability/alert_details/src/hooks/use_alerts_history.test.tsx index 9e059d61753f4..82ced89354006 100644 --- a/x-pack/packages/observability/alert_details/src/hooks/use_alerts_history.test.tsx +++ b/x-pack/packages/observability/alert_details/src/hooks/use_alerts_history.test.tsx @@ -59,6 +59,7 @@ describe('useAlertsHistory', () => { expect(result.current.isSuccess).toBeFalsy(); expect(result.current.isLoading).toBeFalsy(); }); + it('returns no data when API error', async () => { const http = { post: jest.fn().mockImplementation(() => { @@ -151,7 +152,56 @@ describe('useAlertsHistory', () => { expect(result.current.data.totalTriggeredAlerts).toEqual(32); }); - it('calls http post including term queries', async () => { + it('calls http post including instanceId query', async () => { + const controller = new AbortController(); + const signal = controller.signal; + const mockedHttpPost = jest.fn(); + const http = { + post: mockedHttpPost.mockResolvedValue({ + hits: { total: { value: 32, relation: 'eq' }, max_score: null, hits: [] }, + aggregations: { + avgTimeToRecoverUS: { doc_count: 28, recoveryTime: { value: 134959464.2857143 } }, + histogramTriggeredAlerts: { + buckets: [ + { key_as_string: '2023-04-10T00:00:00.000Z', key: 1681084800000, doc_count: 0 }, + ], + }, + }, + }), + } as unknown as HttpSetup; + + const { result, waitFor } = renderHook( + () => + useAlertsHistory({ + http, + featureIds: [AlertConsumers.APM], + ruleId, + dateRange: { from: start, to: end }, + instanceId: 'instance-1', + }), + { + wrapper, + } + ); + + await act(async () => { + await waitFor(() => result.current.isSuccess); + }); + expect(mockedHttpPost).toBeCalledWith('/internal/rac/alerts/find', { + body: + '{"size":0,"feature_ids":["apm"],"query":{"bool":{"must":[' + + '{"term":{"kibana.alert.rule.uuid":"cfd36e60-ef22-11ed-91eb-b7893acacfe2"}},' + + '{"term":{"kibana.alert.instance.id":"instance-1"}},' + + '{"range":{"kibana.alert.time_range":{"from":"2023-04-10T00:00:00.000Z","to":"2023-05-10T00:00:00.000Z"}}}]}},' + + '"aggs":{"histogramTriggeredAlerts":{"date_histogram":{"field":"kibana.alert.start","fixed_interval":"1d",' + + '"extended_bounds":{"min":"2023-04-10T00:00:00.000Z","max":"2023-05-10T00:00:00.000Z"}}},' + + '"avgTimeToRecoverUS":{"filter":{"term":{"kibana.alert.status":"recovered"}},' + + '"aggs":{"recoveryTime":{"avg":{"field":"kibana.alert.duration.us"}}}}}}', + signal, + }); + }); + + it('calls http post without * instanceId query', async () => { const controller = new AbortController(); const signal = controller.signal; const mockedHttpPost = jest.fn(); @@ -176,15 +226,7 @@ describe('useAlertsHistory', () => { featureIds: [AlertConsumers.APM], ruleId, dateRange: { from: start, to: end }, - queries: [ - { - term: { - 'kibana.alert.group.value': { - value: 'host=1', - }, - }, - }, - ], + instanceId: '*', }), { wrapper, @@ -198,7 +240,6 @@ describe('useAlertsHistory', () => { body: '{"size":0,"feature_ids":["apm"],"query":{"bool":{"must":[' + '{"term":{"kibana.alert.rule.uuid":"cfd36e60-ef22-11ed-91eb-b7893acacfe2"}},' + - '{"term":{"kibana.alert.group.value":{"value":"host=1"}}},' + '{"range":{"kibana.alert.time_range":{"from":"2023-04-10T00:00:00.000Z","to":"2023-05-10T00:00:00.000Z"}}}]}},' + '"aggs":{"histogramTriggeredAlerts":{"date_histogram":{"field":"kibana.alert.start","fixed_interval":"1d",' + '"extended_bounds":{"min":"2023-04-10T00:00:00.000Z","max":"2023-05-10T00:00:00.000Z"}}},' + diff --git a/x-pack/packages/observability/alert_details/src/hooks/use_alerts_history.ts b/x-pack/packages/observability/alert_details/src/hooks/use_alerts_history.ts index 7c53001eade82..7519fea5f99f8 100644 --- a/x-pack/packages/observability/alert_details/src/hooks/use_alerts_history.ts +++ b/x-pack/packages/observability/alert_details/src/hooks/use_alerts_history.ts @@ -6,10 +6,10 @@ */ import { type HttpSetup } from '@kbn/core/public'; -import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types'; import { AggregationsDateHistogramBucketKeys } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { ALERT_DURATION, + ALERT_INSTANCE_ID, ALERT_RULE_UUID, ALERT_START, ALERT_STATUS, @@ -27,7 +27,7 @@ export interface Props { from: string; to: string; }; - queries?: QueryDslQueryContainer[]; + instanceId?: string; } interface FetchAlertsHistory { @@ -47,12 +47,13 @@ export const EMPTY_ALERTS_HISTORY = { histogramTriggeredAlerts: [] as AggregationsDateHistogramBucketKeys[], avgTimeToRecoverUS: 0, }; + export function useAlertsHistory({ featureIds, ruleId, dateRange, http, - queries, + instanceId, }: Props): UseAlertsHistory { const { isInitialLoading, isLoading, isError, isSuccess, isRefetching, data } = useQuery({ queryKey: ['useAlertsHistory'], @@ -66,7 +67,7 @@ export function useAlertsHistory({ ruleId, dateRange, signal, - queries, + instanceId, }); }, refetchOnWindowFocus: false, @@ -103,7 +104,7 @@ export async function fetchTriggeredAlertsHistory({ ruleId, dateRange, signal, - queries = [], + instanceId, }: { featureIds: ValidFeatureId[]; http: HttpSetup; @@ -113,7 +114,7 @@ export async function fetchTriggeredAlertsHistory({ to: string; }; signal?: AbortSignal; - queries?: QueryDslQueryContainer[]; + instanceId?: string; }): Promise { try { const responseES = await http.post(`${BASE_RAC_ALERTS_API_PATH}/find`, { @@ -129,7 +130,15 @@ export async function fetchTriggeredAlertsHistory({ [ALERT_RULE_UUID]: ruleId, }, }, - ...queries, + ...(instanceId && instanceId !== '*' + ? [ + { + term: { + [ALERT_INSTANCE_ID]: instanceId, + }, + }, + ] + : []), { range: { [ALERT_TIME_RANGE]: dateRange, diff --git a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/pattern_summary/pattern_label/index.tsx b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/pattern_summary/pattern_label/index.tsx index 34d6f56a8594a..24a23c55e83ac 100644 --- a/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/pattern_summary/pattern_label/index.tsx +++ b/x-pack/packages/security-solution/ecs_data_quality_dashboard/impl/data_quality/data_quality_panel/pattern/pattern_summary/pattern_label/index.tsx @@ -56,7 +56,7 @@ const PatternLabelComponent: React.FC = ({ -

{pattern}

+

{pattern}

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 4c8a72aaa5996..7d399daa5b189 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 @@ -62,18 +62,12 @@ export const TestProvidersComponent: React.FC = ({ children, isILMAvailab actionTypeRegistry={actionTypeRegistry} assistantAvailability={mockAssistantAvailability} augmentMessageCodeBlocks={jest.fn()} - baseAllow={[]} - baseAllowReplacement={[]} basePath={'https://localhost:5601/kbn'} - defaultAllow={[]} - defaultAllowReplacement={[]} docLinks={{ ELASTIC_WEBSITE_URL: 'https://www.elastic.co/', DOC_LINK_VERSION: 'current', }} getComments={mockGetComments} - setDefaultAllow={jest.fn()} - setDefaultAllowReplacement={jest.fn()} http={mockHttp} baseConversations={{}} > diff --git a/x-pack/performance/journeys_e2e/aiops_log_rate_analysis.ts b/x-pack/performance/journeys_e2e/aiops_log_rate_analysis.ts index 4cf8ab6c074cc..06a5e01a2caf5 100644 --- a/x-pack/performance/journeys_e2e/aiops_log_rate_analysis.ts +++ b/x-pack/performance/journeys_e2e/aiops_log_rate_analysis.ts @@ -14,19 +14,27 @@ export const journey = new Journey({ kbnArchives: ['x-pack/performance/kbn_archives/large_arrays_data_view'], esArchives: ['x-pack/test/functional/es_archives/large_arrays'], }) - .step('Go to AIOps Log Rate Analysis', async ({ page, kbnUrl }) => { - // Navigate to Log Rate Analysis with a prepopulated url state that runs - // the analysis directly on page load without any necessary user interactions. + .step('Go to AIOps Log Rate Analysis', async ({ page, kbnUrl, kibanaPage }) => { + // Navigate to Log Rate Analysis with just a prepopulated time range. await page.goto( kbnUrl.get( - `app/ml/aiops/log_rate_analysis?index=${dataView.id}&_g=%28refreshInterval%3A%28pause%3A%21t%2Cvalue%3A60000%29%2Ctime%3A%28from%3A%272019-07-01T15%3A35%3A38.700Z%27%2Cto%3A%272019-07-05T15%3A35%3A38.700Z%27%29%29&_a=%28logRateAnalysis%3A%28filters%3A%21%28%29%2CsearchQuery%3A%28match_all%3A%28%29%29%2CsearchQueryLanguage%3Akuery%2CsearchString%3A%27%27%2Cwp%3A%28bMax%3A1562198400000%2CbMin%3A1562097600000%2CdMax%3A1562270400000%2CdMin%3A1562234400000%29%29%29` + `app/ml/aiops/log_rate_analysis?index=${dataView.id}&_g=%28refreshInterval%3A%28pause%3A%21t%2Cvalue%3A60000%29%2Ctime%3A%28from%3A%272019-07-01T15%3A35%3A38.700Z%27%2Cto%3A%272019-07-05T15%3A35%3A38.700Z%27%29%29&_a=%28logRateAnalysis%3A%28filters%3A%21%28%29%2CsearchQuery%3A%28match_all%3A%28%29%29%2CsearchQueryLanguage%3Akuery%2CsearchString%3A%27%27%29%29` ) ); // Wait for the AIOps Log Rate Analysis page wrapper to load await page.waitForSelector(subj('aiopsLogRateAnalysisPage')); + await page.waitForSelector(subj('aiopsDocumentCountChart')); + // Wait for the histogram chart to load + await kibanaPage.waitForCharts({ + parentLocator: subj('aiopsDocumentCountChart'), + count: 1, + }); + await page.waitForSelector(subj('aiopsNoWindowParametersEmptyPrompt')); }) - .step('Run AIOps Log Rate Analysis', async ({ page, kbnUrl }) => { - // Wait for the analysis to complete with extended timeout, this one tracks a known issue with slow frequent_item_sets performance. + .step('Run AIOps Log Rate Analysis', async ({ page }) => { + // Select the chart and click in the area where the spike is located to trigger log rate analysis. + const chart = await page.locator(subj('aiopsDocumentCountChart')); + await chart.click({ position: { x: 710, y: 50 } }); await page.waitForSelector(subj('aiopsAnalysisComplete'), { timeout: 120000 }); }); diff --git a/x-pack/plugins/actions/common/connector_feature_config.ts b/x-pack/plugins/actions/common/connector_feature_config.ts index 4638387d31c5e..588966b307db1 100644 --- a/x-pack/plugins/actions/common/connector_feature_config.ts +++ b/x-pack/plugins/actions/common/connector_feature_config.ts @@ -27,6 +27,7 @@ export const UptimeConnectorFeatureId = 'uptime'; export const SecurityConnectorFeatureId = 'siem'; export const GenerativeAIForSecurityConnectorFeatureId = 'generativeAIForSecurity'; export const GenerativeAIForObservabilityConnectorFeatureId = 'generativeAIForObservability'; +export const GenerativeAIForSearchPlaygroundConnectorFeatureId = 'generativeAIForSearchPlayground'; const compatibilityGenerativeAIForSecurity = i18n.translate( 'xpack.actions.availableConnectorFeatures.compatibility.generativeAIForSecurity', @@ -42,6 +43,13 @@ const compatibilityGenerativeAIForObservability = i18n.translate( } ); +const compatibilityGenerativeAIForSearchPlayground = i18n.translate( + 'xpack.actions.availableConnectorFeatures.compatibility.generativeAIForSearchPlayground', + { + defaultMessage: 'Generative AI for Search Playground', + } +); + const compatibilityAlertingRules = i18n.translate( 'xpack.actions.availableConnectorFeatures.compatibility.alertingRules', { @@ -100,6 +108,12 @@ export const GenerativeAIForObservabilityFeature: ConnectorFeatureConfig = { compatibility: compatibilityGenerativeAIForObservability, }; +export const GenerativeAIForSearchPlaygroundFeature: ConnectorFeatureConfig = { + id: GenerativeAIForSearchPlaygroundConnectorFeatureId, + name: compatibilityGenerativeAIForSearchPlayground, + compatibility: compatibilityGenerativeAIForSearchPlayground, +}; + const AllAvailableConnectorFeatures = { [AlertingConnectorFeature.id]: AlertingConnectorFeature, [CasesConnectorFeature.id]: CasesConnectorFeature, @@ -107,6 +121,7 @@ const AllAvailableConnectorFeatures = { [SecuritySolutionFeature.id]: SecuritySolutionFeature, [GenerativeAIForSecurityFeature.id]: GenerativeAIForSecurityFeature, [GenerativeAIForObservabilityFeature.id]: GenerativeAIForObservabilityFeature, + [GenerativeAIForSearchPlaygroundFeature.id]: GenerativeAIForSearchPlaygroundFeature, }; export function areValidFeatures(ids: string[]) { diff --git a/x-pack/plugins/actions/server/integration_tests/__snapshots__/connector_types.test.ts.snap b/x-pack/plugins/actions/server/integration_tests/__snapshots__/connector_types.test.ts.snap index f27cc6ab83623..f85e0abce89c7 100644 --- a/x-pack/plugins/actions/server/integration_tests/__snapshots__/connector_types.test.ts.snap +++ b/x-pack/plugins/actions/server/integration_tests/__snapshots__/connector_types.test.ts.snap @@ -30,6 +30,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -114,6 +119,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -203,6 +213,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -219,6 +234,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "any", }, "stopSequences": Object { @@ -244,6 +264,11 @@ Object { "type": "string", }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "array", }, "system": Object { @@ -252,6 +277,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -268,6 +298,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "number", }, }, @@ -349,6 +384,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -365,6 +405,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "any", }, "stopSequences": Object { @@ -390,6 +435,11 @@ Object { "type": "string", }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "array", }, "system": Object { @@ -398,6 +448,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -414,6 +469,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "number", }, }, @@ -855,6 +915,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-get-additional-properties": [Function], + }, + ], "rules": Array [ Object { "args": Object { @@ -1520,6 +1585,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -1536,6 +1606,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -1552,6 +1627,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -1588,6 +1668,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -1604,6 +1689,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -1620,6 +1710,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -2504,6 +2599,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-get-additional-properties": [Function], + }, + ], "rules": Array [ Object { "args": Object { @@ -3136,6 +3236,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-get-additional-properties": [Function], + }, + ], "rules": Array [ Object { "args": Object { @@ -3560,6 +3665,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-max-length": 50, + }, + ], "rules": Array [ Object { "args": Object { @@ -3577,6 +3687,11 @@ Object { "type": "string", }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -3593,6 +3708,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -3609,6 +3729,14 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-max-length": 15000, + }, + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -3631,6 +3759,14 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-get-additional-properties": [Function], + }, + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -3674,6 +3810,14 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-max-length": 512, + }, + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -3694,6 +3838,14 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-min-length": 1, + }, + Object { + "x-oas-max-length": 130, + }, + ], "rules": Array [ Object { "args": Object { @@ -3728,6 +3880,14 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-max-length": 25000, + }, + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -3812,6 +3972,11 @@ Object { }, }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "alternatives", }, "responders": Object { @@ -4052,6 +4217,11 @@ Object { "type": "alternatives", }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -4068,6 +4238,14 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-max-length": 100, + }, + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -4096,6 +4274,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-max-length": 50, + }, + ], "rules": Array [ Object { "args": Object { @@ -4113,6 +4296,11 @@ Object { "type": "string", }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -4129,6 +4317,14 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-max-length": 100, + }, + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -4334,6 +4530,11 @@ Object { "type": "alternatives", }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -4384,6 +4585,14 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-max-length": 25000, + }, + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -4406,6 +4615,14 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-max-length": 100, + }, + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -4428,6 +4645,14 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-max-length": 100, + }, + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -4681,6 +4906,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -4697,6 +4927,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -4713,6 +4948,14 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-get-additional-properties": [Function], + }, + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -4748,6 +4991,14 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-max-length": 255, + }, + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -4808,6 +5059,11 @@ Object { }, }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "alternatives", }, "group": Object { @@ -4816,6 +5072,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -4879,6 +5140,11 @@ Object { "type": "object", }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "array", }, "severity": Object { @@ -4937,6 +5203,11 @@ Object { }, }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "alternatives", }, "source": Object { @@ -4945,6 +5216,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -4961,6 +5237,14 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-max-length": 1024, + }, + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -4983,6 +5267,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -6543,6 +6832,11 @@ Object { "type": "string", }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "array", }, "appsVulnerabilityStatuses": Object { @@ -12250,6 +12544,11 @@ Object { "type": "string", }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "array", }, "appsVulnerabilityStatuses": Object { @@ -17957,6 +18256,11 @@ Object { "type": "string", }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "array", }, "appsVulnerabilityStatuses": Object { @@ -23664,6 +23968,11 @@ Object { "type": "string", }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "array", }, "appsVulnerabilityStatuses": Object { @@ -28663,6 +28972,11 @@ Object { "type": "string", }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "array", }, "computerName": Object { @@ -28671,6 +28985,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -28696,6 +29015,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -28712,6 +29036,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -28728,6 +29057,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -28744,6 +29078,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -28767,6 +29106,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -28783,6 +29127,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -28794,6 +29143,11 @@ Object { "type": "string", }, }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "preferences": Object { "stripUnknown": Object { "objects": false, @@ -28807,6 +29161,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "boolean", }, "scriptId": Object { @@ -28829,6 +29188,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -28845,6 +29209,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "number", }, "singularityxdrKeyword": Object { @@ -28853,6 +29222,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -28869,6 +29243,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -28885,6 +29264,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -32824,6 +33208,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-min-length": 1, + }, + ], "rules": Array [ Object { "args": Object { @@ -32880,6 +33269,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-min-length": 1, + }, + ], "rules": Array [ Object { "args": Object { @@ -32900,6 +33294,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-min-length": 1, + }, + ], "rules": Array [ Object { "args": Object { @@ -32925,6 +33324,11 @@ Object { "type": "object", }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -32959,6 +33363,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-min-length": 1, + }, + ], "rules": Array [ Object { "args": Object { @@ -33026,6 +33435,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -33105,6 +33519,11 @@ Object { "type": "string", }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -33138,6 +33557,11 @@ Object { "type": "string", }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -33152,6 +33576,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-min-length": 1, + }, + ], "rules": Array [ Object { "args": Object { @@ -33237,6 +33666,11 @@ Object { "type": "string", }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -33270,6 +33704,11 @@ Object { "type": "string", }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -34626,6 +35065,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-min-length": 1, + }, + ], "rules": Array [ Object { "args": Object { @@ -34764,6 +35208,11 @@ Object { "type": "number", }, }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "preferences": Object { "stripUnknown": Object { "objects": false, @@ -34777,6 +35226,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -34883,6 +35337,11 @@ Object { "type": "number", }, }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "preferences": Object { "stripUnknown": Object { "objects": false, @@ -34896,6 +35355,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -35205,6 +35669,11 @@ Object { }, }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "alternatives", }, "ca": Object { @@ -35213,6 +35682,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -35255,6 +35729,11 @@ Object { }, }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "alternatives", }, "hasAuth": Object { @@ -35277,6 +35756,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-get-additional-properties": [Function], + }, + ], "rules": Array [ Object { "args": Object { @@ -35422,6 +35906,11 @@ Object { }, }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "alternatives", }, }, @@ -35668,6 +36157,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -35904,6 +36398,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -35920,6 +36419,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -35936,6 +36440,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -35966,6 +36475,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -35982,6 +36496,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -35998,6 +36517,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { diff --git a/x-pack/plugins/aiops/README.md b/x-pack/plugins/aiops/README.md index 2ea2a315c594f..7be0e3b59aa68 100755 --- a/x-pack/plugins/aiops/README.md +++ b/x-pack/plugins/aiops/README.md @@ -14,6 +14,16 @@ The route handler sets up `response_stream_factory:responseStreamFactory()` to c The response stream factory acts as a wrapper to set up the stream itself, the stream state (for example to set if it's running etc.), some custom actions on the stream as well as analysis handlers that fetch data from ES and pass it on to the stream. -## Development - -See the [kibana contributing guide](https://github.com/elastic/kibana/blob/main/CONTRIBUTING.md) for instructions setting up your development environment. +### Analysis details + +Here are some more details on the steps involved to do Log Rate Analysis: + +- **Index info**: This gathers information from the selected index to identify which type of analysis will be run and which fields will be used for analysis. + - **Zero Docs Fallback**: If there are no docs in either `baseline` or `baseline`, the analysis will not identify statistically significant items but will just run regular `terms` aggregations and return the top items for the deviation time range. + - **Field identification**: This runs field caps with the `include_empty_fields=false` option to get populated fields. Custom Kibana code then identifies `keyword/ip/boolean` and `text/match_only/text` fields suitable for analysis. When there's a field with both `keyword/text` mappings the `keyword` one will be preferred unless there's an override defined (currently `message` and `error.message`). +- **Statistically significant items**: + - **General notes**: Both aggregatable fields and log pattern queries will be wrapped in `random_sampler` aggregations . The p-value threshold to define statistically significant items is `0.02`. + - **Aggregatable fields**: For this we use the ES `significant_terms` aggregation with the p-value score option (https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-significantterms-aggregation.html#p-value-score). The `baseline` time range is used as the `background_filter`, the `deviation` time range is used for the query part (=foreground). + - **Log patterns**: To identify statistically significant entries in text fields there is not an ES equivalent to `significant_terms`, so we cannot run a single query for a field to do this. Instead, we use the following approach: We use the `categorize_text` aggregation to identify top text patterns across the baseline and deviation timerange (not yet statistically significant!). Then, for each identified text pattern, we get the document counts for both baseline and deviation. We then use the retrieved counts to run them against the same Kibana code we use for the Data Drift View to detect if there's a statistically significant difference in the counts (`@kbn/ml-chi2test` package, `x-pack/packages/ml/chi2test/critical_table_lookup.ts`). Text field pattern support was added in 8.11, see [#167467](https://github.com/elastic/kibana/issues/167467) for more details. +- **Grouping**: The grouping tries to identify co-occurences of identified significant items. Again, we have to take different approaches for aggregatable fields and log patterns, but eventually we combine the results. The `frequent_item_sets` aggregation is used as a first step to get co-occurence stats of aggregatable fields. This can be a heavy aggregation so we limit how many values per field we pass on to the agg (`50` at the moment). For each possible aggregatable field to log pattern relation we query the doc count. The result of the `frequent_item_sets` aggregation and those doc counts get then passed on to custom code (derived but over time slighty improved from the original PoC Python Notebooks) to transform that raw data into groups (`x-pack/packages/ml/aiops_log_rate_analysis/queries/get_significant_item_groups.ts`). +- **Histogram data**: In addition to the analysis itself the endpoint returns histogram data for the result table sparklines. diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/index_info_handler.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/index_info_handler.ts index 2a29aa6c13e81..730b11cdd28a5 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/index_info_handler.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/index_info_handler.ts @@ -37,7 +37,6 @@ export const indexInfoHandlerFactory = const textFieldCandidates: string[] = []; - let totalDocCount = 0; let zeroDocsFallback = false; if (!requestBody.overrides?.remainingFieldCandidates) { @@ -63,10 +62,12 @@ export const indexInfoHandlerFactory = abortSignal ); + logDebugMessage(`Baseline document count: ${indexInfo.baselineTotalDocCount}`); + logDebugMessage(`Deviation document count: ${indexInfo.deviationTotalDocCount}`); + fieldCandidates.push(...indexInfo.fieldCandidates); fieldCandidatesCount = fieldCandidates.length; textFieldCandidates.push(...indexInfo.textFieldCandidates); - totalDocCount = indexInfo.deviationTotalDocCount; zeroDocsFallback = indexInfo.zeroDocsFallback; } catch (e) { if (!isRequestAbortedError(e)) { @@ -77,8 +78,6 @@ export const indexInfoHandlerFactory = return; } - logDebugMessage(`Total document count: ${totalDocCount}`); - stateHandler.loaded(LOADED_FIELD_CANDIDATES, false); responseStream.pushPingWithTimeout(); diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/route_handler_factory.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/route_handler_factory.ts index 0d0319e9b1ecf..69b9cc923799d 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/route_handler_factory.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/route_handler_factory.ts @@ -81,7 +81,7 @@ export function routeHandlerFactory( analysis.overridesHandler(); responseStream.pushPingWithTimeout(); - // Step 1: Index Info: Field candidates, total doc count, sample probability + // Step 1: Index Info: Field candidates and zero docs fallback flag const indexInfo = await analysis.indexInfoHandler(); if (!indexInfo) { diff --git a/x-pack/plugins/alerting/public/application/maintenance_windows.tsx b/x-pack/plugins/alerting/public/application/maintenance_windows.tsx index bb2ba1847abac..5f4b81bb716f7 100644 --- a/x-pack/plugins/alerting/public/application/maintenance_windows.tsx +++ b/x-pack/plugins/alerting/public/application/maintenance_windows.tsx @@ -7,17 +7,18 @@ import React, { Suspense } from 'react'; import ReactDOM from 'react-dom'; -import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; -import { Router, Routes, Route } from '@kbn/shared-ux-router'; + +import { EuiLoadingSpinner } from '@elastic/eui'; import { CoreStart } from '@kbn/core/public'; -import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; -import { KibanaContextProvider, KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { Storage } from '@kbn/kibana-utils-plugin/public'; import { ManagementAppMountParams } from '@kbn/management-plugin/public'; -import { EuiLoadingSpinner } from '@elastic/eui'; -import { AlertingPluginStart } from '../plugin'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; +import { Route, Router, Routes } from '@kbn/shared-ux-router'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { MAINTENANCE_WINDOW_PATHS } from '../../common'; import { useLicense } from '../hooks/use_license'; +import { AlertingPluginStart } from '../plugin'; const MaintenanceWindowsLazy: React.FC = React.lazy(() => import('../pages/maintenance_windows')); const MaintenanceWindowsCreateLazy: React.FC = React.lazy( @@ -76,14 +77,13 @@ export const renderApp = ({ mountParams: ManagementAppMountParams; kibanaVersion: string; }) => { - const { element, history, theme$ } = mountParams; - const i18nCore = core.i18n; - const isDarkMode = core.theme.getTheme().darkMode; + const { element, history } = mountParams; + const { i18n, theme } = core; const queryClient = new QueryClient(); ReactDOM.render( - + - - - - - - - + + + - , + , element ); return () => { diff --git a/x-pack/plugins/alerting/public/lib/test_utils.tsx b/x-pack/plugins/alerting/public/lib/test_utils.tsx index 6e1642bfe0d36..9c7b59a1527c4 100644 --- a/x-pack/plugins/alerting/public/lib/test_utils.tsx +++ b/x-pack/plugins/alerting/public/lib/test_utils.tsx @@ -6,14 +6,14 @@ */ import React from 'react'; -import { of, BehaviorSubject } from 'rxjs'; +import { BehaviorSubject } from 'rxjs'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { I18nProvider } from '@kbn/i18n-react'; -import { KibanaContextProvider, KibanaThemeProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; +import { KibanaThemeProvider } from '@kbn/react-kibana-context-theme'; import { render as reactRender, RenderOptions, RenderResult } from '@testing-library/react'; import { Capabilities, CoreStart } from '@kbn/core/public'; import { coreMock } from '@kbn/core/public/mocks'; -import { euiDarkVars } from '@kbn/ui-theme'; import type { ILicense } from '@kbn/licensing-plugin/public'; import { licensingMock } from '@kbn/licensing-plugin/public/mocks'; @@ -40,8 +40,6 @@ export const createAppMockRenderer = ({ capabilities, license, }: AppMockRendererArgs = {}): AppMockRenderer => { - const theme$ = of({ eui: euiDarkVars, darkMode: true }); - const licensingPluginMock = licensingMock.createStart(); const queryClient = new QueryClient({ @@ -83,7 +81,7 @@ export const createAppMockRenderer = ({ }; const AppWrapper: React.FC<{ children: React.ReactElement }> = React.memo(({ children }) => ( - + {children} diff --git a/x-pack/plugins/alerting/server/application/rule/methods/bulk_edit/bulk_edit_rules.test.ts b/x-pack/plugins/alerting/server/application/rule/methods/bulk_edit/bulk_edit_rules.test.ts index bc8ca1606e43e..d916a81b5fc81 100644 --- a/x-pack/plugins/alerting/server/application/rule/methods/bulk_edit/bulk_edit_rules.test.ts +++ b/x-pack/plugins/alerting/server/application/rule/methods/bulk_edit/bulk_edit_rules.test.ts @@ -1581,6 +1581,114 @@ describe('bulkEdit()', () => { } `); }); + + test('should throw an error if the user does not have privileges to execute the action', async () => { + const defaultAction = { + frequency: { + notifyWhen: 'onActiveAlert' as const, + summary: false, + throttle: null, + }, + group: 'default', + id: '1', + params: {}, + }; + + const systemAction = { + id: 'system_action-id', + params: {}, + }; + + unsecuredSavedObjectsClient.bulkCreate.mockResolvedValue({ + saved_objects: [ + { + ...existingRule, + attributes: { + ...existingRule.attributes, + actions: [ + { + frequency: { + notifyWhen: 'onActiveAlert' as const, + summary: false, + throttle: null, + }, + group: 'default', + params: {}, + actionRef: 'action_0', + actionTypeId: 'test-1', + uuid: '222', + }, + { + params: {}, + actionRef: 'system_action:system_action-id', + actionTypeId: 'test-2', + uuid: '222', + }, + ], + }, + references: [ + { + name: 'action_0', + type: 'action', + id: '1', + }, + ], + }, + ], + }); + + actionsClient.getBulk.mockResolvedValue([ + { + id: '1', + actionTypeId: 'test-1', + config: {}, + isMissingSecrets: false, + name: 'test default connector', + isPreconfigured: false, + isDeprecated: false, + isSystemAction: false, + }, + { + id: 'system_action-id', + actionTypeId: 'test-2', + config: {}, + isMissingSecrets: false, + name: 'system action connector', + isPreconfigured: false, + isDeprecated: false, + isSystemAction: true, + }, + ]); + + actionsAuthorization.ensureAuthorized.mockRejectedValueOnce( + new Error('Unauthorized to execute actions') + ); + + const res = await rulesClient.bulkEdit({ + filter: '', + operations: [ + { + field: 'actions', + operation: 'add', + value: [defaultAction, systemAction], + }, + ], + }); + + expect(res.rules.length).toBe(0); + expect(res.skipped.length).toBe(0); + expect(res.total).toBe(1); + + expect(res.errors).toEqual([ + { + message: 'Unauthorized to execute actions', + rule: { + id: '1', + name: 'my rule name', + }, + }, + ]); + }); }); describe('index pattern operations', () => { diff --git a/x-pack/plugins/alerting/server/application/rule/methods/bulk_edit/bulk_edit_rules.ts b/x-pack/plugins/alerting/server/application/rule/methods/bulk_edit/bulk_edit_rules.ts index 53508a2de0ceb..e31b1ffa8c1dc 100644 --- a/x-pack/plugins/alerting/server/application/rule/methods/bulk_edit/bulk_edit_rules.ts +++ b/x-pack/plugins/alerting/server/application/rule/methods/bulk_edit/bulk_edit_rules.ts @@ -15,7 +15,7 @@ import { SavedObjectsFindResult, SavedObjectsUpdateResponse, } from '@kbn/core/server'; -import { validateSystemActions } from '../../../../lib/validate_system_actions'; +import { validateAndAuthorizeSystemActions } from '../../../../lib/validate_authorize_system_actions'; import { RuleAction, RuleSystemAction } from '../../../../../common'; import { RULE_SAVED_OBJECT_TYPE } from '../../../../saved_objects'; import { BulkActionSkipResult } from '../../../../../common/bulk_edit'; @@ -682,10 +682,12 @@ async function getUpdatedAttributesFromOperations({ value: [...genActions, ...genSystemActions], }; - await validateSystemActions({ + await validateAndAuthorizeSystemActions({ actionsClient, + actionsAuthorization: context.actionsAuthorization, connectorAdapterRegistry: context.connectorAdapterRegistry, systemActions: genSystemActions, + rule: { consumer: updatedRule.consumer }, }); try { diff --git a/x-pack/plugins/alerting/server/application/rule/methods/create/create_rule.test.ts b/x-pack/plugins/alerting/server/application/rule/methods/create/create_rule.test.ts index 7d1fe07d8a7a4..50f5abb5d3d73 100644 --- a/x-pack/plugins/alerting/server/application/rule/methods/create/create_rule.test.ts +++ b/x-pack/plugins/alerting/server/application/rule/methods/create/create_rule.test.ts @@ -4353,5 +4353,35 @@ describe('create()', () => { `[Error: Cannot use the same system action twice]` ); }); + + test('should throw an error if the user does not have privileges to execute the action', async () => { + actionsAuthorization.ensureAuthorized.mockRejectedValueOnce( + new Error('Unauthorized to execute actions') + ); + + const data = getMockData({ + actions: [ + { + group: 'default', + id: '1', + params: { + foo: true, + }, + }, + ], + systemActions: [ + { + id: 'system_action-id', + params: { + foo: 'test', + }, + }, + ], + }); + + await expect(() => rulesClient.create({ data })).rejects.toMatchInlineSnapshot( + `[Error: Unauthorized to execute actions]` + ); + }); }); }); diff --git a/x-pack/plugins/alerting/server/application/rule/methods/create/create_rule.ts b/x-pack/plugins/alerting/server/application/rule/methods/create/create_rule.ts index 7de8c7effa8f3..e86744b421bb8 100644 --- a/x-pack/plugins/alerting/server/application/rule/methods/create/create_rule.ts +++ b/x-pack/plugins/alerting/server/application/rule/methods/create/create_rule.ts @@ -8,7 +8,7 @@ import Semver from 'semver'; import Boom from '@hapi/boom'; import { SavedObject, SavedObjectsUtils } from '@kbn/core/server'; import { withSpan } from '@kbn/apm-utils'; -import { validateSystemActions } from '../../../../lib/validate_system_actions'; +import { validateAndAuthorizeSystemActions } from '../../../../lib/validate_authorize_system_actions'; import { RULE_SAVED_OBJECT_TYPE } from '../../../../saved_objects'; import { parseDuration, getRuleCircuitBreakerErrorMessage } from '../../../../../common'; import { WriteOperations, AlertingAuthorizationEntity } from '../../../../authorization'; @@ -98,7 +98,7 @@ export async function createRule( } try { - await withSpan({ name: 'authorization.ensureAuthorized', type: 'rules' }, () => + await withSpan({ name: 'authorization.ensureAuthorized', type: 'rules' }, async () => context.authorization.ensureAuthorized({ ruleTypeId: data.alertTypeId, consumer: data.consumer, @@ -149,11 +149,13 @@ export async function createRule( validateActions(context, ruleType, data, allowMissingConnectorSecrets) ); - await withSpan({ name: 'validateSystemActions', type: 'rules' }, () => - validateSystemActions({ + await withSpan({ name: 'validateAndAuthorizeSystemActions', type: 'rules' }, () => + validateAndAuthorizeSystemActions({ actionsClient, + actionsAuthorization: context.actionsAuthorization, connectorAdapterRegistry: context.connectorAdapterRegistry, systemActions: data.systemActions, + rule: { consumer: data.consumer }, }) ); diff --git a/x-pack/plugins/alerting/server/authorization/alerting_authorization.test.ts b/x-pack/plugins/alerting/server/authorization/alerting_authorization.test.ts index 882d3bd103531..da2774e263b58 100644 --- a/x-pack/plugins/alerting/server/authorization/alerting_authorization.test.ts +++ b/x-pack/plugins/alerting/server/authorization/alerting_authorization.test.ts @@ -750,6 +750,49 @@ describe('AlertingAuthorization', () => { `"Unauthorized by \\"myOtherApp\\" to create \\"myType\\" alert"` ); }); + + test('checks additional privileges correctly', async () => { + const { authorization } = mockSecurity(); + const checkPrivileges: jest.MockedFunction< + ReturnType + > = jest.fn(); + authorization.checkPrivilegesDynamicallyWithRequest.mockReturnValue(checkPrivileges); + const alertAuthorization = new AlertingAuthorization({ + request, + authorization, + ruleTypeRegistry, + features, + getSpace, + getSpaceId, + }); + + checkPrivileges.mockResolvedValueOnce({ + username: 'some-user', + hasAllRequested: true, + privileges: { kibana: [] }, + }); + + await alertAuthorization.ensureAuthorized({ + ruleTypeId: 'myType', + consumer: 'myApp', + operation: WriteOperations.Create, + entity: AlertingAuthorizationEntity.Rule, + additionalPrivileges: ['test/create'], + }); + + expect(ruleTypeRegistry.get).toHaveBeenCalledWith('myType'); + + expect(authorization.actions.alerting.get).toHaveBeenCalledTimes(1); + expect(authorization.actions.alerting.get).toHaveBeenCalledWith( + 'myType', + 'myApp', + 'rule', + 'create' + ); + expect(checkPrivileges).toHaveBeenCalledWith({ + kibana: [mockAuthorizationAction('myType', 'myApp', 'rule', 'create'), 'test/create'], + }); + }); }); describe('getFindAuthorizationFilter', () => { diff --git a/x-pack/plugins/alerting/server/authorization/alerting_authorization.ts b/x-pack/plugins/alerting/server/authorization/alerting_authorization.ts index 68edc6667aeed..f5bf6ee049fbf 100644 --- a/x-pack/plugins/alerting/server/authorization/alerting_authorization.ts +++ b/x-pack/plugins/alerting/server/authorization/alerting_authorization.ts @@ -62,6 +62,7 @@ export interface EnsureAuthorizedOpts { consumer: string; operation: ReadOperations | WriteOperations; entity: AlertingAuthorizationEntity; + additionalPrivileges?: string[]; } interface HasPrivileges { @@ -172,6 +173,7 @@ export class AlertingAuthorization { consumer: legacyConsumer, operation, entity, + additionalPrivileges = [], }: EnsureAuthorizedOpts) { const { authorization } = this; const ruleType = this.ruleTypeRegistry.get(ruleTypeId); @@ -186,7 +188,10 @@ export class AlertingAuthorization { const checkPrivileges = authorization.checkPrivilegesDynamicallyWithRequest(this.request); const { hasAllRequested } = await checkPrivileges({ - kibana: [authorization.actions.alerting.get(ruleTypeId, consumer, entity, operation)], + kibana: [ + authorization.actions.alerting.get(ruleTypeId, consumer, entity, operation), + ...additionalPrivileges, + ], }); if (!isAvailableConsumer) { diff --git a/x-pack/plugins/alerting/server/connector_adapters/get_system_action_kibana_privileges.test.ts b/x-pack/plugins/alerting/server/connector_adapters/get_system_action_kibana_privileges.test.ts new file mode 100644 index 0000000000000..9f5d053cbc2b3 --- /dev/null +++ b/x-pack/plugins/alerting/server/connector_adapters/get_system_action_kibana_privileges.test.ts @@ -0,0 +1,102 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { schema } from '@kbn/config-schema'; +import { ConnectorAdapterRegistry } from './connector_adapter_registry'; +import { getSystemActionKibanaPrivileges } from './get_system_action_kibana_privileges'; +import type { ConnectorAdapter } from './types'; + +describe('getSystemActionKibanaPrivileges', () => { + const connectorAdapter: ConnectorAdapter = { + connectorTypeId: '.test', + ruleActionParamsSchema: schema.object({ foo: schema.string() }), + buildActionParams: jest.fn(), + getKibanaPrivileges: (args) => [`my-priv:${args.consumer}`], + }; + + const systemActions = [ + { id: 'my-id', actionTypeId: '.test', params: {} }, + { id: 'my-id-2', actionTypeId: '.test-2', params: {} }, + ]; + + let registry: ConnectorAdapterRegistry; + + beforeEach(() => { + registry = new ConnectorAdapterRegistry(); + registry.register(connectorAdapter); + + registry.register({ + ...connectorAdapter, + connectorTypeId: '.test-2', + getKibanaPrivileges: (args) => [`my-priv-2:${args.consumer}`], + }); + + registry.register({ + ...connectorAdapter, + connectorTypeId: '.no-priv', + }); + }); + + it('should return an empty array if systemActions are empty', () => { + const privileges = getSystemActionKibanaPrivileges({ + connectorAdapterRegistry: registry, + systemActions: [], + rule: { consumer: 'stackAlerts' }, + }); + + expect(privileges).toEqual([]); + }); + + it('should return an empty array if systemActions are not defined', () => { + const privileges = getSystemActionKibanaPrivileges({ + connectorAdapterRegistry: registry, + rule: { consumer: 'stackAlerts' }, + }); + + expect(privileges).toEqual([]); + }); + + it('should return the privileges correctly', () => { + const privileges = getSystemActionKibanaPrivileges({ + connectorAdapterRegistry: registry, + systemActions, + rule: { consumer: 'stackAlerts' }, + }); + + expect(privileges).toEqual(['my-priv:stackAlerts', 'my-priv-2:stackAlerts']); + }); + + it('should return the privileges correctly with system actions without connector adapter', () => { + const privileges = getSystemActionKibanaPrivileges({ + connectorAdapterRegistry: registry, + systemActions: [...systemActions, { id: 'my-id-2', actionTypeId: '.not-valid', params: {} }], + rule: { consumer: 'stackAlerts' }, + }); + + expect(privileges).toEqual(['my-priv:stackAlerts', 'my-priv-2:stackAlerts']); + }); + + it('should return the privileges correctly with system actions without getKibanaPrivileges defined', () => { + const privileges = getSystemActionKibanaPrivileges({ + connectorAdapterRegistry: registry, + systemActions: [...systemActions, { id: 'my-id-2', actionTypeId: '.no-priv', params: {} }], + rule: { consumer: 'stackAlerts' }, + }); + + expect(privileges).toEqual(['my-priv:stackAlerts', 'my-priv-2:stackAlerts']); + }); + + it('should not return duplicated privileges', () => { + const privileges = getSystemActionKibanaPrivileges({ + connectorAdapterRegistry: registry, + systemActions: [systemActions[0], systemActions[0]], + rule: { consumer: 'stackAlerts' }, + }); + + expect(privileges).toEqual(['my-priv:stackAlerts']); + }); +}); diff --git a/x-pack/plugins/alerting/server/connector_adapters/get_system_action_kibana_privileges.ts b/x-pack/plugins/alerting/server/connector_adapters/get_system_action_kibana_privileges.ts new file mode 100644 index 0000000000000..2ffaaf5ead318 --- /dev/null +++ b/x-pack/plugins/alerting/server/connector_adapters/get_system_action_kibana_privileges.ts @@ -0,0 +1,29 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { RuleSystemAction } from '../types'; +import { ConnectorAdapterRegistry } from './connector_adapter_registry'; + +interface Args { + connectorAdapterRegistry: ConnectorAdapterRegistry; + rule: { consumer: string }; + systemActions?: RuleSystemAction[]; +} + +export const getSystemActionKibanaPrivileges = ({ + connectorAdapterRegistry, + systemActions = [], + rule, +}: Args): string[] => { + const kibanaPrivileges = systemActions + .filter((action) => connectorAdapterRegistry.has(action.actionTypeId)) + .map((action) => connectorAdapterRegistry.get(action.actionTypeId)) + .map((adapter) => adapter.getKibanaPrivileges?.({ consumer: rule.consumer }) ?? []) + .flat(); + + return Array.from(new Set(kibanaPrivileges)); +}; diff --git a/x-pack/plugins/alerting/server/connector_adapters/types.ts b/x-pack/plugins/alerting/server/connector_adapters/types.ts index e2bd2d7ed2c93..4a9ab393270b7 100644 --- a/x-pack/plugins/alerting/server/connector_adapters/types.ts +++ b/x-pack/plugins/alerting/server/connector_adapters/types.ts @@ -38,4 +38,5 @@ export interface ConnectorAdapter< */ ruleActionParamsSchema: ObjectType; buildActionParams: (args: BuildActionParamsArgs) => ConnectorParams; + getKibanaPrivileges?: ({ consumer }: { consumer: string }) => string[]; } diff --git a/x-pack/plugins/alerting/server/integration_tests/__snapshots__/serverless_upgrade_and_rollback_checks.test.ts.snap b/x-pack/plugins/alerting/server/integration_tests/__snapshots__/serverless_upgrade_and_rollback_checks.test.ts.snap index af6c6fc130022..bbfa2fb3bb28b 100644 --- a/x-pack/plugins/alerting/server/integration_tests/__snapshots__/serverless_upgrade_and_rollback_checks.test.ts.snap +++ b/x-pack/plugins/alerting/server/integration_tests/__snapshots__/serverless_upgrade_and_rollback_checks.test.ts.snap @@ -16,6 +16,14 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-min-length": 1, + }, + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -87,6 +95,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-min-length": 1, + }, + ], "rules": Array [ Object { "args": Object { @@ -148,6 +161,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-min-length": 1, + }, + ], "rules": Array [ Object { "args": Object { @@ -244,6 +262,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-min-length": 1, + }, + ], "rules": Array [ Object { "args": Object { @@ -442,6 +465,11 @@ Object { "type": "object", }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -464,6 +492,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-min-length": 1, + }, + ], "rules": Array [ Object { "args": Object { @@ -521,6 +554,11 @@ Object { }, }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "alternatives", }, "termSize": Object { @@ -529,6 +567,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -679,6 +722,14 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-min-length": 1, + }, + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -704,6 +755,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-min-length": 1, + }, + ], "rules": Array [ Object { "args": Object { @@ -789,6 +845,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-min-length": 1, + }, + ], "rules": Array [ Object { "args": Object { @@ -809,6 +870,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-min-length": 1, + }, + ], "rules": Array [ Object { "args": Object { @@ -831,12 +897,22 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "any", }, "boundaryIndexTitle": Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-min-length": 1, + }, + ], "rules": Array [ Object { "args": Object { @@ -859,6 +935,14 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-min-length": 1, + }, + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -879,6 +963,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-min-length": 1, + }, + ], "rules": Array [ Object { "args": Object { @@ -899,6 +988,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-min-length": 1, + }, + ], "rules": Array [ Object { "args": Object { @@ -919,6 +1013,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-min-length": 1, + }, + ], "rules": Array [ Object { "args": Object { @@ -939,6 +1038,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-min-length": 1, + }, + ], "rules": Array [ Object { "args": Object { @@ -959,6 +1063,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-min-length": 1, + }, + ], "rules": Array [ Object { "args": Object { @@ -979,6 +1088,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-min-length": 1, + }, + ], "rules": Array [ Object { "args": Object { @@ -1001,6 +1115,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "any", }, }, @@ -1029,6 +1148,14 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-min-length": 1, + }, + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -1073,6 +1200,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -1121,6 +1253,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-min-length": 1, + }, + ], "rules": Array [ Object { "args": Object { @@ -1149,6 +1286,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-min-length": 1, + }, + ], "rules": Array [ Object { "args": Object { @@ -1186,6 +1328,14 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-min-length": 1, + }, + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -1208,6 +1358,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -1339,6 +1494,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-min-length": 1, + }, + ], "rules": Array [ Object { "args": Object { @@ -1554,6 +1714,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -1570,6 +1735,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -1640,6 +1810,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -1673,6 +1848,11 @@ Object { "type": "string", }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "array", }, "searchConfiguration": Object { @@ -1731,6 +1911,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-get-additional-properties": [Function], + }, + ], "rules": Array [ Object { "args": Object { @@ -1773,6 +1958,11 @@ Object { "type": "object", }, }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "preferences": Object { "stripUnknown": Object { "objects": false, @@ -1786,6 +1976,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -1808,6 +2003,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "boolean", }, "windowSize": Object { @@ -1931,6 +2131,11 @@ Object { "type": "string", }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "array", }, "searchConfiguration": Object { @@ -1989,6 +2194,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-get-additional-properties": [Function], + }, + ], "rules": Array [ Object { "args": Object { @@ -2031,6 +2241,11 @@ Object { "type": "object", }, }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "preferences": Object { "stripUnknown": Object { "objects": false, @@ -2044,6 +2259,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -2066,6 +2286,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -2082,6 +2307,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -2098,6 +2328,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "boolean", }, "windowSize": Object { @@ -2177,6 +2412,11 @@ Object { "type": "string", }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "array", }, "searchConfiguration": Object { @@ -2235,6 +2475,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-get-additional-properties": [Function], + }, + ], "rules": Array [ Object { "args": Object { @@ -2277,6 +2522,11 @@ Object { "type": "object", }, }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "preferences": Object { "stripUnknown": Object { "objects": false, @@ -2290,6 +2540,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -2312,6 +2567,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -2328,6 +2588,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -2344,6 +2609,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "boolean", }, "windowSize": Object { @@ -2393,6 +2663,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "boolean", }, "criteria": Object { @@ -2490,6 +2765,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -2511,6 +2791,11 @@ Object { "type": "any", }, }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "preferences": Object { "stripUnknown": Object { "objects": false, @@ -2579,6 +2864,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -2610,6 +2900,11 @@ Object { "type": "number", }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "array", }, }, @@ -2629,6 +2924,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -2700,6 +3000,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "boolean", }, "alertOnNoData": Object { @@ -2708,6 +3013,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "boolean", }, "criteria": Object { @@ -2734,6 +3044,11 @@ Object { "only": true, "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "any", }, "comparator": Object { @@ -2762,6 +3077,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -2778,6 +3098,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -2913,6 +3238,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -3053,6 +3383,11 @@ Object { }, }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "alternatives", }, "searchConfiguration": Object { @@ -3084,6 +3419,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-get-additional-properties": [Function], + }, + ], "rules": Array [ Object { "args": Object { @@ -3119,6 +3459,14 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-get-additional-properties": [Function], + }, + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -3157,6 +3505,11 @@ Object { "type": "object", }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "array", }, "index": Object { @@ -3196,6 +3549,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "boolean", }, "allowNoIndex": Object { @@ -3204,6 +3562,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "boolean", }, "fieldAttrs": Object { @@ -3212,6 +3575,14 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-get-additional-properties": [Function], + }, + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -3244,6 +3615,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "number", }, "customDescription": Object { @@ -3252,6 +3628,14 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-max-length": 300, + }, + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -3274,6 +3658,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -3304,6 +3693,14 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-get-additional-properties": [Function], + }, + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -3336,6 +3733,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -3352,6 +3754,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "any", }, }, @@ -3374,6 +3781,14 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-get-additional-properties": [Function], + }, + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -3406,6 +3821,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "boolean", }, "count": Object { @@ -3414,6 +3834,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -3430,6 +3855,14 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-max-length": 300, + }, + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -3452,6 +3885,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -3485,6 +3923,11 @@ Object { "type": "string", }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "array", }, "format": Object { @@ -3500,6 +3943,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -3516,9 +3964,19 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "any", }, }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "preferences": Object { "stripUnknown": Object { "objects": false, @@ -3530,6 +3988,11 @@ Object { "flags": Object { "error": [Function], }, + "metas": Array [ + Object { + "x-oas-max-length": 1000, + }, + ], "rules": Array [ Object { "args": Object { @@ -3552,6 +4015,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "boolean", }, "runtimeField": Object { @@ -3577,6 +4045,14 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-max-length": 300, + }, + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -3599,6 +4075,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -3622,6 +4103,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -3638,9 +4124,19 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "any", }, }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "preferences": Object { "stripUnknown": Object { "objects": false, @@ -3654,6 +4150,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -3686,6 +4187,11 @@ Object { "type": "string", }, }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "preferences": Object { "stripUnknown": Object { "objects": false, @@ -3810,6 +4316,14 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-get-additional-properties": [Function], + }, + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -3842,6 +4356,14 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-max-length": 300, + }, + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -3864,6 +4386,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -3887,6 +4414,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -3903,9 +4435,19 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "any", }, }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "preferences": Object { "stripUnknown": Object { "objects": false, @@ -3919,6 +4461,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -4057,6 +4604,11 @@ Object { "type": "string", }, }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "preferences": Object { "stripUnknown": Object { "objects": false, @@ -4084,6 +4636,11 @@ Object { }, }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "alternatives", }, "script": Object { @@ -4092,6 +4649,14 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-max-length": 1000000, + }, + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -4114,6 +4679,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "boolean", }, "searchable": Object { @@ -4122,6 +4692,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "boolean", }, "shortDotsEnable": Object { @@ -4130,6 +4705,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "boolean", }, "subType": Object { @@ -4161,6 +4741,11 @@ Object { "type": "string", }, }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "preferences": Object { "stripUnknown": Object { "objects": false, @@ -4190,6 +4775,11 @@ Object { "type": "string", }, }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "preferences": Object { "stripUnknown": Object { "objects": false, @@ -4198,6 +4788,11 @@ Object { "type": "object", }, }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "preferences": Object { "stripUnknown": Object { "objects": false, @@ -4211,6 +4806,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-max-length": 1000, + }, + ], "rules": Array [ Object { "args": Object { @@ -4247,6 +4847,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -4263,6 +4868,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -4296,6 +4906,11 @@ Object { "type": "string", }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "array", }, "runtimeFieldMap": Object { @@ -4304,6 +4919,14 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-get-additional-properties": [Function], + }, + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -4342,6 +4965,14 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-max-length": 300, + }, + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -4364,6 +4995,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -4387,6 +5023,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -4403,9 +5044,19 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "any", }, }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "preferences": Object { "stripUnknown": Object { "objects": false, @@ -4419,6 +5070,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -4451,6 +5107,11 @@ Object { "type": "string", }, }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "preferences": Object { "stripUnknown": Object { "objects": false, @@ -4575,6 +5236,14 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-get-additional-properties": [Function], + }, + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -4607,6 +5276,14 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-max-length": 300, + }, + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -4629,6 +5306,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -4652,6 +5334,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -4668,9 +5355,19 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "any", }, }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "preferences": Object { "stripUnknown": Object { "objects": false, @@ -4684,6 +5381,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -4822,6 +5524,11 @@ Object { "type": "string", }, }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "preferences": Object { "stripUnknown": Object { "objects": false, @@ -4905,6 +5612,11 @@ Object { }, }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "alternatives", }, "value": Object { @@ -4930,6 +5642,11 @@ Object { "type": "object", }, ], + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "type": "array", }, "timeFieldName": Object { @@ -4938,6 +5655,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -4968,6 +5690,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -4986,6 +5713,11 @@ Object { "unknown": true, }, "keys": Object {}, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "preferences": Object { "stripUnknown": Object { "objects": false, @@ -4999,6 +5731,11 @@ Object { "error": [Function], "presence": "optional", }, + "metas": Array [ + Object { + "x-oas-optional": true, + }, + ], "rules": Array [ Object { "args": Object { @@ -6811,6 +7548,52 @@ Object { }, Object { "properties": Object { + "alertSuppression": Object { + "additionalProperties": false, + "properties": Object { + "duration": Object { + "additionalProperties": false, + "properties": Object { + "unit": Object { + "enum": Array [ + "s", + "m", + "h", + ], + "type": "string", + }, + "value": Object { + "minimum": 1, + "type": "integer", + }, + }, + "required": Array [ + "value", + "unit", + ], + "type": "object", + }, + "groupBy": Object { + "items": Object { + "type": "string", + }, + "maxItems": 3, + "minItems": 1, + "type": "array", + }, + "missingFieldsStrategy": Object { + "enum": Array [ + "doNotSuppress", + "suppress", + ], + "type": "string", + }, + }, + "required": Array [ + "groupBy", + ], + "type": "object", + }, "dataViewId": Object { "type": "string", }, diff --git a/x-pack/plugins/alerting/server/lib/validate_system_actions.test.ts b/x-pack/plugins/alerting/server/lib/validate_authorize_system_actions.test.ts similarity index 65% rename from x-pack/plugins/alerting/server/lib/validate_system_actions.test.ts rename to x-pack/plugins/alerting/server/lib/validate_authorize_system_actions.test.ts index 7cc7b4041aa08..f69213b4f3bf2 100644 --- a/x-pack/plugins/alerting/server/lib/validate_system_actions.test.ts +++ b/x-pack/plugins/alerting/server/lib/validate_authorize_system_actions.test.ts @@ -5,16 +5,16 @@ * 2.0. */ -import { ActionsClient } from '@kbn/actions-plugin/server'; -import { actionsClientMock } from '@kbn/actions-plugin/server/mocks'; +import { ActionsAuthorization, ActionsClient } from '@kbn/actions-plugin/server'; +import { actionsAuthorizationMock, actionsClientMock } from '@kbn/actions-plugin/server/mocks'; import { schema } from '@kbn/config-schema'; import { ConnectorAdapterRegistry } from '../connector_adapters/connector_adapter_registry'; import { ConnectorAdapter } from '../connector_adapters/types'; import { NormalizedSystemAction } from '../rules_client'; import { RuleSystemAction } from '../types'; -import { validateSystemActions } from './validate_system_actions'; +import { validateAndAuthorizeSystemActions } from './validate_authorize_system_actions'; -describe('validateSystemActionsWithoutRuleTypeId', () => { +describe('validateAndAuthorizeSystemActions', () => { const connectorAdapter: ConnectorAdapter = { connectorTypeId: '.test', ruleActionParamsSchema: schema.object({ foo: schema.string() }), @@ -23,10 +23,13 @@ describe('validateSystemActionsWithoutRuleTypeId', () => { let registry: ConnectorAdapterRegistry; let actionsClient: jest.Mocked; + let actionsAuthorization: jest.Mocked; beforeEach(() => { registry = new ConnectorAdapterRegistry(); actionsClient = actionsClientMock.create(); + actionsAuthorization = actionsAuthorizationMock.create(); + actionsClient.getBulk.mockResolvedValue([ { id: 'system_action-id', @@ -42,10 +45,12 @@ describe('validateSystemActionsWithoutRuleTypeId', () => { }); it('should not validate with empty system actions', async () => { - const res = await validateSystemActions({ + const res = await validateAndAuthorizeSystemActions({ connectorAdapterRegistry: registry, systemActions: [], actionsClient, + actionsAuthorization, + rule: { consumer: 'stackAlerts' }, }); expect(res).toBe(undefined); @@ -68,10 +73,12 @@ describe('validateSystemActionsWithoutRuleTypeId', () => { actionsClient.isSystemAction.mockReturnValue(false); await expect(() => - validateSystemActions({ + validateAndAuthorizeSystemActions({ connectorAdapterRegistry: registry, systemActions, actionsClient, + actionsAuthorization, + rule: { consumer: 'stackAlerts' }, }) ).rejects.toThrowErrorMatchingInlineSnapshot(`"Action not-exist is not a system action"`); }); @@ -91,10 +98,12 @@ describe('validateSystemActionsWithoutRuleTypeId', () => { actionsClient.isSystemAction.mockReturnValue(true); await expect(() => - validateSystemActions({ + validateAndAuthorizeSystemActions({ connectorAdapterRegistry: registry, systemActions, actionsClient, + actionsAuthorization, + rule: { consumer: 'stackAlerts' }, }) ).rejects.toThrowErrorMatchingInlineSnapshot(`"Action not-exist is not a system action"`); }); @@ -114,10 +123,12 @@ describe('validateSystemActionsWithoutRuleTypeId', () => { actionsClient.isSystemAction.mockReturnValue(true); await expect(() => - validateSystemActions({ + validateAndAuthorizeSystemActions({ connectorAdapterRegistry: registry, systemActions, actionsClient, + actionsAuthorization, + rule: { consumer: 'stackAlerts' }, }) ).rejects.toThrowErrorMatchingInlineSnapshot( `"Invalid system action params. System action type: .test - [foo]: expected value of type [string] but got [undefined]"` @@ -145,10 +156,12 @@ describe('validateSystemActionsWithoutRuleTypeId', () => { actionsClient.isSystemAction.mockReturnValue(false); await expect(() => - validateSystemActions({ + validateAndAuthorizeSystemActions({ connectorAdapterRegistry: registry, systemActions, actionsClient, + actionsAuthorization, + rule: { consumer: 'stackAlerts' }, }) ).rejects.toThrowErrorMatchingInlineSnapshot(`"Cannot use the same system action twice"`); }); @@ -195,10 +208,12 @@ describe('validateSystemActionsWithoutRuleTypeId', () => { actionsClient.isSystemAction.mockReturnValue(true); - const res = await validateSystemActions({ + const res = await validateAndAuthorizeSystemActions({ connectorAdapterRegistry: registry, systemActions, actionsClient, + actionsAuthorization, + rule: { consumer: 'stackAlerts' }, }); expect(res).toBe(undefined); @@ -207,5 +222,71 @@ describe('validateSystemActionsWithoutRuleTypeId', () => { ids: ['system_action-id', 'system_action-id-2'], throwIfSystemAction: false, }); + + expect(actionsAuthorization.ensureAuthorized).toBeCalledWith({ + operation: 'execute', + additionalPrivileges: [], + }); + }); + + it('should call ensureAuthorized correctly', async () => { + const systemActions: Array = [ + { + id: 'system_action-id', + uuid: '123', + params: { foo: 'test' }, + }, + { + id: 'system_action-id-2', + uuid: '123', + params: { foo: 'test' }, + actionTypeId: '.test-2', + }, + ]; + + actionsClient.getBulk.mockResolvedValue([ + { + id: 'system_action-id', + actionTypeId: '.test', + config: {}, + isMissingSecrets: false, + name: 'system action connector', + isPreconfigured: false, + isDeprecated: false, + isSystemAction: true, + }, + { + id: 'system_action-id-2', + actionTypeId: '.test-2', + config: {}, + isMissingSecrets: false, + name: 'system action connector 2', + isPreconfigured: false, + isDeprecated: false, + isSystemAction: true, + }, + ]); + + registry.register(connectorAdapter); + registry.register({ + ...connectorAdapter, + connectorTypeId: '.test-2', + getKibanaPrivileges: (args) => [`my-priv-2:${args.consumer}`], + }); + + actionsClient.isSystemAction.mockReturnValue(true); + + await validateAndAuthorizeSystemActions({ + connectorAdapterRegistry: registry, + systemActions, + actionsClient, + actionsAuthorization, + rule: { consumer: 'stackAlerts' }, + }); + + expect(actionsAuthorization.ensureAuthorized).toBeCalledWith({ + operation: 'execute', + additionalPrivileges: ['my-priv-2:stackAlerts'], + }); }); }); diff --git a/x-pack/plugins/alerting/server/lib/validate_system_actions.ts b/x-pack/plugins/alerting/server/lib/validate_authorize_system_actions.ts similarity index 77% rename from x-pack/plugins/alerting/server/lib/validate_system_actions.ts rename to x-pack/plugins/alerting/server/lib/validate_authorize_system_actions.ts index 190b695efffd7..22ab3f32d3d7a 100644 --- a/x-pack/plugins/alerting/server/lib/validate_system_actions.ts +++ b/x-pack/plugins/alerting/server/lib/validate_authorize_system_actions.ts @@ -6,20 +6,25 @@ */ import Boom from '@hapi/boom'; -import { ActionsClient } from '@kbn/actions-plugin/server'; +import { ActionsAuthorization, ActionsClient } from '@kbn/actions-plugin/server'; import { ConnectorAdapterRegistry } from '../connector_adapters/connector_adapter_registry'; +import { getSystemActionKibanaPrivileges } from '../connector_adapters/get_system_action_kibana_privileges'; import { bulkValidateConnectorAdapterActionParams } from '../connector_adapters/validate_rule_action_params'; import { NormalizedSystemAction } from '../rules_client'; import { RuleSystemAction } from '../types'; interface Params { actionsClient: ActionsClient; + actionsAuthorization: ActionsAuthorization; connectorAdapterRegistry: ConnectorAdapterRegistry; systemActions: Array; + rule: { consumer: string }; } -export const validateSystemActions = async ({ +export const validateAndAuthorizeSystemActions = async ({ actionsClient, connectorAdapterRegistry, + actionsAuthorization, + rule, systemActions = [], }: Params) => { if (systemActions.length === 0) { @@ -64,4 +69,12 @@ export const validateSystemActions = async ({ connectorAdapterRegistry, actions: systemActionsWithActionTypeId, }); + + const additionalPrivileges = getSystemActionKibanaPrivileges({ + connectorAdapterRegistry, + systemActions: systemActionsWithActionTypeId, + rule: { consumer: rule.consumer }, + }); + + await actionsAuthorization.ensureAuthorized({ operation: 'execute', additionalPrivileges }); }; diff --git a/x-pack/plugins/alerting/server/rules_client/methods/update.ts b/x-pack/plugins/alerting/server/rules_client/methods/update.ts index 1b54dfcb18d94..886f112ba2984 100644 --- a/x-pack/plugins/alerting/server/rules_client/methods/update.ts +++ b/x-pack/plugins/alerting/server/rules_client/methods/update.ts @@ -37,7 +37,7 @@ import { validateScheduleLimit, ValidateScheduleLimitResult, } from '../../application/rule/methods/get_schedule_frequency'; -import { validateSystemActions } from '../../lib/validate_system_actions'; +import { validateAndAuthorizeSystemActions } from '../../lib/validate_authorize_system_actions'; import { transformRawActionsToDomainActions } from '../../application/rule/transforms'; import { RULE_SAVED_OBJECT_TYPE } from '../../saved_objects'; import { transformRawActionsToDomainSystemActions } from '../../application/rule/transforms/transform_raw_actions_to_domain_actions'; @@ -245,10 +245,12 @@ async function updateAlert( // Validate const validatedAlertTypeParams = validateRuleTypeParams(data.params, ruleType.validate.params); await validateActions(context, ruleType, data, allowMissingConnectorSecrets); - await validateSystemActions({ + await validateAndAuthorizeSystemActions({ actionsClient, + actionsAuthorization: context.actionsAuthorization, connectorAdapterRegistry: context.connectorAdapterRegistry, systemActions: data.systemActions, + rule: { consumer: currentRule.attributes.consumer }, }); // Throw error if schedule interval is less than the minimum and we are enforcing it diff --git a/x-pack/plugins/alerting/server/rules_client/tests/update.test.ts b/x-pack/plugins/alerting/server/rules_client/tests/update.test.ts index d66b17b5ff6b6..4daf489091d2c 100644 --- a/x-pack/plugins/alerting/server/rules_client/tests/update.test.ts +++ b/x-pack/plugins/alerting/server/rules_client/tests/update.test.ts @@ -3837,5 +3837,42 @@ describe('update()', () => { `[Error: Error validating actions - [actions.0.group]: expected value of type [string] but got [undefined]]` ); }); + + test('should throw an error if the user does not have privileges to execute the action', async () => { + actionsAuthorization.ensureAuthorized.mockRejectedValueOnce( + new Error('Unauthorized to execute actions') + ); + + await expect(() => + rulesClient.update({ + id: '1', + data: { + schedule: { interval: '1m' }, + name: 'abc', + tags: ['foo'], + params: { + bar: true, + }, + throttle: null, + notifyWhen: 'onActiveAlert', + actions: [ + { + group: 'default', + id: '1', + params: { + foo: true, + }, + }, + ], + systemActions: [ + { + id: 'system_action-id', + params: {}, + }, + ], + }, + }) + ).rejects.toMatchInlineSnapshot(`[Error: Unauthorized to execute actions]`); + }); }); }); diff --git a/x-pack/plugins/alerting/tsconfig.json b/x-pack/plugins/alerting/tsconfig.json index de830800f5aea..2158a9d7d33a8 100644 --- a/x-pack/plugins/alerting/tsconfig.json +++ b/x-pack/plugins/alerting/tsconfig.json @@ -68,7 +68,9 @@ "@kbn/core-ui-settings-server-mocks", "@kbn/core-test-helpers-kbn-server", "@kbn/core-http-router-server-internal", - "@kbn/core-execution-context-server-mocks" + "@kbn/core-execution-context-server-mocks", + "@kbn/react-kibana-context-render", + "@kbn/react-kibana-context-theme" ], "exclude": [ "target/**/*" diff --git a/x-pack/plugins/canvas/shareable_runtime/components/__snapshots__/app.test.tsx.snap b/x-pack/plugins/canvas/shareable_runtime/components/__snapshots__/app.test.tsx.snap index cb3c549ed06df..262f95589c62a 100644 --- a/x-pack/plugins/canvas/shareable_runtime/components/__snapshots__/app.test.tsx.snap +++ b/x-pack/plugins/canvas/shareable_runtime/components/__snapshots__/app.test.tsx.snap @@ -1,3 +1,3 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[` App renders properly 1`] = `"
"`; +exports[` App renders properly 1`] = `""`; diff --git a/x-pack/plugins/canvas/shareable_runtime/components/footer/settings/__snapshots__/settings.test.tsx.snap b/x-pack/plugins/canvas/shareable_runtime/components/footer/settings/__snapshots__/settings.test.tsx.snap index da3ad71c3f034..6779553108963 100644 --- a/x-pack/plugins/canvas/shareable_runtime/components/footer/settings/__snapshots__/settings.test.tsx.snap +++ b/x-pack/plugins/canvas/shareable_runtime/components/footer/settings/__snapshots__/settings.test.tsx.snap @@ -244,7 +244,7 @@ exports[` can navigate Autoplay Settings 2`] = `

{ export const useCasesToast = () => { const { appId } = useApplication(); - const { getUrlForApp, navigateToUrl } = useKibana().services.application; + const { application, i18n, theme } = useKibana().services; + const { getUrlForApp, navigateToUrl } = application; const toasts = useToasts(); @@ -147,12 +148,13 @@ export const useCasesToast = () => { return toasts.addSuccess({ color: 'success', iconType: 'check', - title: toMountPoint(), + title: toMountPoint(, { i18n, theme }), text: toMountPoint( + />, + { i18n, theme } ), }); }, @@ -175,7 +177,7 @@ export const useCasesToast = () => { }); }, }), - [appId, getUrlForApp, navigateToUrl, toasts] + [i18n, theme, appId, getUrlForApp, navigateToUrl, toasts] ); }; diff --git a/x-pack/plugins/cases/public/common/use_is_dark_theme.test.tsx b/x-pack/plugins/cases/public/common/use_is_dark_theme.test.tsx deleted file mode 100644 index 460fac7c01be5..0000000000000 --- a/x-pack/plugins/cases/public/common/use_is_dark_theme.test.tsx +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { BehaviorSubject } from 'rxjs'; -import { renderHook } from '@testing-library/react-hooks'; -import { useKibana } from './lib/kibana'; -import { useIsDarkTheme } from './use_is_dark_theme'; -import type { CoreTheme } from '@kbn/core-theme-browser'; -import type { AppMockRenderer } from './mock'; -import { createAppMockRenderer } from './mock'; - -jest.mock('./lib/kibana'); - -const useKibanaMock = useKibana as jest.Mocked; - -describe('useIsDarkTheme', () => { - let appMockRender: AppMockRenderer; - - beforeEach(() => { - appMockRender = createAppMockRenderer(); - useKibanaMock().services.theme.theme$ = new BehaviorSubject({ darkMode: true }); - }); - - it('returns true if the theme is in dark mode', async () => { - const { result } = renderHook(() => useIsDarkTheme(), { - wrapper: appMockRender.AppWrapper, - }); - - expect(result.current).toBe(true); - }); - - it('returns the default theme if the theme service is undefined', async () => { - // @ts-expect-error: service maybe undefined - useKibanaMock().services.theme = undefined; - - const { result } = renderHook(() => useIsDarkTheme(), { - wrapper: appMockRender.AppWrapper, - }); - - expect(result.current).toBe(false); - }); -}); diff --git a/x-pack/plugins/cases/public/common/use_is_dark_theme.tsx b/x-pack/plugins/cases/public/common/use_is_dark_theme.tsx deleted file mode 100644 index 4e6120d953a27..0000000000000 --- a/x-pack/plugins/cases/public/common/use_is_dark_theme.tsx +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { useMemo } from 'react'; -import { of } from 'rxjs'; -import useObservable from 'react-use/lib/useObservable'; -import { useKibana } from './lib/kibana'; - -const themeDefault = { darkMode: false }; - -/** - * Indicates if the currently applied theme is either dark or light. - * @return {boolean} - Returns true if the currently applied theme is dark. - */ -export function useIsDarkTheme(): boolean { - const { - services: { theme }, - } = useKibana(); - - const themeObservable$ = useMemo(() => { - return theme?.theme$ ?? of(themeDefault); - }, [theme]); - - const { darkMode } = useObservable(themeObservable$, themeDefault); - - return darkMode; -} diff --git a/x-pack/plugins/cases/public/components/create/description.test.tsx b/x-pack/plugins/cases/public/components/create/description.test.tsx index d0426731f97d9..5acd5a3b4f5c8 100644 --- a/x-pack/plugins/cases/public/components/create/description.test.tsx +++ b/x-pack/plugins/cases/public/components/create/description.test.tsx @@ -15,7 +15,7 @@ import type { AppMockRenderer } from '../../common/mock'; import { createAppMockRenderer } from '../../common/mock'; import { MAX_DESCRIPTION_LENGTH } from '../../../common/constants'; import { FormTestComponent } from '../../common/test_utils'; -import type { FormSchema } from '@kbn/index-management-plugin/public/shared_imports'; +import type { FormSchema } from '@kbn/es-ui-shared-plugin/static/forms/hook_form_lib'; describe('Description', () => { let appMockRender: AppMockRenderer; diff --git a/x-pack/plugins/cases/public/components/visualizations/actions/action_wrapper.tsx b/x-pack/plugins/cases/public/components/visualizations/actions/action_wrapper.tsx index 798ddea708193..543969c731d36 100644 --- a/x-pack/plugins/cases/public/components/visualizations/actions/action_wrapper.tsx +++ b/x-pack/plugins/cases/public/components/visualizations/actions/action_wrapper.tsx @@ -8,9 +8,8 @@ import type { PropsWithChildren } from 'react'; import React from 'react'; import { Router } from '@kbn/shared-ux-router'; -import { EuiThemeProvider } from '@kbn/kibana-react-plugin/common'; +import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; -import { useIsDarkTheme } from '../../../common/use_is_dark_theme'; import { SECURITY_SOLUTION_OWNER } from '../../../../common'; import type { CasesUIActionProps } from './types'; import { KibanaContextProvider, useKibana } from '../../../common/lib/kibana'; @@ -30,8 +29,7 @@ const ActionWrapperWithContext: React.FC> = ({ caseContextProps, currentAppId, }) => { - const { application } = useKibana().services; - const isDarkTheme = useIsDarkTheme(); + const { application, i18n, theme } = useKibana().services; const owner = getCaseOwnerByAppId(currentAppId); const casePermissions = canUseCases(application.capabilities)(owner ? [owner] : undefined); @@ -39,7 +37,7 @@ const ActionWrapperWithContext: React.FC> = ({ const syncAlerts = owner === SECURITY_SOLUTION_OWNER; return ( - + > = ({ > {children} - + ); }; diff --git a/x-pack/plugins/cases/public/components/visualizations/actions/add_to_existing_case.test.tsx b/x-pack/plugins/cases/public/components/visualizations/actions/add_to_existing_case.test.tsx index 6742242b71fb2..1e1eb398c991b 100644 --- a/x-pack/plugins/cases/public/components/visualizations/actions/add_to_existing_case.test.tsx +++ b/x-pack/plugins/cases/public/components/visualizations/actions/add_to_existing_case.test.tsx @@ -14,7 +14,7 @@ import { createAddToExistingCaseLensAction } from './add_to_existing_case'; import type { ActionContext } from './types'; import { useCasesAddToExistingCaseModal } from '../../all_cases/selector_modal/use_cases_add_to_existing_case_modal'; import React from 'react'; -import { toMountPoint } from '@kbn/kibana-react-plugin/public'; +import { toMountPoint } from '@kbn/react-kibana-mount'; import { getMockApplications$, getMockCaseUiActionProps, @@ -44,10 +44,13 @@ jest.mock('../../../client/helpers/can_use_cases', () => { }); jest.mock('@kbn/kibana-react-plugin/public', () => ({ - toMountPoint: jest.fn(), KibanaThemeProvider: jest.fn().mockImplementation(({ children }) => <>{children}), })); +jest.mock('@kbn/react-kibana-mount', () => ({ + toMountPoint: jest.fn(), +})); + jest.mock('../../../common/lib/kibana', () => { return { useKibana: jest.fn(), diff --git a/x-pack/plugins/cases/public/components/visualizations/actions/add_to_existing_case.tsx b/x-pack/plugins/cases/public/components/visualizations/actions/add_to_existing_case.tsx index b71248353ec54..647abe8b41f2a 100644 --- a/x-pack/plugins/cases/public/components/visualizations/actions/add_to_existing_case.tsx +++ b/x-pack/plugins/cases/public/components/visualizations/actions/add_to_existing_case.tsx @@ -10,7 +10,7 @@ import type { Embeddable as LensEmbeddable } from '@kbn/lens-plugin/public'; import { createAction } from '@kbn/ui-actions-plugin/public'; import { isErrorEmbeddable } from '@kbn/embeddable-plugin/public'; -import { toMountPoint } from '@kbn/kibana-react-plugin/public'; +import { toMountPoint } from '@kbn/react-kibana-mount'; import type { CaseUI } from '../../../../common'; import { isLensEmbeddable, hasInput, getLensCaseAttachment } from './utils'; @@ -59,7 +59,7 @@ export const createAddToExistingCaseLensAction = ({ history, caseContextProps, }: CasesUIActionProps) => { - const { application: applicationService, theme } = core; + const { application: applicationService, i18n, theme } = core; let currentAppId: string | undefined; @@ -124,7 +124,7 @@ export const createAddToExistingCaseLensAction = ({ onSuccess={onSuccess} /> , - { theme$: theme.theme$ } + { i18n, theme } ); mount(targetDomElement); diff --git a/x-pack/plugins/cases/public/components/visualizations/actions/mocks.ts b/x-pack/plugins/cases/public/components/visualizations/actions/mocks.ts index 7957b24b1ba48..aee3b128d554b 100644 --- a/x-pack/plugins/cases/public/components/visualizations/actions/mocks.ts +++ b/x-pack/plugins/cases/public/components/visualizations/actions/mocks.ts @@ -4,23 +4,16 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import type { CoreTheme, PublicAppInfo } from '@kbn/core/public'; -import { BehaviorSubject, of } from 'rxjs'; -import type { TypedLensByValueInput } from '@kbn/lens-plugin/public'; -import { createBrowserHistory } from 'history'; -import type { CasesUIActionProps } from './types'; -const mockTheme: CoreTheme = { - darkMode: false, -}; +import { createBrowserHistory } from 'history'; +import { BehaviorSubject } from 'rxjs'; -const createThemeMock = (): CoreTheme => { - return { ...mockTheme }; -}; +import type { PublicAppInfo } from '@kbn/core/public'; +import { coreMock } from '@kbn/core/public/mocks'; +import type { TypedLensByValueInput } from '@kbn/lens-plugin/public'; +import type { CasesUIActionProps } from './types'; -export const createTheme$Mock = () => { - return of(createThemeMock()); -}; +const coreStart = coreMock.createStart(); export class MockEmbeddable { public type; @@ -76,8 +69,8 @@ export const getMockApplications$ = () => export const getMockCaseUiActionProps = () => { const core = { + ...coreStart, application: { currentAppId$: getMockCurrentAppId$(), capabilities: {} }, - theme: { theme$: createTheme$Mock() }, uiSettings: { get: jest.fn().mockReturnValue(true), }, diff --git a/x-pack/plugins/cases/tsconfig.json b/x-pack/plugins/cases/tsconfig.json index 1a1f8e56543bf..bf205c79e50c8 100644 --- a/x-pack/plugins/cases/tsconfig.json +++ b/x-pack/plugins/cases/tsconfig.json @@ -11,12 +11,10 @@ ], "kbn_references": [ "@kbn/core", - // optionalPlugins from ./kibana.json "@kbn/lens-plugin", "@kbn/security-plugin", "@kbn/spaces-plugin", - // Required from './kibana.json' "@kbn/actions-plugin", "@kbn/rule-registry-plugin", @@ -64,15 +62,14 @@ "@kbn/ui-actions-plugin", "@kbn/core-lifecycle-browser", "@kbn/core-saved-objects-api-server-mocks", - "@kbn/core-theme-browser", "@kbn/serverless", "@kbn/core-http-server", "@kbn/alerting-plugin", "@kbn/content-management-plugin", - "@kbn/index-management-plugin", "@kbn/rison", "@kbn/core-application-browser", "@kbn/react-kibana-context-render", + "@kbn/react-kibana-mount", ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/cloud_integrations/cloud_experiments/common/constants.ts b/x-pack/plugins/cloud_integrations/cloud_experiments/common/constants.ts index 2ae72dabb6484..d0e77614f4be3 100644 --- a/x-pack/plugins/cloud_integrations/cloud_experiments/common/constants.ts +++ b/x-pack/plugins/cloud_integrations/cloud_experiments/common/constants.ts @@ -38,6 +38,10 @@ export enum FEATURE_FLAG_NAMES { * Options are: 'header' (the chat button appears as part of the kibana header) and 'bubble' (floating chat button at the bottom of the screen). */ 'cloud-chat.chat-variant' = 'cloud-chat.chat-variant', + /** + * Used to enable the new stack navigation around solutions during the rollout period. + */ + 'navigation.solutionNavEnabled' = 'navigation.solutionNavEnabled', } /** diff --git a/x-pack/plugins/cloud_security_posture/public/components/cloud_security_data_table/fields_selector/fields_selector_modal.tsx b/x-pack/plugins/cloud_security_posture/public/components/cloud_security_data_table/fields_selector/fields_selector_modal.tsx index 862fe219afa14..548c2ad03c2bb 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/cloud_security_data_table/fields_selector/fields_selector_modal.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/cloud_security_data_table/fields_selector/fields_selector_modal.tsx @@ -4,7 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import React, { useCallback } from 'react'; +import React from 'react'; import { EuiButton, EuiButtonEmpty, @@ -17,8 +17,6 @@ import { import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { type DataView } from '@kbn/data-views-plugin/common'; -import useSessionStorage from 'react-use/lib/useSessionStorage'; -import { SESSION_STORAGE_FIELDS_MODAL_SHOW_SELECTED } from '../../../common/constants'; import { FieldsSelectorTable } from './fields_selector_table'; import { CSP_FIELDS_SELECTOR_CLOSE_BUTTON, @@ -47,18 +45,6 @@ export const FieldsSelectorModal = ({ onRemoveColumn, onResetColumns, }: FieldsSelectorModalProps) => { - const [isFilterSelectedEnabled, setIsFilterSelectedEnabled] = useSessionStorage( - SESSION_STORAGE_FIELDS_MODAL_SHOW_SELECTED, - false - ); - - const onFilterSelectedChange = useCallback( - (enabled: boolean) => { - setIsFilterSelectedEnabled(enabled); - }, - [setIsFilterSelectedEnabled] - ); - return ( @@ -71,8 +57,6 @@ export const FieldsSelectorModal = ({ columns={columns} onAddColumn={onAddColumn} onRemoveColumn={onRemoveColumn} - isFilterSelectedEnabled={isFilterSelectedEnabled} - onFilterSelectedChange={onFilterSelectedChange} /> diff --git a/x-pack/plugins/cloud_security_posture/public/components/cloud_security_data_table/fields_selector/fields_selector_table.test.tsx b/x-pack/plugins/cloud_security_posture/public/components/cloud_security_data_table/fields_selector/fields_selector_table.test.tsx index 58caad6e26f82..76c59f9b667a3 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/cloud_security_data_table/fields_selector/fields_selector_table.test.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/cloud_security_data_table/fields_selector/fields_selector_table.test.tsx @@ -8,29 +8,39 @@ import React from 'react'; import { render, fireEvent } from '@testing-library/react'; import { waitForEuiPopoverOpen } from '@elastic/eui/lib/test/rtl'; +import useSessionStorage from 'react-use/lib/useSessionStorage'; import { TestProvider } from '../../../test/test_provider'; -import { FieldsSelectorTable, FieldsSelectorTableProps } from './fields_selector_table'; +import { + FieldsSelectorTable, + FieldsSelectorTableProps, + filterFieldsBySearch, +} from './fields_selector_table'; + +const VIEW_MENU_ALL_TEXT = 'View: all'; +const VIEW_MENU_SELECTED_TEXT = 'View: selected'; const mockDataView = { fields: { getAll: () => [ { id: 'field1', name: 'field1', customLabel: 'Label 1', visualizable: true }, { id: 'field2', name: 'field2', customLabel: 'Label 2', visualizable: true }, + { id: 'field3', name: 'field3', customLabel: 'Label 3', visualizable: true }, + { id: 'field4', name: 'field4', customLabel: 'Label 3.A', visualizable: true }, + { id: 'not-visible', name: 'not-visible', customLabel: 'Label 3.A', visualizable: false }, + { id: '_index', name: '_index', customLabel: 'should not be shown', visualizable: true }, ], }, } as any; -const mockOnFilterSelectedChange = jest.fn(); +jest.mock('react-use/lib/useSessionStorage', () => jest.fn().mockReturnValue([false, jest.fn()])); const renderFieldsTable = (props: Partial = {}) => { const defaultProps: FieldsSelectorTableProps = { dataView: mockDataView, - columns: [], + columns: props.columns || [], onAddColumn: jest.fn(), onRemoveColumn: jest.fn(), title: 'title', - onFilterSelectedChange: mockOnFilterSelectedChange, - isFilterSelectedEnabled: false, }; return render( @@ -41,6 +51,10 @@ const renderFieldsTable = (props: Partial = {}) => { }; describe('FieldsSelectorTable', () => { + afterEach(() => { + jest.clearAllMocks(); + }); + it('renders the table with data correctly', () => { const { getByText } = renderFieldsTable(); @@ -74,20 +88,60 @@ describe('FieldsSelectorTable', () => { }); describe('View selected', () => { - beforeEach(() => { - mockOnFilterSelectedChange.mockClear(); + it('should show "view all" option by default', () => { + const { getByTestId } = renderFieldsTable(); + expect(getByTestId('viewSelectorButton').textContent).toBe(VIEW_MENU_ALL_TEXT); }); - it('should render "view all" option when filterSelected is not enabled', () => { - const { getByTestId } = renderFieldsTable({ isFilterSelectedEnabled: false }); + it('should render "view selected" option when previous selection was "view selected"', () => { + (useSessionStorage as jest.Mock).mockReturnValueOnce([true, jest.fn()]); + const { getByTestId } = renderFieldsTable(); + + expect(getByTestId('viewSelectorButton').textContent).toBe(VIEW_MENU_SELECTED_TEXT); + }); + + it('should show "view all" option after the "view all" is selected', async () => { + // Forcing the view to be the selected state + (useSessionStorage as jest.Mock).mockReturnValueOnce([true, jest.fn()]); + + const { getByTestId } = renderFieldsTable(); + expect(getByTestId('viewSelectorButton').textContent).toBe(VIEW_MENU_SELECTED_TEXT); + + getByTestId('viewSelectorButton').click(); + await waitForEuiPopoverOpen(); + + getByTestId('viewSelectorOption-all').click(); + + expect(getByTestId('viewSelectorButton').textContent).toBe(VIEW_MENU_ALL_TEXT); + }); - expect(getByTestId('viewSelectorButton').textContent).toBe('View: all'); + it('should show only selected columns after the "view selected" option is selected', async () => { + (useSessionStorage as jest.Mock).mockReturnValueOnce([true, jest.fn()]); + // Render the table with field3 selected + const { getAllByRole, getByTestId } = renderFieldsTable({ columns: ['field3'] }); + expect(getByTestId('viewSelectorButton').textContent).toBe(VIEW_MENU_SELECTED_TEXT); + // Only field3 should be visible + expect(getByTestId('cloud-security-fields-selector-item-field3')).toBeInTheDocument(); + expect(getAllByRole('checkbox').length).toBe(1); }); - it('should render "view selected" option when filterSelected is not enabled', () => { - const { getByTestId } = renderFieldsTable({ isFilterSelectedEnabled: true }); + it('should show all columns available after the "view all" option is selected', async () => { + // Forcing the view to be the selected state + (useSessionStorage as jest.Mock).mockReturnValueOnce([true, jest.fn()]); - expect(getByTestId('viewSelectorButton').textContent).toBe('View: selected'); + // Render the table with field3 selected + const { getAllByRole, getByTestId } = renderFieldsTable({ columns: ['field3'] }); + expect(getByTestId('viewSelectorButton').textContent).toBe(VIEW_MENU_SELECTED_TEXT); + + getByTestId('viewSelectorButton').click(); + await waitForEuiPopoverOpen(); + + getByTestId('viewSelectorOption-all').click(); + + expect(getByTestId('viewSelectorButton').textContent).toBe(VIEW_MENU_ALL_TEXT); + // Only field3 should be visible + expect(getByTestId('cloud-security-fields-selector-item-field3')).toBeInTheDocument(); + expect(getAllByRole('checkbox').length).toBe(4); }); it('should open the view selector with button click', async () => { @@ -104,23 +158,72 @@ describe('FieldsSelectorTable', () => { expect(getByTestId('viewSelectorOption-all')).toBeInTheDocument(); expect(getByTestId('viewSelectorOption-selected')).toBeInTheDocument(); }); + }); - it('should callback when "view all" option is clicked', async () => { - const { getByTestId } = renderFieldsTable({ isFilterSelectedEnabled: false }); - - getByTestId('viewSelectorButton').click(); - await waitForEuiPopoverOpen(); - getByTestId('viewSelectorOption-all').click(); - expect(mockOnFilterSelectedChange).toHaveBeenCalledWith(false); + describe('Searching columns', () => { + it('should find all columns match the search term', async () => { + // No columns are selected and no search term + expect( + filterFieldsBySearch(mockDataView.fields.getAll(), undefined, undefined, false).length + ).toEqual(4); + + // Columns selected and no search term + expect( + filterFieldsBySearch(mockDataView.fields.getAll(), ['field3', 'field4'], undefined, false) + .length + ).toEqual(4); + + expect( + filterFieldsBySearch(mockDataView.fields.getAll(), ['field3', 'field4'], 'Label', false) + .length + ).toEqual(4); + + expect( + filterFieldsBySearch(mockDataView.fields.getAll(), ['field3', 'field4'], 'Label 3', false) + .length + ).toEqual(2); + + expect( + filterFieldsBySearch(mockDataView.fields.getAll(), ['field3', 'field4'], 'Label 3.A', false) + .length + ).toEqual(1); + + expect( + filterFieldsBySearch(mockDataView.fields.getAll(), ['field3', 'field4'], 'foo', false) + .length + ).toEqual(0); }); - it('should callback when "view selected" option is clicked', async () => { - const { getByTestId } = renderFieldsTable({ isFilterSelectedEnabled: false }); - - getByTestId('viewSelectorButton').click(); - await waitForEuiPopoverOpen(); - getByTestId('viewSelectorOption-selected').click(); - expect(mockOnFilterSelectedChange).toHaveBeenCalledWith(true); + it('should find all columns match the search term and are selected', async () => { + // No columns are selected and no search term + expect( + filterFieldsBySearch(mockDataView.fields.getAll(), undefined, undefined, true).length + ).toEqual(0); + + // Columns selected and no search term + expect( + filterFieldsBySearch(mockDataView.fields.getAll(), ['field3', 'field4'], undefined, true) + .length + ).toEqual(2); + + expect( + filterFieldsBySearch(mockDataView.fields.getAll(), ['field3', 'field4'], 'Label', true) + .length + ).toEqual(2); + + expect( + filterFieldsBySearch(mockDataView.fields.getAll(), ['field3', 'field4'], 'Label 3', true) + .length + ).toEqual(2); + + expect( + filterFieldsBySearch(mockDataView.fields.getAll(), ['field3', 'field4'], 'Label 3.A', true) + .length + ).toEqual(1); + + expect( + filterFieldsBySearch(mockDataView.fields.getAll(), ['field3', 'field4'], 'foo', true).length + ).toEqual(0); }); }); }); diff --git a/x-pack/plugins/cloud_security_posture/public/components/cloud_security_data_table/fields_selector/fields_selector_table.tsx b/x-pack/plugins/cloud_security_posture/public/components/cloud_security_data_table/fields_selector/fields_selector_table.tsx index 0afd4332c41db..12a1a766f1602 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/cloud_security_data_table/fields_selector/fields_selector_table.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/cloud_security_data_table/fields_selector/fields_selector_table.tsx @@ -4,7 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - +import React, { useCallback, useMemo, useState } from 'react'; +import useSessionStorage from 'react-use/lib/useSessionStorage'; import { EuiBasicTableColumn, EuiButtonEmpty, @@ -19,11 +20,10 @@ import { EuiSearchBarProps, EuiText, } from '@elastic/eui'; -import { DataView } from '@kbn/data-views-plugin/common'; +import { DataView, DataViewField } from '@kbn/data-views-plugin/common'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; -import React, { useCallback, useEffect, useMemo, useState } from 'react'; - +import { SESSION_STORAGE_FIELDS_MODAL_SHOW_SELECTED } from '../../../common/constants'; const ACTION_COLUMN_WIDTH = '24px'; const defaultSorting = { sort: { @@ -56,46 +56,53 @@ export interface FieldsSelectorTableProps { onAddColumn: (column: string) => void; onRemoveColumn: (column: string) => void; title: string; - onFilterSelectedChange: (enabled: boolean) => void; - isFilterSelectedEnabled: boolean; } +export const filterFieldsBySearch = ( + fields: DataViewField[], + visibleColumns: string[] = [], + searchQuery?: string, + isFilterSelectedEnabled: boolean = false +) => { + const allowedFields = fields + .filter((field) => field.name !== '_index' && field.visualizable) + .map((field) => ({ + id: field.name, + name: field.name, + displayName: field.customLabel || '', + })); + + const visibleFields = !isFilterSelectedEnabled + ? allowedFields + : allowedFields.filter((field) => visibleColumns.includes(field.id)); + + return !searchQuery + ? visibleFields + : visibleFields.filter((field) => { + const normalizedName = `${field.name} ${field.displayName}`.toLowerCase(); + const normalizedQuery = searchQuery.toLowerCase() || ''; + return normalizedName.indexOf(normalizedQuery) !== -1; + }); +}; + export const FieldsSelectorTable = ({ title, dataView, columns, onAddColumn, onRemoveColumn, - isFilterSelectedEnabled, - onFilterSelectedChange, }: FieldsSelectorTableProps) => { - const dataViewFields = useMemo(() => { - return dataView.fields - .getAll() - .filter((field) => { - return field.name !== '_index' && field.visualizable; - }) - .map((field) => ({ - id: field.name, - name: field.name, - displayName: field.customLabel || '', - })); - }, [dataView.fields]); - - const [fields, setFields] = useState(dataViewFields); - - useEffect(() => { - if (isFilterSelectedEnabled) { - const filteredItems = dataViewFields.filter((field) => { - return columns.includes(field.id); - }); - setFields(filteredItems); - } else { - setFields(dataViewFields); - } - }, [columns, dataViewFields, isFilterSelectedEnabled]); - const [isPopoverOpen, setIsPopoverOpen] = useState(false); + const [searchQuery, setSearchQuery] = useState(); + const [isFilterSelectedEnabled, setIsFilterSelectedEnabled] = useSessionStorage( + SESSION_STORAGE_FIELDS_MODAL_SHOW_SELECTED, + false + ); + const fields = useMemo( + () => + filterFieldsBySearch(dataView.fields.getAll(), columns, searchQuery, isFilterSelectedEnabled), + [dataView, columns, searchQuery, isFilterSelectedEnabled] + ); const togglePopover = useCallback(() => { setIsPopoverOpen((open) => !open); @@ -103,19 +110,21 @@ export const FieldsSelectorTable = ({ const closePopover = useCallback(() => { setIsPopoverOpen(false); }, []); + + const onFilterSelectedChange = useCallback( + (enabled: boolean) => { + setIsFilterSelectedEnabled(enabled); + }, + [setIsFilterSelectedEnabled] + ); + let debounceTimeoutId: ReturnType; const onQueryChange: EuiSearchBarProps['onChange'] = ({ query }) => { clearTimeout(debounceTimeoutId); debounceTimeoutId = setTimeout(() => { - const filteredItems = dataViewFields.filter((field) => { - const normalizedName = `${field.name} ${field.displayName}`.toLowerCase(); - const normalizedQuery = query?.text.toLowerCase() || ''; - return normalizedName.indexOf(normalizedQuery) !== -1; - }); - - setFields(filteredItems); + setSearchQuery(query?.text); }, 300); }; @@ -125,19 +134,17 @@ export const FieldsSelectorTable = ({ name: '', width: ACTION_COLUMN_WIDTH, sortable: false, - render: (_, { id }: Field) => { - return ( - { - const isChecked = e.target.checked; - return isChecked ? onAddColumn(id) : onRemoveColumn(id); - }} - /> - ); - }, + render: (_, { id }: Field) => ( + { + const isChecked = e.target.checked; + return isChecked ? onAddColumn(id) : onRemoveColumn(id); + }} + /> + ), }, { field: 'name', diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/aws_credentials_form/aws_credentials_form.tsx b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/aws_credentials_form/aws_credentials_form.tsx index 18d387d3136f3..009d7fc7a1473 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/aws_credentials_form/aws_credentials_form.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/aws_credentials_form/aws_credentials_form.tsx @@ -284,6 +284,7 @@ export const AwsCredentialsForm = ({ { updatePolicy(getPosturePolicy(newPolicy, input.type, { [key]: { value } })); }} diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/aws_credentials_form/aws_credentials_form_agentless.tsx b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/aws_credentials_form/aws_credentials_form_agentless.tsx index b0ab98db98cda..790bfdc606e82 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/aws_credentials_form/aws_credentials_form_agentless.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/aws_credentials_form/aws_credentials_form_agentless.tsx @@ -25,7 +25,12 @@ import { AwsCredentialTypeSelector, } from './aws_credentials_form'; -export const AwsCredentialsFormAgentless = ({ input, newPolicy, updatePolicy }: AwsFormProps) => { +export const AwsCredentialsFormAgentless = ({ + input, + newPolicy, + packageInfo, + updatePolicy, +}: AwsFormProps) => { const awsCredentialsType = getAwsCredentialsType(input) || DEFAULT_AGENTLESS_AWS_CREDENTIALS_TYPE; const options = getAwsCredentialsFormOptions(); const group = options[awsCredentialsType]; @@ -74,6 +79,7 @@ export const AwsCredentialsFormAgentless = ({ input, newPolicy, updatePolicy }: { updatePolicy(getPosturePolicy(newPolicy, input.type, { [key]: { value } })); }} 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 5ac54872a583b..960c1c3b39ddc 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 @@ -5,40 +5,80 @@ * 2.0. */ -import React from 'react'; -import { EuiFieldPassword, EuiFieldText, EuiFormRow } from '@elastic/eui'; +import React, { Suspense } from 'react'; +import { EuiFieldText, EuiFormRow, EuiSpacer, EuiLoadingSpinner } from '@elastic/eui'; +import { PackageInfo } from '@kbn/fleet-plugin/common'; +import { css } from '@emotion/react'; +import { LazyPackagePolicyInputVarField } from '@kbn/fleet-plugin/public'; import { AwsOptions } from './get_aws_credentials_form_options'; +import { findVariableDef } from '../utils'; export const AwsInputVarFields = ({ fields, onChange, + packageInfo, }: { fields: Array; onChange: (key: string, value: string) => void; -}) => ( -
- {fields.map((field) => ( - + packageInfo: PackageInfo; +}) => { + return ( +
+ {fields.map((field) => ( <> - {field.type === 'password' && ( - onChange(field.id, event.target.value)} - /> + {field.type === 'password' && field.isSecret === true && ( + <> + +
+ }> + { + onChange(field.id, value); + }} + errors={[]} + forceShowErrors={false} + isEditPage={true} + /> + +
+ + )} {field.type === 'text' && ( - onChange(field.id, event.target.value)} - /> + hasChildLabel={true} + id={field.id} + > + onChange(field.id, event.target.value)} + /> + )} - - ))} -
-); + ))} +
+ ); +}; diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/aws_credentials_form/get_aws_credentials_form_options.tsx b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/aws_credentials_form/get_aws_credentials_form_options.tsx index 90175947ca172..d490e7cad5e27 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/aws_credentials_form/get_aws_credentials_form_options.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/aws_credentials_form/get_aws_credentials_form_options.tsx @@ -71,7 +71,10 @@ const AWS_FIELD_LABEL = { }), }; -export type AwsCredentialsFields = Record; +export type AwsCredentialsFields = Record< + string, + { label: string; type?: 'password' | 'text'; isSecret?: boolean } +>; export interface AwsOptionValue { label: string; @@ -89,6 +92,7 @@ export const getInputVarsFields = (input: NewPackagePolicyInput, fields: AwsCred label: field.label, type: field.type || 'text', value: inputVar.value, + isSecret: field.isSecret, } as const; }); @@ -147,7 +151,11 @@ export const getAwsCredentialsFormOptions = (): AwsOptions => ({ info: DirectAccessKeysDescription, fields: { access_key_id: { label: AWS_FIELD_LABEL.access_key_id }, - secret_access_key: { label: AWS_FIELD_LABEL.secret_access_key, type: 'password' }, + secret_access_key: { + label: AWS_FIELD_LABEL.secret_access_key, + type: 'password', + isSecret: true, + }, }, }, [AWS_CREDENTIALS_TYPE.TEMPORARY_KEYS]: { @@ -157,7 +165,11 @@ export const getAwsCredentialsFormOptions = (): AwsOptions => ({ }), fields: { access_key_id: { label: AWS_FIELD_LABEL.access_key_id }, - secret_access_key: { label: AWS_FIELD_LABEL.secret_access_key, type: 'password' }, + secret_access_key: { + label: AWS_FIELD_LABEL.secret_access_key, + type: 'password', + isSecret: true, + }, session_token: { label: i18n.translate('xpack.csp.awsIntegration.sessionTokenLabel', { defaultMessage: 'Session Token', 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 e1ae2ce16e242..18d76c9e7b90f 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 @@ -4,10 +4,9 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import React, { useEffect } from 'react'; +import React, { Suspense, useEffect } from 'react'; import { EuiCallOut, - EuiFieldPassword, EuiFieldText, EuiFormRow, EuiHorizontalRule, @@ -16,6 +15,7 @@ import { EuiSpacer, EuiText, EuiTitle, + EuiLoadingSpinner, } from '@elastic/eui'; import type { NewPackagePolicy } from '@kbn/fleet-plugin/public'; import { NewPackagePolicyInput, PackageInfo } from '@kbn/fleet-plugin/common'; @@ -25,13 +25,14 @@ import { i18n } from '@kbn/i18n'; import semverValid from 'semver/functions/valid'; import semverCoerce from 'semver/functions/coerce'; import semverLt from 'semver/functions/lt'; +import { LazyPackagePolicyInputVarField } from '@kbn/fleet-plugin/public'; import { AzureOptions, getAzureCredentialsFormManualOptions, } from './get_azure_credentials_form_options'; import { AzureCredentialsType } from '../../../../common/types_old'; import { useAzureCredentialsForm } from './hooks'; -import { getPosturePolicy, NewPackagePolicyPostureInput } from '../utils'; +import { findVariableDef, getPosturePolicy, NewPackagePolicyPostureInput } from '../utils'; import { CspRadioOption, RadioGroup } from '../csp_boxed_radio_group'; import { CIS_AZURE_SETUP_FORMAT_TEST_SUBJECTS } from '../../test_subjects'; @@ -267,39 +268,73 @@ const AZURE_MANUAL_FIELDS_PACKAGE_VERSION = '1.7.0'; export const AzureInputVarFields = ({ fields, + packageInfo, onChange, }: { fields: Array; + packageInfo: PackageInfo; onChange: (key: string, value: string) => void; -}) => ( -
- {fields.map((field) => ( - +}) => { + return ( +
+ {fields.map((field) => ( <> - {field.type === 'password' && ( - onChange(field.id, event.target.value)} - data-test-subj={field.testSubj} - /> + {field.type === 'password' && field.isSecret === true && ( + <> + +
+ }> + { + onChange(field.id, value); + }} + errors={[]} + forceShowErrors={false} + isEditPage={true} + /> + +
+ )} {field.type === 'text' && ( - onChange(field.id, event.target.value)} - data-test-subj={field.testSubj} - /> + hasChildLabel={true} + id={field.id} + > + onChange(field.id, event.target.value)} + data-test-subj={field.testSubj} + /> + )} - - ))} -
-); + ))} +
+ ); +}; export const AzureCredentialsForm = ({ input, @@ -403,6 +438,7 @@ export const AzureCredentialsForm = ({ { updatePolicy(getPosturePolicy(newPolicy, input.type, { [key]: { value } })); }} @@ -412,7 +448,7 @@ export const AzureCredentialsForm = ({ { const integrationLink = cspIntegrationDocsNavigation.cspm.getStartedPath; const options = getAzureCredentialsFormOptions(); @@ -40,6 +41,7 @@ export const AzureCredentialsFormAgentless = ({ { updatePolicy(getPosturePolicy(newPolicy, input.type, { [key]: { value } })); diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/azure_credentials_form/get_azure_credentials_form_options.tsx b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/azure_credentials_form/get_azure_credentials_form_options.tsx index 97ef3ae78b974..0f46330a4f457 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/azure_credentials_form/get_azure_credentials_form_options.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/azure_credentials_form/get_azure_credentials_form_options.tsx @@ -16,7 +16,7 @@ import { AZURE_CREDENTIALS_TYPE } from './azure_credentials_form'; export type AzureCredentialsFields = Record< string, - { label: string; type?: 'password' | 'text'; testSubj?: string } + { label: string; type?: 'password' | 'text'; testSubj?: string; isSecret?: boolean } >; export interface AzureOptionValue { @@ -55,6 +55,7 @@ export const getInputVarsFields = (input: NewPackagePolicyInput, fields: AzureCr type: field.type || 'text', testSubj: field.testSubj, value: inputVar.value, + isSecret: field?.isSecret, } as const; }); @@ -107,6 +108,7 @@ export const getAzureCredentialsFormOptions = (): AzureOptions => ({ }, 'azure.credentials.client_secret': { type: 'password', + isSecret: true, label: i18n.translate('xpack.csp.azureIntegration.clientSecretLabel', { defaultMessage: 'Client Secret', }), @@ -135,6 +137,7 @@ export const getAzureCredentialsFormOptions = (): AzureOptions => ({ }, 'azure.credentials.client_certificate_password': { type: 'password', + isSecret: true, label: i18n.translate('xpack.csp.azureIntegration.clientCertificatePasswordLabel', { defaultMessage: 'Client Certificate Password', }), @@ -164,6 +167,7 @@ export const getAzureCredentialsFormOptions = (): AzureOptions => ({ }, 'azure.credentials.client_password': { type: 'password', + isSecret: true, label: i18n.translate('xpack.csp.azureIntegration.clientPasswordLabel', { defaultMessage: 'Client Password', }), diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/eks_credentials_form.tsx b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/eks_credentials_form.tsx index fda6ae2f631fa..476aa627cfb53 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/eks_credentials_form.tsx +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/eks_credentials_form.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { EuiLink, EuiSpacer, EuiText, EuiTitle, EuiHorizontalRule } from '@elastic/eui'; import type { NewPackagePolicy } from '@kbn/fleet-plugin/public'; -import { NewPackagePolicyInput } from '@kbn/fleet-plugin/common'; +import { NewPackagePolicyInput, PackageInfo } from '@kbn/fleet-plugin/common'; import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import { RadioGroup } from './csp_boxed_radio_group'; @@ -119,7 +119,7 @@ type AwsOptions = Record< { label: string; info: React.ReactNode; - fields: Record; + fields: Record; testId: string; } >; @@ -146,7 +146,11 @@ const options: AwsOptions = { info: DirectAccessKeysDescription, fields: { access_key_id: { label: AWS_FIELD_LABEL.access_key_id }, - secret_access_key: { label: AWS_FIELD_LABEL.secret_access_key, type: 'password' }, + secret_access_key: { + label: AWS_FIELD_LABEL.secret_access_key, + type: 'password', + isSecret: true, + }, }, testId: 'directAccessKeyTestId', }, @@ -157,7 +161,11 @@ const options: AwsOptions = { }), fields: { access_key_id: { label: AWS_FIELD_LABEL.access_key_id }, - secret_access_key: { label: AWS_FIELD_LABEL.secret_access_key, type: 'password' }, + secret_access_key: { + label: AWS_FIELD_LABEL.secret_access_key, + type: 'password', + isSecret: true, + }, session_token: { label: i18n.translate('xpack.csp.eksIntegration.sessionTokenLabel', { defaultMessage: 'Session Token', @@ -197,6 +205,7 @@ const AWS_CREDENTIALS_OPTIONS = Object.keys(options).map((value) => ({ interface Props { newPolicy: NewPackagePolicy; + packageInfo: PackageInfo; input: Extract; updatePolicy(updatedPolicy: NewPackagePolicy): void; } @@ -214,13 +223,14 @@ const getInputVarsFields = ( label: field.label, type: field.type || 'text', value: inputVar.value, + isSecret: field?.isSecret, } as const; }); const getAwsCredentialsType = (input: Props['input']): AwsCredentialsType | undefined => input.streams[0].vars?.['aws.credentials.type'].value; -export const EksCredentialsForm = ({ input, newPolicy, updatePolicy }: Props) => { +export const EksCredentialsForm = ({ input, newPolicy, packageInfo, updatePolicy }: Props) => { // We only have a value for 'aws.credentials.type' once the form has mounted. // On initial render we don't have that value so we default to the first option. const awsCredentialsType = getAwsCredentialsType(input) || AWS_CREDENTIALS_OPTIONS[0].id; @@ -248,6 +258,7 @@ export const EksCredentialsForm = ({ input, newPolicy, updatePolicy }: Props) => updatePolicy(getPosturePolicy(newPolicy, input.type, { [key]: { value } })) } 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 887c8c471d9c8..38e6d5d632cea 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 @@ -7,6 +7,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 { RegistryRelease, RegistryVarType } from '@kbn/fleet-plugin/common/types'; import { CLOUDBEAT_GCP, CLOUDBEAT_AZURE, @@ -31,6 +32,7 @@ export const getMockPolicyVulnMgmtAWS = () => export const getMockAgentlessAgentPolicy = () => { return createAgentPolicyMock({ id: 'agentless' }); }; +export const getMockPackageInfo = () => getPackageInfoMock(); export const getMockPackageInfoVulnMgmtAWS = () => { return { @@ -142,7 +144,7 @@ const getPolicyMock = ( const awsVarsMock = { access_key_id: { type: 'text' }, - secret_access_key: { type: 'text' }, + secret_access_key: { type: 'password', isSecret: true }, session_token: { type: 'text' }, shared_credential_file: { type: 'text' }, credential_profile_name: { type: 'text' }, @@ -152,7 +154,7 @@ const getPolicyMock = ( const eksVarsMock = { access_key_id: { type: 'text' }, - secret_access_key: { type: 'text' }, + secret_access_key: { type: 'password', isSecret: true }, session_token: { type: 'text' }, shared_credential_file: { type: 'text' }, credential_profile_name: { type: 'text' }, @@ -262,3 +264,95 @@ const getPolicyMock = ( ], }; }; + +export const getPackageInfoMock = () => { + return { + data_streams: [ + { + dataset: 'cloud_security_posture.findings', + type: 'logs', + + package: 'cloud_security_posture', + path: 'findings', + release: 'ga' as RegistryRelease, + + title: 'Cloud Security Posture Findings', + streams: [ + { + input: 'cloudbeat/cis_aws', + template_path: 'aws.yml.hbs', + title: 'CIS AWS Benchmark', + vars: [ + { + name: 'secret_access_key', + title: 'Secret Access Key', + secret: true, + type: 'text' as RegistryVarType, + }, + ], + }, + { + input: 'cloudbeat/cis_eks', + template_path: 'eks.yml.hbs', + title: 'Amazon EKS Benchmark', + vars: [ + { + name: 'secret_access_key', + title: 'Secret Access Key', + secret: true, + type: 'text' as RegistryVarType, + }, + ], + }, + { + input: 'cloudbeat/cis_azure', + template_path: 'azure.yml.hbs', + title: 'CIS Azure Benchmark', + vars: [ + { + multi: false, + name: 'azure.credentials.client_secret', + required: false, + secret: true, + show_user: true, + title: 'Client Secret', + type: 'text' as RegistryVarType, + }, + { + multi: false, + name: 'azure.credentials.client_password', + required: false, + secret: true, + show_user: true, + title: 'Client Password', + type: 'text' as RegistryVarType, + }, + { + multi: false, + name: 'azure.credentials.client_certificate_password', + required: false, + secret: true, + show_user: true, + title: 'Client Certificate Password', + type: 'text' as RegistryVarType, + }, + ], + }, + ], + }, + ], + format_version: '3.0.0', + version: '1.9.0-preview109', + name: 'cloud_security_posture', + description: 'Identify & remediate configuration risks in your Cloud infrastructure', + owner: { + github: 'elastic/cloud-security-posture', + type: 'elastic' as 'elastic' | 'partner' | 'community' | undefined, + }, + title: 'Security Posture Management', + latestVersion: '1.9.0', + assets: { + kibana: {}, + }, + }; +}; 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 ef680d95c7166..9704678e634f1 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 @@ -17,6 +17,7 @@ import { import { TestProvider } from '../../test/test_provider'; import { getMockAgentlessAgentPolicy, + getMockPackageInfo, getMockPackageInfoCspmAWS, getMockPackageInfoCspmAzure, getMockPackageInfoCspmGCP, @@ -27,6 +28,7 @@ import { getMockPolicyGCP, getMockPolicyK8s, getMockPolicyVulnMgmtAWS, + getPackageInfoMock, } from './mocks'; import type { AgentPolicy, @@ -58,6 +60,8 @@ import { SETUP_TECHNOLOGY_SELECTOR_ACCORDION_TEST_SUBJ, SETUP_TECHNOLOGY_SELECTOR_TEST_SUBJ, } from '../test_subjects'; +import { ExperimentalFeaturesService } from '@kbn/fleet-plugin/public/services'; +import { ThemeProvider } from '@emotion/react'; // mock useParams jest.mock('react-router-dom', () => ({ @@ -68,8 +72,10 @@ jest.mock('react-router-dom', () => ({ })); jest.mock('../../common/api/use_setup_status_api'); jest.mock('../../common/api/use_package_policy_list'); +jest.mock('@kbn/fleet-plugin/public/services/experimental_features'); const onChange = jest.fn(); +const mockedExperimentalFeaturesService = jest.mocked(ExperimentalFeaturesService); const createReactQueryResponseWithRefetch = ( data: Parameters[0] @@ -85,6 +91,9 @@ describe('', () => { (useParams as jest.Mock).mockReturnValue({ integration: undefined, }); + mockedExperimentalFeaturesService.get.mockReturnValue({ + secretsStorage: true, + } as any); (usePackagePolicyList as jest.Mock).mockImplementation((packageName) => createReactQueryResponseWithRefetch({ status: 'success', @@ -116,29 +125,31 @@ describe('', () => { onChange?: jest.Mock; agentlessPolicy?: AgentPolicy; }) => ( - - {edit && ( - - )} - {!edit && ( - - )} - + ({ eui: { euiSizeXS: '4px' } })}> + + {edit && ( + + )} + {!edit && ( + + )} + + ); it('updates package policy namespace to default when it changes', () => { @@ -625,29 +636,32 @@ describe('', () => { }); }); - it(`renders ${CLOUDBEAT_EKS} Direct Access Keys fields`, () => { - let policy: NewPackagePolicy = getMockPolicyEKS(); + it(`renders ${CLOUDBEAT_EKS} Direct Access Keys fields`, async () => { + let policy = getMockPolicyEKS(); policy = getPosturePolicy(policy, CLOUDBEAT_EKS, { 'aws.credentials.type': { value: 'direct_access_keys' }, 'aws.setup.format': { value: 'manual' }, }); - - const { getByLabelText } = render(); + const { getByLabelText } = render( + + ); const option = getByLabelText('Direct access keys'); expect(option).toBeChecked(); expect(getByLabelText('Access Key ID')).toBeInTheDocument(); - expect(getByLabelText('Secret Access Key')).toBeInTheDocument(); + await waitFor(() => expect(getByLabelText('Secret Access Key')).toBeInTheDocument()); }); - it(`updates ${CLOUDBEAT_EKS} Direct Access Keys fields`, () => { + it(`updates ${CLOUDBEAT_EKS} Direct Access Keys fields`, async () => { let policy = getMockPolicyEKS(); policy = getPosturePolicy(policy, CLOUDBEAT_EKS, { 'aws.credentials.type': { value: 'direct_access_keys' }, 'aws.setup.format': { value: 'manual' }, }); - const { getByLabelText, rerender } = render(); + const { getByLabelText, rerender, getByTestId } = render( + + ); userEvent.type(getByLabelText('Access Key ID'), 'a'); policy = getPosturePolicy(policy, CLOUDBEAT_EKS, { access_key_id: { value: 'a' } }); @@ -658,10 +672,12 @@ describe('', () => { updatedPolicy: policy, }); - rerender(); + rerender( + + ); - userEvent.type(getByLabelText('Secret Access Key'), 'b'); - policy = getPosturePolicy(policy, CLOUDBEAT_EKS, { secret_access_key: { value: 'b' } }); + await waitFor(() => userEvent.type(getByTestId('passwordInput-secret-access-key'), 'c')); + policy = getPosturePolicy(policy, CLOUDBEAT_EKS, { secret_access_key: { value: 'c' } }); expect(onChange).toHaveBeenCalledWith({ isValid: true, @@ -669,30 +685,34 @@ describe('', () => { }); }); - it(`renders ${CLOUDBEAT_EKS} Temporary Keys fields`, () => { + it(`renders ${CLOUDBEAT_EKS} Temporary Keys fields`, async () => { let policy: NewPackagePolicy = getMockPolicyEKS(); policy = getPosturePolicy(policy, CLOUDBEAT_EKS, { 'aws.credentials.type': { value: 'temporary_keys' }, 'aws.setup.format': { value: 'manual' }, }); - const { getByLabelText } = render(); + const { getByLabelText } = render( + + ); const option = getByLabelText('Temporary keys'); expect(option).toBeChecked(); expect(getByLabelText('Access Key ID')).toBeInTheDocument(); - expect(getByLabelText('Secret Access Key')).toBeInTheDocument(); + await waitFor(() => expect(getByLabelText('Secret Access Key')).toBeInTheDocument()); expect(getByLabelText('Session Token')).toBeInTheDocument(); }); - it(`updates ${CLOUDBEAT_EKS} Temporary Keys fields`, () => { + it(`updates ${CLOUDBEAT_EKS} Temporary Keys fields`, async () => { let policy = getMockPolicyEKS(); policy = getPosturePolicy(policy, CLOUDBEAT_EKS, { 'aws.credentials.type': { value: 'temporary_keys' }, 'aws.setup.format': { value: 'manual' }, }); - const { getByLabelText, rerender } = render(); + const { getByLabelText, rerender, getByTestId } = render( + + ); userEvent.type(getByLabelText('Access Key ID'), 'a'); policy = getPosturePolicy(policy, CLOUDBEAT_EKS, { access_key_id: { value: 'a' } }); @@ -702,17 +722,21 @@ describe('', () => { updatedPolicy: policy, }); - rerender(); + rerender( + + ); - userEvent.type(getByLabelText('Secret Access Key'), 'b'); - policy = getPosturePolicy(policy, CLOUDBEAT_EKS, { secret_access_key: { value: 'b' } }); + await waitFor(() => userEvent.type(getByTestId('passwordInput-secret-access-key'), 'c')); + policy = getPosturePolicy(policy, CLOUDBEAT_EKS, { secret_access_key: { value: 'c' } }); expect(onChange).toHaveBeenCalledWith({ isValid: true, updatedPolicy: policy, }); - rerender(); + rerender( + + ); userEvent.type(getByLabelText('Session Token'), 'a'); policy = getPosturePolicy(policy, CLOUDBEAT_EKS, { session_token: { value: 'a' } }); @@ -907,30 +931,34 @@ describe('', () => { }); }); - it(`renders ${CLOUDBEAT_AWS} Direct Access Keys fields`, () => { + it(`renders ${CLOUDBEAT_AWS} Direct Access Keys fields`, async () => { let policy: NewPackagePolicy = getMockPolicyAWS(); policy = getPosturePolicy(policy, CLOUDBEAT_AWS, { 'aws.credentials.type': { value: 'direct_access_keys' }, 'aws.setup.format': { value: 'manual' }, }); - const { getByLabelText, getByRole } = render(); + const { getByLabelText, getByRole } = render( + + ); expect( getByRole('option', { name: 'Direct access keys', selected: true }) ).toBeInTheDocument(); expect(getByLabelText('Access Key ID')).toBeInTheDocument(); - expect(getByLabelText('Secret Access Key')).toBeInTheDocument(); + await waitFor(() => expect(getByLabelText('Secret Access Key')).toBeInTheDocument()); }); - it(`updates ${CLOUDBEAT_AWS} Direct Access Keys fields`, () => { + it(`updates ${CLOUDBEAT_AWS} Direct Access Keys fields`, async () => { let policy = getMockPolicyAWS(); policy = getPosturePolicy(policy, CLOUDBEAT_AWS, { 'aws.credentials.type': { value: 'direct_access_keys' }, 'aws.setup.format': { value: 'manual' }, }); - const { getByLabelText, rerender } = render(); + const { getByLabelText, rerender, getByTestId } = render( + + ); userEvent.type(getByLabelText('Access Key ID'), 'a'); policy = getPosturePolicy(policy, CLOUDBEAT_AWS, { access_key_id: { value: 'a' } }); @@ -941,9 +969,11 @@ describe('', () => { updatedPolicy: policy, }); - rerender(); + rerender( + + ); - userEvent.type(getByLabelText('Secret Access Key'), 'b'); + await waitFor(() => userEvent.type(getByTestId('passwordInput-secret-access-key'), 'b')); policy = getPosturePolicy(policy, CLOUDBEAT_AWS, { secret_access_key: { value: 'b' } }); expect(onChange).toHaveBeenCalledWith({ @@ -952,28 +982,32 @@ describe('', () => { }); }); - it(`renders ${CLOUDBEAT_AWS} Temporary Keys fields`, () => { + it(`renders ${CLOUDBEAT_AWS} Temporary Keys fields`, async () => { let policy: NewPackagePolicy = getMockPolicyAWS(); policy = getPosturePolicy(policy, CLOUDBEAT_AWS, { 'aws.credentials.type': { value: 'temporary_keys' }, 'aws.setup.format': { value: 'manual' }, }); - const { getByLabelText, getByRole } = render(); + const { getByLabelText, getByRole } = render( + + ); expect(getByRole('option', { name: 'Temporary keys', selected: true })).toBeInTheDocument(); expect(getByLabelText('Access Key ID')).toBeInTheDocument(); - expect(getByLabelText('Secret Access Key')).toBeInTheDocument(); + await waitFor(() => expect(getByLabelText('Secret Access Key')).toBeInTheDocument()); expect(getByLabelText('Session Token')).toBeInTheDocument(); }); - it(`updates ${CLOUDBEAT_AWS} Temporary Keys fields`, () => { + it(`updates ${CLOUDBEAT_AWS} Temporary Keys fields`, async () => { let policy = getMockPolicyAWS(); policy = getPosturePolicy(policy, CLOUDBEAT_AWS, { 'aws.credentials.type': { value: 'temporary_keys' }, 'aws.setup.format': { value: 'manual' }, }); - const { getByLabelText, rerender } = render(); + const { getByLabelText, rerender, getByTestId } = render( + + ); userEvent.type(getByLabelText('Access Key ID'), 'a'); policy = getPosturePolicy(policy, CLOUDBEAT_AWS, { access_key_id: { value: 'a' } }); @@ -983,9 +1017,16 @@ describe('', () => { updatedPolicy: policy, }); - rerender(); + expect(onChange).toHaveBeenCalledWith({ + isValid: true, + updatedPolicy: policy, + }); + + rerender( + + ); - userEvent.type(getByLabelText('Secret Access Key'), 'b'); + await waitFor(() => userEvent.type(getByTestId('passwordInput-secret-access-key'), 'b')); policy = getPosturePolicy(policy, CLOUDBEAT_AWS, { secret_access_key: { value: 'b' } }); expect(onChange).toHaveBeenCalledWith({ @@ -993,7 +1034,9 @@ describe('', () => { updatedPolicy: policy, }); - rerender(); + rerender( + + ); userEvent.type(getByLabelText('Session Token'), 'a'); policy = getPosturePolicy(policy, CLOUDBEAT_AWS, { session_token: { value: 'a' } }); @@ -1384,14 +1427,14 @@ describe('', () => { }); }); - it(`renders ${CLOUDBEAT_AZURE} Service Principal with Client Secret fields`, () => { + it(`renders ${CLOUDBEAT_AZURE} Service Principal with Client Secret fields`, async () => { let policy = getMockPolicyAzure(); policy = getPosturePolicy(policy, CLOUDBEAT_AZURE, { 'azure.credentials.type': { value: 'service_principal_with_client_secret' }, }); const { getByLabelText, getByRole } = render( - + ); expect( @@ -1399,17 +1442,17 @@ describe('', () => { ).toBeInTheDocument(); expect(getByLabelText('Tenant ID')).toBeInTheDocument(); expect(getByLabelText('Client ID')).toBeInTheDocument(); - expect(getByLabelText('Client Secret')).toBeInTheDocument(); + await waitFor(() => expect(getByLabelText('Client Secret')).toBeInTheDocument()); }); - it(`updates ${CLOUDBEAT_AZURE} Service Principal with Client Secret fields`, () => { + it(`updates ${CLOUDBEAT_AZURE} Service Principal with Client Secret fields`, async () => { let policy = getMockPolicyAzure(); policy = getPosturePolicy(policy, CLOUDBEAT_AZURE, { 'azure.credentials.type': { value: 'service_principal_with_client_secret' }, }); - const { rerender, getByLabelText } = render( - + const { rerender, getByLabelText, getByTestId } = render( + ); userEvent.type(getByLabelText('Tenant ID'), 'a'); @@ -1424,7 +1467,7 @@ describe('', () => { }); rerender( - + ); userEvent.type(getByLabelText('Client ID'), 'b'); @@ -1438,10 +1481,10 @@ describe('', () => { }); rerender( - + ); - userEvent.type(getByLabelText('Client Secret'), 'c'); + await waitFor(() => userEvent.type(getByTestId('passwordInput-client-secret'), 'c')); policy = getPosturePolicy(policy, CLOUDBEAT_AZURE, { 'azure.credentials.client_secret': { value: 'c' }, }); @@ -1600,7 +1643,7 @@ describe('', () => { ); @@ -1649,7 +1692,7 @@ describe('', () => { ); @@ -1709,14 +1752,14 @@ describe('', () => { }); }); - it(`renders Service principal with Client Certificate fields`, () => { + it(`renders Service principal with Client Certificate fields`, async () => { let policy = getMockPolicyAzure(); policy = getPosturePolicy(policy, CLOUDBEAT_AZURE, { 'azure.credentials.type': { value: 'service_principal_with_client_certificate' }, }); const { getByLabelText, getByRole } = render( - + ); expect( @@ -1725,17 +1768,17 @@ describe('', () => { expect(getByLabelText('Tenant ID')).toBeInTheDocument(); expect(getByLabelText('Client ID')).toBeInTheDocument(); expect(getByLabelText('Client Certificate Path')).toBeInTheDocument(); - expect(getByLabelText('Client Certificate Password')).toBeInTheDocument(); + await waitFor(() => expect(getByLabelText('Client Certificate Password')).toBeInTheDocument()); }); - it(`updates Service principal with Client Certificate fields`, () => { + it(`updates Service principal with Client Certificate fields`, async () => { let policy = getMockPolicyAzure(); policy = getPosturePolicy(policy, CLOUDBEAT_AZURE, { 'azure.credentials.type': { value: 'service_principal_with_client_certificate' }, }); - const { rerender, getByLabelText } = render( - + const { rerender, getByLabelText, getByTestId } = render( + ); userEvent.type(getByLabelText('Tenant ID'), 'a'); @@ -1750,7 +1793,7 @@ describe('', () => { }); rerender( - + ); userEvent.type(getByLabelText('Client ID'), 'b'); @@ -1764,7 +1807,7 @@ describe('', () => { }); rerender( - + ); userEvent.type(getByLabelText('Client Certificate Path'), 'c'); @@ -1778,10 +1821,12 @@ describe('', () => { }); rerender( - + ); - userEvent.type(getByLabelText('Client Certificate Password'), 'd'); + await waitFor(() => + userEvent.type(getByTestId('passwordInput-client-certificate-password'), 'd') + ); policy = getPosturePolicy(policy, CLOUDBEAT_AZURE, { 'azure.credentials.client_certificate_password': { value: 'd' }, }); diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/utils.test.ts b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/utils.test.ts index 9475298b2d6f3..13bb5398de44c 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/utils.test.ts +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/utils.test.ts @@ -16,8 +16,9 @@ import { getDefaultAwsCredentialsType, getDefaultAzureCredentialsType, getDefaultGcpHiddenVars, + findVariableDef, } from './utils'; -import { getMockPolicyAWS, getMockPolicyK8s, getMockPolicyEKS } from './mocks'; +import { getMockPolicyAWS, getMockPolicyK8s, getMockPolicyEKS, getPackageInfoMock } from './mocks'; describe('getPosturePolicy', () => { for (const [name, getPolicy, expectedVars] of [ @@ -486,3 +487,65 @@ describe('getDefaultGcpHiddenVars', () => { }); }); }); + +describe('findVariableDef', () => { + it('Should return var item when key exist', () => { + const packageInfo = getPackageInfoMock() as PackageInfo; + const key = 'secret_access_key'; + const result = findVariableDef(packageInfo, key); + + expect(result).toMatchObject({ + name: 'secret_access_key', + secret: true, + title: 'Secret Access Key', + }); + }); + + it('Should return undefined when key is invalid', () => { + const packageInfo = getPackageInfoMock() as PackageInfo; + const key = 'invalid_access_key'; + const result = findVariableDef(packageInfo, key); + + expect(result).toBeUndefined(); + }); + + it('Should return undefined when datastream is undefined', () => { + const packageInfo = { + data_streams: [{}], + } as PackageInfo; + const key = 'secret_access_key'; + const result = findVariableDef(packageInfo, key); + + expect(result).toBeUndefined(); + }); + + it('Should return undefined when stream is undefined', () => { + const packageInfo = { + data_streams: [ + { + title: 'Cloud Security Posture Findings', + streams: [{}], + }, + ], + } as PackageInfo; + const key = 'secret_access_key'; + const result = findVariableDef(packageInfo, key); + + expect(result).toBeUndefined(); + }); + + it('Should return undefined when stream.var is invalid', () => { + const packageInfo = { + data_streams: [ + { + title: 'Cloud Security Posture Findings', + streams: [{ vars: {} }], + }, + ], + } as PackageInfo; + const key = 'secret_access_key'; + const result = findVariableDef(packageInfo, key); + + expect(result).toBeUndefined(); + }); +}); diff --git a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/utils.ts b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/utils.ts index 1a42e5dd5c54f..8090117ad5df2 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/utils.ts +++ b/x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/utils.ts @@ -378,3 +378,20 @@ export const isBelowMinVersion = (version: string, minVersion: string) => { const versionNumberOnly = semverCoerce(semanticVersion) || ''; return semverLt(versionNumberOnly, minVersion); }; + +/** + * Searches for a variable definition in a given packageInfo object based on a specified key. + * It navigates through nested arrays within the packageInfo object to locate the variable definition associated with the provided key. + * If found, it returns the variable definition object; otherwise, it returns undefined. + */ +export const findVariableDef = (packageInfo: PackageInfo, key: string) => { + return packageInfo?.data_streams + ?.filter((datastreams) => datastreams !== undefined) + .map((ds) => ds.streams) + .filter((streams) => streams !== undefined) + .flat() + .filter((streams) => streams?.vars !== undefined) + .map((cis) => cis?.vars) + .flat() + .find((vars) => vars?.name === key); +}; diff --git a/x-pack/plugins/cloud_security_posture/public/components/test_subjects.ts b/x-pack/plugins/cloud_security_posture/public/components/test_subjects.ts index ca6fc35c75340..0872dff084498 100644 --- a/x-pack/plugins/cloud_security_posture/public/components/test_subjects.ts +++ b/x-pack/plugins/cloud_security_posture/public/components/test_subjects.ts @@ -66,7 +66,7 @@ export const SETUP_TECHNOLOGY_SELECTOR_TEST_SUBJ = 'setup-technology-selector'; export const CIS_AZURE_INPUT_FIELDS_TEST_SUBJECTS = { TENANT_ID: 'cisAzureTenantId', CLIENT_ID: 'cisAzureClientId', - CLIENT_SECRET: 'cisAzureClientSecret', + CLIENT_SECRET: 'passwordInput-client-secret', CLIENT_CERTIFICATE_PATH: 'cisAzureClientCertificatePath', CLIENT_CERTIFICATE_PASSWORD: 'cisAzureClientCertificatePassword', CLIENT_USERNAME: 'cisAzureClientUsername', diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/esql/use_esql_overall_stats_data.ts b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/esql/use_esql_overall_stats_data.ts index 1d5e2e4626e70..3cb59da17ad8c 100644 --- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/esql/use_esql_overall_stats_data.ts +++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/hooks/esql/use_esql_overall_stats_data.ts @@ -14,7 +14,7 @@ import { type UseCancellableSearch, useCancellableSearch } from '@kbn/ml-cancell import type { estypes } from '@elastic/elasticsearch'; import type { ISearchOptions } from '@kbn/data-plugin/common'; import type { TimeBucketsInterval } from '@kbn/ml-time-buckets'; -import { getESQLWithSafeLimit } from '@kbn/esql-utils'; +import { getESQLWithSafeLimit, ESQL_LATEST_VERSION } from '@kbn/esql-utils'; import { OMIT_FIELDS } from '../../../../../common/constants'; import type { DataStatsFetchProgress, @@ -84,6 +84,7 @@ const getESQLDocumentCountStats = async ( params: { query: esqlBaseQuery + aggQuery, ...(filter ? { filter } : {}), + version: ESQL_LATEST_VERSION, }, }; try { @@ -129,6 +130,7 @@ const getESQLDocumentCountStats = async ( params: { query: esqlBaseQuery + ' | STATS _count_ = COUNT(*) | LIMIT 1', ...(filter ? { filter } : {}), + version: ESQL_LATEST_VERSION, }, }; try { @@ -247,6 +249,7 @@ export const useESQLOverallStatsData = ( params: { query: esqlBaseQuery + '| LIMIT 0', ...(filter ? { filter } : {}), + version: ESQL_LATEST_VERSION, }, }, { strategy: ESQL_SEARCH_STRATEGY } diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/esql_requests/get_count_and_cardinality.ts b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/esql_requests/get_count_and_cardinality.ts index 41bc6e4b52b6d..9bcf5e7190fb2 100644 --- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/esql_requests/get_count_and_cardinality.ts +++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/esql_requests/get_count_and_cardinality.ts @@ -9,6 +9,7 @@ import pLimit from 'p-limit'; import { chunk } from 'lodash'; import { isDefined } from '@kbn/ml-is-defined'; import type { ESQLSearchReponse } from '@kbn/es-types'; +import { ESQL_LATEST_VERSION } from '@kbn/esql-utils'; import type { UseCancellableSearch } from '@kbn/ml-cancellable-search'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { i18n } from '@kbn/i18n'; @@ -105,6 +106,7 @@ const getESQLOverallStatsInChunk = async ({ params: { query, ...(filter ? { filter } : {}), + version: ESQL_LATEST_VERSION, }, }; diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/esql_requests/get_date_field_stats.ts b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/esql_requests/get_date_field_stats.ts index fb06899466576..846aadf7e17ad 100644 --- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/esql_requests/get_date_field_stats.ts +++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/esql_requests/get_date_field_stats.ts @@ -8,6 +8,7 @@ import type { UseCancellableSearch } from '@kbn/ml-cancellable-search'; import type { QueryDslQueryContainer } from '@kbn/data-views-plugin/common/types'; import { ESQL_SEARCH_STRATEGY } from '@kbn/data-plugin/common'; +import { ESQL_LATEST_VERSION } from '@kbn/esql-utils'; import type { Column } from '../../hooks/esql/use_esql_overall_stats_data'; import { getSafeESQLName } from '../requests/esql_utils'; import type { DateFieldStats, FieldStatsError } from '../../../../../common/types/field_stats'; @@ -40,6 +41,7 @@ export const getESQLDateFieldStats = async ({ params: { query: esqlBaseQuery + dateStatsQuery, ...(filter ? { filter } : {}), + version: ESQL_LATEST_VERSION, }, }; try { diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/esql_requests/get_numeric_field_stats.ts b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/esql_requests/get_numeric_field_stats.ts index 2f0ea4d7b3070..615d07abc4066 100644 --- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/esql_requests/get_numeric_field_stats.ts +++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/esql_requests/get_numeric_field_stats.ts @@ -8,6 +8,7 @@ import type { UseCancellableSearch } from '@kbn/ml-cancellable-search'; import type { QueryDslQueryContainer } from '@kbn/data-views-plugin/common/types'; import { ESQL_SEARCH_STRATEGY } from '@kbn/data-plugin/common'; +import { ESQL_LATEST_VERSION } from '@kbn/esql-utils'; import { chunk } from 'lodash'; import pLimit from 'p-limit'; import type { Column } from '../../hooks/esql/use_esql_overall_stats_data'; @@ -69,6 +70,7 @@ const getESQLNumericFieldStatsInChunk = async ({ params: { query: esqlBaseQuery + numericStatsQuery, ...(filter ? { filter } : {}), + version: ESQL_LATEST_VERSION, }, }; try { diff --git a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/esql_requests/get_text_field_stats.ts b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/esql_requests/get_text_field_stats.ts index d78e286e88d31..f79e6fc9a7145 100644 --- a/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/esql_requests/get_text_field_stats.ts +++ b/x-pack/plugins/data_visualizer/public/application/index_data_visualizer/search_strategy/esql_requests/get_text_field_stats.ts @@ -8,6 +8,7 @@ import type { UseCancellableSearch } from '@kbn/ml-cancellable-search'; import type { QueryDslQueryContainer } from '@kbn/data-views-plugin/common/types'; import { ESQL_SEARCH_STRATEGY } from '@kbn/data-plugin/common'; +import { ESQL_LATEST_VERSION } from '@kbn/esql-utils'; import type { Column } from '../../hooks/esql/use_esql_overall_stats_data'; import type { FieldExamples, FieldStatsError } from '../../../../../common/types/field_stats'; @@ -39,6 +40,7 @@ export const getESQLExampleFieldValues = async ({ `| KEEP ${textFields.map((f) => f.name).join(',')} | LIMIT 10`, ...(filter ? { filter } : {}), + version: ESQL_LATEST_VERSION, }, }; const textFieldsResp = await runRequest(request, { strategy: ESQL_SEARCH_STRATEGY }); diff --git a/x-pack/plugins/ecs_data_quality_dashboard/server/__mocks__/server.ts b/x-pack/plugins/ecs_data_quality_dashboard/server/__mocks__/server.ts index 913c226517ce3..68673fed6fcb4 100644 --- a/x-pack/plugins/ecs_data_quality_dashboard/server/__mocks__/server.ts +++ b/x-pack/plugins/ecs_data_quality_dashboard/server/__mocks__/server.ts @@ -113,7 +113,11 @@ class MockServer { private validateRequest(request: KibanaRequest): KibanaRequest { const config = this.getRoute(request).config; - const validations = config.validate && config.validate?.request; + const validations = config.validate + ? typeof config.validate === 'function' + ? config.validate().request + : config.validate.request + : undefined; if (!validations) { return request; } diff --git a/x-pack/plugins/security_solution/public/assistant/content/anonymization/index.ts b/x-pack/plugins/elastic_assistant/common/anonymization/index.ts similarity index 88% rename from x-pack/plugins/security_solution/public/assistant/content/anonymization/index.ts rename to x-pack/plugins/elastic_assistant/common/anonymization/index.ts index 353cc3b3afce9..d88cc68c36c74 100644 --- a/x-pack/plugins/security_solution/public/assistant/content/anonymization/index.ts +++ b/x-pack/plugins/elastic_assistant/common/anonymization/index.ts @@ -90,3 +90,16 @@ export const DEFAULT_ALLOW_REPLACEMENT = [ 'user.domain', 'user.name', ]; + +export const getDefaultAnonymizationFields = (spaceId: string) => { + const changedAt = new Date().toISOString(); + return DEFAULT_ALLOW.map((field) => ({ + '@timestamp': changedAt, + created_at: changedAt, + created_by: '', + field, + anonymized: DEFAULT_ALLOW_REPLACEMENT.includes(field), + allowed: true, + namespace: spaceId, + })); +}; diff --git a/x-pack/plugins/elastic_assistant/common/constants.ts b/x-pack/plugins/elastic_assistant/common/constants.ts index 0a1481e381abe..97309930b0000 100755 --- a/x-pack/plugins/elastic_assistant/common/constants.ts +++ b/x-pack/plugins/elastic_assistant/common/constants.ts @@ -29,3 +29,8 @@ export const PROMPTS_TABLE_MAX_PAGE_SIZE = 100; // Capabilities export const CAPABILITIES = `${BASE_PATH}/capabilities`; + +/** + Licensing requirements + */ +export const MINIMUM_AI_ASSISTANT_LICENSE = 'platinum' as const; diff --git a/x-pack/plugins/elastic_assistant/kibana.jsonc b/x-pack/plugins/elastic_assistant/kibana.jsonc index f148bbb4ad072..9879ba274d209 100644 --- a/x-pack/plugins/elastic_assistant/kibana.jsonc +++ b/x-pack/plugins/elastic_assistant/kibana.jsonc @@ -12,6 +12,7 @@ "data", "ml", "taskManager", + "licensing", "spaces", "security" ] diff --git a/x-pack/plugins/elastic_assistant/server/__mocks__/anonymization_fields_schema.mock.ts b/x-pack/plugins/elastic_assistant/server/__mocks__/anonymization_fields_schema.mock.ts index 7a36f48d69e8c..e7fd791a209b3 100644 --- a/x-pack/plugins/elastic_assistant/server/__mocks__/anonymization_fields_schema.mock.ts +++ b/x-pack/plugins/elastic_assistant/server/__mocks__/anonymization_fields_schema.mock.ts @@ -6,16 +6,16 @@ */ import { estypes } from '@elastic/elasticsearch'; -import { SearchEsAnonymizationFieldsSchema } from '../ai_assistant_data_clients/anonymization_fields/types'; import { AnonymizationFieldCreateProps, AnonymizationFieldResponse, AnonymizationFieldUpdateProps, PerformBulkActionRequestBody, } from '@kbn/elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.gen'; +import { EsAnonymizationFieldsSchema } from '../ai_assistant_data_clients/anonymization_fields/types'; export const getAnonymizationFieldsSearchEsMock = () => { - const searchResponse: estypes.SearchResponse = { + const searchResponse: estypes.SearchResponse = { took: 3, timed_out: false, _shards: { @@ -41,14 +41,9 @@ export const getAnonymizationFieldsSearchEsMock = () => { namespace: 'default', id: '04128c15-0d1b-4716-a4c5-46997ac7f3bd', field: 'testField', - default_allow: true, - default_allow_replacement: false, + allowed: true, + anonymized: false, created_by: 'elastic', - users: [ - { - name: 'elastic', - }, - ], }, }, ], @@ -59,15 +54,15 @@ export const getAnonymizationFieldsSearchEsMock = () => { export const getCreateAnonymizationFieldSchemaMock = (): AnonymizationFieldCreateProps => ({ field: 'testField', - defaultAllow: false, - defaultAllowReplacement: true, + allowed: false, + anonymized: true, }); export const getUpdateAnonymizationFieldSchemaMock = ( promptId = 'prompt-1' ): AnonymizationFieldUpdateProps => ({ - defaultAllowReplacement: true, - defaultAllow: false, + anonymized: true, + allowed: false, id: promptId, }); @@ -76,16 +71,11 @@ export const getAnonymizationFieldMock = ( ): AnonymizationFieldResponse => ({ id: '04128c15-0d1b-4716-a4c5-46997ac7f3bd', field: 'testField', - defaultAllow: false, + allowed: false, ...params, createdAt: '2019-12-13T16:40:33.400Z', updatedAt: '2019-12-13T16:40:33.400Z', namespace: 'default', - users: [ - { - name: 'elastic', - }, - ], }); export const getQueryAnonymizationFieldParams = ( @@ -94,14 +84,14 @@ export const getQueryAnonymizationFieldParams = ( return isUpdate ? { field: 'testField', - defaultAllowReplacement: true, - defaultAllow: false, + anonymized: true, + allowed: false, id: '1', } : { field: 'test 2', - defaultAllowReplacement: true, - defaultAllow: false, + anonymized: true, + allowed: false, }; }; diff --git a/x-pack/plugins/elastic_assistant/server/__mocks__/prompts_schema.mock.ts b/x-pack/plugins/elastic_assistant/server/__mocks__/prompts_schema.mock.ts index 24ca98dccdf88..404ff5954c004 100644 --- a/x-pack/plugins/elastic_assistant/server/__mocks__/prompts_schema.mock.ts +++ b/x-pack/plugins/elastic_assistant/server/__mocks__/prompts_schema.mock.ts @@ -6,7 +6,7 @@ */ import { estypes } from '@elastic/elasticsearch'; -import { SearchEsPromptsSchema } from '../ai_assistant_data_clients/prompts/types'; +import { EsPromptsSchema } from '../ai_assistant_data_clients/prompts/types'; import { PerformBulkActionRequestBody, PromptCreateProps, @@ -15,7 +15,7 @@ import { } from '@kbn/elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen'; export const getPromptsSearchEsMock = () => { - const searchResponse: estypes.SearchResponse = { + const searchResponse: estypes.SearchResponse = { took: 3, timed_out: false, _shards: { diff --git a/x-pack/plugins/elastic_assistant/server/__mocks__/request_context.ts b/x-pack/plugins/elastic_assistant/server/__mocks__/request_context.ts index 723b8c2707a95..6a4c275a510d6 100644 --- a/x-pack/plugins/elastic_assistant/server/__mocks__/request_context.ts +++ b/x-pack/plugins/elastic_assistant/server/__mocks__/request_context.ts @@ -61,12 +61,14 @@ const createMockConfig = () => ({}); const createAppClientMock = () => ({}); +const license = licensingMock.createLicense({ license: { type: 'platinum' } }); const createRequestContextMock = ( clients: MockClients = createMockClients() ): ElasticAssistantRequestHandlerContextMock => { return { core: clients.core, elasticAssistant: createElasticAssistantRequestContextMock(clients), + licensing: licensingMock.createRequestHandlerContext({ license }), }; }; diff --git a/x-pack/plugins/elastic_assistant/server/__mocks__/response.ts b/x-pack/plugins/elastic_assistant/server/__mocks__/response.ts index 0ba99f6ed1b9f..dc5a2ba0e884a 100644 --- a/x-pack/plugins/elastic_assistant/server/__mocks__/response.ts +++ b/x-pack/plugins/elastic_assistant/server/__mocks__/response.ts @@ -11,9 +11,9 @@ import { estypes } from '@elastic/elasticsearch'; import { EsConversationSchema } from '../ai_assistant_data_clients/conversations/types'; import { FindResponse } from '../ai_assistant_data_clients/find'; import { ConversationResponse } from '@kbn/elastic-assistant-common'; -import { SearchEsPromptsSchema } from '../ai_assistant_data_clients/prompts/types'; +import { EsPromptsSchema } from '../ai_assistant_data_clients/prompts/types'; import { getPromptsSearchEsMock } from './prompts_schema.mock'; -import { SearchEsAnonymizationFieldsSchema } from '../ai_assistant_data_clients/anonymization_fields/types'; +import { EsAnonymizationFieldsSchema } from '../ai_assistant_data_clients/anonymization_fields/types'; import { getAnonymizationFieldsSearchEsMock } from './anonymization_fields_schema.mock'; export const responseMock = { @@ -34,7 +34,7 @@ export const getFindConversationsResultWithSingleHit = (): FindResponse => ({ +export const getFindPromptsResultWithSingleHit = (): FindResponse => ({ page: 1, perPage: 1, total: 1, @@ -42,7 +42,7 @@ export const getFindPromptsResultWithSingleHit = (): FindResponse => ({ + (): FindResponse => ({ page: 1, perPage: 1, total: 1, diff --git a/x-pack/plugins/elastic_assistant/server/__mocks__/server.ts b/x-pack/plugins/elastic_assistant/server/__mocks__/server.ts index 7c6eb0c42ad27..6b31e74e736ac 100644 --- a/x-pack/plugins/elastic_assistant/server/__mocks__/server.ts +++ b/x-pack/plugins/elastic_assistant/server/__mocks__/server.ts @@ -52,11 +52,14 @@ const getVersionedRoute = (router: MockServer['router']): Route => { const route: RegisteredVersionedRoute = router.versioned.getRoute(method, routePath); const firstVersion = Object.values(route.versions)[0]; + const validation = firstVersion.config.validate + ? typeof firstVersion.config.validate === 'function' + ? firstVersion.config.validate().request + : firstVersion.config.validate.request + : undefined; + return { - validate: - firstVersion.config.validate === false - ? false - : firstVersion.config.validate.request || false, + validate: validation ?? false, handler: firstVersion.handler, }; }; diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/anonymization_fields/field_maps_configuration.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/anonymization_fields/field_maps_configuration.ts index c97a20a2ad521..078f71ef2ce47 100644 --- a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/anonymization_fields/field_maps_configuration.ts +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/anonymization_fields/field_maps_configuration.ts @@ -23,12 +23,12 @@ export const assistantAnonymizationFieldsFieldMap: FieldMap = { array: false, required: false, }, - default_allow: { + allowed: { type: 'boolean', array: false, required: false, }, - default_allow_replacement: { + anonymized: { type: 'boolean', array: false, required: false, @@ -53,19 +53,4 @@ export const assistantAnonymizationFieldsFieldMap: FieldMap = { array: false, required: false, }, - users: { - type: 'nested', - array: true, - required: false, - }, - 'users.id': { - type: 'keyword', - array: false, - required: false, - }, - 'users.name': { - type: 'keyword', - array: false, - required: false, - }, }; diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/anonymization_fields/helpers.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/anonymization_fields/helpers.ts index f04a4fa3ade16..29e7f5c75758e 100644 --- a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/anonymization_fields/helpers.ts +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/anonymization_fields/helpers.ts @@ -14,12 +14,31 @@ import { import { AuthenticatedUser } from '@kbn/security-plugin-types-common'; import { CreateAnonymizationFieldSchema, - SearchEsAnonymizationFieldsSchema, + EsAnonymizationFieldsSchema, UpdateAnonymizationFieldSchema, } from './types'; export const transformESToAnonymizationFields = ( - response: estypes.SearchResponse + response: EsAnonymizationFieldsSchema[] +): AnonymizationFieldResponse[] => { + return response.map((anonymizationFieldSchema) => { + const anonymizationField: AnonymizationFieldResponse = { + timestamp: anonymizationFieldSchema['@timestamp'], + createdAt: anonymizationFieldSchema.created_at, + field: anonymizationFieldSchema.field, + allowed: anonymizationFieldSchema.allowed, + anonymized: anonymizationFieldSchema.anonymized, + updatedAt: anonymizationFieldSchema.updated_at, + namespace: anonymizationFieldSchema.namespace, + id: anonymizationFieldSchema.id, + }; + + return anonymizationField; + }); +}; + +export const transformESSearchToAnonymizationFields = ( + response: estypes.SearchResponse ): AnonymizationFieldResponse[] => { return response.hits.hits .filter((hit) => hit._source !== undefined) @@ -29,14 +48,9 @@ export const transformESToAnonymizationFields = ( const anonymizationField: AnonymizationFieldResponse = { timestamp: anonymizationFieldSchema['@timestamp'], createdAt: anonymizationFieldSchema.created_at, - users: - anonymizationFieldSchema.users?.map((user) => ({ - id: user.id, - name: user.name, - })) ?? [], field: anonymizationFieldSchema.field, - defaultAllow: anonymizationFieldSchema.default_allow, - defaultAllowReplacement: anonymizationFieldSchema.default_allow_replacement, + allowed: anonymizationFieldSchema.allowed, + anonymized: anonymizationFieldSchema.anonymized, updatedAt: anonymizationFieldSchema.updated_at, namespace: anonymizationFieldSchema.namespace, id: hit._id, @@ -49,39 +63,29 @@ export const transformESToAnonymizationFields = ( export const transformToUpdateScheme = ( user: AuthenticatedUser, updatedAt: string, - { defaultAllow, defaultAllowReplacement, id }: AnonymizationFieldUpdateProps + { allowed, anonymized, id }: AnonymizationFieldUpdateProps ): UpdateAnonymizationFieldSchema => { return { id, - users: [ - { - id: user.profile_uid, - name: user.username, - }, - ], updated_at: updatedAt, - default_allow: defaultAllow, - default_allow_replacement: defaultAllowReplacement, + updated_by: user.username, + allowed, + anonymized, }; }; export const transformToCreateScheme = ( user: AuthenticatedUser, createdAt: string, - { defaultAllow, defaultAllowReplacement, field }: AnonymizationFieldCreateProps + { allowed, anonymized, field }: AnonymizationFieldCreateProps ): CreateAnonymizationFieldSchema => { return { updated_at: createdAt, field, - users: [ - { - id: user.profile_uid, - name: user.username, - }, - ], created_at: createdAt, - default_allow: defaultAllow, - default_allow_replacement: defaultAllowReplacement, + created_by: user.username, + allowed, + anonymized, }; }; @@ -94,11 +98,11 @@ export const getUpdateScript = ({ }) => { return { source: ` - if (params.assignEmpty == true || params.containsKey('default_allow')) { - ctx._source.default_allow = params.default_allow; + if (params.assignEmpty == true || params.containsKey('allowed')) { + ctx._source.allowed = params.allowed; } - if (params.assignEmpty == true || params.containsKey('default_allow_replacement')) { - ctx._source.default_allow_replacement = params.default_allow_replacement; + if (params.assignEmpty == true || params.containsKey('anonymized')) { + ctx._source.anonymized = params.anonymized; } ctx._source.updated_at = params.updated_at; `, diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/anonymization_fields/types.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/anonymization_fields/types.ts index 637c1ebdd11c2..9fd67cce94686 100644 --- a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/anonymization_fields/types.ts +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/anonymization_fields/types.ts @@ -5,18 +5,14 @@ * 2.0. */ -export interface SearchEsAnonymizationFieldsSchema { +export interface EsAnonymizationFieldsSchema { id: string; '@timestamp': string; created_at: string; created_by: string; field: string; - default_allow_replacement?: boolean; - default_allow?: boolean; - users?: Array<{ - id?: string; - name?: string; - }>; + anonymized?: boolean; + allowed?: boolean; updated_at?: string; updated_by?: string; namespace: string; @@ -25,12 +21,8 @@ export interface SearchEsAnonymizationFieldsSchema { export interface UpdateAnonymizationFieldSchema { id: string; '@timestamp'?: string; - default_allow_replacement?: boolean; - default_allow?: boolean; - users?: Array<{ - id?: string; - name?: string; - }>; + anonymized?: boolean; + allowed?: boolean; updated_at?: string; updated_by?: string; } @@ -38,12 +30,8 @@ export interface UpdateAnonymizationFieldSchema { export interface CreateAnonymizationFieldSchema { '@timestamp'?: string; field: string; - default_allow_replacement?: boolean; - default_allow?: boolean; - users?: Array<{ - id?: string; - name?: string; - }>; + anonymized?: boolean; + allowed?: boolean; updated_at?: string; updated_by?: string; created_at?: string; diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/prompts/helpers.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/prompts/helpers.ts index 04db04a00b257..84e683121ae75 100644 --- a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/prompts/helpers.ts +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/prompts/helpers.ts @@ -12,10 +12,37 @@ import { PromptUpdateProps, } from '@kbn/elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen'; import { AuthenticatedUser } from '@kbn/security-plugin-types-common'; -import { CreatePromptSchema, SearchEsPromptsSchema, UpdatePromptSchema } from './types'; +import { CreatePromptSchema, EsPromptsSchema, UpdatePromptSchema } from './types'; -export const transformESToPrompts = ( - response: estypes.SearchResponse +export const transformESToPrompts = (response: EsPromptsSchema[]): PromptResponse[] => { + return response.map((promptSchema) => { + const prompt: PromptResponse = { + timestamp: promptSchema['@timestamp'], + createdAt: promptSchema.created_at, + users: + promptSchema.users?.map((user) => ({ + id: user.id, + name: user.name, + })) ?? [], + content: promptSchema.content, + isDefault: promptSchema.is_default, + isNewConversationDefault: promptSchema.is_new_conversation_default, + updatedAt: promptSchema.updated_at, + namespace: promptSchema.namespace, + id: promptSchema.id, + name: promptSchema.name, + promptType: promptSchema.prompt_type, + isShared: promptSchema.is_shared, + createdBy: promptSchema.created_by, + updatedBy: promptSchema.updated_by, + }; + + return prompt; + }); +}; + +export const transformESSearchToPrompts = ( + response: estypes.SearchResponse ): PromptResponse[] => { return response.hits.hits .filter((hit) => hit._source !== undefined) diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/prompts/types.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/prompts/types.ts index 73e03494cfd2c..91f52fb3a0829 100644 --- a/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/prompts/types.ts +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_data_clients/prompts/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -export interface SearchEsPromptsSchema { +export interface EsPromptsSchema { id: string; '@timestamp': string; created_at: string; diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_service/index.test.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_service/index.test.ts index 7553b27064ab9..a96088b413dcf 100644 --- a/x-pack/plugins/elastic_assistant/server/ai_assistant_service/index.test.ts +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_service/index.test.ts @@ -163,6 +163,9 @@ describe('AI Assistant Service', () => { (AIAssistantConversationsDataClient as jest.Mock).mockImplementation( () => conversationsDataClient ); + (clusterClient.search as unknown as jest.Mock).mockResolvedValue({ + hits: { hits: [], total: { value: 0 } }, + }); }); test('should create new AIAssistantConversationsDataClient', async () => { @@ -325,6 +328,7 @@ describe('AI Assistant Service', () => { mappings: {}, }, })); + clusterClient.indices.simulateIndexTemplate.mockImplementationOnce(async () => ({ ...SimulateTemplateResponse, template: { @@ -775,6 +779,9 @@ describe('AI Assistant Service', () => { .mockRejectedValueOnce(new EsErrors.ConnectionError('foo')) .mockRejectedValueOnce(new EsErrors.TimeoutError('timeout')) .mockResolvedValue({ acknowledged: true }); + (clusterClient.search as unknown as jest.Mock).mockResolvedValue({ + hits: { hits: [], total: { value: 0 } }, + }); const assistantService = new AIAssistantService({ logger, diff --git a/x-pack/plugins/elastic_assistant/server/ai_assistant_service/index.ts b/x-pack/plugins/elastic_assistant/server/ai_assistant_service/index.ts index e7f78b732cac2..eeb3c6cc4289d 100644 --- a/x-pack/plugins/elastic_assistant/server/ai_assistant_service/index.ts +++ b/x-pack/plugins/elastic_assistant/server/ai_assistant_service/index.ts @@ -11,6 +11,7 @@ import type { Logger, ElasticsearchClient } from '@kbn/core/server'; import type { TaskManagerSetupContract } from '@kbn/task-manager-plugin/server'; import { AuthenticatedUser } from '@kbn/security-plugin/server'; import { Subject } from 'rxjs'; +import { getDefaultAnonymizationFields } from '../../common/anonymization'; import { AssistantResourceNames } from '../types'; import { AIAssistantConversationsDataClient } from '../ai_assistant_data_clients/conversations'; import { @@ -300,24 +301,24 @@ export class AIAssistantService { ) { try { this.options.logger.debug(`Initializing spaceId level resources for AIAssistantService`); - let conversationsIndexName = await this.conversationsDataStream.getInstalledSpaceName( + const conversationsIndexName = await this.conversationsDataStream.getInstalledSpaceName( spaceId ); if (!conversationsIndexName) { - conversationsIndexName = await this.conversationsDataStream.installSpace(spaceId); + await this.conversationsDataStream.installSpace(spaceId); } - let promptsIndexName = await this.promptsDataStream.getInstalledSpaceName(spaceId); + const promptsIndexName = await this.promptsDataStream.getInstalledSpaceName(spaceId); if (!promptsIndexName) { - promptsIndexName = await this.promptsDataStream.installSpace(spaceId); + await this.promptsDataStream.installSpace(spaceId); } - let anonymizationFieldsIndexName = + const anonymizationFieldsIndexName = await this.anonymizationFieldsDataStream.getInstalledSpaceName(spaceId); + if (!anonymizationFieldsIndexName) { - anonymizationFieldsIndexName = await this.anonymizationFieldsDataStream.installSpace( - spaceId - ); + await this.anonymizationFieldsDataStream.installSpace(spaceId); + this.createDefaultAnonymizationFields(spaceId); } } catch (error) { this.options.logger.error( @@ -326,4 +327,31 @@ export class AIAssistantService { throw error; } } + + private async createDefaultAnonymizationFields(spaceId: string) { + const dataClient = new AIAssistantDataClient({ + logger: this.options.logger, + elasticsearchClientPromise: this.options.elasticsearchClientPromise, + spaceId, + kibanaVersion: this.options.kibanaVersion, + indexPatternsResorceName: this.resourceNames.aliases.anonymizationFields, + currentUser: null, + }); + + const existingAnonymizationFields = await ( + await dataClient?.getReader() + ).search({ + body: { + size: 1, + }, + allow_no_indices: true, + }); + if (existingAnonymizationFields.hits.total.value === 0) { + const writer = await dataClient?.getWriter(); + const res = await writer?.bulk({ + documentsToCreate: getDefaultAnonymizationFields(spaceId), + }); + this.options.logger.info(`Created default anonymization fields: ${res?.docs_created.length}`); + } + } } diff --git a/x-pack/plugins/elastic_assistant/server/lib/data_stream/documents_data_writer.ts b/x-pack/plugins/elastic_assistant/server/lib/data_stream/documents_data_writer.ts index 76248304f0a8e..83b4227275066 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/data_stream/documents_data_writer.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/data_stream/documents_data_writer.ts @@ -36,7 +36,7 @@ interface BulkParams { documentsToCreate?: TCreateParams[]; documentsToUpdate?: TUpdateParams[]; documentsToDelete?: string[]; - getUpdateScript: (document: TUpdateParams, updatedAt: string) => Script; + getUpdateScript?: (document: TUpdateParams, updatedAt: string) => Script; authenticatedUser?: AuthenticatedUser; } @@ -106,14 +106,19 @@ export class DocumentsDataWriter implements DocumentsDataWriter { } }; - private getUpdateDocumentsQuery = async ( - documentsToUpdate: TUpdateParams[], - getUpdateScript: (document: TUpdateParams, updatedAt: string) => Script, - authenticatedUser?: AuthenticatedUser - ) => { - const updatedAt = new Date().toISOString(); - const filterByUser = authenticatedUser - ? [ + getFilterByUser = (authenticatedUser: AuthenticatedUser) => ({ + filter: { + bool: { + should: [ + { + bool: { + must_not: { + exists: { + field: 'users', + }, + }, + }, + }, { nested: { path: 'users', @@ -130,8 +135,17 @@ export class DocumentsDataWriter implements DocumentsDataWriter { }, }, }, - ] - : []; + ], + }, + }, + }); + + private getUpdateDocumentsQuery = async ( + documentsToUpdate: TUpdateParams[], + getUpdateScript: (document: TUpdateParams, updatedAt: string) => Script, + authenticatedUser?: AuthenticatedUser + ) => { + const updatedAt = new Date().toISOString(); const responseToUpdate = await this.options.esClient.search({ body: { @@ -149,8 +163,8 @@ export class DocumentsDataWriter implements DocumentsDataWriter { ], }, }, - ...filterByUser, ], + ...(authenticatedUser ? this.getFilterByUser(authenticatedUser) : {}), }, }, }, @@ -184,27 +198,6 @@ export class DocumentsDataWriter implements DocumentsDataWriter { documentsToDelete: string[], authenticatedUser?: AuthenticatedUser ) => { - const filterByUser = authenticatedUser - ? [ - { - nested: { - path: 'users', - query: { - bool: { - must: [ - { - match: authenticatedUser.profile_uid - ? { 'users.id': authenticatedUser.profile_uid } - : { 'users.name': authenticatedUser.username }, - }, - ], - }, - }, - }, - }, - ] - : []; - const responseToDelete = await this.options.esClient.search({ body: { query: { @@ -221,8 +214,8 @@ export class DocumentsDataWriter implements DocumentsDataWriter { ], }, }, - ...filterByUser, ], + ...(authenticatedUser ? this.getFilterByUser(authenticatedUser) : {}), }, }, }, @@ -246,13 +239,12 @@ export class DocumentsDataWriter implements DocumentsDataWriter { private buildBulkOperations = async ( params: BulkParams ): Promise => { - const documentCreateBody = - params.authenticatedUser && params.documentsToCreate - ? params.documentsToCreate.flatMap((document) => [ - { create: { _index: this.options.index, _id: uuidV4() } }, - document, - ]) - : []; + const documentCreateBody = params.documentsToCreate + ? params.documentsToCreate.flatMap((document) => [ + { create: { _index: this.options.index, _id: uuidV4() } }, + document, + ]) + : []; const documentDeletedBody = params.documentsToDelete && params.documentsToDelete.length > 0 @@ -260,7 +252,7 @@ export class DocumentsDataWriter implements DocumentsDataWriter { : []; const documentUpdatedBody = - params.documentsToUpdate && params.documentsToUpdate.length > 0 + params.documentsToUpdate && params.documentsToUpdate.length > 0 && params.getUpdateScript ? await this.getUpdateDocumentsQuery( params.documentsToUpdate, params.getUpdateScript, diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/execute_custom_llm_chain/index.test.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/execute_custom_llm_chain/index.test.ts index 4c182f2fb652a..28d765b03b4d5 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/execute_custom_llm_chain/index.test.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/execute_custom_llm_chain/index.test.ts @@ -10,17 +10,19 @@ import { elasticsearchServiceMock } from '@kbn/core-elasticsearch-server-mocks'; import { coreMock } from '@kbn/core/server/mocks'; import { KibanaRequest } from '@kbn/core/server'; import { loggerMock } from '@kbn/logging-mocks'; +import { initializeAgentExecutorWithOptions } from 'langchain/agents'; -import { ActionsClientLlm } from '../llm/actions_client_llm'; -import { ActionsClientChatOpenAI } from '../llm/openai'; import { mockActionResponse } from '../../../__mocks__/action_result_data'; import { langChainMessages } from '../../../__mocks__/lang_chain_messages'; import { ESQL_RESOURCE } from '../../../routes/knowledge_base/constants'; import { callAgentExecutor } from '.'; import { Stream } from 'stream'; +import { ActionsClientChatOpenAI, ActionsClientLlm } from '@kbn/elastic-assistant-common/impl/llm'; -jest.mock('../llm/actions_client_llm'); -jest.mock('../llm/openai'); +jest.mock('@kbn/elastic-assistant-common/impl/llm', () => ({ + ActionsClientChatOpenAI: jest.fn(), + ActionsClientLlm: jest.fn(), +})); const mockConversationChain = { call: jest.fn(), @@ -38,14 +40,7 @@ const mockCall = jest.fn().mockImplementation(() => }) ); const mockInvoke = jest.fn().mockImplementation(() => Promise.resolve()); -jest.mock('langchain/agents', () => ({ - initializeAgentExecutorWithOptions: jest.fn().mockImplementation((_a, _b, { agentType }) => ({ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - call: (props: any) => mockCall({ ...props, agentType }), - // eslint-disable-next-line @typescript-eslint/no-explicit-any - invoke: (props: any) => mockInvoke({ ...props, agentType }), - })), -})); +jest.mock('langchain/agents'); jest.mock('../elasticsearch_store/elasticsearch_store', () => ({ ElasticsearchStore: jest.fn().mockImplementation(() => ({ @@ -57,7 +52,7 @@ jest.mock('../elasticsearch_store/elasticsearch_store', () => ({ const mockConnectorId = 'mock-connector-id'; // eslint-disable-next-line @typescript-eslint/no-explicit-any -const mockRequest: KibanaRequest = {} as KibanaRequest< +const mockRequest: KibanaRequest = { body: {} } as KibanaRequest< unknown, unknown, any, // eslint-disable-line @typescript-eslint/no-explicit-any @@ -85,6 +80,14 @@ const defaultProps = { describe('callAgentExecutor', () => { beforeEach(() => { jest.clearAllMocks(); + (initializeAgentExecutorWithOptions as jest.Mock).mockImplementation( + (_a, _b, { agentType }) => ({ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + call: (props: any, more: any) => mockCall({ ...props, agentType }, more), + // eslint-disable-next-line @typescript-eslint/no-explicit-any + invoke: (props: any, more: any) => mockInvoke({ ...props, agentType }, more), + }) + ); }); describe('callAgentExecutor', () => { @@ -178,5 +181,33 @@ describe('callAgentExecutor', () => { 'X-Content-Type-Options': 'nosniff', }); }); + + it('onLlmResponse gets called only after final chain step', async () => { + const mockInvokeWithChainCallback = jest.fn().mockImplementation((a, b, c, d, e, f, g) => { + b.callbacks[0].handleChainEnd({ output: 'hi' }, '123', '456'); + b.callbacks[0].handleChainEnd({ output: 'hello' }, '123'); + return Promise.resolve(); + }); + (initializeAgentExecutorWithOptions as jest.Mock).mockImplementation( + (_a, _b, { agentType }) => ({ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + call: (props: any, more: any) => mockCall({ ...props, agentType }, more), + // eslint-disable-next-line @typescript-eslint/no-explicit-any + invoke: (props: any, more: any) => + mockInvokeWithChainCallback({ ...props, agentType }, more), + }) + ); + const onLlmResponse = jest.fn(); + await callAgentExecutor({ ...defaultProps, onLlmResponse, isStream: true }); + + expect(onLlmResponse).toHaveBeenCalledWith( + 'hello', + { + traceId: undefined, + transactionId: undefined, + }, + false + ); + }); }); }); diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/execute_custom_llm_chain/index.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/execute_custom_llm_chain/index.ts index 12a8dd9b409d8..24083fb6267ce 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/execute_custom_llm_chain/index.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/execute_custom_llm_chain/index.ts @@ -12,9 +12,8 @@ import { ToolInterface } from '@langchain/core/tools'; import { streamFactory } from '@kbn/ml-response-stream/server'; import { transformError } from '@kbn/securitysolution-es-utils'; import { RetrievalQAChain } from 'langchain/chains'; +import { ActionsClientChatOpenAI, ActionsClientLlm } from '@kbn/elastic-assistant-common/impl/llm'; import { ElasticsearchStore } from '../elasticsearch_store/elasticsearch_store'; -import { ActionsClientChatOpenAI } from '../llm/openai'; -import { ActionsClientLlm } from '../llm/actions_client_llm'; import { KNOWLEDGE_BASE_INDEX_PATTERN } from '../../../routes/knowledge_base/constants'; import { AgentExecutor } from '../executors/types'; import { withAssistantSpan } from '../tracers/with_assistant_span'; @@ -31,8 +30,7 @@ export const callAgentExecutor: AgentExecutor = async ({ abortSignal, actions, alertsIndexPattern, - allow, - allowReplacement, + anonymizationFields, isEnabledKnowledgeBase, assistantTools = [], connectorId, @@ -61,6 +59,7 @@ export const callAgentExecutor: AgentExecutor = async ({ request, llmType, logger, + model: request.body.model, signal: abortSignal, streaming: isStream, // prevents the agent from retrying on failure @@ -96,8 +95,7 @@ export const callAgentExecutor: AgentExecutor = async ({ // Fetch any applicable tools that the source plugin may have registered const assistantToolParams: AssistantToolParams = { - allow, - allowReplacement, + anonymizationFields, alertsIndexPattern, isEnabledKnowledgeBase, chain, @@ -145,12 +143,16 @@ export const callAgentExecutor: AgentExecutor = async ({ let didEnd = false; - const handleStreamEnd = (finalResponse: string) => { + const handleStreamEnd = (finalResponse: string, isError = false) => { if (onLlmResponse) { - onLlmResponse(finalResponse, { - transactionId: streamingSpan?.transaction?.ids?.['transaction.id'], - traceId: streamingSpan?.ids?.['trace.id'], - }); + onLlmResponse( + finalResponse, + { + transactionId: streamingSpan?.transaction?.ids?.['transaction.id'], + traceId: streamingSpan?.ids?.['trace.id'], + }, + isError + ); } streamEnd(); didEnd = true; @@ -179,8 +181,11 @@ export const callAgentExecutor: AgentExecutor = async ({ message += payload; } }, - handleChainEnd(llmResult) { - handleStreamEnd(llmResult.output); + handleChainEnd(outputs, runId, parentRunId) { + // if parentRunId is undefined, this is the end of the stream + if (!parentRunId) { + handleStreamEnd(outputs.output); + } }, }, apmTracer, @@ -202,7 +207,7 @@ export const callAgentExecutor: AgentExecutor = async ({ } logger.error(`Error streaming from LangChain: ${error.message}`); push({ payload: error.message, type: 'content' }); - handleStreamEnd(error.message); + handleStreamEnd(error.message, true); }); return responseWithHeaders; diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/executors/openai_functions_executor.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/executors/openai_functions_executor.ts index 4e037323bf034..989e2935c82ef 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/executors/openai_functions_executor.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/executors/openai_functions_executor.ts @@ -10,8 +10,8 @@ import { RetrievalQAChain } from 'langchain/chains'; import { BufferMemory, ChatMessageHistory } from 'langchain/memory'; import { ChainTool } from 'langchain/tools/chain'; +import { ActionsClientLlm } from '@kbn/elastic-assistant-common/impl/llm'; import { ElasticsearchStore } from '../elasticsearch_store/elasticsearch_store'; -import { ActionsClientLlm } from '../llm/actions_client_llm'; import { KNOWLEDGE_BASE_INDEX_PATTERN } from '../../../routes/knowledge_base/constants'; import { AgentExecutor } from './types'; import { withAssistantSpan } from '../tracers/with_assistant_span'; @@ -39,7 +39,14 @@ export const callOpenAIFunctionsExecutor: AgentExecutor = async ({ telemetry, traceOptions, }) => { - const llm = new ActionsClientLlm({ actions, connectorId, request, llmType, logger }); + const llm = new ActionsClientLlm({ + actions, + connectorId, + request, + llmType, + logger, + model: request.body.model, + }); const pastMessages = langChainMessages.slice(0, -1); // all but the last message const latestMessage = langChainMessages.slice(-1); // the last message diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/executors/types.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/executors/types.ts index 580e078120b72..0e7925df20281 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/executors/types.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/executors/types.ts @@ -14,6 +14,7 @@ import type { LangChainTracer } from '@langchain/core/tracers/tracer_langchain'; import type { AnalyticsServiceSetup } from '@kbn/core-analytics-server'; import { ExecuteConnectorRequestBody, Message, Replacements } from '@kbn/elastic-assistant-common'; import { StreamFactoryReturnType } from '@kbn/ml-response-stream/server'; +import { AnonymizationFieldResponse } from '@kbn/elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.gen'; import { ResponseBody } from '../types'; import type { AssistantTool } from '../../../types'; @@ -21,8 +22,7 @@ export interface AgentExecutorParams { abortSignal?: AbortSignal; alertsIndexPattern?: string; actions: ActionsPluginStart; - allow?: string[]; - allowReplacement?: string[]; + anonymizationFields?: AnonymizationFieldResponse[]; isEnabledKnowledgeBase: boolean; assistantTools?: AssistantTool[]; connectorId: string; @@ -34,7 +34,11 @@ export interface AgentExecutorParams { onNewReplacements?: (newReplacements: Replacements) => void; replacements: Replacements; isStream?: T; - onLlmResponse?: (content: string, traceData?: Message['traceData']) => Promise; + onLlmResponse?: ( + content: string, + traceData?: Message['traceData'], + isError?: boolean + ) => Promise; request: KibanaRequest; size?: number; elserId?: string; diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/helpers.test.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/helpers.test.ts index 8aa3e52befa32..f2872b4e8b946 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/helpers.test.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/helpers.test.ts @@ -6,14 +6,13 @@ */ import { KibanaRequest } from '@kbn/core-http-server'; -import type { Message } from '@kbn/elastic-assistant'; +import type { Message } from '@kbn/elastic-assistant-common'; import { AIMessage, BaseMessage, HumanMessage, SystemMessage } from '@langchain/core/messages'; import { ExecuteConnectorRequestBody } from '@kbn/elastic-assistant-common'; import { getLangChainMessage, getLangChainMessages, - getMessageContentAndRole, requestHasRequiredAnonymizationParams, } from './helpers'; import { langChainMessages } from '../../__mocks__/lang_chain_messages'; @@ -97,84 +96,10 @@ describe('helpers', () => { }); }); - describe('getMessageContentAndRole', () => { - const testCases: Array<[string, Pick]> = [ - ['Prompt 1', { content: 'Prompt 1', role: 'user' }], - ['Prompt 2', { content: 'Prompt 2', role: 'user' }], - ['', { content: '', role: 'user' }], - ]; - - testCases.forEach(([prompt, expectedOutput]) => { - test(`Given the prompt "${prompt}", it returns the prompt as content with a "user" role`, () => { - const result = getMessageContentAndRole(prompt); - - expect(result).toEqual(expectedOutput); - }); - }); - }); - describe('requestHasRequiredAnonymizationParams', () => { it('returns true if the request has valid anonymization params', () => { const request = { body: { - allow: ['a', 'b', 'c'], - allowReplacement: ['b', 'c'], - replacements: { key: 'value' }, - }, - } as unknown as KibanaRequest; - - const result = requestHasRequiredAnonymizationParams(request); - - expect(result).toBe(true); - }); - - it('returns false if allow is undefined', () => { - const request = { - body: { - // allow is undefined - allowReplacement: ['b', 'c'], - replacements: { key: 'value' }, - }, - } as unknown as KibanaRequest; - - const result = requestHasRequiredAnonymizationParams(request); - - expect(result).toBe(false); - }); - - it('returns false if allow is empty', () => { - const request = { - body: { - allow: [], // <-- empty - allowReplacement: ['b', 'c'], - replacements: { key: 'value' }, - }, - } as unknown as KibanaRequest; - - const result = requestHasRequiredAnonymizationParams(request); - - expect(result).toBe(false); - }); - - it('returns false if allow has non-string values', () => { - const request = { - body: { - allow: ['a', 9876, 'c'], // <-- non-string value - allowReplacement: ['b', 'c'], - replacements: { key: 'value' }, - }, - } as unknown as KibanaRequest; - - const result = requestHasRequiredAnonymizationParams(request); - - expect(result).toBe(false); - }); - - it('returns true if allowReplacement is empty', () => { - const request = { - body: { - allow: ['a', 'b', 'c'], - allowReplacement: [], replacements: { key: 'value' }, }, } as unknown as KibanaRequest; @@ -184,25 +109,9 @@ describe('helpers', () => { expect(result).toBe(true); }); - it('returns false if allowReplacement has non-string values', () => { - const request = { - body: { - allow: ['a', 'b', 'c'], - allowReplacement: ['b', 12345], // <-- non-string value - replacements: { key: 'value' }, - }, - } as unknown as KibanaRequest; - - const result = requestHasRequiredAnonymizationParams(request); - - expect(result).toBe(false); - }); - it('returns true if replacements is empty', () => { const request = { body: { - allow: ['a', 'b', 'c'], - allowReplacement: ['b', 'c'], replacements: {}, }, } as unknown as KibanaRequest; @@ -215,8 +124,6 @@ describe('helpers', () => { it('returns false if replacements has non-string values', () => { const request = { body: { - allow: ['a', 'b', 'c'], - allowReplacement: ['b', 'c'], replacements: { key: 76543 }, // <-- non-string value }, } as unknown as KibanaRequest; diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/helpers.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/helpers.ts index 52aa78e106c01..34f9bd9889e5a 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/helpers.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/helpers.ts @@ -6,7 +6,7 @@ */ import { KibanaRequest } from '@kbn/core-http-server'; -import type { Message } from '@kbn/elastic-assistant'; +import type { Message } from '@kbn/elastic-assistant-common'; import { AIMessage, BaseMessage, HumanMessage, SystemMessage } from '@langchain/core/messages'; import { ExecuteConnectorRequestBody } from '@kbn/elastic-assistant-common/impl/schemas/actions_connector/post_actions_connector_execute_route.gen'; @@ -30,23 +30,10 @@ export const getLangChainMessages = ( assistantMessages: Array> ): BaseMessage[] => assistantMessages.map(getLangChainMessage); -export const getMessageContentAndRole = (prompt: string): Pick => ({ - content: prompt, - role: 'user', -}); - export const requestHasRequiredAnonymizationParams = ( request: KibanaRequest ): boolean => { - const { allow, allowReplacement, replacements } = request?.body ?? {}; - - const allowIsValid = - Array.isArray(allow) && - allow.length > 0 && // at least one field must be in the allow list - allow.every((item) => typeof item === 'string'); - - const allowReplacementIsValid = - Array.isArray(allowReplacement) && allowReplacement.every((item) => typeof item === 'string'); + const { replacements } = request?.body ?? {}; const replacementsIsValid = typeof replacements === 'object' && @@ -54,5 +41,5 @@ export const requestHasRequiredAnonymizationParams = ( (key) => typeof key === 'string' && typeof replacements[key] === 'string' ); - return allowIsValid && allowReplacementIsValid && replacementsIsValid; + return replacementsIsValid; }; diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/tracers/README.mdx b/x-pack/plugins/elastic_assistant/server/lib/langchain/tracers/README.mdx index 9e5bec7ea3371..b7ddd03ccf811 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/tracers/README.mdx +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/tracers/README.mdx @@ -33,7 +33,7 @@ First, enable the `assistantModelEvaluation` experimental feature flag by adding xpack.securitySolution.enableExperimental: [ 'assistantModelEvaluation' ] ``` -Next, you'll need an APM server to collect the traces. You can either [follow the documentation for installing](https://www.elastic.co/guide/en/apm/guide/current/installing.html) the released artifact, or [run from source](https://github.com/elastic/apm-server#apm-server-development) and set up using the [quickstart guide provided](https://www.elastic.co/guide/en/apm/guide/current/apm-quick-start.html) (be sure to install the APM Server integration to ensure the necessary indices are created!). Once your APM server is running, add your APM server configuration to your `kibana.dev.yml` as well using the following: +Next, you'll need an APM server to collect the traces. You can either [follow the documentation for installing](https://www.elastic.co/guide/en/apm/guide/current/installing.html) the released artifact, or [run from source](https://github.com/elastic/apm-server#apm-server-development) and set up using the [quickstart guide provided](https://www.elastic.co/guide/en/apm/guide/current/apm-quick-start.html) (be sure to install the APM Server integration to ensure the necessary indices are created! In dev environments you must click `Display beta integrations` on main Integrations page to ensure the latest package is installed.). Once your APM server is running, add your APM server configuration to your `kibana.dev.yml` as well using the following: ``` # APM @@ -48,11 +48,13 @@ elastic.apm: servicesOverrides.kibana-frontend.active: false ``` +If using a remote APM Server/Kibana instance for viewing traces, you can set the `APM URL` as outlined in https://github.com/elastic/kibana/pull/180227 so that the `View APM trace` button within the UI will link to the appropriate instance. + > [!NOTE] -> If connecting to a cloud APM server (like our [ai-assistant apm deployment](https://ai-assistant-apm-do-not-delete.kb.us-central1.gcp.cloud.es.io/)), follow [these steps](https://www.elastic.co/guide/en/apm/guide/current/api-key.html#create-an-api-key) to create an API key, and then set it via `apiKey` and also set your `serverUrl` as shown in the APM Integration details within fleet. Note that the `View APM trace` button within the UI will link to your local instance, not the cloud instance. +> If connecting to a cloud APM server (like our [ai-assistant apm deployment](https://ai-assistant-apm-do-not-delete.kb.us-central1.gcp.cloud.es.io/)), follow [these steps](https://www.elastic.co/guide/en/apm/guide/current/api-key.html#create-an-api-key) to create an API key, and then set it via `apiKey` and also set your `serverUrl` as shown in the APM Integration details within fleet. > [!NOTE] -> If you're an Elastic developer running Kibana from source, you can just enable APM as above, and _not_ include a `serverUrl`, and your traces will be sent to the https://kibana-cloud-apm.elastic.dev cluster. Note that the `View APM trace` button within the UI will link to your local instance, not the cloud instance. +> If you're an Elastic developer running Kibana from source, you can just enable APM as above, and _not_ include a `serverUrl`, and your traces will be sent to the https://kibana-cloud-apm.elastic.dev cluster. ### Configuring LangSmith @@ -66,3 +68,5 @@ export LANGCHAIN_API_KEY="" export LANGCHAIN_PROJECT="8.12 ESQL Query Generation" ``` +If wanting to configure LangSmith in cloud or other environments where you may not have the ability to set env vars, you can set the `LangSmith Project` and `LangSmith API Key` values in session storage as outlined in https://github.com/elastic/kibana/pull/180227. + diff --git a/x-pack/plugins/elastic_assistant/server/lib/langchain/types.ts b/x-pack/plugins/elastic_assistant/server/lib/langchain/types.ts index fbf6e428d2265..7ed79cfda0c47 100644 --- a/x-pack/plugins/elastic_assistant/server/lib/langchain/types.ts +++ b/x-pack/plugins/elastic_assistant/server/lib/langchain/types.ts @@ -5,39 +5,6 @@ * 2.0. */ -import { - ChatCompletionContentPart, - ChatCompletionCreateParamsNonStreaming, -} from 'openai/resources/chat/completions'; import { ExecuteConnectorResponse } from '@kbn/elastic-assistant-common'; export type ResponseBody = ExecuteConnectorResponse; - -export interface InvokeAIActionParamsSchema { - messages: Array<{ - role: string; - content: string | ChatCompletionContentPart[]; - name?: string; - function_call?: { - arguments: string; - name: string; - }; - tool_calls?: Array<{ - id: string; - - function: { - arguments: string; - name: string; - }; - - type: string; - }>; - tool_call_id?: string; - }>; - model?: ChatCompletionCreateParamsNonStreaming['model']; - n?: ChatCompletionCreateParamsNonStreaming['n']; - stop?: ChatCompletionCreateParamsNonStreaming['stop']; - temperature?: ChatCompletionCreateParamsNonStreaming['temperature']; - functions?: ChatCompletionCreateParamsNonStreaming['functions']; - signal?: AbortSignal; -} diff --git a/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/bulk_actions_route.test.ts b/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/bulk_actions_route.test.ts index 92f01334a19af..769bd069cb040 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/bulk_actions_route.test.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/bulk_actions_route.test.ts @@ -74,14 +74,14 @@ describe('Perform bulk action route', () => { expect(response.status).toEqual(200); expect(response.body).toEqual({ success: true, - anonymization_fields_count: 2, + anonymization_fields_count: 3, attributes: { results: someBulkActionResults(), summary: { failed: 0, skipped: 0, - succeeded: 2, - total: 2, + succeeded: 3, + total: 3, }, }, }); @@ -94,7 +94,7 @@ describe('Perform bulk action route', () => { (await clients.elasticAssistant.getAIAssistantAnonymizationFieldsDataClient.getWriter()) .bulk as jest.Mock ).mockResolvedValue({ - docs_created: [mockAnonymizationField, mockAnonymizationField], + docs_created: [mockAnonymizationField], docs_updated: [], docs_deleted: [], errors: [ @@ -111,7 +111,7 @@ describe('Perform bulk action route', () => { document: { id: 'failed-anonymization-field-id-3', name: 'Detect Root/Admin Users' }, }, ], - total: 5, + total: 4, }); clients.elasticAssistant.getAIAssistantAnonymizationFieldsDataClient.findDocuments.mockResolvedValueOnce( Promise.resolve(getEmptyFindResult()) @@ -130,9 +130,9 @@ describe('Perform bulk action route', () => { attributes: { summary: { failed: 3, - succeeded: 2, + succeeded: 1, skipped: 0, - total: 5, + total: 4, }, errors: [ { diff --git a/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/bulk_actions_route.ts b/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/bulk_actions_route.ts index 371a537b22ebf..d85377a1dba38 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/bulk_actions_route.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/bulk_actions_route.ts @@ -10,8 +10,8 @@ import type { IKibanaResponse, KibanaResponseFactory, Logger } from '@kbn/core/s import { transformError } from '@kbn/securitysolution-es-utils'; import { + API_VERSIONS, ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_BULK_ACTION, - ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, } from '@kbn/elastic-assistant-common'; import { @@ -29,14 +29,16 @@ import { ElasticAssistantPluginRouter } from '../../types'; import { buildResponse } from '../utils'; import { getUpdateScript, + transformESSearchToAnonymizationFields, transformESToAnonymizationFields, transformToCreateScheme, transformToUpdateScheme, } from '../../ai_assistant_data_clients/anonymization_fields/helpers'; import { - SearchEsAnonymizationFieldsSchema, + EsAnonymizationFieldsSchema, UpdateAnonymizationFieldSchema, } from '../../ai_assistant_data_clients/anonymization_fields/types'; +import { UPGRADE_LICENSE_MESSAGE, hasAIAssistantLicense } from '../helpers'; export interface BulkOperationError { message: string; @@ -127,7 +129,7 @@ export const bulkActionAnonymizationFieldsRoute = ( }) .addVersion( { - version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + version: API_VERSIONS.public.v1, validate: { request: { body: buildRouteValidationWithZod(PerformBulkActionRequestBody), @@ -155,7 +157,15 @@ export const bulkActionAnonymizationFieldsRoute = ( // when route is finished by timeout, aborted$ is not getting fired request.events.completed$.subscribe(() => abortController.abort()); try { - const ctx = await context.resolve(['core', 'elasticAssistant']); + const ctx = await context.resolve(['core', 'elasticAssistant', 'licensing']); + const license = ctx.licensing.license; + if (!hasAIAssistantLicense(license)) { + return response.forbidden({ + body: { + message: UPGRADE_LICENSE_MESSAGE, + }, + }); + } const authenticatedUser = ctx.elasticAssistant.getCurrentUser(); if (authenticatedUser == null) { @@ -168,18 +178,16 @@ export const bulkActionAnonymizationFieldsRoute = ( await ctx.elasticAssistant.getAIAssistantAnonymizationFieldsDataClient(); if (body.create && body.create.length > 0) { - const result = await dataClient?.findDocuments({ + const result = await dataClient?.findDocuments({ perPage: 100, page: 1, - filter: `users:{ id: "${authenticatedUser?.profile_uid}" } AND (${body.create - .map((c) => `field:${c.field}`) - .join(' OR ')})`, + filter: `(${body.create.map((c) => `field:${c.field}`).join(' OR ')})`, fields: ['field'], }); if (result?.data != null && result.total > 0) { return assistantResponse.error({ statusCode: 409, - body: `anonymization for field: "${result.data.hits.hits + body: `anonymization field: "${result.data.hits.hits .map((c) => c._id) .join(',')}" already exists`, }); @@ -204,25 +212,21 @@ export const bulkActionAnonymizationFieldsRoute = ( ), getUpdateScript: (document: UpdateAnonymizationFieldSchema) => getUpdateScript({ anonymizationField: document, isPatch: true }), - authenticatedUser, - }); - - const created = await dataClient?.findDocuments({ - page: 1, - perPage: 1000, - filter: docsCreated.map((c) => `id:${c}`).join(' OR '), - fields: ['id'], - }); - const updated = await dataClient?.findDocuments({ - page: 1, - perPage: 1000, - filter: docsUpdated.map((c) => `id:${c}`).join(' OR '), - fields: ['id'], }); + const created = + docsCreated.length > 0 + ? await dataClient?.findDocuments({ + page: 1, + perPage: 1000, + filter: docsCreated.map((c) => `_id:${c}`).join(' OR '), + }) + : undefined; return buildBulkResponse(response, { - updated: updated?.data ? transformESToAnonymizationFields(updated.data) : [], - created: created?.data ? transformESToAnonymizationFields(created.data) : [], + updated: docsUpdated + ? transformESToAnonymizationFields(docsUpdated as EsAnonymizationFieldsSchema[]) + : [], + created: created?.data ? transformESSearchToAnonymizationFields(created?.data) : [], deleted: docsDeleted ?? [], errors, }); diff --git a/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/find_route.test.ts b/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/find_route.test.ts index e0b3cfc815902..4659503261a6e 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/find_route.test.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/find_route.test.ts @@ -93,7 +93,7 @@ describe('Find user anonymization fields route', () => { const result = server.validate(request); expect(result.badRequest).toHaveBeenCalledWith( - `sort_field: Invalid enum value. Expected 'created_at' | 'is_default' | 'title' | 'updated_at', received 'name'` + `sort_field: Invalid enum value. Expected 'created_at' | 'anonymized' | 'allowed' | 'field' | 'updated_at', received 'name'` ); }); diff --git a/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/find_route.ts b/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/find_route.ts index e081dbbf7616d..904a80d6a3ea4 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/find_route.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/anonymization_fields/find_route.ts @@ -9,8 +9,8 @@ import type { IKibanaResponse, Logger } from '@kbn/core/server'; import { transformError } from '@kbn/securitysolution-es-utils'; import { + API_VERSIONS, ELASTIC_AI_ASSISTANT_ANONYMIZATION_FIELDS_URL_FIND, - ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, } from '@kbn/elastic-assistant-common'; import { @@ -20,8 +20,9 @@ import { import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/schemas/common'; import { ElasticAssistantPluginRouter } from '../../types'; import { buildResponse } from '../utils'; -import { SearchEsAnonymizationFieldsSchema } from '../../ai_assistant_data_clients/anonymization_fields/types'; -import { transformESToAnonymizationFields } from '../../ai_assistant_data_clients/anonymization_fields/helpers'; +import { EsAnonymizationFieldsSchema } from '../../ai_assistant_data_clients/anonymization_fields/types'; +import { transformESSearchToAnonymizationFields } from '../../ai_assistant_data_clients/anonymization_fields/helpers'; +import { UPGRADE_LICENSE_MESSAGE, hasAIAssistantLicense } from '../helpers'; export const findAnonymizationFieldsRoute = ( router: ElasticAssistantPluginRouter, @@ -37,7 +38,7 @@ export const findAnonymizationFieldsRoute = ( }) .addVersion( { - version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + version: API_VERSIONS.public.v1, validate: { request: { query: buildRouteValidationWithZod(FindAnonymizationFieldsRequestQuery), @@ -53,11 +54,19 @@ export const findAnonymizationFieldsRoute = ( try { const { query } = request; - const ctx = await context.resolve(['core', 'elasticAssistant']); + const ctx = await context.resolve(['core', 'elasticAssistant', 'licensing']); + const license = ctx.licensing.license; + if (!hasAIAssistantLicense(license)) { + return response.forbidden({ + body: { + message: UPGRADE_LICENSE_MESSAGE, + }, + }); + } const dataClient = await ctx.elasticAssistant.getAIAssistantAnonymizationFieldsDataClient(); - const result = await dataClient?.findDocuments({ + const result = await dataClient?.findDocuments({ perPage: query.per_page, page: query.page, sortField: query.sort_field, @@ -72,7 +81,7 @@ export const findAnonymizationFieldsRoute = ( perPage: result.perPage, page: result.page, total: result.total, - data: transformESToAnonymizationFields(result.data), + data: transformESSearchToAnonymizationFields(result.data), }, }); } diff --git a/x-pack/plugins/elastic_assistant/server/routes/evaluate/post_evaluate.ts b/x-pack/plugins/elastic_assistant/server/routes/evaluate/post_evaluate.ts index 4c0107d2abd93..6b3cc92da1936 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/evaluate/post_evaluate.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/evaluate/post_evaluate.ts @@ -17,6 +17,7 @@ import { PostEvaluateResponse, ExecuteConnectorRequestBody, } from '@kbn/elastic-assistant-common'; +import { ActionsClientLlm } from '@kbn/elastic-assistant-common/impl/llm'; import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/schemas/common'; import { ESQL_RESOURCE } from '../knowledge_base/constants'; import { buildResponse } from '../../lib/build_response'; @@ -24,7 +25,6 @@ import { ElasticAssistantRequestHandlerContext, GetElser } from '../../types'; import { EVALUATE } from '../../../common/constants'; import { performEvaluation } from '../../lib/model_evaluator/evaluation'; import { AgentExecutorEvaluatorWithMetadata } from '../../lib/langchain/executors/types'; -import { ActionsClientLlm } from '../../lib/langchain/llm/actions_client_llm'; import { indexEvaluations, setupEvaluationIndex, @@ -193,7 +193,11 @@ export const postEvaluateRoute = ( ...(connectorName != null ? [connectorName] : []), runName, ], - tracers: getLangSmithTracer(detailedRunName, exampleId, logger), + tracers: getLangSmithTracer({ + projectName: detailedRunName, + exampleId, + logger, + }), }, replacements: {}, }); @@ -217,6 +221,7 @@ export const postEvaluateRoute = ( connectorId: evalModel, request: skeletonRequest, logger, + model: skeletonRequest.body.model, }); const { evaluationResults, evaluationSummary } = await performEvaluation({ diff --git a/x-pack/plugins/elastic_assistant/server/routes/evaluate/utils.ts b/x-pack/plugins/elastic_assistant/server/routes/evaluate/utils.ts index ab270ca1b6c87..17757b8778771 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/evaluate/utils.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/evaluate/utils.ts @@ -103,22 +103,30 @@ export const writeLangSmithFeedback = async ( * If `exampleId` is present (and a corresponding example exists in LangSmith) trace is written to the Dataset's `Tests` * section, otherwise it is written to the `Project` provided * + * @param apiKey API Key for LangSmith (will fetch from env vars if not provided) * @param projectName Name of project to trace results to * @param exampleId Dataset exampleId to associate trace with * @param logger */ -export const getLangSmithTracer = ( - projectName: string | undefined, - exampleId: string | undefined, - logger: Logger | ToolingLog -): LangChainTracer[] => { +export const getLangSmithTracer = ({ + apiKey, + projectName, + exampleId, + logger, +}: { + apiKey?: string; + projectName?: string; + exampleId?: string; + logger: Logger | ToolingLog; +}): LangChainTracer[] => { try { - if (!isLangSmithEnabled()) { + if (!isLangSmithEnabled() && apiKey == null) { return []; } const lcTracer = new LangChainTracer({ - projectName: projectName ?? 'default', // Shows as the 'test' run's 'name' in langsmith ui + projectName, // Shows as the 'test' run's 'name' in langsmith ui exampleId, + client: new Client({ apiKey }), }); return [lcTracer]; diff --git a/x-pack/plugins/elastic_assistant/server/routes/helpers.ts b/x-pack/plugins/elastic_assistant/server/routes/helpers.ts index 95afcd4b4569b..932eafb4a549b 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/helpers.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/helpers.ts @@ -8,6 +8,8 @@ import { KibanaRequest } from '@kbn/core-http-server'; import { Logger } from '@kbn/core/server'; import { Message, TraceData } from '@kbn/elastic-assistant-common'; +import { ILicense } from '@kbn/licensing-plugin/server'; +import { MINIMUM_AI_ASSISTANT_LICENSE } from '../../common/constants'; interface GetPluginNameFromRequestParams { request: KibanaRequest; @@ -79,3 +81,9 @@ export const getMessageFromRawResponse = ({ }; } }; + +export const hasAIAssistantLicense = (license: ILicense): boolean => + license.hasAtLeast(MINIMUM_AI_ASSISTANT_LICENSE); + +export const UPGRADE_LICENSE_MESSAGE = + 'Your license does not support AI Assistant. Please upgrade your license.'; diff --git a/x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.test.ts b/x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.test.ts index 20b7e8faa8765..dc88f7aae2011 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.test.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.test.ts @@ -22,6 +22,7 @@ import { import { PassThrough } from 'stream'; import { getConversationResponseMock } from '../ai_assistant_data_clients/conversations/update_conversation.test'; import { actionsClientMock } from '@kbn/actions-plugin/server/actions_client/actions_client.mock'; +import { getFindAnonymizationFieldsResultWithSingleHit } from '../__mocks__/response'; const actionsClient = actionsClientMock.create(); jest.mock('../lib/build_response', () => ({ @@ -84,6 +85,7 @@ jest.mock('../lib/langchain/execute_custom_llm_chain', () => ({ })); const existingConversation = getConversationResponseMock(); const reportEvent = jest.fn(); +const appendConversationMessages = jest.fn(); const mockContext = { elasticAssistant: { actions: { @@ -108,7 +110,11 @@ const mockContext = { getAIAssistantConversationsDataClient: jest.fn().mockResolvedValue({ getConversation: jest.fn().mockResolvedValue(existingConversation), updateConversation: jest.fn().mockResolvedValue(existingConversation), - appendConversationMessages: jest.fn().mockResolvedValue(existingConversation), + appendConversationMessages: + appendConversationMessages.mockResolvedValue(existingConversation), + }), + getAIAssistantAnonymizationFieldsDataClient: jest.fn().mockResolvedValue({ + findDocuments: jest.fn().mockResolvedValue(getFindAnonymizationFieldsResultWithSingleHit()), }), }, core: { @@ -127,6 +133,7 @@ const mockRequest = { actionTypeId: '.gen-ai', isEnabledKnowledgeBase: true, isEnabledRAGAlerts: false, + replacements: {}, }, events: { aborted$: NEVER, @@ -284,8 +291,10 @@ describe('postActionsConnectorExecuteRoute', () => { ...mockRequest, body: { ...mockRequest.body, - allow: ['@timestamp'], - allowReplacement: ['host.name'], + anonymizationFields: [ + { id: '@timestamp', field: '@timestamp', allowed: true, anonymized: false }, + { id: 'host.name', field: 'host.name', allowed: true, anonymized: true }, + ], replacements: [], isEnabledRAGAlerts: true, }, @@ -320,8 +329,10 @@ describe('postActionsConnectorExecuteRoute', () => { body: { ...mockRequest.body, isEnabledKnowledgeBase: false, - allow: ['@timestamp'], - allowReplacement: ['host.name'], + anonymizationFields: [ + { id: '@timestamp', field: '@timestamp', allowed: true, anonymized: false }, + { id: 'host.name', field: 'host.name', allowed: true, anonymized: true }, + ], replacements: [], isEnabledRAGAlerts: true, }, @@ -453,8 +464,10 @@ describe('postActionsConnectorExecuteRoute', () => { body: { ...mockRequest.body, isEnabledKnowledgeBase: false, - allow: ['@timestamp'], - allowReplacement: ['host.name'], + anonymizationFields: [ + { id: '@timestamp', field: '@timestamp', allowed: true, anonymized: false }, + { id: 'host.name', field: 'host.name', allowed: true, anonymized: true }, + ], replacements: [], isEnabledRAGAlerts: true, }, @@ -484,6 +497,41 @@ describe('postActionsConnectorExecuteRoute', () => { ); }); + it('Adds error to conversation history', async () => { + const badRequest = { + ...mockRequest, + params: { connectorId: 'bad-connector-id' }, + body: { + ...mockRequest.body, + conversationId: '99999', + }, + }; + + const mockRouter = { + versioned: { + post: jest.fn().mockImplementation(() => { + return { + addVersion: jest.fn().mockImplementation(async (_, handler) => { + await handler(mockContext, badRequest, mockResponse); + expect(appendConversationMessages.mock.calls[1][0].messages[0]).toEqual( + expect.objectContaining({ + content: 'simulated error', + isError: true, + role: 'assistant', + }) + ); + }), + }; + }), + }, + }; + + await postActionsConnectorExecuteRoute( + mockRouter as unknown as IRouter, + mockGetElser + ); + }); + it('reports error events to telemetry - kb off, RAG alerts off', async () => { const badRequest = { ...mockRequest, diff --git a/x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.ts b/x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.ts index 96dd69648912e..e79531826cdeb 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/post_actions_connector_execute.ts @@ -12,7 +12,7 @@ import { StreamFactoryReturnType } from '@kbn/ml-response-stream/server'; import { schema } from '@kbn/config-schema'; import { - ELASTIC_AI_ASSISTANT_INTERNAL_API_VERSION, + API_VERSIONS, ExecuteConnectorRequestBody, Message, Replacements, @@ -37,6 +37,9 @@ import { getMessageFromRawResponse, getPluginNameFromRequest, } from './helpers'; +import { getLangSmithTracer } from './evaluate/utils'; +import { EsAnonymizationFieldsSchema } from '../ai_assistant_data_clients/anonymization_fields/types'; +import { transformESSearchToAnonymizationFields } from '../ai_assistant_data_clients/anonymization_fields/helpers'; export const postActionsConnectorExecuteRoute = ( router: IRouter, @@ -52,7 +55,7 @@ export const postActionsConnectorExecuteRoute = ( }) .addVersion( { - version: ELASTIC_AI_ASSISTANT_INTERNAL_API_VERSION, + version: API_VERSIONS.internal.v1, validate: { request: { body: buildRouteValidationWithZod(ExecuteConnectorRequestBody), @@ -69,6 +72,7 @@ export const postActionsConnectorExecuteRoute = ( const assistantContext = await context.elasticAssistant; const logger: Logger = assistantContext.logger; const telemetry = assistantContext.telemetry; + let onLlmResponse; try { const authenticatedUser = assistantContext.getCurrentUser(); @@ -77,18 +81,23 @@ export const postActionsConnectorExecuteRoute = ( body: `Authenticated user not found`, }); } - const dataClient = await assistantContext.getAIAssistantConversationsDataClient(); + const conversationsDataClient = + await assistantContext.getAIAssistantConversationsDataClient(); + + const anonymizationFieldsDataClient = + await assistantContext.getAIAssistantAnonymizationFieldsDataClient(); let latestReplacements: Replacements = request.body.replacements; const onNewReplacements = (newReplacements: Replacements) => { latestReplacements = { ...latestReplacements, ...newReplacements }; }; - let onLlmResponse; let prevMessages; let newMessage: Pick | undefined; const conversationId = request.body.conversationId; const actionTypeId = request.body.actionTypeId; + const langSmithProject = request.body.langSmithProject; + const langSmithApiKey = request.body.langSmithApiKey; // if message is undefined, it means the user is regenerating a message from the stored conversation if (request.body.message) { @@ -99,7 +108,7 @@ export const postActionsConnectorExecuteRoute = ( } if (conversationId) { - const conversation = await dataClient?.getConversation({ + const conversation = await conversationsDataClient?.getConversation({ id: conversationId, authenticatedUser, }); @@ -109,14 +118,14 @@ export const postActionsConnectorExecuteRoute = ( }); } - // messages are anonymized by dataClient + // messages are anonymized by conversationsDataClient prevMessages = conversation?.messages?.map((c) => ({ role: c.role, content: c.content, })); if (request.body.message) { - const res = await dataClient?.appendConversationMessages({ + const res = await conversationsDataClient?.appendConversationMessages({ existingConversation: conversation, messages: [ { @@ -138,7 +147,7 @@ export const postActionsConnectorExecuteRoute = ( }); } } - const updatedConversation = await dataClient?.getConversation({ + const updatedConversation = await conversationsDataClient?.getConversation({ id: conversationId, authenticatedUser, }); @@ -151,10 +160,11 @@ export const postActionsConnectorExecuteRoute = ( onLlmResponse = async ( content: string, - traceData: Message['traceData'] = {} + traceData: Message['traceData'] = {}, + isError = false ): Promise => { if (updatedConversation) { - await dataClient?.appendConversationMessages({ + await conversationsDataClient?.appendConversationMessages({ existingConversation: updatedConversation, messages: [ getMessageFromRawResponse({ @@ -163,12 +173,13 @@ export const postActionsConnectorExecuteRoute = ( replacements: latestReplacements, }), traceData, + isError, }), ], }); } if (Object.keys(latestReplacements).length > 0) { - await dataClient?.updateConversation({ + await conversationsDataClient?.updateConversation({ conversationUpdateProps: { id: conversationId, replacements: latestReplacements, @@ -240,12 +251,19 @@ export const postActionsConnectorExecuteRoute = ( const elserId = await getElser(request, (await context.core).savedObjects.getClient()); + const anonymizationFieldsRes = + await anonymizationFieldsDataClient?.findDocuments({ + perPage: 1000, + page: 1, + }); + const result: StreamFactoryReturnType['responseWithHeaders'] | StaticReturnType = await callAgentExecutor({ abortSignal, alertsIndexPattern: request.body.alertsIndexPattern, - allow: request.body.allow, - allowReplacement: request.body.allowReplacement, + anonymizationFields: anonymizationFieldsRes + ? transformESSearchToAnonymizationFields(anonymizationFieldsRes.data) + : undefined, actions, isEnabledKnowledgeBase: request.body.isEnabledKnowledgeBase ?? false, assistantTools, @@ -266,6 +284,14 @@ export const postActionsConnectorExecuteRoute = ( replacements: request.body.replacements, size: request.body.size, telemetry, + traceOptions: { + projectName: langSmithProject, + tracers: getLangSmithTracer({ + apiKey: langSmithApiKey, + projectName: langSmithProject, + logger, + }), + }, }); telemetry.reportEvent(INVOKE_ASSISTANT_SUCCESS_EVENT.eventType, { @@ -279,6 +305,9 @@ export const postActionsConnectorExecuteRoute = ( } catch (err) { logger.error(err); const error = transformError(err); + if (onLlmResponse) { + onLlmResponse(error.message, {}, true); + } telemetry.reportEvent(INVOKE_ASSISTANT_ERROR_EVENT.eventType, { isEnabledKnowledgeBase: request.body.isEnabledKnowledgeBase, isEnabledRAGAlerts: request.body.isEnabledRAGAlerts, diff --git a/x-pack/plugins/elastic_assistant/server/routes/prompts/bulk_actions_route.test.ts b/x-pack/plugins/elastic_assistant/server/routes/prompts/bulk_actions_route.test.ts index 659219d4ae648..9d5ba91abdaf4 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/prompts/bulk_actions_route.test.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/prompts/bulk_actions_route.test.ts @@ -70,14 +70,14 @@ describe('Perform bulk action route', () => { expect(response.status).toEqual(200); expect(response.body).toEqual({ success: true, - prompts_count: 2, + prompts_count: 3, attributes: { results: someBulkActionResults(), summary: { failed: 0, skipped: 0, - succeeded: 2, - total: 2, + succeeded: 3, + total: 3, }, }, }); @@ -90,7 +90,7 @@ describe('Perform bulk action route', () => { (await clients.elasticAssistant.getAIAssistantPromptsDataClient.getWriter()) .bulk as jest.Mock ).mockResolvedValue({ - docs_created: [mockPrompt, mockPrompt], + docs_created: [mockPrompt], docs_updated: [], docs_deleted: [], errors: [ @@ -107,7 +107,7 @@ describe('Perform bulk action route', () => { document: { id: 'failed-prompt-id-3', name: 'Detect Root/Admin Users' }, }, ], - total: 5, + total: 4, }); clients.elasticAssistant.getAIAssistantPromptsDataClient.findDocuments.mockResolvedValueOnce( Promise.resolve(getEmptyFindResult()) @@ -126,9 +126,9 @@ describe('Perform bulk action route', () => { attributes: { summary: { failed: 3, - succeeded: 2, + succeeded: 1, skipped: 0, - total: 5, + total: 4, }, errors: [ { diff --git a/x-pack/plugins/elastic_assistant/server/routes/prompts/bulk_actions_route.ts b/x-pack/plugins/elastic_assistant/server/routes/prompts/bulk_actions_route.ts index 8f502fa599839..d90b01b78cfa7 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/prompts/bulk_actions_route.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/prompts/bulk_actions_route.ts @@ -10,8 +10,8 @@ import type { IKibanaResponse, KibanaResponseFactory, Logger } from '@kbn/core/s import { transformError } from '@kbn/securitysolution-es-utils'; import { + API_VERSIONS, ELASTIC_AI_ASSISTANT_PROMPTS_URL_BULK_ACTION, - ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, } from '@kbn/elastic-assistant-common'; import { @@ -32,11 +32,10 @@ import { transformToCreateScheme, transformToUpdateScheme, transformESToPrompts, + transformESSearchToPrompts, } from '../../ai_assistant_data_clients/prompts/helpers'; -import { - SearchEsPromptsSchema, - UpdatePromptSchema, -} from '../../ai_assistant_data_clients/prompts/types'; +import { EsPromptsSchema, UpdatePromptSchema } from '../../ai_assistant_data_clients/prompts/types'; +import { UPGRADE_LICENSE_MESSAGE, hasAIAssistantLicense } from '../helpers'; export interface BulkOperationError { message: string; @@ -124,7 +123,7 @@ export const bulkPromptsRoute = (router: ElasticAssistantPluginRouter, logger: L }) .addVersion( { - version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + version: API_VERSIONS.public.v1, validate: { request: { body: buildRouteValidationWithZod(PerformBulkActionRequestBody), @@ -152,7 +151,15 @@ export const bulkPromptsRoute = (router: ElasticAssistantPluginRouter, logger: L // when route is finished by timeout, aborted$ is not getting fired request.events.completed$.subscribe(() => abortController.abort()); try { - const ctx = await context.resolve(['core', 'elasticAssistant']); + const ctx = await context.resolve(['core', 'elasticAssistant', 'licensing']); + const license = ctx.licensing.license; + if (!hasAIAssistantLicense(license)) { + return response.forbidden({ + body: { + message: UPGRADE_LICENSE_MESSAGE, + }, + }); + } const authenticatedUser = ctx.elasticAssistant.getCurrentUser(); if (authenticatedUser == null) { @@ -164,7 +171,7 @@ export const bulkPromptsRoute = (router: ElasticAssistantPluginRouter, logger: L const dataClient = await ctx.elasticAssistant.getAIAssistantPromptsDataClient(); if (body.create && body.create.length > 0) { - const result = await dataClient?.findDocuments({ + const result = await dataClient?.findDocuments({ perPage: 100, page: 1, filter: `users:{ id: "${authenticatedUser?.profile_uid}" } AND (${body.create @@ -202,23 +209,18 @@ export const bulkPromptsRoute = (router: ElasticAssistantPluginRouter, logger: L getUpdateScript({ prompt: document, isPatch: true }), authenticatedUser, }); - - const created = await dataClient?.findDocuments({ - page: 1, - perPage: 1000, - filter: docsCreated.map((c) => `id:${c}`).join(' OR '), - fields: ['id'], - }); - const updated = await dataClient?.findDocuments({ - page: 1, - perPage: 1000, - filter: docsUpdated.map((c) => `id:${c}`).join(' OR '), - fields: ['id'], - }); + const created = + docsCreated.length > 0 + ? await dataClient?.findDocuments({ + page: 1, + perPage: 100, + filter: docsCreated.map((c) => `_id:${c}`).join(' OR '), + }) + : undefined; return buildBulkResponse(response, { - updated: updated?.data ? transformESToPrompts(updated.data) : [], - created: created?.data ? transformESToPrompts(created.data) : [], + updated: docsUpdated ? transformESToPrompts(docsUpdated as EsPromptsSchema[]) : [], + created: created ? transformESSearchToPrompts(created.data) : [], deleted: docsDeleted ?? [], errors, }); diff --git a/x-pack/plugins/elastic_assistant/server/routes/prompts/find_route.ts b/x-pack/plugins/elastic_assistant/server/routes/prompts/find_route.ts index 6b8634e184f70..f0f198b54eaf3 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/prompts/find_route.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/prompts/find_route.ts @@ -8,10 +8,7 @@ import type { IKibanaResponse, Logger } from '@kbn/core/server'; import { transformError } from '@kbn/securitysolution-es-utils'; -import { - ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, - ELASTIC_AI_ASSISTANT_PROMPTS_URL_FIND, -} from '@kbn/elastic-assistant-common'; +import { API_VERSIONS, ELASTIC_AI_ASSISTANT_PROMPTS_URL_FIND } from '@kbn/elastic-assistant-common'; import { FindPromptsRequestQuery, FindPromptsResponse, @@ -19,8 +16,9 @@ import { import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/schemas/common'; import { ElasticAssistantPluginRouter } from '../../types'; import { buildResponse } from '../utils'; -import { SearchEsPromptsSchema } from '../../ai_assistant_data_clients/prompts/types'; -import { transformESToPrompts } from '../../ai_assistant_data_clients/prompts/helpers'; +import { EsPromptsSchema } from '../../ai_assistant_data_clients/prompts/types'; +import { transformESSearchToPrompts } from '../../ai_assistant_data_clients/prompts/helpers'; +import { UPGRADE_LICENSE_MESSAGE, hasAIAssistantLicense } from '../helpers'; export const findPromptsRoute = (router: ElasticAssistantPluginRouter, logger: Logger) => { router.versioned @@ -33,7 +31,7 @@ export const findPromptsRoute = (router: ElasticAssistantPluginRouter, logger: L }) .addVersion( { - version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + version: API_VERSIONS.public.v1, validate: { request: { query: buildRouteValidationWithZod(FindPromptsRequestQuery), @@ -45,10 +43,18 @@ export const findPromptsRoute = (router: ElasticAssistantPluginRouter, logger: L try { const { query } = request; - const ctx = await context.resolve(['core', 'elasticAssistant']); + const ctx = await context.resolve(['core', 'elasticAssistant', 'licensing']); + const license = ctx.licensing.license; + if (!hasAIAssistantLicense(license)) { + return response.forbidden({ + body: { + message: UPGRADE_LICENSE_MESSAGE, + }, + }); + } const dataClient = await ctx.elasticAssistant.getAIAssistantPromptsDataClient(); - const result = await dataClient?.findDocuments({ + const result = await dataClient?.findDocuments({ perPage: query.per_page, page: query.page, sortField: query.sort_field, @@ -63,7 +69,7 @@ export const findPromptsRoute = (router: ElasticAssistantPluginRouter, logger: L perPage: result.perPage, page: result.page, total: result.total, - data: transformESToPrompts(result.data), + data: transformESSearchToPrompts(result.data), }, }); } diff --git a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/append_conversation_messages_route.ts b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/append_conversation_messages_route.ts index efc98b2cbd858..dad21069e84c0 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/append_conversation_messages_route.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/append_conversation_messages_route.ts @@ -11,12 +11,13 @@ import { ConversationResponse, AppendConversationMessageRequestBody, AppendConversationMessageRequestParams, - ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID_MESSAGES, + API_VERSIONS, } from '@kbn/elastic-assistant-common'; import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/schemas/common'; import { buildResponse } from '../utils'; import { ElasticAssistantPluginRouter } from '../../types'; +import { UPGRADE_LICENSE_MESSAGE, hasAIAssistantLicense } from '../helpers'; export const appendConversationMessageRoute = (router: ElasticAssistantPluginRouter) => { router.versioned @@ -29,7 +30,7 @@ export const appendConversationMessageRoute = (router: ElasticAssistantPluginRou }) .addVersion( { - version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + version: API_VERSIONS.public.v1, validate: { request: { body: buildRouteValidationWithZod(AppendConversationMessageRequestBody), @@ -41,7 +42,15 @@ export const appendConversationMessageRoute = (router: ElasticAssistantPluginRou const assistantResponse = buildResponse(response); const { id } = request.params; try { - const ctx = await context.resolve(['core', 'elasticAssistant']); + const ctx = await context.resolve(['core', 'elasticAssistant', 'licensing']); + const license = ctx.licensing.license; + if (!hasAIAssistantLicense(license)) { + return response.forbidden({ + body: { + message: UPGRADE_LICENSE_MESSAGE, + }, + }); + } const dataClient = await ctx.elasticAssistant.getAIAssistantConversationsDataClient(); const authenticatedUser = ctx.elasticAssistant.getCurrentUser(); if (authenticatedUser == null) { diff --git a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/bulk_actions_route.ts b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/bulk_actions_route.ts index 6f8c924d040ef..fafa5d6cc6e0e 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/bulk_actions_route.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/bulk_actions_route.ts @@ -10,7 +10,6 @@ import type { IKibanaResponse, KibanaResponseFactory, Logger } from '@kbn/core/s import { transformError } from '@kbn/securitysolution-es-utils'; import { - ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BULK_ACTION, BulkActionSkipResult, BulkCrudActionResponse, @@ -19,6 +18,7 @@ import { PerformBulkActionRequestBody, PerformBulkActionResponse, ConversationResponse, + API_VERSIONS, } from '@kbn/elastic-assistant-common'; import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/schemas/common'; import { CONVERSATIONS_TABLE_MAX_PAGE_SIZE } from '../../../common/constants'; @@ -35,6 +35,7 @@ import { transformToUpdateScheme, } from '../../ai_assistant_data_clients/conversations/update_conversation'; import { EsConversationSchema } from '../../ai_assistant_data_clients/conversations/types'; +import { UPGRADE_LICENSE_MESSAGE, hasAIAssistantLicense } from '../helpers'; export interface BulkOperationError { message: string; @@ -126,7 +127,7 @@ export const bulkActionConversationsRoute = ( }) .addVersion( { - version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + version: API_VERSIONS.public.v1, validate: { request: { body: buildRouteValidationWithZod(PerformBulkActionRequestBody), @@ -154,7 +155,15 @@ export const bulkActionConversationsRoute = ( // when route is finished by timeout, aborted$ is not getting fired request.events.completed$.subscribe(() => abortController.abort()); try { - const ctx = await context.resolve(['core', 'elasticAssistant']); + const ctx = await context.resolve(['core', 'elasticAssistant', 'licensing']); + const license = ctx.licensing.license; + if (!hasAIAssistantLicense(license)) { + return response.forbidden({ + body: { + message: UPGRADE_LICENSE_MESSAGE, + }, + }); + } const dataClient = await ctx.elasticAssistant.getAIAssistantConversationsDataClient(); const spaceId = ctx.elasticAssistant.getSpaceId(); const authenticatedUser = ctx.elasticAssistant.getCurrentUser(); diff --git a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/create_route.ts b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/create_route.ts index b63fd02cba40b..2c77312ad52be 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/create_route.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/create_route.ts @@ -8,14 +8,15 @@ import type { IKibanaResponse } from '@kbn/core/server'; import { transformError } from '@kbn/securitysolution-es-utils'; import { - ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL, ConversationCreateProps, ConversationResponse, + API_VERSIONS, } from '@kbn/elastic-assistant-common'; import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/schemas/common'; import { ElasticAssistantPluginRouter } from '../../types'; import { buildResponse } from '../utils'; +import { UPGRADE_LICENSE_MESSAGE, hasAIAssistantLicense } from '../helpers'; export const createConversationRoute = (router: ElasticAssistantPluginRouter): void => { router.versioned @@ -29,7 +30,7 @@ export const createConversationRoute = (router: ElasticAssistantPluginRouter): v }) .addVersion( { - version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + version: API_VERSIONS.public.v1, validate: { request: { body: buildRouteValidationWithZod(ConversationCreateProps), @@ -39,8 +40,15 @@ export const createConversationRoute = (router: ElasticAssistantPluginRouter): v async (context, request, response): Promise> => { const assistantResponse = buildResponse(response); try { - const ctx = await context.resolve(['core', 'elasticAssistant']); - + const ctx = await context.resolve(['core', 'elasticAssistant', 'licensing']); + const license = ctx.licensing.license; + if (!hasAIAssistantLicense(license)) { + return response.forbidden({ + body: { + message: UPGRADE_LICENSE_MESSAGE, + }, + }); + } const dataClient = await ctx.elasticAssistant.getAIAssistantConversationsDataClient(); const authenticatedUser = ctx.elasticAssistant.getCurrentUser(); if (authenticatedUser == null) { diff --git a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/delete_route.ts b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/delete_route.ts index a808a28fc3261..5d761c09f682c 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/delete_route.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/delete_route.ts @@ -7,13 +7,14 @@ import { transformError } from '@kbn/securitysolution-es-utils'; import { - ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID, DeleteConversationRequestParams, + API_VERSIONS, } from '@kbn/elastic-assistant-common'; import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/schemas/common'; import { ElasticAssistantPluginRouter } from '../../types'; import { buildResponse } from '../utils'; +import { UPGRADE_LICENSE_MESSAGE, hasAIAssistantLicense } from '../helpers'; export const deleteConversationRoute = (router: ElasticAssistantPluginRouter) => { router.versioned @@ -26,7 +27,7 @@ export const deleteConversationRoute = (router: ElasticAssistantPluginRouter) => }) .addVersion( { - version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + version: API_VERSIONS.public.v1, validate: { request: { params: buildRouteValidationWithZod(DeleteConversationRequestParams), @@ -38,7 +39,15 @@ export const deleteConversationRoute = (router: ElasticAssistantPluginRouter) => try { const { id } = request.params; - const ctx = await context.resolve(['core', 'elasticAssistant']); + const ctx = await context.resolve(['core', 'elasticAssistant', 'licensing']); + const license = ctx.licensing.license; + if (!hasAIAssistantLicense(license)) { + return response.forbidden({ + body: { + message: UPGRADE_LICENSE_MESSAGE, + }, + }); + } const dataClient = await ctx.elasticAssistant.getAIAssistantConversationsDataClient(); const authenticatedUser = ctx.elasticAssistant.getCurrentUser(); diff --git a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/find_route.ts b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/find_route.ts index e26f24a3b1fff..6eda3e37645c5 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/find_route.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/find_route.ts @@ -9,7 +9,7 @@ import type { IKibanaResponse } from '@kbn/core/server'; import { transformError } from '@kbn/securitysolution-es-utils'; import { - ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + API_VERSIONS, ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_FIND, } from '@kbn/elastic-assistant-common'; import { @@ -21,6 +21,7 @@ import { ElasticAssistantPluginRouter } from '../../types'; import { buildResponse } from '../utils'; import { EsConversationSchema } from '../../ai_assistant_data_clients/conversations/types'; import { transformESSearchToConversations } from '../../ai_assistant_data_clients/conversations/transforms'; +import { UPGRADE_LICENSE_MESSAGE, hasAIAssistantLicense } from '../helpers'; export const findUserConversationsRoute = (router: ElasticAssistantPluginRouter) => { router.versioned @@ -33,7 +34,7 @@ export const findUserConversationsRoute = (router: ElasticAssistantPluginRouter) }) .addVersion( { - version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + version: API_VERSIONS.public.v1, validate: { request: { query: buildRouteValidationWithZod(FindConversationsRequestQuery), @@ -44,7 +45,15 @@ export const findUserConversationsRoute = (router: ElasticAssistantPluginRouter) const assistantResponse = buildResponse(response); try { const { query } = request; - const ctx = await context.resolve(['core', 'elasticAssistant']); + const ctx = await context.resolve(['core', 'elasticAssistant', 'licensing']); + const license = ctx.licensing.license; + if (!hasAIAssistantLicense(license)) { + return response.forbidden({ + body: { + message: UPGRADE_LICENSE_MESSAGE, + }, + }); + } const dataClient = await ctx.elasticAssistant.getAIAssistantConversationsDataClient(); const currentUser = ctx.elasticAssistant.getCurrentUser(); diff --git a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/read_route.ts b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/read_route.ts index 9b11827958360..dd540897b0ece 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/read_route.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/read_route.ts @@ -8,7 +8,7 @@ import type { IKibanaResponse } from '@kbn/core/server'; import { transformError } from '@kbn/securitysolution-es-utils'; import { - ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + API_VERSIONS, ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID, } from '@kbn/elastic-assistant-common'; import { ConversationResponse } from '@kbn/elastic-assistant-common/impl/schemas/conversations/common_attributes.gen'; @@ -16,6 +16,7 @@ import { ReadConversationRequestParams } from '@kbn/elastic-assistant-common/imp import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/schemas/common'; import { buildResponse } from '../utils'; import { ElasticAssistantPluginRouter } from '../../types'; +import { UPGRADE_LICENSE_MESSAGE, hasAIAssistantLicense } from '../helpers'; export const readConversationRoute = (router: ElasticAssistantPluginRouter) => { router.versioned @@ -28,7 +29,7 @@ export const readConversationRoute = (router: ElasticAssistantPluginRouter) => { }) .addVersion( { - version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + version: API_VERSIONS.public.v1, validate: { request: { params: buildRouteValidationWithZod(ReadConversationRequestParams), @@ -41,7 +42,15 @@ export const readConversationRoute = (router: ElasticAssistantPluginRouter) => { const { id } = request.params; try { - const ctx = await context.resolve(['core', 'elasticAssistant']); + const ctx = await context.resolve(['core', 'elasticAssistant', 'licensing']); + const license = ctx.licensing.license; + if (!hasAIAssistantLicense(license)) { + return response.forbidden({ + body: { + message: UPGRADE_LICENSE_MESSAGE, + }, + }); + } const authenticatedUser = ctx.elasticAssistant.getCurrentUser(); if (authenticatedUser == null) { return assistantResponse.error({ diff --git a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/update_route.ts b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/update_route.ts index 3ed2a35d03124..213ea1e20a9ff 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/user_conversations/update_route.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/user_conversations/update_route.ts @@ -8,7 +8,7 @@ import type { IKibanaResponse } from '@kbn/core/server'; import { transformError } from '@kbn/securitysolution-es-utils'; import { - ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + API_VERSIONS, ELASTIC_AI_ASSISTANT_CONVERSATIONS_URL_BY_ID, } from '@kbn/elastic-assistant-common'; import { @@ -19,6 +19,7 @@ import { UpdateConversationRequestParams } from '@kbn/elastic-assistant-common/i import { buildRouteValidationWithZod } from '@kbn/elastic-assistant-common/impl/schemas/common'; import { ElasticAssistantPluginRouter } from '../../types'; import { buildResponse } from '../utils'; +import { UPGRADE_LICENSE_MESSAGE, hasAIAssistantLicense } from '../helpers'; export const updateConversationRoute = (router: ElasticAssistantPluginRouter) => { router.versioned @@ -31,7 +32,7 @@ export const updateConversationRoute = (router: ElasticAssistantPluginRouter) => }) .addVersion( { - version: ELASTIC_AI_ASSISTANT_API_CURRENT_VERSION, + version: API_VERSIONS.public.v1, validate: { request: { body: buildRouteValidationWithZod(ConversationUpdateProps), @@ -43,7 +44,15 @@ export const updateConversationRoute = (router: ElasticAssistantPluginRouter) => const assistantResponse = buildResponse(response); const { id } = request.params; try { - const ctx = await context.resolve(['core', 'elasticAssistant']); + const ctx = await context.resolve(['core', 'elasticAssistant', 'licensing']); + const license = ctx.licensing.license; + if (!hasAIAssistantLicense(license)) { + return response.forbidden({ + body: { + message: UPGRADE_LICENSE_MESSAGE, + }, + }); + } const dataClient = await ctx.elasticAssistant.getAIAssistantConversationsDataClient(); const authenticatedUser = ctx.elasticAssistant.getCurrentUser(); diff --git a/x-pack/plugins/elastic_assistant/server/types.ts b/x-pack/plugins/elastic_assistant/server/types.ts index 2252ef65d640d..d7e4cc4d56366 100755 --- a/x-pack/plugins/elastic_assistant/server/types.ts +++ b/x-pack/plugins/elastic_assistant/server/types.ts @@ -31,6 +31,8 @@ import { ExecuteConnectorRequestBody, Replacements, } from '@kbn/elastic-assistant-common'; +import { AnonymizationFieldResponse } from '@kbn/elastic-assistant-common/impl/schemas/anonymization_fields/bulk_crud_anonymization_fields_route.gen'; +import { LicensingApiRequestHandlerContext } from '@kbn/licensing-plugin/server'; import { AIAssistantConversationsDataClient } from './ai_assistant_data_clients/conversations'; import type { GetRegisteredFeatures, GetRegisteredTools } from './services/app_context'; import { AIAssistantDataClient } from './ai_assistant_data_clients'; @@ -111,6 +113,7 @@ export interface ElasticAssistantApiRequestHandlerContext { */ export type ElasticAssistantRequestHandlerContext = CustomRequestHandlerContext<{ elasticAssistant: ElasticAssistantApiRequestHandlerContext; + licensing: LicensingApiRequestHandlerContext; }>; export type ElasticAssistantPluginRouter = IRouter; @@ -198,8 +201,7 @@ export interface AssistantTool { export interface AssistantToolParams { alertsIndexPattern?: string; - allow?: string[]; - allowReplacement?: string[]; + anonymizationFields?: AnonymizationFieldResponse[]; isEnabledKnowledgeBase: boolean; chain: RetrievalQAChain; esClient: ElasticsearchClient; diff --git a/x-pack/plugins/elastic_assistant/tsconfig.json b/x-pack/plugins/elastic_assistant/tsconfig.json index 8aa96c7b22bd9..207fbefce69e9 100644 --- a/x-pack/plugins/elastic_assistant/tsconfig.json +++ b/x-pack/plugins/elastic_assistant/tsconfig.json @@ -19,7 +19,6 @@ "@kbn/licensing-plugin", "@kbn/securitysolution-es-utils", "@kbn/actions-plugin", - "@kbn/elastic-assistant", "@kbn/logging-mocks", "@kbn/core-elasticsearch-server-mocks", "@kbn/core-logging-server-mocks", diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_detail.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_detail.tsx index b17f501501d8e..4c3b1deceff2b 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_detail.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connector_detail/connector_detail.tsx @@ -58,7 +58,6 @@ export const ConnectorDetail: React.FC = () => { }>(); const { - productAccess: { hasAppSearchAccess }, productFeatures: { hasDefaultIngestPipeline }, } = useValues(KibanaLogic); @@ -239,7 +238,7 @@ export const ConnectorDetail: React.FC = () => { responsive: false, wrap: false, }, - rightSideItems: getHeaderActions(index, hasAppSearchAccess, connector), + rightSideItems: getHeaderActions(index, connector), tabs, }} > diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/select_connector/select_connector.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/select_connector/select_connector.tsx index dbbdd49f07914..cf38a2cec0c3f 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/select_connector/select_connector.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/connectors/select_connector/select_connector.tsx @@ -37,13 +37,12 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { CONNECTOR_CLIENTS_TYPE, CONNECTOR_NATIVE_TYPE } from '../../../../../../common/constants'; import connectorLogo from '../../../../../assets/images/connector_logo_network_drive_version.svg'; -import { BACK_BUTTON_LABEL } from '../../../../shared/constants'; import { KibanaLogic } from '../../../../shared/kibana'; import { LicensingLogic } from '../../../../shared/licensing'; import { parseQueryParams } from '../../../../shared/query_params'; -import { NEW_CONNECTOR_PATH, NEW_INDEX_PATH } from '../../../routes'; +import { NEW_CONNECTOR_PATH } from '../../../routes'; import { EnterpriseSearchContentPageTemplate } from '../../layout'; import { connectorsBreadcrumbs } from '../connectors'; @@ -381,20 +380,6 @@ export const SelectConnector: React.FC = () => { )} - - - - - KibanaLogic.values.navigateToUrl(NEW_INDEX_PATH)} - > - {BACK_BUTTON_LABEL} - - - - diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/playground/playground.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/playground/playground.tsx index f4e7dd4adb216..2b9e8c5027f3b 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/playground/playground.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/playground/playground.tsx @@ -7,6 +7,8 @@ import React from 'react'; +import { useSearchParams } from 'react-router-dom-v5-compat'; + import { useValues } from 'kea'; import { i18n } from '@kbn/i18n'; @@ -15,10 +17,18 @@ import { KibanaLogic } from '../../../shared/kibana'; import { EnterpriseSearchContentPageTemplate } from '../layout/page_template'; export const Playground: React.FC = () => { + const [searchParams] = useSearchParams(); + const index: string | null = searchParams.has('default-index') + ? searchParams.get('default-index') + : null; const { searchPlayground } = useValues(KibanaLogic); return ( - + { it('renders api index', () => { - expect(getHeaderActions(apiIndex, true)).toEqual([ - , + expect(getHeaderActions(apiIndex)).toEqual([ + , ]); - expect(getHeaderActions(apiIndex, false)).toEqual([]); }); it('renders connector index', () => { - expect(getHeaderActions(connectorIndex, true)).toEqual([ + expect(getHeaderActions(connectorIndex)).toEqual([ , - , + , ]); - expect(getHeaderActions(connectorIndex, false)).toEqual([]); }); it('renders crawler index', () => { - expect(getHeaderActions(crawlerIndex, true)).toEqual([ + expect(getHeaderActions(crawlerIndex)).toEqual([ , - , + , ]); - expect(getHeaderActions(crawlerIndex, false)).toEqual([]); }); }); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/header_actions.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/header_actions.tsx index 78c89facb231e..14900cbd4fa3a 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/header_actions.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/header_actions.tsx @@ -13,27 +13,20 @@ import { ElasticsearchIndexWithIngestion } from '../../../../../../../common/typ import { isCrawlerIndex, isConnectorIndex, getIngestionMethod } from '../../../../utils/indices'; import { CrawlerStatusIndicator } from '../../../shared/crawler_status_indicator/crawler_status_indicator'; -import { SearchEnginesPopover } from './search_engines_popover'; +import { SearchPlaygroundPopover } from './search_playground_popover'; import { SyncsContextMenu } from './syncs_context_menu'; // Used to populate rightSideItems of an EuiPageTemplate, which is rendered right-to-left export const getHeaderActions = ( indexData: ElasticsearchIndexWithIngestion | undefined, - hasAppSearchAccess: boolean, connector?: Connector ) => { const ingestionMethod = getIngestionMethod(indexData); return [ ...(isCrawlerIndex(indexData) && indexData.connector ? [] : []), ...(isConnectorIndex(indexData) || connector ? [] : []), - ...(hasAppSearchAccess && indexData - ? [ - , - ] + ...(indexData + ? [] : []), ]; }; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/search_engines_popover.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/search_engines_popover.tsx deleted file mode 100644 index db7a8cee5cd75..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/search_engines_popover.tsx +++ /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; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import React from 'react'; - -import { useActions, useValues } from 'kea'; - -import { - EuiButton, - EuiPopover, - EuiContextMenuPanel, - EuiContextMenuItem, - EuiText, - EuiToolTip, -} from '@elastic/eui'; - -import { i18n } from '@kbn/i18n'; - -import { APPLICATIONS_PLUGIN } from '../../../../../../../common/constants'; -import { SEARCH_APPLICATIONS_PATH } from '../../../../../applications/routes'; -import { KibanaLogic } from '../../../../../shared/kibana'; - -import { CreateEngineMenuItem } from './create_engine_menu_item'; -import { SearchEnginesPopoverLogic } from './search_engines_popover_logic'; - -export interface SearchEnginesPopoverProps { - indexName?: string; - ingestionMethod: string; - isHiddenIndex?: boolean; -} - -export const SearchEnginesPopover: React.FC = ({ - indexName, - ingestionMethod, - isHiddenIndex, -}) => { - const { isSearchEnginesPopoverOpen } = useValues(SearchEnginesPopoverLogic); - const { toggleSearchEnginesPopover } = useActions(SearchEnginesPopoverLogic); - - return ( - - {i18n.translate('xpack.enterpriseSearch.content.index.searchEngines.label', { - defaultMessage: 'Search Applications', - })} - - } - > - { - KibanaLogic.values.navigateToUrl(APPLICATIONS_PLUGIN.URL + SEARCH_APPLICATIONS_PATH, { - shouldNotCreateHref: true, - }); - }} - > - -

- {i18n.translate('xpack.enterpriseSearch.content.index.searchEngines.viewEngines', { - defaultMessage: 'View Search Applications', - })} -

-
- , - isHiddenIndex ? ( - - ) : ( - - ), - ]} - /> -
- ); -}; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/search_engines_popover_logic.ts b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/search_engines_popover_logic.ts deleted file mode 100644 index 5ca501839d2c8..0000000000000 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/search_engines_popover_logic.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { kea, MakeLogicType } from 'kea'; - -interface SearchEnginesPopoverLogicValues { - isSearchEnginesPopoverOpen: boolean; -} - -interface SearchEnginesPopoverLogicActions { - toggleSearchEnginesPopover: void; -} - -export const SearchEnginesPopoverLogic = kea< - MakeLogicType ->({ - actions: { - toggleSearchEnginesPopover: true, - }, - path: ['enterprise_search', 'search_index', 'header'], - reducers: () => ({ - isSearchEnginesPopoverOpen: [ - false, - { - toggleSearchEnginesPopover: (state) => !state, - }, - ], - }), -}); diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/search_playground_popover.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/search_playground_popover.tsx new file mode 100644 index 0000000000000..01a6e901af3f9 --- /dev/null +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/components/header_actions/search_playground_popover.tsx @@ -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 React from 'react'; + +import { EuiButton } from '@elastic/eui'; + +import { i18n } from '@kbn/i18n'; + +import { KibanaLogic } from '../../../../../shared/kibana'; + +import { PLAYGROUND_PATH } from '../../../../routes'; + +export interface SearchPlaygroundPopoverProps { + indexName: string; + ingestionMethod: string; +} + +export const SearchPlaygroundPopover: React.FC = ({ + indexName, + ingestionMethod, +}) => { + const playgroundUrl = PLAYGROUND_PATH + `?default-index=${indexName}`; + + return ( + { + KibanaLogic.values.navigateToUrl(playgroundUrl, { + shouldNotCreateHref: false, + }); + }} + > + {i18n.translate('xpack.enterpriseSearch.content.index.viewPlayground', { + defaultMessage: 'View in Playground', + })} + + ); +}; diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/search_index.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/search_index.tsx index eddf8ba934a4f..a6e59f8e8e747 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/search_index.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/search_index.tsx @@ -75,7 +75,6 @@ export const SearchIndex: React.FC = () => { const { config, guidedOnboarding, - productAccess: { hasAppSearchAccess }, productFeatures: { hasDefaultIngestPipeline }, } = useValues(KibanaLogic); @@ -232,7 +231,7 @@ export const SearchIndex: React.FC = () => { rightSideGroupProps: { responsive: false, }, - rightSideItems: getHeaderActions(index, hasAppSearchAccess), + rightSideItems: getHeaderActions(index), }} > {isCrawlerIndex(index) && !index.connector ? ( diff --git a/x-pack/plugins/enterprise_search/public/applications/shared/kibana/kibana_logic.ts b/x-pack/plugins/enterprise_search/public/applications/shared/kibana/kibana_logic.ts index dbf0bb4208911..91a23a42f6aea 100644 --- a/x-pack/plugins/enterprise_search/public/applications/shared/kibana/kibana_logic.ts +++ b/x-pack/plugins/enterprise_search/public/applications/shared/kibana/kibana_logic.ts @@ -22,7 +22,7 @@ import { import { DataPublicPluginStart } from '@kbn/data-plugin/public'; import { GuidedOnboardingPluginStart } from '@kbn/guided-onboarding-plugin/public'; -import { IndexMappingProps } from '@kbn/index-management-plugin/public'; +import { IndexMappingProps } from '@kbn/index-management'; import { LensPublicStart } from '@kbn/lens-plugin/public'; import { MlPluginStart } from '@kbn/ml-plugin/public'; import { ELASTICSEARCH_URL_PLACEHOLDER } from '@kbn/search-api-panels/constants'; diff --git a/x-pack/plugins/enterprise_search/public/plugin.ts b/x-pack/plugins/enterprise_search/public/plugin.ts index 0a1e4dfd35fbd..754b4ecd401f9 100644 --- a/x-pack/plugins/enterprise_search/public/plugin.ts +++ b/x-pack/plugins/enterprise_search/public/plugin.ts @@ -25,7 +25,7 @@ import { DataPublicPluginStart } from '@kbn/data-plugin/public'; import { GuidedOnboardingPluginStart } from '@kbn/guided-onboarding-plugin/public'; import type { HomePublicPluginSetup } from '@kbn/home-plugin/public'; import { i18n } from '@kbn/i18n'; -import { IndexManagementPluginStart } from '@kbn/index-management-plugin/public'; +import type { IndexManagementPluginStart } from '@kbn/index-management'; import { LensPublicStart } from '@kbn/lens-plugin/public'; import { LicensingPluginStart } from '@kbn/licensing-plugin/public'; import { MlPluginStart } from '@kbn/ml-plugin/public'; diff --git a/x-pack/plugins/enterprise_search/tsconfig.json b/x-pack/plugins/enterprise_search/tsconfig.json index 0b3380fd34f9d..2750299a8f6a0 100644 --- a/x-pack/plugins/enterprise_search/tsconfig.json +++ b/x-pack/plugins/enterprise_search/tsconfig.json @@ -72,7 +72,7 @@ "@kbn/search-connectors-plugin", "@kbn/search-playground", "@kbn/utility-types", - "@kbn/index-management-plugin", + "@kbn/index-management", "@kbn/deeplinks-search" ] } diff --git a/x-pack/plugins/fleet/common/experimental_features.ts b/x-pack/plugins/fleet/common/experimental_features.ts index 48e77dbe1988d..a12711012f307 100644 --- a/x-pack/plugins/fleet/common/experimental_features.ts +++ b/x-pack/plugins/fleet/common/experimental_features.ts @@ -29,6 +29,7 @@ export const allowedExperimentalValues = Object.freeze>( enableStrictKQLValidation: false, subfeaturePrivileges: false, enablePackagesStateMachine: true, + advancedPolicySettings: true, }); type ExperimentalConfigKeys = Array; diff --git a/x-pack/plugins/fleet/common/openapi/bundled.json b/x-pack/plugins/fleet/common/openapi/bundled.json index 1ed749fe31dea..d10af2053ef4e 100644 --- a/x-pack/plugins/fleet/common/openapi/bundled.json +++ b/x-pack/plugins/fleet/common/openapi/bundled.json @@ -7383,6 +7383,11 @@ "type": "object", "description": "Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure.", "nullable": true + }, + "advanced_settings": { + "type": "object", + "description": "Advanced settings stored in the agent policy, e.g. agent_limits_go_max_procs", + "nullable": true } }, "required": [ diff --git a/x-pack/plugins/fleet/common/openapi/bundled.yaml b/x-pack/plugins/fleet/common/openapi/bundled.yaml index 03bb90fd84d73..25850c8c6d811 100644 --- a/x-pack/plugins/fleet/common/openapi/bundled.yaml +++ b/x-pack/plugins/fleet/common/openapi/bundled.yaml @@ -4734,6 +4734,12 @@ components: settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure. nullable: true + advanced_settings: + type: object + description: >- + Advanced settings stored in the agent policy, e.g. + agent_limits_go_max_procs + nullable: true required: - id - status diff --git a/x-pack/plugins/fleet/common/openapi/components/schemas/agent_policy.yaml b/x-pack/plugins/fleet/common/openapi/components/schemas/agent_policy.yaml index 8b088e34c10dc..070d72a5ec353 100644 --- a/x-pack/plugins/fleet/common/openapi/components/schemas/agent_policy.yaml +++ b/x-pack/plugins/fleet/common/openapi/components/schemas/agent_policy.yaml @@ -69,6 +69,10 @@ properties: type: object description: Override settings that are defined in the agent policy. Input settings cannot be overridden. The override option should be used only in unusual circumstances and not as a routine procedure. nullable: true + advanced_settings: + type: object + description: Advanced settings stored in the agent policy, e.g. agent_limits_go_max_procs + nullable: true required: - id - status diff --git a/x-pack/plugins/fleet/common/settings/agent_policy_settings.ts b/x-pack/plugins/fleet/common/settings/agent_policy_settings.ts new file mode 100644 index 0000000000000..f0d7a84d36d2a --- /dev/null +++ b/x-pack/plugins/fleet/common/settings/agent_policy_settings.ts @@ -0,0 +1,40 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { i18n } from '@kbn/i18n'; +import { z } from 'zod'; + +import type { SettingsConfig } from './types'; + +export const zodStringWithDurationValidation = z + .string() + .refine((val) => val.match(/^(\d+[s|m|h|d])?$/), { + message: i18n.translate( + 'xpack.fleet.settings.agentPolicyAdvanced.downloadTimeoutValidationMessage', + { + defaultMessage: 'Must be a string with a time unit, e.g. 30s, 5m, 2h, 1d', + } + ), + }); + +export const AGENT_POLICY_ADVANCED_SETTINGS: SettingsConfig[] = [ + { + name: 'agent.limits.go_max_procs', + title: i18n.translate('xpack.fleet.settings.agentPolicyAdvanced.goMaxProcsTitle', { + defaultMessage: 'GO_MAX_PROCS', + }), + description: i18n.translate('xpack.fleet.settings.agentPolicyAdvanced.goMaxProcsDescription', { + defaultMessage: 'Limits the maximum number of CPUs that can be executing simultaneously', + }), + learnMoreLink: + 'https://www.elastic.co/guide/en/fleet/current/enable-custom-policy-settings.html#limit-cpu-usage', + api_field: { + name: 'agent_limits_go_max_procs', + }, + schema: z.number().int().min(0).default(0), + }, +]; diff --git a/x-pack/plugins/fleet/common/settings/index.ts b/x-pack/plugins/fleet/common/settings/index.ts new file mode 100644 index 0000000000000..b33370b593971 --- /dev/null +++ b/x-pack/plugins/fleet/common/settings/index.ts @@ -0,0 +1,8 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export { AGENT_POLICY_ADVANCED_SETTINGS } from './agent_policy_settings'; diff --git a/x-pack/plugins/fleet/common/settings/types.ts b/x-pack/plugins/fleet/common/settings/types.ts new file mode 100644 index 0000000000000..0fc8ad98f17c0 --- /dev/null +++ b/x-pack/plugins/fleet/common/settings/types.ts @@ -0,0 +1,21 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { z } from 'zod'; + +export type SettingsSection = 'AGENT_POLICY_ADVANCED_SETTINGS'; + +export interface SettingsConfig { + name: string; + title: string; + description: string; + learnMoreLink?: string; + schema: z.ZodTypeAny; + api_field: { + name: string; + }; +} diff --git a/x-pack/plugins/fleet/common/types/models/agent_policy.ts b/x-pack/plugins/fleet/common/types/models/agent_policy.ts index 4e5d6250208a5..60e635f73f6cc 100644 --- a/x-pack/plugins/fleet/common/types/models/agent_policy.ts +++ b/x-pack/plugins/fleet/common/types/models/agent_policy.ts @@ -39,6 +39,7 @@ export interface NewAgentPolicy { agent_features?: Array<{ name: string; enabled: boolean }>; is_protected?: boolean; overrides?: { [key: string]: any } | null; + advanced_settings?: { [key: string]: any } | null; } // SO definition for this type is declared in server/types/interfaces diff --git a/x-pack/plugins/fleet/public/applications/fleet/components/form_settings/index.test.tsx b/x-pack/plugins/fleet/public/applications/fleet/components/form_settings/index.test.tsx new file mode 100644 index 0000000000000..7d0cb7dbae341 --- /dev/null +++ b/x-pack/plugins/fleet/public/applications/fleet/components/form_settings/index.test.tsx @@ -0,0 +1,104 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { act, fireEvent } from '@testing-library/react'; + +import React from 'react'; + +import { z } from 'zod'; + +import { zodStringWithDurationValidation } from '../../../../../common/settings/agent_policy_settings'; +import type { SettingsConfig } from '../../../../../common/settings/types'; +import { createFleetTestRendererMock } from '../../../../mock'; + +import { ConfiguredSettings } from '.'; + +const mockUpdateAgentPolicy = jest.fn(); +const mockUpdateAdvancedSettingsHasErrors = jest.fn(); + +jest.mock('../../sections/agent_policy/components/agent_policy_form', () => ({ + useAgentPolicyFormContext: () => ({ + updateAdvancedSettingsHasErrors: mockUpdateAdvancedSettingsHasErrors, + updateAgentPolicy: mockUpdateAgentPolicy, + agentPolicy: { + advanced_settings: { + agent_limits_go_max_procs: 0, + agent_download_timeout: '120s', + }, + }, + }), +})); + +describe('ConfiguredSettings', () => { + const testRenderer = createFleetTestRendererMock(); + + beforeEach(() => { + jest.clearAllMocks(); + }); + + function render(settingsConfig: SettingsConfig[]) { + return testRenderer.render(); + } + + it('should render number field', () => { + const result = render([ + { + name: 'agent.limits.go_max_procs', + title: 'GO_MAX_PROCS', + description: 'Description', + learnMoreLink: '', + api_field: { + name: 'agent_limits_go_max_procs', + }, + schema: z.number().int().min(0).default(0), + }, + ]); + + expect(result.getByText('GO_MAX_PROCS')).not.toBeNull(); + const input = result.getByTestId('configuredSetting-agent.limits.go_max_procs'); + expect(input).toHaveValue(0); + + act(() => { + fireEvent.change(input, { target: { value: '1' } }); + }); + + expect(mockUpdateAgentPolicy).toHaveBeenCalledWith( + expect.objectContaining({ + advanced_settings: expect.objectContaining({ agent_limits_go_max_procs: 1 }), + }) + ); + }); + + it('should render string field with time duration validation', () => { + const result = render([ + { + name: 'agent.download.timeout', + title: 'Agent binary download timeout', + description: 'Description', + learnMoreLink: '', + api_field: { + name: 'agent_download_timeout', + }, + schema: zodStringWithDurationValidation.default('120s'), + }, + ]); + + expect(result.getByText('Agent binary download timeout')).not.toBeNull(); + const input = result.getByTestId('configuredSetting-agent.download.timeout'); + expect(input).toHaveValue('120s'); + + act(() => { + fireEvent.change(input, { target: { value: '120' } }); + }); + + expect(input).toHaveAttribute('aria-invalid', 'true'); + expect( + result.getByText('Must be a string with a time unit, e.g. 30s, 5m, 2h, 1d') + ).not.toBeNull(); + expect(mockUpdateAdvancedSettingsHasErrors).toHaveBeenCalledWith(true); + }); +}); diff --git a/x-pack/plugins/fleet/public/applications/fleet/components/form_settings/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/components/form_settings/index.tsx new file mode 100644 index 0000000000000..03d66d23615ba --- /dev/null +++ b/x-pack/plugins/fleet/public/applications/fleet/components/form_settings/index.tsx @@ -0,0 +1,157 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { z, ZodFirstPartyTypeKind } from 'zod'; +import React, { useState } from 'react'; +import { + EuiDescribedFormGroup, + EuiFieldNumber, + EuiFieldText, + EuiFormRow, + EuiLink, +} from '@elastic/eui'; + +import type { SettingsConfig } from '../../../../../common/settings/types'; +import { useAgentPolicyFormContext } from '../../sections/agent_policy/components/agent_policy_form'; + +export const settingComponentRegistry = new Map< + string, + (settingsconfig: SettingsConfig) => React.ReactElement +>(); + +settingComponentRegistry.set(ZodFirstPartyTypeKind.ZodNumber, (settingsConfig) => { + return ( + ( + + )} + /> + ); +}); + +settingComponentRegistry.set(ZodFirstPartyTypeKind.ZodString, (settingsConfig) => { + return ( + ( + + )} + /> + ); +}); + +const SettingsFieldWrapper: React.FC<{ + settingsConfig: SettingsConfig; + typeName: keyof typeof ZodFirstPartyTypeKind; + renderItem: Function; +}> = ({ settingsConfig, typeName, renderItem }) => { + const [error, setError] = useState(''); + const agentPolicyFormContext = useAgentPolicyFormContext(); + + const fieldKey = `configuredSetting-${settingsConfig.name}`; + const defaultValue: number = + settingsConfig.schema instanceof z.ZodDefault + ? settingsConfig.schema._def.defaultValue() + : undefined; + const coercedSchema = settingsConfig.schema as z.ZodString; + + const convertValue = (value: string, type: keyof typeof ZodFirstPartyTypeKind): any => { + if (type === ZodFirstPartyTypeKind.ZodNumber) { + if (value === '') { + return 0; + } + return parseInt(value, 10); + } + return value; + }; + + const handleChange = (e: React.ChangeEvent) => { + const newValue = convertValue(e.target.value, typeName); + const validationResults = coercedSchema.safeParse(newValue); + + if (!validationResults.success) { + setError(validationResults.error.issues[0].message); + agentPolicyFormContext?.updateAdvancedSettingsHasErrors(true); + } else { + setError(''); + agentPolicyFormContext?.updateAdvancedSettingsHasErrors(false); + } + + const newAdvancedSettings = { + ...(agentPolicyFormContext?.agentPolicy.advanced_settings ?? {}), + [settingsConfig.api_field.name]: newValue, + }; + + agentPolicyFormContext?.updateAgentPolicy({ advanced_settings: newAdvancedSettings }); + }; + + const fieldValue = + agentPolicyFormContext?.agentPolicy.advanced_settings?.[settingsConfig.api_field.name] ?? + defaultValue; + + return ( + {settingsConfig.title}} + description={ + <> + {settingsConfig.description}.{' '} + + Learn more. + + + } + > + + {renderItem({ fieldValue, handleChange, isInvalid: !!error, fieldKey, coercedSchema })} + + + ); +}; + +export function ConfiguredSettings({ + configuredSettings, +}: { + configuredSettings: SettingsConfig[]; +}) { + return ( + <> + {configuredSettings.map((configuredSetting) => { + const Component = settingComponentRegistry.get( + configuredSetting.schema instanceof z.ZodDefault + ? configuredSetting.schema._def.innerType._def.typeName === 'ZodEffects' + ? configuredSetting.schema._def.innerType._def.schema._def.typeName + : configuredSetting.schema._def.innerType._def.typeName + : configuredSetting.schema._def.typeName + ); + + if (!Component) { + throw new Error(`Unknown setting type: ${configuredSetting.schema._type}}`); + } + + return ; + })} + + ); +} diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_form.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_form.tsx index 230a4152cf55d..8a0d92b159207 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_form.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/components/agent_policy_form.tsx @@ -12,13 +12,19 @@ import { EuiForm, EuiHorizontalRule, EuiSpacer, + EuiTitle, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; import styled from 'styled-components'; +import { AGENT_POLICY_ADVANCED_SETTINGS } from '../../../../../../common/settings'; import type { NewAgentPolicy, AgentPolicy } from '../../../types'; import { useAuthz } from '../../../../../hooks'; +import { ConfiguredSettings } from '../../../components/form_settings'; + +import { ExperimentalFeaturesService } from '../../../../../services'; + import { AgentPolicyAdvancedOptionsContent } from './agent_policy_advanced_fields'; import { AgentPolicyGeneralFields } from './agent_policy_general_fields'; import { AgentPolicyFormSystemMonitoringCheckbox } from './agent_policy_system_monitoring_field'; @@ -37,7 +43,21 @@ interface Props { updateSysMonitoring: (newValue: boolean) => void; validation: ValidationResults; isEditing?: boolean; + // form error state is passed up to the form + updateAdvancedSettingsHasErrors: (hasErrors: boolean) => void; } +const AgentPolicyFormContext = React.createContext< + | { + agentPolicy: Partial & { [key: string]: any }; + updateAgentPolicy: (u: Partial) => void; + updateAdvancedSettingsHasErrors: (hasErrors: boolean) => void; + } + | undefined +>(undefined); + +export const useAgentPolicyFormContext = () => { + return React.useContext(AgentPolicyFormContext); +}; export const AgentPolicyForm: React.FunctionComponent = ({ agentPolicy, @@ -46,10 +66,13 @@ export const AgentPolicyForm: React.FunctionComponent = ({ updateSysMonitoring, validation, isEditing = false, + updateAdvancedSettingsHasErrors, }) => { const authz = useAuthz(); const disabled = !authz.fleet.allAgents; + const { advancedPolicySettings } = ExperimentalFeaturesService.get(); + const generalSettingsWrapper = (children: JSX.Element[]) => ( = ({ ); return ( - - {!isEditing ? ( - - ) : ( - generalSettingsWrapper([ + + + {!isEditing ? ( , - ]) - )} - {!isEditing ? ( - - ) : null} - {!isEditing ? ( - <> - - - + ) : ( + generalSettingsWrapper([ + , + ]) + )} + {!isEditing ? ( + + ) : null} + {!isEditing ? ( + <> + + + + } + buttonClassName="ingest-active-button" + > + + - } - buttonClassName="ingest-active-button" - > - + + {advancedPolicySettings ? ( + <> + + + +

+ +

+
+ + + + ) : null} +
+ + ) : ( + <> -
- - ) : ( - - )} -
+ {advancedPolicySettings ? ( + <> + + + +

+ +

+
+ + + + ) : null} + + + )} +
+ ); }; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_var_field.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_var_field.tsx index eb4e6dd5f5c69..bc326f92edb68 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_var_field.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_var_field.tsx @@ -4,7 +4,6 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ - import React, { useState, memo, useMemo, useRef } from 'react'; import ReactMarkdown from 'react-markdown'; import { i18n } from '@kbn/i18n'; @@ -51,11 +50,11 @@ const FormRow = styled(EuiFormRow)` } .euiFormRow__fieldWrapper > .euiPanel { - padding: ${(props) => props.theme.eui.euiSizeXS}; + padding: ${(props) => props.theme.eui?.euiSizeXS}; } `; -interface InputFieldProps { +export interface InputFieldProps { varDef: RegistryVarsEntry; value: any; onChange: (newValue: any) => void; diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/step_select_hosts.test.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/step_select_hosts.test.tsx index 57ca70990451c..89de7ba44b3e6 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/step_select_hosts.test.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/step_select_hosts.test.tsx @@ -136,7 +136,7 @@ describe('StepSelectHosts', () => { expect( renderResult.container.querySelector('[data-test-subj="agentPolicySelect"]')?.textContent - ).toEqual('Agent policy 1'); + ).toContain('Agent policy 1'); }); it('should display dropdown without preselected value when Existing hosts selected with mulitple agent policies', () => { diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/index.test.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/index.test.tsx index e7811a87de38a..32416fd817770 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/index.test.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/single_page_layout/index.test.tsx @@ -523,7 +523,7 @@ describe('when on the package policy create page', () => { test('should disable submit button on invalid form with empty name', async () => { await act(async () => { - fireEvent.change(renderResult.getByLabelText('Integration name'), { + fireEvent.change(renderResult.getByTestId('packagePolicyNameInput'), { target: { value: '' }, }); }); diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/settings/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/settings/index.tsx index b3559fb876e1f..f9ca5fa24226c 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/settings/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/details_page/components/settings/index.tsx @@ -52,6 +52,7 @@ const pickAgentPolicyKeysToSend = (agentPolicy: AgentPolicy) => 'fleet_server_host_id', 'agent_features', 'is_protected', + 'advanced_settings', ]); const FormWrapper = styled.div` @@ -77,6 +78,7 @@ export const SettingsView = memo<{ agentPolicy: AgentPolicy }>( const [agentCount, setAgentCount] = useState(0); const [withSysMonitoring, setWithSysMonitoring] = useState(true); const validation = agentPolicyFormValidation(agentPolicy); + const [hasAdvancedSettingsErrors, setHasAdvancedSettingsErrors] = useState(false); const updateAgentPolicy = (updatedFields: Partial) => { setAgentPolicy({ @@ -169,6 +171,7 @@ export const SettingsView = memo<{ agentPolicy: AgentPolicy }>( updateSysMonitoring={(newValue) => setWithSysMonitoring(newValue)} validation={validation} isEditing={true} + updateAdvancedSettingsHasErrors={setHasAdvancedSettingsErrors} /> {hasChanges ? ( @@ -202,7 +205,11 @@ export const SettingsView = memo<{ agentPolicy: AgentPolicy }>( {showDevtoolsRequest ? ( 0} + isDisabled={ + isLoading || + Object.keys(validation).length > 0 || + hasAdvancedSettingsErrors + } btnProps={{ color: 'text', }} @@ -221,7 +228,10 @@ export const SettingsView = memo<{ agentPolicy: AgentPolicy }>( onClick={onSubmit} isLoading={isLoading} isDisabled={ - !hasFleetAllPrivileges || isLoading || Object.keys(validation).length > 0 + !hasFleetAllPrivileges || + isLoading || + Object.keys(validation).length > 0 || + hasAdvancedSettingsErrors } iconType="save" color="primary" diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/list_page/components/create_agent_policy.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/list_page/components/create_agent_policy.tsx index 09650bafdff3c..bfe9d233b2bf4 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/list_page/components/create_agent_policy.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/list_page/components/create_agent_policy.tsx @@ -53,6 +53,7 @@ export const CreateAgentPolicyFlyout: React.FunctionComponent = ({ const [isLoading, setIsLoading] = useState(false); const [withSysMonitoring, setWithSysMonitoring] = useState(true); const validation = agentPolicyFormValidation(agentPolicy); + const [hasAdvancedSettingsErrors, setHasAdvancedSettingsErrors] = useState(false); const updateAgentPolicy = (updatedFields: Partial) => { setAgentPolicy({ @@ -95,6 +96,7 @@ export const CreateAgentPolicyFlyout: React.FunctionComponent = ({ withSysMonitoring={withSysMonitoring} updateSysMonitoring={(newValue) => setWithSysMonitoring(newValue)} validation={validation} + updateAdvancedSettingsHasErrors={setHasAdvancedSettingsErrors} /> ); @@ -120,7 +122,9 @@ export const CreateAgentPolicyFlyout: React.FunctionComponent = ({ {showDevtoolsRequest ? ( 0} + isDisabled={ + isLoading || Object.keys(validation).length > 0 || hasAdvancedSettingsErrors + } description={i18n.translate( 'xpack.fleet.createAgentPolicy.devtoolsRequestDescription', { @@ -136,7 +140,10 @@ export const CreateAgentPolicyFlyout: React.FunctionComponent = ({ fill isLoading={isLoading} isDisabled={ - !hasFleetAllPrivileges || isLoading || Object.keys(validation).length > 0 + !hasFleetAllPrivileges || + isLoading || + Object.keys(validation).length > 0 || + hasAdvancedSettingsErrors } onClick={async () => { setIsLoading(true); diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/actions_menu.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/actions_menu.tsx index f9d869555eb35..feefebf4fa2d6 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/actions_menu.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_details_page/components/actions_menu.tsx @@ -63,79 +63,55 @@ export const AgentDetailsActionMenu: React.FunctionComponent<{ } }, [onCancelReassign, setIsReassignFlyoutOpen]); - const menuItems = []; - - if (hasFleetAllPrivileges && !agentPolicy?.is_managed) { - menuItems.push( - { - setIsReassignFlyoutOpen(true); - }} - disabled={!agent.active && !agentPolicy} - key="reassignPolicy" - > - - , - { - setIsUnenrollModalOpen(true); - }} - key="unenrollAgent" - > - {isUnenrolling ? ( - - ) : ( - - )} - , - { - setIsUpgradeModalOpen(true); - }} - key="upgradeAgent" - data-test-subj="upgradeBtn" - > - - - ); - } - - if (hasFleetAllPrivileges && isAgentUpdating) { - menuItems.push( - { - setIsUpgradeModalOpen(true); - }} - key="restartUpgradeAgent" - data-test-subj="restartUpgradeBtn" - > - - - ); - } - - menuItems.push( + const menuItems = [ + ...(hasFleetAllPrivileges && !agentPolicy?.is_managed + ? [ + { + setIsReassignFlyoutOpen(true); + }} + disabled={!agent.active && !agentPolicy} + key="reassignPolicy" + > + + , + { + setIsUpgradeModalOpen(true); + }} + key="upgradeAgent" + data-test-subj="upgradeBtn" + > + + , + ] + : []), + ...(hasFleetAllPrivileges && isAgentUpdating + ? [ + { + setIsUpgradeModalOpen(true); + }} + key="restartUpgradeAgent" + data-test-subj="restartUpgradeBtn" + > + + , + ] + : []), { @@ -149,27 +125,50 @@ export const AgentDetailsActionMenu: React.FunctionComponent<{ id="xpack.fleet.agentList.viewAgentDetailsJsonText" defaultMessage="View agent JSON" /> - - ); - - if (authz.fleet.readAgents && diagnosticFileUploadEnabled) { - menuItems.push( - { - setIsRequestDiagnosticsModalOpen(true); - }} - data-test-subj="requestAgentDiagnosticsBtn" - key="requestDiagnostics" - > - - - ); - } + , + ...(authz.fleet.readAgents && diagnosticFileUploadEnabled + ? [ + { + setIsRequestDiagnosticsModalOpen(true); + }} + data-test-subj="requestAgentDiagnosticsBtn" + key="requestDiagnostics" + > + + , + ] + : []), + ...(hasFleetAllPrivileges && !agentPolicy?.is_managed + ? [ + { + setIsUnenrollModalOpen(true); + }} + key="unenrollAgent" + > + {isUnenrolling ? ( + + ) : ( + + )} + , + ] + : []), + ]; return ( <> diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/bulk_actions.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/bulk_actions.tsx index cde9c8960e479..261dfbdd83365 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/bulk_actions.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/components/bulk_actions.tsx @@ -127,23 +127,6 @@ export const AgentBulkActions: React.FunctionComponent = ({ setIsReassignFlyoutOpen(true); }, }, - { - name: ( - - ), - icon: , - onClick: () => { - closeMenu(); - setIsUnenrollModalOpen(true); - }, - }, { name: ( = ({ setUpgradeModalState({ isOpen: true, isScheduled: true, isUpdating: false }); }, }, - ]; - - menuItems.push({ - name: ( - - ), - icon: , - onClick: () => { - closeMenu(); - setUpgradeModalState({ isOpen: true, isScheduled: false, isUpdating: true }); + { + name: ( + + ), + icon: , + onClick: () => { + closeMenu(); + setUpgradeModalState({ isOpen: true, isScheduled: false, isUpdating: true }); + }, }, - }); - - if (diagnosticFileUploadEnabled) { - menuItems.push({ + ...(diagnosticFileUploadEnabled + ? [ + { + name: ( + + ), + icon: , + onClick: () => { + closeMenu(); + setIsRequestDiagnosticsModalOpen(true); + }, + }, + ] + : []), + { name: ( ), - icon: , + icon: , onClick: () => { closeMenu(); - setIsRequestDiagnosticsModalOpen(true); + setIsUnenrollModalOpen(true); }, - }); - } + }, + ]; const panels = [ { diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_kafka_authentication.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_kafka_authentication.tsx index 5d21567cbbb35..199b92d4de98e 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_kafka_authentication.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_kafka_authentication.tsx @@ -75,6 +75,10 @@ export const OutputFormKafkaAuthentication: React.FunctionComponent<{ onToggleSecretStorage: (secretEnabled: boolean) => void; }> = (props) => { const { inputs, useSecretsStorage, onToggleSecretStorage } = props; + const [isConvertedToSecret, setIsConvertedToSecret] = React.useState({ + kafkaAuthPassword: false, + kafkaSslKey: false, + }); const [isFirstLoad, setIsFirstLoad] = React.useState(true); useEffect(() => { @@ -85,11 +89,13 @@ export const OutputFormKafkaAuthentication: React.FunctionComponent<{ if (inputs.kafkaAuthPasswordInput.value && !inputs.kafkaAuthPasswordSecretInput.value) { inputs.kafkaAuthPasswordSecretInput.setValue(inputs.kafkaAuthPasswordInput.value); inputs.kafkaAuthPasswordInput.clear(); + setIsConvertedToSecret({ ...isConvertedToSecret, kafkaAuthPassword: true }); } if (inputs.kafkaSslKeyInput.value && !inputs.kafkaSslKeySecretInput.value) { inputs.kafkaSslKeySecretInput.setValue(inputs.kafkaSslKeyInput.value); inputs.kafkaSslKeyInput.clear(); + setIsConvertedToSecret({ ...isConvertedToSecret, kafkaSslKey: true }); } } }, [ @@ -100,6 +106,7 @@ export const OutputFormKafkaAuthentication: React.FunctionComponent<{ inputs.kafkaSslKeySecretInput, isFirstLoad, setIsFirstLoad, + isConvertedToSecret, ]); const onToggleSecretAndClearValue = (secretEnabled: boolean) => { @@ -110,6 +117,7 @@ export const OutputFormKafkaAuthentication: React.FunctionComponent<{ inputs.kafkaAuthPasswordSecretInput.setValue(''); inputs.kafkaSslKeySecretInput.setValue(''); } + setIsConvertedToSecret({ kafkaAuthPassword: false, kafkaSslKey: false }); onToggleSecretStorage(secretEnabled); }; @@ -221,6 +229,7 @@ export const OutputFormKafkaAuthentication: React.FunctionComponent<{ )} {...inputs.kafkaSslKeySecretInput.formRowProps} useSecretsStorage={useSecretsStorage} + isConvertedToSecret={isConvertedToSecret.kafkaSslKey} onToggleSecretStorage={onToggleSecretAndClearValue} cancelEdit={inputs.kafkaSslKeySecretInput.cancelEdit} > @@ -291,6 +300,7 @@ export const OutputFormKafkaAuthentication: React.FunctionComponent<{ )} {...inputs.kafkaAuthPasswordSecretInput.formRowProps} useSecretsStorage={useSecretsStorage} + isConvertedToSecret={isConvertedToSecret.kafkaAuthPassword} onToggleSecretStorage={onToggleSecretAndClearValue} cancelEdit={inputs.kafkaAuthPasswordSecretInput.cancelEdit} > diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_logstash.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_logstash.tsx index 9277ee7290937..1884c5aa7551f 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_logstash.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_logstash.tsx @@ -32,6 +32,9 @@ export const OutputFormLogstashSection: React.FunctionComponent = (props) const { docLinks } = useStartServices(); const [isFirstLoad, setIsFirstLoad] = React.useState(true); + const [isConvertedToSecret, setIsConvertedToSecret] = React.useState({ + sslKey: false, + }); useEffect(() => { if (!isFirstLoad) return; @@ -41,6 +44,7 @@ export const OutputFormLogstashSection: React.FunctionComponent = (props) if (inputs.sslKeyInput.value && !inputs.sslKeySecretInput.value) { inputs.sslKeySecretInput.setValue(inputs.sslKeyInput.value); inputs.sslKeyInput.clear(); + setIsConvertedToSecret({ ...isConvertedToSecret, sslKey: true }); } } }, [ @@ -49,6 +53,7 @@ export const OutputFormLogstashSection: React.FunctionComponent = (props) inputs.sslKeySecretInput, isFirstLoad, setIsFirstLoad, + isConvertedToSecret, ]); const onToggleSecretAndClearValue = (secretEnabled: boolean) => { @@ -57,6 +62,7 @@ export const OutputFormLogstashSection: React.FunctionComponent = (props) } else { inputs.sslKeySecretInput.setValue(''); } + setIsConvertedToSecret({ sslKey: false }); onToggleSecretStorage(secretEnabled); }; @@ -172,6 +178,7 @@ export const OutputFormLogstashSection: React.FunctionComponent = (props) })} {...inputs.sslKeySecretInput.formRowProps} useSecretsStorage={useSecretsStorage} + isConvertedToSecret={isConvertedToSecret.sslKey} onToggleSecretStorage={onToggleSecretAndClearValue} cancelEdit={inputs.sslKeySecretInput.cancelEdit} > diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_remote_es.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_remote_es.tsx index 1b44bdc97ed8f..354c6ce7d3821 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_remote_es.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_remote_es.tsx @@ -23,6 +23,9 @@ interface Props { export const OutputFormRemoteEsSection: React.FunctionComponent = (props) => { const { inputs, useSecretsStorage, onToggleSecretStorage } = props; + const [isConvertedToSecret, setIsConvertedToSecret] = React.useState({ + serviceToken: false, + }); const [isFirstLoad, setIsFirstLoad] = React.useState(true); @@ -34,6 +37,7 @@ export const OutputFormRemoteEsSection: React.FunctionComponent = (props) if (inputs.serviceTokenInput.value && !inputs.serviceTokenSecretInput.value) { inputs.serviceTokenSecretInput.setValue(inputs.serviceTokenInput.value); inputs.serviceTokenInput.clear(); + setIsConvertedToSecret({ serviceToken: true }); } } }, [ @@ -42,6 +46,7 @@ export const OutputFormRemoteEsSection: React.FunctionComponent = (props) inputs.serviceTokenSecretInput, isFirstLoad, setIsFirstLoad, + isConvertedToSecret, ]); const onToggleSecretAndClearValue = (secretEnabled: boolean) => { @@ -50,6 +55,7 @@ export const OutputFormRemoteEsSection: React.FunctionComponent = (props) } else { inputs.serviceTokenSecretInput.setValue(''); } + setIsConvertedToSecret({ ...isConvertedToSecret, serviceToken: false }); onToggleSecretStorage(secretEnabled); }; @@ -104,6 +110,7 @@ export const OutputFormRemoteEsSection: React.FunctionComponent = (props) {...inputs.serviceTokenSecretInput.formRowProps} cancelEdit={inputs.serviceTokenSecretInput.cancelEdit} useSecretsStorage={useSecretsStorage} + isConvertedToSecret={isConvertedToSecret.serviceToken} onToggleSecretStorage={onToggleSecretAndClearValue} > { expect(onToggleSecretStorage).toHaveBeenCalledWith(true); }); + + it('should display input normally and display a callout when the field is converted to secret storage', () => { + const { getByText, queryByText } = render( + + + + ); + + expect(queryByText('Replace Test Secret')).not.toBeInTheDocument(); + expect( + getByText('This field will be re-saved using secret storage from plain text storage.', { + exact: false, + }) + ).toBeInTheDocument(); + }); }); diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_secret_form_row.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_secret_form_row.tsx index 2028c6107bfd3..3b39ecc4dfa2b 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_secret_form_row.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/settings/components/edit_output_flyout/output_form_secret_form_row.tsx @@ -7,16 +7,18 @@ import { EuiButtonEmpty, + EuiCallOut, EuiFlexGroup, EuiFlexItem, EuiFormRow, EuiIcon, + EuiLink, EuiPanel, EuiSpacer, EuiText, EuiToolTip, } from '@elastic/eui'; -import React, { useState } from 'react'; +import React, { useMemo, useState } from 'react'; import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; @@ -24,6 +26,7 @@ export const SecretFormRow: React.FC<{ fullWidth?: boolean; children: ConstructorParameters[0]['children']; useSecretsStorage: boolean; + isConvertedToSecret?: boolean; onToggleSecretStorage: (secretEnabled: boolean) => void; error?: string[]; isInvalid?: boolean; @@ -43,10 +46,11 @@ export const SecretFormRow: React.FC<{ onToggleSecretStorage, cancelEdit, useSecretsStorage, + isConvertedToSecret = false, label, }) => { const hasInitialValue = !!initialValue; - const [editMode, setEditMode] = useState(!initialValue); + const [editMode, setEditMode] = useState(isConvertedToSecret || !initialValue); const valueHiddenPanel = ( @@ -101,7 +105,7 @@ export const SecretFormRow: React.FC<{ const editValue = ( <> {children} - {hasInitialValue && ( + {hasInitialValue && !isConvertedToSecret && ( {cancelButton} @@ -110,7 +114,7 @@ export const SecretFormRow: React.FC<{ ); const secretLabel = ( - + <>   {title} @@ -123,25 +127,49 @@ export const SecretFormRow: React.FC<{ > - + ); - const helpText = !initialValue ? ( - onToggleSecretStorage(false)} color="primary" size="xs"> - - - ), - }} - /> - ) : undefined; + const helpText = useMemo(() => { + if (isConvertedToSecret) + return ( + + onToggleSecretStorage(false)} color="primary"> + + + ), + }} + /> + + ); + + if (!initialValue) + return ( + onToggleSecretStorage(false)} color="primary"> + + + ), + }} + /> + ); + return undefined; + }, [initialValue, isConvertedToSecret, onToggleSecretStorage]); const plainTextHelp = ( onToggleSecretStorage(true)} color="primary" size="xs"> + onToggleSecretStorage(true)} color="primary"> - + ), }} /> diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.stories.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.stories.tsx index 0cfb804980008..8639d18b1278b 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.stories.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.stories.tsx @@ -9,7 +9,7 @@ import React from 'react'; import { action } from '@storybook/addon-actions'; -import type { Props } from '.'; +import type { PackageListGridProps } from '.'; import { PackageListGrid } from '.'; export default { @@ -18,7 +18,7 @@ export default { }; type Args = Pick< - Props, + PackageListGridProps, 'title' | 'isLoading' | 'showMissingIntegrationMessage' | 'showControls' | 'showSearchTools' >; diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.tsx index 0ff1a708dabc2..8a6761d48f9b1 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/package_list_grid/index.tsx @@ -48,7 +48,7 @@ const StickySidebar = styled(EuiFlexItem)` top: 120px; `; -export interface Props { +export interface PackageListGridProps { isLoading?: boolean; controls?: ReactNode | ReactNode[]; list: IntegrationCardItem[]; @@ -71,7 +71,7 @@ export interface Props { showSearchTools?: boolean; } -export const PackageListGrid: FunctionComponent = ({ +export const PackageListGrid: FunctionComponent = ({ isLoading, controls, title, diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/utils/promote_featured_integrations.ts b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/utils/promote_featured_integrations.ts index 675d3691c1fd5..07d41ea431dab 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/utils/promote_featured_integrations.ts +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/components/utils/promote_featured_integrations.ts @@ -8,7 +8,7 @@ import partition from 'lodash/partition'; import { FEATURED_INTEGRATIONS_BY_CATEGORY } from '@kbn/custom-integrations-plugin/common'; -import type { Props as PackageListGridProps } from '../package_list_grid'; +import type { PackageListGridProps } from '../package_list_grid'; type Category = PackageListGridProps['selectedCategory']; diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/policies/components/package_policy_agents_cell.test.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/policies/components/package_policy_agents_cell.test.tsx index ce1de40f1d59c..c1bba8284548a 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/policies/components/package_policy_agents_cell.test.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/policies/components/package_policy_agents_cell.test.tsx @@ -19,6 +19,7 @@ function renderCell({ agentPolicy = {} as AgentPolicy, onAddAgent = () => {}, hasHelpPopover = false, + canAddAgents = true, }) { const renderer = createIntegrationsTestRendererMock(); @@ -27,6 +28,7 @@ function renderCell({ agentCount={agentCount} agentPolicy={agentPolicy} onAddAgent={onAddAgent} + canAddAgents={canAddAgents} hasHelpPopover={hasHelpPopover} /> ); @@ -80,4 +82,10 @@ describe('PackagePolicyAgentsCell', () => { ).not.toBeInTheDocument(); }); }); + test('it should be disabled if canAddAgents is false', async () => { + const utils = renderCell({ agentCount: 0, canAddAgents: false }); + await act(async () => { + expect(utils.container.querySelector('[data-test-subj="addAgentButton"]')).toBeDisabled(); + }); + }); }); diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/policies/components/package_policy_agents_cell.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/policies/components/package_policy_agents_cell.tsx index 9471079902a90..87f2682671204 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/policies/components/package_policy_agents_cell.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/policies/components/package_policy_agents_cell.tsx @@ -13,8 +13,20 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { LinkedAgentCount, AddAgentHelpPopover } from '../../../../../../components'; import type { AgentPolicy } from '../../../../../../types'; -const AddAgentButton = ({ onAddAgent }: { onAddAgent: () => void }) => ( - +const AddAgentButton = ({ + onAddAgent, + canAddAgents, +}: { + onAddAgent: () => void; + canAddAgents: boolean; +}) => ( + void }) => ( ); -const AddAgentButtonWithPopover = ({ onAddAgent }: { onAddAgent: () => void }) => { +const AddAgentButtonWithPopover = ({ + onAddAgent, + canAddAgents, +}: { + onAddAgent: () => void; + canAddAgents: boolean; +}) => { const [isHelpOpen, setIsHelpOpen] = useState(true); const onAddAgentCloseHelp = () => { setIsHelpOpen(false); onAddAgent(); }; - const button = ; + const button = ; return ( void; + canAddAgents: boolean; }) => { if (agentCount > 0 || agentPolicy.is_managed) { return ( @@ -60,8 +80,8 @@ export const PackagePolicyAgentsCell = ({ } if (!hasHelpPopover) { - return ; + return ; } - return ; + return ; }; diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/policies/package_policies.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/policies/package_policies.tsx index acff29b6e9ff0..9b42fdd42f10c 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/policies/package_policies.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/detail/policies/package_policies.tsx @@ -112,6 +112,7 @@ export const PackagePoliciesPage = ({ name, version }: PackagePoliciesPanelProps const { isPackagePolicyUpgradable } = useIsPackagePolicyUpgradable(); const canWriteIntegrationPolicies = useAuthz().integrations.writeIntegrationPolicies; + const canAddAgents = useAuthz().fleet.addAgents; const packageAndAgentPolicies = useMemo((): Array<{ agentPolicy?: GetAgentPoliciesResponseItem; @@ -268,6 +269,7 @@ export const PackagePoliciesPage = ({ name, version }: PackagePoliciesPanelProps agentPolicy={agentPolicy} agentCount={agentPolicy.agents} onAddAgent={() => setFlyoutOpenForPolicyId(agentPolicy.id)} + canAddAgents={canAddAgents} hasHelpPopover={showAddAgentHelpForPackagePolicyId === packagePolicy.id} /> ); @@ -299,7 +301,7 @@ export const PackagePoliciesPage = ({ name, version }: PackagePoliciesPanelProps }, }, ], - [getHref, showAddAgentHelpForPackagePolicyId, canWriteIntegrationPolicies] + [getHref, canWriteIntegrationPolicies, canAddAgents, showAddAgentHelpForPackagePolicyId] ); const noItemsMessage = useMemo(() => { diff --git a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/hooks/use_available_packages.tsx b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/hooks/use_available_packages.tsx index 9aa242f8575b3..c7b1f936e2424 100644 --- a/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/hooks/use_available_packages.tsx +++ b/x-pack/plugins/fleet/public/applications/integrations/sections/epm/screens/home/hooks/use_available_packages.tsx @@ -103,6 +103,8 @@ const packageListToIntegrationsList = (packages: PackageList): PackageList => { }, []); }; +export type AvailablePackagesHookType = typeof useAvailablePackages; + export const useAvailablePackages = ({ prereleaseIntegrationsEnabled, }: { diff --git a/x-pack/plugins/fleet/public/components/package_policy_actions_menu.tsx b/x-pack/plugins/fleet/public/components/package_policy_actions_menu.tsx index e2f581d38d1db..e7f54fc1b8c54 100644 --- a/x-pack/plugins/fleet/public/components/package_policy_actions_menu.tsx +++ b/x-pack/plugins/fleet/public/components/package_policy_actions_menu.tsx @@ -36,6 +36,7 @@ export const PackagePolicyActionsMenu: React.FunctionComponent<{ const [isEnrollmentFlyoutOpen, setIsEnrollmentFlyoutOpen] = useState(false); const { getHref } = useLink(); const canWriteIntegrationPolicies = useAuthz().integrations.writeIntegrationPolicies; + const canAddAgents = useAuthz().fleet.addAgents; const refreshAgentPolicy = useAgentPolicyRefresh(); const [isActionsMenuOpen, setIsActionsMenuOpen] = useState(defaultIsOpen); @@ -70,6 +71,7 @@ export const PackagePolicyActionsMenu: React.FunctionComponent<{ setIsEnrollmentFlyoutOpen(true); }} key="addAgent" + disabled={!canAddAgents} > {(deletePackagePoliciesPrompt) => { return ( - - + ); }} diff --git a/x-pack/plugins/fleet/public/index.ts b/x-pack/plugins/fleet/public/index.ts index 003e3de3f35dd..7661cbc64ad31 100644 --- a/x-pack/plugins/fleet/public/index.ts +++ b/x-pack/plugins/fleet/public/index.ts @@ -7,6 +7,8 @@ import type { PluginInitializerContext } from '@kbn/core/public'; +import { lazy } from 'react'; + import { FleetPlugin } from './plugin'; export type { FleetSetup, FleetStart, FleetStartServices } from './plugin'; @@ -62,9 +64,20 @@ export { PackagePolicyEditorDatastreamPipelines } from './applications/fleet/sec export type { PackagePolicyEditorDatastreamPipelinesProps } from './applications/fleet/sections/agent_policy/create_package_policy_page/components/datastream_pipelines'; export { PackagePolicyEditorDatastreamMappings } from './applications/fleet/sections/agent_policy/create_package_policy_page/components/datastream_mappings'; export type { PackagePolicyEditorDatastreamMappingsProps } from './applications/fleet/sections/agent_policy/create_package_policy_page/components/datastream_mappings'; - export type { DynamicPagePathValues } from './constants'; +// This Type export is added to prevent error TS4023 +export type { InputFieldProps } from './applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_var_field'; + +export const LazyPackagePolicyInputVarField = lazy(() => + import( + './applications/fleet/sections/agent_policy/create_package_policy_page/components/steps/components/package_policy_input_var_field' + ).then((module) => ({ default: module.PackagePolicyInputVarField })) +); +export type { PackageListGridProps } from './applications/integrations/sections/epm/components/package_list_grid'; +export type { AvailablePackagesHookType } from './applications/integrations/sections/epm/screens/home/hooks/use_available_packages'; +export type { IntegrationCardItem } from './applications/integrations/sections/epm/screens/home'; + export const PackageList = () => { return import('./applications/integrations/sections/epm/components/package_list_grid'); }; diff --git a/x-pack/plugins/fleet/server/saved_objects/index.ts b/x-pack/plugins/fleet/server/saved_objects/index.ts index 4aef23990ffec..787137cacba18 100644 --- a/x-pack/plugins/fleet/server/saved_objects/index.ts +++ b/x-pack/plugins/fleet/server/saved_objects/index.ts @@ -74,6 +74,7 @@ import { import { migratePackagePolicyToV8100, migratePackagePolicyToV8140, + migratePackagePolicyEnableCapsToV8140, migratePackagePolicyToV870, } from './migrations/security_solution'; import { migratePackagePolicyToV880 } from './migrations/to_v8_8_0'; @@ -156,6 +157,7 @@ export const getSavedObjectTypes = (): { [key: string]: SavedObjectsType } => ({ is_protected: { type: 'boolean' }, overrides: { type: 'flattened', index: false }, keep_monitoring_alive: { type: 'boolean' }, + advanced_settings: { type: 'flattened', index: false }, }, }, migrations: { @@ -165,6 +167,18 @@ export const getSavedObjectTypes = (): { [key: string]: SavedObjectsType } => ({ '8.5.0': migrateAgentPolicyToV850, '8.9.0': migrateAgentPolicyToV890, }, + modelVersions: { + '1': { + changes: [ + { + type: 'mappings_addition', + addedMappings: { + advanced_settings: { type: 'flattened', index: false }, + }, + }, + ], + }, + }, }, [OUTPUT_SAVED_OBJECT_TYPE]: { name: OUTPUT_SAVED_OBJECT_TYPE, @@ -482,6 +496,14 @@ export const getSavedObjectTypes = (): { [key: string]: SavedObjectsType } => ({ }, ], }, + '7': { + changes: [ + { + type: 'data_backfill', + backfillFn: migratePackagePolicyEnableCapsToV8140, + }, + ], + }, }, migrations: { '7.10.0': migratePackagePolicyToV7100, diff --git a/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution/index.ts b/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution/index.ts index cd37ed56b5b58..0108b1d5a33c8 100644 --- a/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution/index.ts +++ b/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution/index.ts @@ -20,3 +20,4 @@ export { migratePackagePolicyToV870 } from './to_v8_7_0'; export { migratePackagePolicyToV880 } from './to_v8_8_0'; export { migratePackagePolicyToV8100 } from './to_v8_10_0'; export { migratePackagePolicyToV8140 } from './to_v8_14_0'; +export { migratePackagePolicyEnableCapsToV8140 } from './to_v8_14_0'; diff --git a/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution/to_v8_14_0.test.ts b/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution/to_v8_14_0.test.ts index e724c039179dc..52bb5f1c591ae 100644 --- a/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution/to_v8_14_0.test.ts +++ b/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution/to_v8_14_0.test.ts @@ -81,57 +81,143 @@ describe('8.14.0 Endpoint Package Policy migration', () => { }); }); - it('should backfill `on_write_scan` field to malware protections on Kibana update', () => { - const originalPolicyConfigSO = cloneDeep(policyDoc); + describe('backfilling `on_write_scan`', () => { + it('should backfill `on_write_scan` field to malware protections on Kibana update', () => { + const originalPolicyConfigSO = cloneDeep(policyDoc); + + const migratedPolicyConfigSO = migrator.migrate({ + document: originalPolicyConfigSO, + fromVersion: 5, + toVersion: 6, + }); + + const migratedPolicyConfig = migratedPolicyConfigSO.attributes.inputs[0].config?.policy.value; + expect(migratedPolicyConfig.windows.malware.on_write_scan).toBe(true); + expect(migratedPolicyConfig.mac.malware.on_write_scan).toBe(true); + expect(migratedPolicyConfig.linux.malware.on_write_scan).toBe(true); + }); - const migratedPolicyConfigSO = migrator.migrate({ - document: originalPolicyConfigSO, - fromVersion: 5, - toVersion: 6, + it('should not backfill `on_write_scan` field if already present due to user edit before migration is performed on serverless', () => { + const originalPolicyConfigSO = cloneDeep(policyDoc); + const originalPolicyConfig = originalPolicyConfigSO.attributes.inputs[0].config?.policy.value; + originalPolicyConfig.windows.malware.on_write_scan = false; + originalPolicyConfig.mac.malware.on_write_scan = true; + originalPolicyConfig.linux.malware.on_write_scan = false; + + const migratedPolicyConfigSO = migrator.migrate({ + document: originalPolicyConfigSO, + fromVersion: 5, + toVersion: 6, + }); + + const migratedPolicyConfig = migratedPolicyConfigSO.attributes.inputs[0].config?.policy.value; + expect(migratedPolicyConfig.windows.malware.on_write_scan).toBe(false); + expect(migratedPolicyConfig.mac.malware.on_write_scan).toBe(true); + expect(migratedPolicyConfig.linux.malware.on_write_scan).toBe(false); }); - const migratedPolicyConfig = migratedPolicyConfigSO.attributes.inputs[0].config?.policy.value; - expect(migratedPolicyConfig.windows.malware.on_write_scan).toBe(true); - expect(migratedPolicyConfig.mac.malware.on_write_scan).toBe(true); - expect(migratedPolicyConfig.linux.malware.on_write_scan).toBe(true); + // no reason for removing `on_write_scan` for a lower version Kibana - the field will just sit silently in the package config + it('should not strip `on_write_scan` in regards of forward compatibility', () => { + const originalPolicyConfigSO = cloneDeep(policyDoc); + const originalPolicyConfig = originalPolicyConfigSO.attributes.inputs[0].config?.policy.value; + originalPolicyConfig.windows.malware.on_write_scan = false; + originalPolicyConfig.mac.malware.on_write_scan = true; + originalPolicyConfig.linux.malware.on_write_scan = false; + + const migratedPolicyConfigSO = migrator.migrate({ + document: originalPolicyConfigSO, + fromVersion: 6, + toVersion: 5, + }); + + const migratedPolicyConfig = migratedPolicyConfigSO.attributes.inputs[0].config?.policy.value; + expect(migratedPolicyConfig.windows.malware.on_write_scan).toBe(false); + expect(migratedPolicyConfig.mac.malware.on_write_scan).toBe(true); + expect(migratedPolicyConfig.linux.malware.on_write_scan).toBe(false); + }); }); - it('should not backfill `on_write_scan` field if already present due to user edit before migration is performed on serverless', () => { - const originalPolicyConfigSO = cloneDeep(policyDoc); - const originalPolicyConfig = originalPolicyConfigSO.attributes.inputs[0].config?.policy.value; - originalPolicyConfig.windows.malware.on_write_scan = false; - originalPolicyConfig.mac.malware.on_write_scan = true; - originalPolicyConfig.linux.malware.on_write_scan = false; - - const migratedPolicyConfigSO = migrator.migrate({ - document: originalPolicyConfigSO, - fromVersion: 5, - toVersion: 6, + describe('backfilling `linux.advanced.events.enable_caps`', () => { + it('should backfill `enable_caps` field on Kibana update if there are no advanced options yet', () => { + const originalPolicyConfigSO = cloneDeep(policyDoc); + const expectedPolicyConfig = cloneDeep(policyDoc).attributes.inputs[0].config?.policy.value; + expectedPolicyConfig.linux.advanced = { + events: { + enable_caps: true, + }, + }; + + const migratedPolicyConfigSO = migrator.migrate({ + document: originalPolicyConfigSO, + fromVersion: 6, + toVersion: 7, + }); + + const migratedPolicyConfig = migratedPolicyConfigSO.attributes.inputs[0].config?.policy.value; + expect(migratedPolicyConfig).toStrictEqual(expectedPolicyConfig); }); - const migratedPolicyConfig = migratedPolicyConfigSO.attributes.inputs[0].config?.policy.value; - expect(migratedPolicyConfig.windows.malware.on_write_scan).toBe(false); - expect(migratedPolicyConfig.mac.malware.on_write_scan).toBe(true); - expect(migratedPolicyConfig.linux.malware.on_write_scan).toBe(false); - }); + it('should backfill `enable_caps` field without modifying other `advanced` options', () => { + const originalPolicyConfigSO = cloneDeep(policyDoc); + const originalPolicyConfig = originalPolicyConfigSO.attributes.inputs[0].config?.policy.value; + originalPolicyConfig.linux.advanced = { + cheese: 'brie', + }; + const expectedPolicyConfig = cloneDeep(originalPolicyConfig); + expectedPolicyConfig.linux.advanced.events = { + enable_caps: true, + }; + + const migratedPolicyConfigSO = migrator.migrate({ + document: originalPolicyConfigSO, + fromVersion: 6, + toVersion: 7, + }); + + const migratedPolicyConfig = migratedPolicyConfigSO.attributes.inputs[0].config?.policy.value; + expect(migratedPolicyConfig).toStrictEqual(expectedPolicyConfig); + }); - // no reason for removing `on_write_scan` for a lower version Kibana - the field will just sit silently in the package config - it('should not strip `on_write_scan` in regards of forward compatibility', () => { - const originalPolicyConfigSO = cloneDeep(policyDoc); - const originalPolicyConfig = originalPolicyConfigSO.attributes.inputs[0].config?.policy.value; - originalPolicyConfig.windows.malware.on_write_scan = false; - originalPolicyConfig.mac.malware.on_write_scan = true; - originalPolicyConfig.linux.malware.on_write_scan = false; - - const migratedPolicyConfigSO = migrator.migrate({ - document: originalPolicyConfigSO, - fromVersion: 6, - toVersion: 5, + it('should backfill `enable_caps` without modifying other `events`', () => { + const originalPolicyConfigSO = cloneDeep(policyDoc); + const originalPolicyConfig = originalPolicyConfigSO.attributes.inputs[0].config?.policy.value; + originalPolicyConfig.linux.advanced = { + events: { + cheese: 'brie', + }, + }; + const expectedPolicyConfig = cloneDeep(originalPolicyConfig); + expectedPolicyConfig.linux.advanced.events.enable_caps = true; + + const migratedPolicyConfigSO = migrator.migrate({ + document: originalPolicyConfigSO, + fromVersion: 6, + toVersion: 7, + }); + + const migratedPolicyConfig = migratedPolicyConfigSO.attributes.inputs[0].config?.policy.value; + expect(migratedPolicyConfig).toStrictEqual(expectedPolicyConfig); }); - const migratedPolicyConfig = migratedPolicyConfigSO.attributes.inputs[0].config?.policy.value; - expect(migratedPolicyConfig.windows.malware.on_write_scan).toBe(false); - expect(migratedPolicyConfig.mac.malware.on_write_scan).toBe(true); - expect(migratedPolicyConfig.linux.malware.on_write_scan).toBe(false); + it('should not backfill `enable_caps` field if already present', () => { + const originalPolicyConfigSO = cloneDeep(policyDoc); + const originalPolicyConfig = originalPolicyConfigSO.attributes.inputs[0].config?.policy.value; + originalPolicyConfig.linux.advanced = { + events: { + cheese: 'brie', + enable_caps: false, + }, + }; + const expectedPolicyConfig = cloneDeep(originalPolicyConfig); + + const migratedPolicyConfigSO = migrator.migrate({ + document: originalPolicyConfigSO, + fromVersion: 6, + toVersion: 7, + }); + + const migratedPolicyConfig = migratedPolicyConfigSO.attributes.inputs[0].config?.policy.value; + expect(migratedPolicyConfig).toStrictEqual(expectedPolicyConfig); + }); }); }); diff --git a/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution/to_v8_14_0.ts b/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution/to_v8_14_0.ts index cc97dafe72180..a911edf830cd9 100644 --- a/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution/to_v8_14_0.ts +++ b/x-pack/plugins/fleet/server/saved_objects/migrations/security_solution/to_v8_14_0.ts @@ -35,3 +35,30 @@ export const migratePackagePolicyToV8140: SavedObjectModelDataBackfillFn< return { attributes: updatedPackagePolicyDoc.attributes }; }; + +export const migratePackagePolicyEnableCapsToV8140: SavedObjectModelDataBackfillFn< + PackagePolicy, + PackagePolicy +> = (packagePolicyDoc) => { + if (packagePolicyDoc.attributes.package?.name !== 'endpoint') { + return { attributes: packagePolicyDoc.attributes }; + } + + const updatedPackagePolicyDoc: SavedObjectUnsanitizedDoc = packagePolicyDoc; + + const input = updatedPackagePolicyDoc.attributes.inputs[0]; + + if (input && input.config) { + const policy = input.config.policy.value; + + policy.linux.advanced = { + ...policy.linux.advanced, + events: { + enable_caps: true, + ...policy.linux.advanced?.events, // this comes second, so existing value is not overwritten by backfill + }, + }; + } + + return { attributes: updatedPackagePolicyDoc.attributes }; +}; diff --git a/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.test.ts b/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.test.ts index 0ecd385c2516c..3a56bf248bcf4 100644 --- a/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.test.ts +++ b/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.test.ts @@ -714,6 +714,22 @@ describe('getFullAgentPolicy', () => { revision: 1, }); }); + + it('should return a policy with advanced settings', async () => { + mockAgentPolicy({ + advanced_settings: { + agent_limits_go_max_procs: 2, + }, + }); + const agentPolicy = await getFullAgentPolicy(savedObjectsClientMock.create(), 'agent-policy'); + + expect(agentPolicy).toMatchObject({ + id: 'agent-policy', + agent: { + limits: { go_max_procs: 2 }, + }, + }); + }); }); describe('transformOutputToFullPolicyOutput', () => { diff --git a/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.ts b/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.ts index ab277a97774d0..bec47eea524c4 100644 --- a/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.ts +++ b/x-pack/plugins/fleet/server/services/agent_policies/full_agent_policy.ts @@ -10,6 +10,7 @@ import type { SavedObjectsClientContract } from '@kbn/core/server'; import { safeLoad } from 'js-yaml'; import deepMerge from 'deepmerge'; +import { set } from '@kbn/safer-lodash-set'; import { getDefaultPresetForEsOutput, @@ -37,7 +38,7 @@ import { kafkaCompressionType, outputType, } from '../../../common/constants'; - +import { getSettingsValuesForAgentPolicy } from '../form_settings'; import { getPackageInfo } from '../epm/packages'; import { pkgToPkgKey, splitPkgKey } from '../epm/registry'; import { appContextService } from '../app_context'; @@ -242,6 +243,14 @@ export async function getFullAgentPolicy( fullAgentPolicy.fleet = generateFleetConfig(fleetServerHosts, proxies); } + const settingsValues = getSettingsValuesForAgentPolicy( + 'AGENT_POLICY_ADVANCED_SETTINGS', + agentPolicy + ); + Object.entries(settingsValues).forEach(([settingsKey, settingValue]) => { + set(fullAgentPolicy, settingsKey, settingValue); + }); + // populate protection and signed properties const messageSigningService = appContextService.getMessageSigningService(); if (messageSigningService && fullAgentPolicy.agent) { diff --git a/x-pack/plugins/fleet/server/services/epm/packages/install_state_machine/steps/step_create_restart_installation.ts b/x-pack/plugins/fleet/server/services/epm/packages/install_state_machine/steps/step_create_restart_installation.ts index 58daa6c379134..af0fb0fea9caf 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/install_state_machine/steps/step_create_restart_installation.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/install_state_machine/steps/step_create_restart_installation.ts @@ -11,6 +11,7 @@ import { MAX_TIME_COMPLETE_INSTALL } from '../../../../../constants'; import { restartInstallation, createInstallation } from '../../install'; import type { InstallContext } from '../_state_machine_package_install'; +import { withPackageSpan } from '../../utils'; export async function stepCreateRestartInstallation(context: InstallContext) { const { @@ -42,13 +43,15 @@ export async function stepCreateRestartInstallation(context: InstallContext) { if (force) { logger.debug(`Package install - Forced installation, restarting`); - await restartInstallation({ - savedObjectsClient, - pkgName, - pkgVersion, - installSource, - verificationResult, - }); + await withPackageSpan('Restarting installation with force flag', () => + restartInstallation({ + savedObjectsClient, + pkgName, + pkgVersion, + installSource, + verificationResult, + }) + ); } else { throw new ConcurrentInstallOperationError( `Concurrent installation or upgrade of ${pkgName || 'unknown'}-${ @@ -62,23 +65,27 @@ export async function stepCreateRestartInstallation(context: InstallContext) { logger.debug( `Package install - no installation running or the installation has been running longer than ${MAX_TIME_COMPLETE_INSTALL}, restarting` ); - await restartInstallation({ - savedObjectsClient, - pkgName, - pkgVersion, - installSource, - verificationResult, - }); + await withPackageSpan('Restarting installation', () => + restartInstallation({ + savedObjectsClient, + pkgName, + pkgVersion, + installSource, + verificationResult, + }) + ); } } else { logger.debug(`Package install - Create installation`); - await createInstallation({ - savedObjectsClient, - packageInfo, - installSource, - spaceId, - verificationResult, - }); + await withPackageSpan('Creating installation', () => + createInstallation({ + savedObjectsClient, + packageInfo, + installSource, + spaceId, + verificationResult, + }) + ); } } diff --git a/x-pack/plugins/fleet/server/services/epm/packages/install_state_machine/steps/step_delete_previous_pipelines.ts b/x-pack/plugins/fleet/server/services/epm/packages/install_state_machine/steps/step_delete_previous_pipelines.ts index eb80ef16dbcb0..4a524e3e07939 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/install_state_machine/steps/step_delete_previous_pipelines.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/install_state_machine/steps/step_delete_previous_pipelines.ts @@ -36,26 +36,30 @@ export async function stepDeletePreviousPipelines(context: InstallContext) { installedPkg ) { logger.debug(`Package install - installType ${installType} Deleting previous ingest pipelines`); - updatedESReferences = await withPackageSpan('Delete previous ingest pipelines', () => - deletePreviousPipelines( - esClient, - savedObjectsClient, - pkgName, - installedPkg!.attributes.version, - esReferences || [] - ) + updatedESReferences = await withPackageSpan( + 'Delete previous ingest pipelines with installType update or reupdate', + () => + deletePreviousPipelines( + esClient, + savedObjectsClient, + pkgName, + installedPkg!.attributes.version, + esReferences || [] + ) ); } else if (installType === 'rollback' && installedPkg) { // pipelines from a different version may have been installed during a failed update logger.debug(`Package install - installType ${installType} Deleting previous ingest pipelines`); - updatedESReferences = await withPackageSpan('Delete previous ingest pipelines', () => - deletePreviousPipelines( - esClient, - savedObjectsClient, - pkgName, - installedPkg!.attributes.install_version, - esReferences || [] - ) + updatedESReferences = await withPackageSpan( + 'Delete previous ingest pipelines with installType rollback', + () => + deletePreviousPipelines( + esClient, + savedObjectsClient, + pkgName, + installedPkg!.attributes.install_version, + esReferences || [] + ) ); } else { // if none of the previous cases, return the original esReferences diff --git a/x-pack/plugins/fleet/server/services/epm/packages/install_state_machine/steps/step_install_index_template_pipelines.ts b/x-pack/plugins/fleet/server/services/epm/packages/install_state_machine/steps/step_install_index_template_pipelines.ts index e2b6918b722cf..18c0956da31c9 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/install_state_machine/steps/step_install_index_template_pipelines.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/install_state_machine/steps/step_install_index_template_pipelines.ts @@ -10,6 +10,7 @@ import { getNormalizedDataStreams } from '../../../../../../common/services'; import { installIndexTemplatesAndPipelines } from '../../install_index_template_pipeline'; import type { InstallContext } from '../_state_machine_package_install'; +import { withPackageSpan } from '../../utils'; export async function stepInstallIndexTemplatePipelines(context: InstallContext) { const { esClient, savedObjectsClient, packageInstallContext, logger, installedPkg } = context; @@ -20,15 +21,18 @@ export async function stepInstallIndexTemplatePipelines(context: InstallContext) logger.debug( `Package install - Installing index templates and pipelines, packageInfo.type: ${packageInfo.type}` ); - const { installedTemplates, esReferences: templateEsReferences } = - await installIndexTemplatesAndPipelines({ - installedPkg: installedPkg ? installedPkg.attributes : undefined, - packageInstallContext, - esClient, - savedObjectsClient, - logger, - esReferences, - }); + const { installedTemplates, esReferences: templateEsReferences } = await withPackageSpan( + 'Install index templates and pipelines with packageInfo integration', + () => + installIndexTemplatesAndPipelines({ + installedPkg: installedPkg ? installedPkg.attributes : undefined, + packageInstallContext, + esClient, + savedObjectsClient, + logger, + esReferences, + }) + ); return { esReferences: templateEsReferences, indexTemplates: installedTemplates, @@ -50,16 +54,19 @@ export async function stepInstallIndexTemplatePipelines(context: InstallContext) ); if (dataStreams.length) { - const { installedTemplates, esReferences: templateEsReferences } = - await installIndexTemplatesAndPipelines({ - installedPkg: installedPkg ? installedPkg.attributes : undefined, - packageInstallContext, - esClient, - savedObjectsClient, - logger, - esReferences, - onlyForDataStreams: dataStreams, - }); + const { installedTemplates, esReferences: templateEsReferences } = await withPackageSpan( + 'Install index templates and pipelines with packageInfo input', + () => + installIndexTemplatesAndPipelines({ + installedPkg: installedPkg ? installedPkg.attributes : undefined, + packageInstallContext, + esClient, + savedObjectsClient, + logger, + esReferences, + onlyForDataStreams: dataStreams, + }) + ); return { esReferences: templateEsReferences, indexTemplates: installedTemplates }; } } diff --git a/x-pack/plugins/fleet/server/services/epm/packages/install_state_machine/steps/step_remove_legacy_templates.ts b/x-pack/plugins/fleet/server/services/epm/packages/install_state_machine/steps/step_remove_legacy_templates.ts index 0c70989a67096..b93197af5e521 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/install_state_machine/steps/step_remove_legacy_templates.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/install_state_machine/steps/step_remove_legacy_templates.ts @@ -8,12 +8,15 @@ import { removeLegacyTemplates } from '../../../elasticsearch/template/remove_legacy'; import type { InstallContext } from '../_state_machine_package_install'; +import { withPackageSpan } from '../../utils'; export async function stepRemoveLegacyTemplates(context: InstallContext) { const { esClient, packageInstallContext, logger } = context; const { packageInfo } = packageInstallContext; try { - await removeLegacyTemplates({ packageInfo, esClient, logger }); + await withPackageSpan('Remove legacy templates', () => + removeLegacyTemplates({ packageInfo, esClient, logger }) + ); } catch (e) { logger.warn(`Error removing legacy templates: ${e.message}`); } diff --git a/x-pack/plugins/fleet/server/services/epm/packages/install_state_machine/steps/update_latest_executed_state.test.ts b/x-pack/plugins/fleet/server/services/epm/packages/install_state_machine/steps/update_latest_executed_state.test.ts index afce673348d7e..d963e5fea44c9 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/install_state_machine/steps/update_latest_executed_state.test.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/install_state_machine/steps/update_latest_executed_state.test.ts @@ -52,7 +52,7 @@ describe('updateLatestExecutedState', () => { soClient.update.mockReset(); }); - it('Updates the SO after each transition', async () => { + it('Should update the SO if there was an error on latest step', async () => { await updateLatestExecutedState({ savedObjectsClient: soClient, // @ts-ignore @@ -78,6 +78,7 @@ describe('updateLatestExecutedState', () => { latestExecutedState: { name: INSTALL_STATES.SAVE_ARCHIVE_ENTRIES, started_at: new Date(Date.now() - MAX_TIME_COMPLETE_INSTALL * 2).toISOString(), + error: `Some error`, }, installType: 'install', installSource: 'registry', @@ -92,6 +93,7 @@ describe('updateLatestExecutedState', () => { { latest_executed_state: { name: 'save_archive_entries_from_assets_map', + error: 'Some error', started_at: expect.anything(), }, }, @@ -105,7 +107,7 @@ describe('updateLatestExecutedState', () => { }); }); - it('Should not update the SO if the context contains concurrent installation error', async () => { + it('Should not update the SO if the latest error was of type concurrent installation', async () => { await updateLatestExecutedState({ savedObjectsClient: soClient, // @ts-ignore @@ -142,7 +144,43 @@ describe('updateLatestExecutedState', () => { expect(mockedAuditLoggingService.writeCustomSoAuditLog).not.toHaveBeenCalled(); }); - it('Should log error if the update failed', async () => { + it('Should not update the SO if there was no error', async () => { + await updateLatestExecutedState({ + savedObjectsClient: soClient, + // @ts-ignore + savedObjectsImporter: jest.fn(), + esClient, + logger, + packageInstallContext: { + assetsMap: new Map(), + paths: [], + packageInfo: { + title: 'title', + name: 'xyz', + version: '4.5.6', + description: 'test', + type: 'integration', + categories: ['cloud', 'custom'], + format_version: 'string', + release: 'experimental', + conditions: { kibana: { version: 'x.y.z' } }, + owner: { github: 'elastic/fleet' }, + }, + }, + latestExecutedState: { + name: INSTALL_STATES.SAVE_ARCHIVE_ENTRIES, + started_at: new Date(Date.now() - MAX_TIME_COMPLETE_INSTALL * 2).toISOString(), + }, + installType: 'install', + installSource: 'registry', + spaceId: DEFAULT_SPACE_ID, + }); + + expect(soClient.update.mock.calls).toEqual([]); + expect(mockedAuditLoggingService.writeCustomSoAuditLog).not.toHaveBeenCalled(); + }); + + it('Should log error if the SO update failed', async () => { soClient.update.mockImplementation( async ( _type: string, @@ -177,6 +215,7 @@ describe('updateLatestExecutedState', () => { latestExecutedState: { name: INSTALL_STATES.SAVE_ARCHIVE_ENTRIES, started_at: new Date(Date.now() - MAX_TIME_COMPLETE_INSTALL * 2).toISOString(), + error: `Some error`, }, installType: 'install', installSource: 'registry', diff --git a/x-pack/plugins/fleet/server/services/epm/packages/install_state_machine/steps/update_latest_executed_state.ts b/x-pack/plugins/fleet/server/services/epm/packages/install_state_machine/steps/update_latest_executed_state.ts index 55d7997ad58f7..17854f69454e9 100644 --- a/x-pack/plugins/fleet/server/services/epm/packages/install_state_machine/steps/update_latest_executed_state.ts +++ b/x-pack/plugins/fleet/server/services/epm/packages/install_state_machine/steps/update_latest_executed_state.ts @@ -12,6 +12,7 @@ import { PACKAGES_SAVED_OBJECT_TYPE } from '../../../../../constants'; import { auditLoggingService } from '../../../../audit_logging'; import type { InstallContext } from '../_state_machine_package_install'; +import { withPackageSpan } from '../../utils'; // Function invoked after each transition export const updateLatestExecutedState = async (context: InstallContext) => { @@ -20,17 +21,24 @@ export const updateLatestExecutedState = async (context: InstallContext) => { const { name: pkgName } = packageInfo; try { - // If the error is of type ConcurrentInstallationError, don't save it in the SO - if (latestExecutedState?.error?.includes('Concurrent installation or upgrade')) return; + // if there is no error avoid updating the SO as the call adds ~1s to install time + // also don't save it if the error is of type ConcurrentInstallationError + if ( + !latestExecutedState?.error || + latestExecutedState?.error?.includes('Concurrent installation or upgrade') + ) + return; auditLoggingService.writeCustomSoAuditLog({ action: 'update', id: pkgName, savedObjectType: PACKAGES_SAVED_OBJECT_TYPE, }); - return await savedObjectsClient.update(PACKAGES_SAVED_OBJECT_TYPE, pkgName, { - latest_executed_state: latestExecutedState, - }); + return await withPackageSpan('Update latest executed state', () => + savedObjectsClient.update(PACKAGES_SAVED_OBJECT_TYPE, pkgName, { + latest_executed_state: latestExecutedState, + }) + ); } catch (err) { if (!SavedObjectsErrorHelpers.isNotFoundError(err)) { logger.error(`Failed to update SO with latest executed state: ${err}`); diff --git a/x-pack/plugins/fleet/server/services/form_settings/form_settings.test.ts b/x-pack/plugins/fleet/server/services/form_settings/form_settings.test.ts new file mode 100644 index 0000000000000..d620737e8dc27 --- /dev/null +++ b/x-pack/plugins/fleet/server/services/form_settings/form_settings.test.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 { z } from 'zod'; +import { schema } from '@kbn/config-schema'; + +import type { SettingsConfig } from '../../../common/settings/types'; + +import { _getSettingsAPISchema, _getSettingsValuesForAgentPolicy } from './form_settings'; + +const TEST_SETTINGS: SettingsConfig[] = [ + { + name: 'test.foo', + title: 'test', + description: 'test', + schema: z.boolean(), + api_field: { + name: 'test_foo', + }, + }, + { + name: 'test.foo.default_value', + title: 'test', + description: 'test', + schema: z.string().default('test'), + api_field: { + name: 'test_foo_default_value', + }, + }, +]; + +describe('form_settings', () => { + describe('_getSettingsAPISchema', () => { + it('generate a valid API schema for api_field', () => { + const apiSchema = schema.object(_getSettingsAPISchema(TEST_SETTINGS)); + + expect(() => + apiSchema.validate({ + advanced_settings: { + test_foo: 'not valid', + }, + }) + ).toThrowError(/Expected boolean, received string/); + + expect(() => + apiSchema.validate({ + advanced_settings: { + test_foo: true, + }, + }) + ).not.toThrow(); + }); + + it('generate a valid API schema for api_field with default value', () => { + const apiSchema = schema.object(_getSettingsAPISchema(TEST_SETTINGS)); + const res = apiSchema.validate({ advanced_settings: {} }); + expect(res).toEqual({ advanced_settings: { test_foo_default_value: 'test' } }); + }); + }); + + describe('_getSettingsValuesForAgentPolicy', () => { + it('generate the proper values for agent policy (full agent policy)', () => { + const res = _getSettingsValuesForAgentPolicy(TEST_SETTINGS, { + advanced_settings: { + test_foo_default_value: 'test', + }, + } as any); + expect(res).toEqual({ 'test.foo.default_value': 'test' }); + }); + }); +}); diff --git a/x-pack/plugins/fleet/server/services/form_settings/form_settings.ts b/x-pack/plugins/fleet/server/services/form_settings/form_settings.ts new file mode 100644 index 0000000000000..a381fcd55b4ba --- /dev/null +++ b/x-pack/plugins/fleet/server/services/form_settings/form_settings.ts @@ -0,0 +1,105 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { type Props, schema } from '@kbn/config-schema'; +import { stringifyZodError } from '@kbn/zod-helpers'; + +import type { SettingsConfig, SettingsSection } from '../../../common/settings/types'; +import { AGENT_POLICY_ADVANCED_SETTINGS } from '../../../common/settings'; +import type { AgentPolicy } from '../../types'; + +export function getSettingsAPISchema(settingSection: SettingsSection) { + const settings = getSettings(settingSection); + + return _getSettingsAPISchema(settings); +} + +export function _getSettingsAPISchema(settings: SettingsConfig[]): Props { + const validations: Props = {}; + settings.forEach((setting) => { + if (!setting.api_field) { + return; + } + const defaultValueRes = setting.schema.safeParse(undefined); + const defaultValue = defaultValueRes.success ? defaultValueRes.data : undefined; + if (defaultValue) { + validations[setting.api_field.name] = schema.oneOf( + [ + schema.any({ + validate: (val: any) => { + const res = setting.schema.safeParse(val); + if (!res.success) { + return stringifyZodError(res.error); + } + }, + }), + schema.literal(null), + ], + { + defaultValue, + } + ); + } else { + validations[setting.api_field.name] = schema.maybe( + schema.nullable( + schema.any({ + validate: (val: any) => { + const res = setting.schema.safeParse(val); + if (!res.success) { + return stringifyZodError(res.error); + } + }, + }) + ) + ); + } + }); + + const advancedSettingsValidations: Props = { + advanced_settings: schema.maybe( + schema.object({ + ...validations, + }) + ), + }; + return advancedSettingsValidations; +} + +export function getSettingsValuesForAgentPolicy( + settingSection: SettingsSection, + agentPolicy: AgentPolicy +) { + const settings = getSettings(settingSection); + + return _getSettingsValuesForAgentPolicy(settings, agentPolicy); +} + +export function _getSettingsValuesForAgentPolicy( + settings: SettingsConfig[], + agentPolicy: AgentPolicy +) { + const settingsValues: { [k: string]: any } = {}; + settings.forEach((setting) => { + if (!setting.api_field) { + return; + } + + const val = agentPolicy.advanced_settings?.[setting.api_field.name]; + if (val) { + settingsValues[setting.name] = val; + } + }); + return settingsValues; +} + +export function getSettings(settingSection: SettingsSection) { + if (settingSection === 'AGENT_POLICY_ADVANCED_SETTINGS') { + return AGENT_POLICY_ADVANCED_SETTINGS; + } + + throw new Error(`Invalid settings section ${settingSection}`); +} diff --git a/x-pack/plugins/fleet/server/services/form_settings/index.ts b/x-pack/plugins/fleet/server/services/form_settings/index.ts new file mode 100644 index 0000000000000..b88cd1e0eda2a --- /dev/null +++ b/x-pack/plugins/fleet/server/services/form_settings/index.ts @@ -0,0 +1,12 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export { + getSettings, + getSettingsAPISchema, + getSettingsValuesForAgentPolicy, +} from './form_settings'; diff --git a/x-pack/plugins/fleet/server/types/models/agent_policy.ts b/x-pack/plugins/fleet/server/types/models/agent_policy.ts index 518510f0b8454..748a5c81c1bfb 100644 --- a/x-pack/plugins/fleet/server/types/models/agent_policy.ts +++ b/x-pack/plugins/fleet/server/types/models/agent_policy.ts @@ -9,6 +9,7 @@ import { schema } from '@kbn/config-schema'; import { agentPolicyStatuses, dataTypes } from '../../../common/constants'; import { isValidNamespace } from '../../../common/services'; +import { getSettingsAPISchema } from '../../services/form_settings'; import { PackagePolicySchema } from './package_policy'; @@ -81,6 +82,7 @@ export const AgentPolicyBaseSchema = { }) ) ), + ...getSettingsAPISchema('AGENT_POLICY_ADVANCED_SETTINGS'), }; export const NewAgentPolicySchema = schema.object({ diff --git a/x-pack/plugins/fleet/tsconfig.json b/x-pack/plugins/fleet/tsconfig.json index b99fb0cce0985..d57c36aa70165 100644 --- a/x-pack/plugins/fleet/tsconfig.json +++ b/x-pack/plugins/fleet/tsconfig.json @@ -105,5 +105,6 @@ "@kbn/core-http-server-mocks", "@kbn/code-editor", "@kbn/core-test-helpers-model-versions", + "@kbn/zod-helpers", ] } diff --git a/x-pack/plugins/index_lifecycle_management/public/extend_index_management/components/index_lifecycle_summary.tsx b/x-pack/plugins/index_lifecycle_management/public/extend_index_management/components/index_lifecycle_summary.tsx index 0afe886bf1706..1d828a758b277 100644 --- a/x-pack/plugins/index_lifecycle_management/public/extend_index_management/components/index_lifecycle_summary.tsx +++ b/x-pack/plugins/index_lifecycle_management/public/extend_index_management/components/index_lifecycle_summary.tsx @@ -26,8 +26,7 @@ import { import { euiThemeVars } from '@kbn/ui-theme'; import { ApplicationStart } from '@kbn/core/public'; -import { Index } from '@kbn/index-management-plugin/common'; -import { IndexDetailsTab } from '@kbn/index-management-plugin/common/constants'; +import { Index, IndexDetailsTab } from '@kbn/index-management'; import { IlmExplainLifecycleLifecycleExplainManaged } from '@elastic/elasticsearch/lib/api/types'; import { Phase } from '../../../common/types'; import { getPolicyEditPath } from '../../application/services/navigation'; diff --git a/x-pack/plugins/index_lifecycle_management/tsconfig.json b/x-pack/plugins/index_lifecycle_management/tsconfig.json index 6632d318e5d9f..b759a9468861f 100644 --- a/x-pack/plugins/index_lifecycle_management/tsconfig.json +++ b/x-pack/plugins/index_lifecycle_management/tsconfig.json @@ -36,7 +36,8 @@ "@kbn/config-schema", "@kbn/shared-ux-router", "@kbn/ui-theme", - "@kbn/shared-ux-link-redirect-app" + "@kbn/shared-ux-link-redirect-app", + "@kbn/index-management" ], "exclude": [ "target/**/*", diff --git a/x-pack/plugins/index_management/common/constants/index.ts b/x-pack/plugins/index_management/common/constants/index.ts index 718775ed9167e..146c33d6cfd11 100644 --- a/x-pack/plugins/index_management/common/constants/index.ts +++ b/x-pack/plugins/index_management/common/constants/index.ts @@ -52,6 +52,6 @@ export { export { MAJOR_VERSION } from './plugin'; -export { Section, IndexDetailsSection } from './home_sections'; -export type { IndexDetailsTab, IndexDetailsTabId } from './home_sections'; +export { Section, IndexDetailsSection } from '@kbn/index-management'; +export type { IndexDetailsTab, IndexDetailsTabId } from '@kbn/index-management'; export * from './allow_auto_create'; diff --git a/x-pack/plugins/index_management/common/lib/enrich_policies.ts b/x-pack/plugins/index_management/common/lib/enrich_policies.ts index 9372578089c84..fc7e15addec86 100644 --- a/x-pack/plugins/index_management/common/lib/enrich_policies.ts +++ b/x-pack/plugins/index_management/common/lib/enrich_policies.ts @@ -6,7 +6,7 @@ */ import type { EnrichSummary, EnrichPolicyType } from '@elastic/elasticsearch/lib/api/types'; -import type { SerializedEnrichPolicy } from '../types'; +import type { SerializedEnrichPolicy } from '@kbn/index-management'; export const getPolicyType = (policy: EnrichSummary): EnrichPolicyType => { if (policy.config.match) { diff --git a/x-pack/plugins/index_management/common/types/enrich_policies.ts b/x-pack/plugins/index_management/common/types/enrich_policies.ts index 52bab8e6c0f18..ae516b0775f8f 100644 --- a/x-pack/plugins/index_management/common/types/enrich_policies.ts +++ b/x-pack/plugins/index_management/common/types/enrich_policies.ts @@ -5,17 +5,6 @@ * 2.0. */ -import type { EnrichPolicyType } from '@elastic/elasticsearch/lib/api/types'; - -export interface SerializedEnrichPolicy { - type: EnrichPolicyType; - name: string; - sourceIndices: string[]; - matchField: string; - enrichFields: string[]; - query?: Record; -} - export interface FieldItem { name: string; type: string; diff --git a/x-pack/plugins/index_management/common/types/indices.ts b/x-pack/plugins/index_management/common/types/indices.ts index b5f70ec5e1463..678d5c854470d 100644 --- a/x-pack/plugins/index_management/common/types/indices.ts +++ b/x-pack/plugins/index_management/common/types/indices.ts @@ -5,12 +5,7 @@ * 2.0. */ -import { - HealthStatus, - IlmExplainLifecycleLifecycleExplain, - IndicesStatsIndexMetadataState, - Uuid, -} from '@elastic/elasticsearch/lib/api/types'; +export type { Index } from '@kbn/index-management'; interface IndexModule { number_of_shards: number | string; @@ -58,31 +53,6 @@ export interface IndexSettings { [key: string]: any; } -export interface Index { - name: string; - primary?: number | string; - replica?: number | string; - isFrozen: boolean; - hidden: boolean; - aliases: string | string[]; - data_stream?: string; - - // The types below are added by extension services if corresponding plugins are enabled (ILM, Rollup, CCR) - isRollupIndex?: boolean; - ilm?: IlmExplainLifecycleLifecycleExplain; - isFollowerIndex?: boolean; - - // The types from here below represent information returned from the index stats API; - // treated optional as the stats API is not available on serverless - health?: HealthStatus; - status?: IndicesStatsIndexMetadataState; - uuid?: Uuid; - documents?: number; - size?: string; - primary_size?: string; - documents_deleted?: number; -} - export interface IndexSettingsResponse { settings: IndexSettings; defaults: IndexSettings; diff --git a/x-pack/plugins/index_management/public/application/components/no_match/no_match.tsx b/x-pack/plugins/index_management/public/application/components/no_match/no_match.tsx index 6f7c79724763e..7f5b3f4b4b7d5 100644 --- a/x-pack/plugins/index_management/public/application/components/no_match/no_match.tsx +++ b/x-pack/plugins/index_management/public/application/components/no_match/no_match.tsx @@ -8,8 +8,8 @@ import React from 'react'; import { EuiButton, EuiEmptyPrompt } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n-react'; -import { ExtensionsService } from '../../../services'; import { CreateIndexButton } from '../../sections/home/index_list/create_index/create_index_button'; +import { ExtensionsService } from '../../../services/extensions_service'; export const NoMatch = ({ loadIndices, diff --git a/x-pack/plugins/index_management/public/application/mount_management_section.ts b/x-pack/plugins/index_management/public/application/mount_management_section.ts index aaf2e871ca6f0..ae202bcf55c0f 100644 --- a/x-pack/plugins/index_management/public/application/mount_management_section.ts +++ b/x-pack/plugins/index_management/public/application/mount_management_section.ts @@ -13,10 +13,9 @@ import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/public'; import { CloudSetup } from '@kbn/cloud-plugin/public'; import { Observable } from 'rxjs'; +import { StartDependencies } from '@kbn/index-management'; import { UIM_APP_NAME } from '../../common/constants'; import { PLUGIN } from '../../common/constants/plugin'; -import { ExtensionsService } from '../services'; -import { StartDependencies } from '../types'; import { AppDependencies } from './app_context'; import { breadcrumbService } from './services/breadcrumbs'; import { documentationService } from './services/documentation'; @@ -26,6 +25,7 @@ import { renderApp } from '.'; import { setUiMetricService } from './services/api'; import { notificationService } from './services/notification'; import { httpService } from './services/http'; +import { ExtensionsService } from '../services/extensions_service'; function initSetup({ usageCollection, diff --git a/x-pack/plugins/index_management/public/application/sections/enrich_policy_create/create_policy_context.tsx b/x-pack/plugins/index_management/public/application/sections/enrich_policy_create/create_policy_context.tsx index a84d503758c6a..dab8056486405 100644 --- a/x-pack/plugins/index_management/public/application/sections/enrich_policy_create/create_policy_context.tsx +++ b/x-pack/plugins/index_management/public/application/sections/enrich_policy_create/create_policy_context.tsx @@ -6,7 +6,7 @@ */ import React, { createContext, useContext, useState } from 'react'; -import type { SerializedEnrichPolicy } from '../../../../common'; +import type { SerializedEnrichPolicy } from '@kbn/index-management'; export type DraftPolicy = Partial; diff --git a/x-pack/plugins/index_management/public/application/sections/enrich_policy_create/create_policy_wizard.tsx b/x-pack/plugins/index_management/public/application/sections/enrich_policy_create/create_policy_wizard.tsx index fc5aa6f667a6f..ff20f78830476 100644 --- a/x-pack/plugins/index_management/public/application/sections/enrich_policy_create/create_policy_wizard.tsx +++ b/x-pack/plugins/index_management/public/application/sections/enrich_policy_create/create_policy_wizard.tsx @@ -9,12 +9,12 @@ import React, { useState, useMemo, useCallback } from 'react'; import { i18n } from '@kbn/i18n'; import { EuiSteps, EuiStepStatus, EuiCallOut, EuiSpacer } from '@elastic/eui'; +import type { SerializedEnrichPolicy } from '@kbn/index-management'; import { useAppContext } from '../../app_context'; import { ConfigurationStep, FieldSelectionStep, CreateStep } from './steps'; import { useCreatePolicyContext } from './create_policy_context'; import { createEnrichPolicy } from '../../services/api'; import type { Error } from '../../../shared_imports'; -import type { SerializedEnrichPolicy } from '../../../../common'; const CONFIGURATION = 1; const FIELD_SELECTION = 2; diff --git a/x-pack/plugins/index_management/public/application/sections/enrich_policy_create/steps/create.tsx b/x-pack/plugins/index_management/public/application/sections/enrich_policy_create/steps/create.tsx index d2226a0adf371..7150e2bd29bac 100644 --- a/x-pack/plugins/index_management/public/application/sections/enrich_policy_create/steps/create.tsx +++ b/x-pack/plugins/index_management/public/application/sections/enrich_policy_create/steps/create.tsx @@ -21,7 +21,7 @@ import { EuiCodeBlock, } from '@elastic/eui'; -import type { SerializedEnrichPolicy } from '../../../../../common'; +import type { SerializedEnrichPolicy } from '@kbn/index-management'; import { useCreatePolicyContext } from '../create_policy_context'; import { serializeAsESPolicy, getESPolicyCreationApiCall } from '../../../../../common/lib'; diff --git a/x-pack/plugins/index_management/public/application/sections/home/enrich_policies_list/details_flyout/policy_details_flyout.tsx b/x-pack/plugins/index_management/public/application/sections/home/enrich_policies_list/details_flyout/policy_details_flyout.tsx index 7b7bc588e598a..9fb20e33e22c8 100644 --- a/x-pack/plugins/index_management/public/application/sections/home/enrich_policies_list/details_flyout/policy_details_flyout.tsx +++ b/x-pack/plugins/index_management/public/application/sections/home/enrich_policies_list/details_flyout/policy_details_flyout.tsx @@ -21,7 +21,7 @@ import { EuiButtonEmpty, } from '@elastic/eui'; import { CodeEditor } from '@kbn/code-editor'; -import type { SerializedEnrichPolicy } from '../../../../../../common'; +import type { SerializedEnrichPolicy } from '@kbn/index-management'; export interface Props { policy: SerializedEnrichPolicy; diff --git a/x-pack/plugins/index_management/public/application/sections/home/enrich_policies_list/enrich_policies_list.tsx b/x-pack/plugins/index_management/public/application/sections/home/enrich_policies_list/enrich_policies_list.tsx index 0d5c79612191a..e11c0e9db87fc 100644 --- a/x-pack/plugins/index_management/public/application/sections/home/enrich_policies_list/enrich_policies_list.tsx +++ b/x-pack/plugins/index_management/public/application/sections/home/enrich_policies_list/enrich_policies_list.tsx @@ -12,8 +12,8 @@ import { RouteComponentProps } from 'react-router-dom'; import { Location } from 'history'; import { parse } from 'query-string'; +import type { SerializedEnrichPolicy } from '@kbn/index-management'; import { APP_WRAPPER_CLASS, useExecutionContext } from '../../../../shared_imports'; -import type { SerializedEnrichPolicy } from '../../../../../common'; import { useAppContext } from '../../../app_context'; import { useRedirectPath } from '../../../hooks/redirect_path'; diff --git a/x-pack/plugins/index_management/public/application/sections/home/enrich_policies_list/policies_table/policies_table.tsx b/x-pack/plugins/index_management/public/application/sections/home/enrich_policies_list/policies_table/policies_table.tsx index 87002e6042270..50140898ee090 100644 --- a/x-pack/plugins/index_management/public/application/sections/home/enrich_policies_list/policies_table/policies_table.tsx +++ b/x-pack/plugins/index_management/public/application/sections/home/enrich_policies_list/policies_table/policies_table.tsx @@ -16,8 +16,8 @@ import { import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { reactRouterNavigate } from '@kbn/kibana-react-plugin/public'; +import type { SerializedEnrichPolicy } from '@kbn/index-management'; import { useAppContext } from '../../../../app_context'; -import type { SerializedEnrichPolicy } from '../../../../../../common/types'; export interface Props { policies: SerializedEnrichPolicy[]; diff --git a/x-pack/plugins/index_management/public/application/sections/home/index_list/details_page/index_mapping_with_context_types.tsx b/x-pack/plugins/index_management/public/application/sections/home/index_list/details_page/index_mapping_with_context_types.tsx index 3d33b77bbd25b..5dd264d38b80e 100644 --- a/x-pack/plugins/index_management/public/application/sections/home/index_list/details_page/index_mapping_with_context_types.tsx +++ b/x-pack/plugins/index_management/public/application/sections/home/index_list/details_page/index_mapping_with_context_types.tsx @@ -6,35 +6,9 @@ */ import { CoreStart } from '@kbn/core/public'; -import { ExtensionsService } from '../../../../../services'; +import { IndexMappingProps } from '@kbn/index-management'; import { AppDependencies } from '../../../../app_context'; - -// duplicating this Index interface here so we don't blow up the bundle by importing all the types -interface Index { - name: string; - primary?: number | string; - replica?: number | string; - isFrozen: boolean; - hidden: boolean; - aliases: string | string[]; - data_stream?: string; - - // The types below are added by extension services if corresponding plugins are enabled (ILM, Rollup, CCR) - isRollupIndex?: boolean; - isFollowerIndex?: boolean; - - // The types from here below represent information returned from the index stats API; - // treated optional as the stats API is not available on serverless - documents?: number; - size?: string; - primary_size?: string; - documents_deleted?: number; -} - -export interface IndexMappingProps { - index?: Index; - showAboutMappings?: boolean; -} +import { ExtensionsService } from '../../../../../services/extensions_service'; export type IndexMappingWithContextProps = { core: CoreStart; diff --git a/x-pack/plugins/index_management/public/application/services/api.ts b/x-pack/plugins/index_management/public/application/services/api.ts index eb7e0c1876240..f9a454af4b1a8 100644 --- a/x-pack/plugins/index_management/public/application/services/api.ts +++ b/x-pack/plugins/index_management/public/application/services/api.ts @@ -7,6 +7,7 @@ import { METRIC_TYPE } from '@kbn/analytics'; import { IndicesStatsResponse } from '@elastic/elasticsearch/lib/api/types'; +import type { SerializedEnrichPolicy } from '@kbn/index-management'; import { API_BASE_PATH, INTERNAL_API_BASE_PATH, @@ -44,7 +45,7 @@ import { import { useRequest, sendRequest } from './use_request'; import { httpService } from './http'; import { UiMetricService } from './ui_metric'; -import type { SerializedEnrichPolicy, FieldFromIndicesRequest } from '../../../common'; +import type { FieldFromIndicesRequest } from '../../../common'; import { Fields } from '../components/mappings_editor/types'; interface ReloadIndicesOptions { diff --git a/x-pack/plugins/index_management/public/index.ts b/x-pack/plugins/index_management/public/index.ts index 19d50a5f961f8..09adb299c711f 100644 --- a/x-pack/plugins/index_management/public/index.ts +++ b/x-pack/plugins/index_management/public/index.ts @@ -14,10 +14,11 @@ export const plugin = (ctx: PluginInitializerContext) => { return new IndexMgmtUIPlugin(ctx); }; -export type { IndexManagementPluginSetup, IndexManagementPluginStart } from './types'; +export type { + Index, + IndexMappingProps, + IndexManagementPluginSetup, + IndexManagementPluginStart, +} from '@kbn/index-management'; export { getIndexListUri, getTemplateDetailsLink } from './application/services/routing'; - -export type { Index } from '../common'; - -export type { IndexMappingProps } from './application/sections/home/index_list/details_page/index_mapping_with_context_types'; diff --git a/x-pack/plugins/index_management/public/plugin.ts b/x-pack/plugins/index_management/public/plugin.ts index 4cc904ebf6ad0..d733c4dfeeeb2 100644 --- a/x-pack/plugins/index_management/public/plugin.ts +++ b/x-pack/plugins/index_management/public/plugin.ts @@ -15,21 +15,21 @@ import { PluginInitializerContext, ScopedHistory, } from '@kbn/core/public'; -import { setExtensionsService } from './application/store/selectors/extension_service'; - -import { ExtensionsService, PublicApiService } from './services'; - import { IndexManagementPluginSetup, SetupDependencies, StartDependencies, - ClientConfigType, IndexManagementPluginStart, -} from './types'; +} from '@kbn/index-management'; +import { setExtensionsService } from './application/store/selectors/extension_service'; +import { ExtensionsService } from './services/extensions_service'; + +import { ClientConfigType } from './types'; // avoid import from index files in plugin.ts, use specific import paths import { PLUGIN } from '../common/constants/plugin'; import { IndexMapping } from './application/sections/home/index_list/details_page/index_mappings_embeddable'; +import { PublicApiService } from './services/public_api_service'; export class IndexMgmtUIPlugin implements diff --git a/x-pack/plugins/index_management/public/services/extensions_service.mock.ts b/x-pack/plugins/index_management/public/services/extensions_service.mock.ts index 73053eec98556..072acd92f5a9d 100644 --- a/x-pack/plugins/index_management/public/services/extensions_service.mock.ts +++ b/x-pack/plugins/index_management/public/services/extensions_service.mock.ts @@ -6,7 +6,8 @@ */ import type { PublicMethodsOf } from '@kbn/utility-types'; -import { ExtensionsService, ExtensionsSetup } from './extensions_service'; +import { ExtensionsSetup } from '@kbn/index-management/src/services/extensions_service'; +import { ExtensionsService } from './extensions_service'; export type ExtensionsSetupMock = jest.Mocked; diff --git a/x-pack/plugins/index_management/public/services/extensions_service.ts b/x-pack/plugins/index_management/public/services/extensions_service.ts index e7cb4aef2282d..3823ad7ed28f2 100644 --- a/x-pack/plugins/index_management/public/services/extensions_service.ts +++ b/x-pack/plugins/index_management/public/services/extensions_service.ts @@ -6,70 +6,15 @@ */ import { i18n } from '@kbn/i18n'; -import { FunctionComponent, ReactNode } from 'react'; -import { ApplicationStart } from '@kbn/core-application-browser'; -import { EuiBadgeProps } from '@elastic/eui'; -import type { IndexDetailsTab } from '../../common/constants'; -import { Index } from '..'; - -export interface IndexContent { - renderContent: (args: { - index: Index; - getUrlForApp: ApplicationStart['getUrlForApp']; - }) => ReturnType; -} - -export interface IndexToggle { - matchIndex: (index: Index) => boolean; - label: string; - name: string; -} -export interface IndexBadge { - matchIndex: (index: Index) => boolean; - label: string; - // a parseable search bar filter expression, for example "isFollowerIndex:true" - filterExpression?: string; - color: EuiBadgeProps['color']; -} - -export interface EmptyListContent { - renderContent: (args: { - // the button to open the "create index" modal - createIndexButton: ReturnType; - }) => ReturnType; -} - -export interface IndicesListColumn { - fieldName: string; - label: string; - order: number; - render?: (index: Index) => ReactNode; - // return a value used for sorting (only if the value is different from the original value at index[fieldName]) - sort?: (index: Index) => any; -} - -export interface ExtensionsSetup { - // adds an option to the "manage index" menu - addAction(action: any): void; - // adds a banner to the indices list - addBanner(banner: any): void; - // adds a filter to the indices list - addFilter(filter: any): void; - // adds a badge to the index name - addBadge(badge: IndexBadge): void; - // adds a toggle to the indices list - addToggle(toggle: IndexToggle): void; - // adds a column to display additional information added via a data enricher - addColumn(column: IndicesListColumn): void; - // set the content to render when the indices list is empty - setEmptyListContent(content: EmptyListContent): void; - // adds a tab to the index details page - addIndexDetailsTab(tab: IndexDetailsTab): void; - // sets content to render instead of the code block on the overview tab of the index page - setIndexOverviewContent(content: IndexContent): void; - // sets content to render below the docs link on the mappings tab of the index page - setIndexMappingsContent(content: IndexContent): void; -} +import { + IndexBadge, + IndexToggle, + IndicesListColumn, + EmptyListContent, + IndexContent, + ExtensionsSetup, +} from '@kbn/index-management'; +import { IndexDetailsTab } from '../../common/constants'; export class ExtensionsService { private _actions: any[] = []; diff --git a/x-pack/plugins/index_management/public/services/index.ts b/x-pack/plugins/index_management/public/services/index.ts index bca35e09c9776..92c6e95a8b432 100644 --- a/x-pack/plugins/index_management/public/services/index.ts +++ b/x-pack/plugins/index_management/public/services/index.ts @@ -5,8 +5,6 @@ * 2.0. */ -export type { ExtensionsSetup, IndexContent } from './extensions_service'; export { ExtensionsService } from './extensions_service'; -export type { PublicApiServiceSetup } from './public_api_service'; export { PublicApiService } from './public_api_service'; diff --git a/x-pack/plugins/index_management/public/services/public_api_service.mock.ts b/x-pack/plugins/index_management/public/services/public_api_service.mock.ts index 85ce1b232c06a..567c87b914654 100644 --- a/x-pack/plugins/index_management/public/services/public_api_service.mock.ts +++ b/x-pack/plugins/index_management/public/services/public_api_service.mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { PublicApiServiceSetup } from './public_api_service'; +import { PublicApiServiceSetup } from '@kbn/index-management/src/services/public_api_service'; export type PublicApiServiceSetupMock = jest.Mocked; diff --git a/x-pack/plugins/index_management/public/services/public_api_service.ts b/x-pack/plugins/index_management/public/services/public_api_service.ts index 75a3081c0fda5..bf51e90b75d38 100644 --- a/x-pack/plugins/index_management/public/services/public_api_service.ts +++ b/x-pack/plugins/index_management/public/services/public_api_service.ts @@ -5,14 +5,9 @@ * 2.0. */ -import { HttpSetup } from '@kbn/core/public'; -import { sendRequest, SendRequestResponse } from '../shared_imports'; -import { INTERNAL_API_BASE_PATH } from '../../common/constants'; -import { SerializedEnrichPolicy } from '../../common/types'; - -export interface PublicApiServiceSetup { - getAllEnrichPolicies(): Promise>; -} +import { HttpSetup } from '@kbn/core-http-browser'; +import { INTERNAL_API_BASE_PATH } from '../../common'; +import { sendRequest } from '../shared_imports'; /** * Index Management public API service diff --git a/x-pack/plugins/index_management/public/types.ts b/x-pack/plugins/index_management/public/types.ts index 7deb650c1c266..9b85903f1884a 100644 --- a/x-pack/plugins/index_management/public/types.ts +++ b/x-pack/plugins/index_management/public/types.ts @@ -5,44 +5,6 @@ * 2.0. */ -import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/public'; -import { ManagementSetup } from '@kbn/management-plugin/public'; -import { SharePluginSetup, SharePluginStart } from '@kbn/share-plugin/public'; -import { CloudSetup } from '@kbn/cloud-plugin/public'; -import { ConsolePluginStart } from '@kbn/console-plugin/public'; -import { ScopedHistory } from '@kbn/core-application-browser'; -import { IndexMappingProps } from './application/sections/home/index_list/details_page/index_mapping_with_context_types'; -import { ExtensionsSetup, PublicApiServiceSetup } from './services'; - -export interface IndexManagementPluginSetup { - apiService: PublicApiServiceSetup; - extensionsService: ExtensionsSetup; -} - -export interface IndexManagementPluginStart { - extensionsService: ExtensionsSetup; - getIndexMappingComponent: (deps: { - history: ScopedHistory; - }) => React.FC; -} - -export interface SetupDependencies { - fleet?: unknown; - usageCollection: UsageCollectionSetup; - management: ManagementSetup; - share: SharePluginSetup; - cloud?: CloudSetup; -} - -export interface StartDependencies { - cloud?: CloudSetup; - console?: ConsolePluginStart; - share: SharePluginStart; - fleet?: unknown; - usageCollection: UsageCollectionSetup; - management: ManagementSetup; -} - export interface ClientConfigType { ui: { enabled: boolean; diff --git a/x-pack/plugins/index_management/server/lib/enrich_policies.ts b/x-pack/plugins/index_management/server/lib/enrich_policies.ts index db25603817e64..61fa1d1467006 100644 --- a/x-pack/plugins/index_management/server/lib/enrich_policies.ts +++ b/x-pack/plugins/index_management/server/lib/enrich_policies.ts @@ -7,7 +7,7 @@ import { IScopedClusterClient } from '@kbn/core/server'; import type { EnrichSummary } from '@elastic/elasticsearch/lib/api/types'; -import type { SerializedEnrichPolicy } from '../../common/types'; +import type { SerializedEnrichPolicy } from '@kbn/index-management'; import { getPolicyType } from '../../common/lib'; export const serializeEnrichmentPolicies = ( diff --git a/x-pack/plugins/index_management/server/routes/api/enrich_policies/register_create_route.ts b/x-pack/plugins/index_management/server/routes/api/enrich_policies/register_create_route.ts index 2a26ec687574c..8b43fc19d2a31 100644 --- a/x-pack/plugins/index_management/server/routes/api/enrich_policies/register_create_route.ts +++ b/x-pack/plugins/index_management/server/routes/api/enrich_policies/register_create_route.ts @@ -8,12 +8,12 @@ import { IScopedClusterClient } from '@kbn/core/server'; import { schema, TypeOf } from '@kbn/config-schema'; +import type { SerializedEnrichPolicy } from '@kbn/index-management'; import { RouteDependencies } from '../../../types'; import { addInternalBasePath } from '..'; import { enrichPoliciesActions } from '../../../lib/enrich_policies'; import { serializeAsESPolicy } from '../../../../common/lib'; import { normalizeFieldsList, getIndices, FieldCapsList, getCommonFields } from './helpers'; -import type { SerializedEnrichPolicy } from '../../../../common'; const validationSchema = schema.object({ policy: schema.object({ diff --git a/x-pack/plugins/index_management/tsconfig.json b/x-pack/plugins/index_management/tsconfig.json index 3247b35bec421..dc587d5a1ab9e 100644 --- a/x-pack/plugins/index_management/tsconfig.json +++ b/x-pack/plugins/index_management/tsconfig.json @@ -26,7 +26,6 @@ "@kbn/i18n", "@kbn/ml-trained-models-utils", "@kbn/analytics", - "@kbn/utility-types", "@kbn/i18n-react", "@kbn/core-doc-links-browser-mocks", "@kbn/core-execution-context-browser-mocks", @@ -42,11 +41,14 @@ "@kbn/search-api-panels", "@kbn/cloud-plugin", "@kbn/ui-theme", - "@kbn/core-application-browser", "@kbn/code-editor", "@kbn/monaco", "@kbn/console-plugin", - "@kbn/shared-ux-utility" + "@kbn/shared-ux-utility", + "@kbn/index-management", + "@kbn/utility-types" ], - "exclude": ["target/**/*"] + "exclude": [ + "target/**/*" + ] } diff --git a/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/flyout_wrapper.tsx b/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/flyout_wrapper.tsx index f8ee1c5779693..3c013cdc95998 100644 --- a/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/flyout_wrapper.tsx +++ b/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/flyout_wrapper.tsx @@ -62,18 +62,10 @@ export const FlyoutWrapper = ({ values: { lang: language }, })} { + const count = table.meta?.statistics?.totalCount || table.rows.length; + + return count > 0; + }); + + if (hasData) { + this.parent.trackContentfulRender(); + } + } + private renderUserMessages() { const errors = this.getUserMessages(['visualization', 'visualizationOnEmbeddable'], { severity: 'error', diff --git a/x-pack/plugins/lens/public/shared_components/axis/extent/axis_extent_settings.tsx b/x-pack/plugins/lens/public/shared_components/axis/extent/axis_extent_settings.tsx index a015c0d477dba..66a4326d04198 100644 --- a/x-pack/plugins/lens/public/shared_components/axis/extent/axis_extent_settings.tsx +++ b/x-pack/plugins/lens/public/shared_components/axis/extent/axis_extent_settings.tsx @@ -179,7 +179,6 @@ function MetricAxisBoundsControl({ defaultMessage: 'Bounds', })} data-test-subj={`${testSubjPrefix}_axisBounds_groups`} - name="axisBounds" buttonSize="compressed" options={[ { @@ -250,7 +249,6 @@ function BucketAxisBoundsControl({ defaultMessage: 'Bounds', })} data-test-subj={`${testSubjPrefix}_axisBounds_groups`} - name="axisBounds" buttonSize="compressed" options={[ { diff --git a/x-pack/plugins/lens/public/shared_components/legend/legend_settings_popover.test.tsx b/x-pack/plugins/lens/public/shared_components/legend/legend_settings_popover.test.tsx index 777f2860cb8b6..5350f1468c27c 100644 --- a/x-pack/plugins/lens/public/shared_components/legend/legend_settings_popover.test.tsx +++ b/x-pack/plugins/lens/public/shared_components/legend/legend_settings_popover.test.tsx @@ -6,35 +6,32 @@ */ import React from 'react'; -import { shallowWithIntl as shallow } from '@kbn/test-jest-helpers'; -import { - LegendSettingsPopover, - LegendSettingsPopoverProps, - MaxLinesInput, -} from './legend_settings_popover'; +import { LegendSettingsPopover, LegendSettingsPopoverProps } from './legend_settings_popover'; +import userEvent from '@testing-library/user-event'; +import { RenderOptions, fireEvent, render, screen } from '@testing-library/react'; +import { getSelectedButtonInGroup } from '@kbn/test-eui-helpers'; describe('Legend Settings', () => { - const legendOptions: Array<{ id: string; value: 'auto' | 'show' | 'hide'; label: string }> = [ - { - id: `test_legend_auto`, - value: 'auto', - label: 'Auto', - }, - { - id: `test_legend_show`, - value: 'show', - label: 'Show', - }, - { - id: `test_legend_hide`, - value: 'hide', - label: 'Hide', - }, - ]; - let props: LegendSettingsPopoverProps; + let defaultProps: LegendSettingsPopoverProps; beforeEach(() => { - props = { - legendOptions, + defaultProps = { + legendOptions: [ + { + id: `test_legend_auto`, + value: 'auto', + label: 'Auto', + }, + { + id: `test_legend_show`, + value: 'show', + label: 'Show', + }, + { + id: `test_legend_hide`, + value: 'hide', + label: 'Hide', + }, + ], mode: 'auto', showAutoLegendSizeOption: true, onDisplayChange: jest.fn(), @@ -43,83 +40,89 @@ describe('Legend Settings', () => { }; }); - it('should have selected the given mode as Display value', () => { - const component = shallow(); - expect(component.find('[data-test-subj="lens-legend-display-btn"]').prop('idSelected')).toEqual( - 'test_legend_auto' + const renderLegendSettingsPopover = ( + overrideProps?: Partial, + renderOptions?: RenderOptions + ) => { + const rtlRender = render( + , + renderOptions ); + const openLegendPopover = () => userEvent.click(screen.getByRole('button', { name: 'Legend' })); + + openLegendPopover(); + + return { + ...rtlRender, + getSelectedDisplayOption: getSelectedButtonInGroup('lens-legend-display-btn'), + }; + }; + + it('should have selected the given mode as Display value', () => { + const { getSelectedDisplayOption } = renderLegendSettingsPopover(); + expect(getSelectedDisplayOption()).toHaveTextContent('Auto'); }); it('should have called the onDisplayChange function on ButtonGroup change', () => { - const component = shallow(); - component.find('[data-test-subj="lens-legend-display-btn"]').simulate('change'); - expect(props.onDisplayChange).toHaveBeenCalled(); + renderLegendSettingsPopover(); + fireEvent.click(screen.getByRole('button', { name: 'Show' })); + expect(defaultProps.onDisplayChange).toHaveBeenCalled(); }); - it('should have default the max lines input to 1 when no value is given', () => { - const component = shallow(); - expect(component.find(MaxLinesInput).prop('value')).toEqual(1); + it('should have default line limit set to one and be enabled when it is on', () => { + renderLegendSettingsPopover({ shouldTruncate: true }); + const lineLimit = screen.getByRole('spinbutton', { name: 'Line limit' }); + expect(lineLimit).toHaveValue(1); + expect(lineLimit).not.toBeDisabled(); }); - it('should have the `Truncate legend text` switch enabled by default', () => { - const component = shallow(); - expect( - component.find('[data-test-subj="lens-legend-truncate-switch"]').prop('checked') - ).toEqual(true); + it('should have default line limit set to one and be disabled when it is off', () => { + renderLegendSettingsPopover({ shouldTruncate: false }); + const lineLimit = screen.getByRole('spinbutton', { name: 'Line limit' }); + expect(lineLimit).toHaveValue(1); + expect(lineLimit).toBeDisabled(); }); - it('should set the truncate switch state when truncate prop value is false', () => { - const component = shallow(); - expect( - component.find('[data-test-subj="lens-legend-truncate-switch"]').prop('checked') - ).toEqual(false); + it('should have the `Label truncation` switch enabled by default', () => { + renderLegendSettingsPopover(); + const switchElement = screen.getByRole('switch', { name: 'Label truncation' }); + expect(switchElement).toBeChecked(); }); - it('should hide the max lines input when truncate is set to false', () => { - const component = shallow(); - expect(component.exists(MaxLinesInput)).toEqual(false); + it('should set the truncate switch state when truncate prop value is false', () => { + renderLegendSettingsPopover({ shouldTruncate: false }); + const switchElement = screen.getByRole('switch', { name: 'Label truncation' }); + expect(switchElement).not.toBeChecked(); }); it('should have called the onTruncateLegendChange function on truncate switch change', () => { - const nestedProps = { - ...props, - shouldTruncate: true, - onTruncateLegendChange: jest.fn(), - }; - const component = shallow(); - component.find('[data-test-subj="lens-legend-truncate-switch"]').simulate('change'); - expect(nestedProps.onTruncateLegendChange).toHaveBeenCalled(); + const onTruncateLegendChange = jest.fn(); + renderLegendSettingsPopover({ onTruncateLegendChange }); + const switchElement = screen.getByRole('switch', { name: 'Label truncation' }); + fireEvent.click(switchElement); + expect(onTruncateLegendChange).toHaveBeenCalled(); }); it('should enable the Nested Legend Switch when renderNestedLegendSwitch prop is true', () => { - const component = shallow(); - expect(component.find('[data-test-subj="lens-legend-nested-switch"]')).toHaveLength(1); + renderLegendSettingsPopover({ renderNestedLegendSwitch: true }); + expect(screen.getByRole('switch', { name: 'Nested' })).toBeEnabled(); }); it('should set the switch state on nestedLegend prop value', () => { - const component = shallow( - - ); - expect(component.find('[data-test-subj="lens-legend-nested-switch"]').prop('checked')).toEqual( - true - ); + renderLegendSettingsPopover({ renderNestedLegendSwitch: true, nestedLegend: true }); + expect(screen.getByRole('switch', { name: 'Nested' })).toBeChecked(); }); it('should have called the onNestedLegendChange function on switch change', () => { - const nestedProps = { - ...props, - renderNestedLegendSwitch: true, - onNestedLegendChange: jest.fn(), - }; - const component = shallow(); - component.find('[data-test-subj="lens-legend-nested-switch"]').simulate('change'); - expect(nestedProps.onNestedLegendChange).toHaveBeenCalled(); + const onNestedLegendChange = jest.fn(); + renderLegendSettingsPopover({ renderNestedLegendSwitch: true, onNestedLegendChange }); + const switchElement = screen.getByRole('switch', { name: 'Nested' }); + fireEvent.click(switchElement); + expect(onNestedLegendChange).toHaveBeenCalled(); }); it('should hide switch group on hide mode', () => { - const component = shallow( - - ); - expect(component.exists('[data-test-subj="lens-legend-nested-switch"]')).toEqual(false); + renderLegendSettingsPopover({ mode: 'hide', renderNestedLegendSwitch: true }); + expect(screen.queryByRole('switch', { name: 'Nested' })).toBeNull(); }); }); diff --git a/x-pack/plugins/lens/public/shared_components/legend/legend_settings_popover.tsx b/x-pack/plugins/lens/public/shared_components/legend/legend_settings_popover.tsx index 64a374bae7052..0add0332d65b6 100644 --- a/x-pack/plugins/lens/public/shared_components/legend/legend_settings_popover.tsx +++ b/x-pack/plugins/lens/public/shared_components/legend/legend_settings_popover.tsx @@ -13,6 +13,8 @@ import { EuiSwitch, EuiSwitchEvent, EuiFieldNumber, + EuiFlexItem, + EuiFlexGroup, } from '@elastic/eui'; import { Position, VerticalAlignment, HorizontalAlignment } from '@elastic/charts'; import { LegendSize } from '@kbn/visualizations-plugin/public'; @@ -141,13 +143,23 @@ const MIN_TRUNCATE_LINES = 1; export const MaxLinesInput = ({ value, setValue, + disabled, }: { value: number; setValue: (value: number) => void; + disabled?: boolean; }) => { const { inputValue, handleInputChange } = useDebouncedValue({ value, onChange: setValue }); return ( {}; +const PANEL_STYLE = { + width: '500px', +}; export const LegendSettingsPopover: React.FunctionComponent = ({ legendOptions, @@ -202,12 +217,14 @@ export const LegendSettingsPopover: React.FunctionComponent value === mode)!.id} @@ -250,43 +266,44 @@ export const LegendSettingsPopover: React.FunctionComponent )} + - + + + + + + + + - {shouldTruncate && ( - - - - )} + {renderNestedLegendSwitch && ( { - let props: LegendLocationSettingsProps; + let defaultProps: LegendLocationSettingsProps; beforeEach(() => { - props = { + defaultProps = { onLocationChange: jest.fn(), onPositionChange: jest.fn(), + onAlignmentChange: jest.fn(), + location: 'outside', }; }); - it('should have default the Position to right when no position is given', () => { - const component = shallow(); - expect( - component.find('[data-test-subj="lens-legend-position-btn"]').prop('idSelected') - ).toEqual(Position.Right); + afterEach(() => { + jest.clearAllMocks(); }); - it('should have called the onPositionChange function on ButtonGroup change', () => { - const component = shallow(); - component.find('[data-test-subj="lens-legend-position-btn"]').simulate('change'); - expect(props.onPositionChange).toHaveBeenCalled(); + const renderLegendLocationSettings = ( + overrideProps?: Partial, + renderOptions?: RenderOptions + ) => { + const rtlRender = render( + , + renderOptions + ); + + return { + ...rtlRender, + getSelectedPositionOption: getSelectedButtonInGroup('lens-legend-position-btn'), + getSelectedLocationOption: getSelectedButtonInGroup('lens-legend-location-btn'), + getSelectedAlignmentOption: getSelectedButtonInGroup('lens-legend-inside-alignment-btn'), + }; + }; + + it('should have default the Position to right when no position is given', () => { + const { getSelectedPositionOption } = renderLegendLocationSettings(); + expect(getSelectedPositionOption()).toHaveTextContent('Right'); }); - it('should hide the position group if isDisabled prop is true', () => { - const component = shallow(); - expect(component.exists('[data-test-subj="lens-legend-position-btn"]')).toEqual(false); + it('should have called the onPositionChange function on ButtonGroup change', () => { + renderLegendLocationSettings(); + fireEvent.click(screen.getByRole('button', { name: 'Left' })); + expect(defaultProps.onPositionChange).toHaveBeenCalled(); }); it('should hide the position button group if location inside is given', () => { - const newProps = { - ...props, - location: 'inside', - } as LegendLocationSettingsProps; - const component = shallow(); - expect(component.find('[data-test-subj="lens-legend-position-btn"]').length).toEqual(0); + renderLegendLocationSettings({ location: 'inside' }); + expect(screen.queryByTestId('lens-legend-position-btn')).toBeNull(); }); it('should render the location settings if location inside is given', () => { - const newProps = { - ...props, - location: 'inside', - } as LegendLocationSettingsProps; - const component = shallow(); - expect(component.find('[data-test-subj="lens-legend-location-btn"]').length).toEqual(1); + renderLegendLocationSettings({ location: 'inside' }); + expect(screen.queryByTestId('lens-legend-location-btn')).toBeInTheDocument(); }); it('should have selected the given location', () => { - const newProps = { - ...props, - location: 'inside', - } as LegendLocationSettingsProps; - const component = shallow(); - expect( - component.find('[data-test-subj="lens-legend-location-btn"]').prop('idSelected') - ).toEqual('xy_location_inside'); + const { getSelectedLocationOption } = renderLegendLocationSettings({ location: 'inside' }); + expect(getSelectedLocationOption()).toHaveTextContent('Inside'); }); it('should have called the onLocationChange function on ButtonGroup change', () => { - const newProps = { - ...props, - location: 'inside', - } as LegendLocationSettingsProps; - const component = shallow(); - component - .find('[data-test-subj="lens-legend-location-btn"]') - .simulate('change', 'xy_location_outside'); - expect(props.onLocationChange).toHaveBeenCalled(); + renderLegendLocationSettings({ location: 'inside' }); + fireEvent.click(screen.getByRole('button', { name: 'Outside' })); + expect(defaultProps.onLocationChange).toHaveBeenCalled(); }); it('should default the alignment to top right when no value is given', () => { - const newProps = { - ...props, - location: 'inside', - } as LegendLocationSettingsProps; - const component = shallow(); - expect( - component.find('[data-test-subj="lens-legend-inside-alignment-btn"]').prop('idSelected') - ).toEqual('xy_location_alignment_top_right'); + const { getSelectedAlignmentOption } = renderLegendLocationSettings({ location: 'inside' }); + expect(getSelectedAlignmentOption()).toHaveTextContent('Top right'); }); it('should have called the onAlignmentChange function on ButtonGroup change', () => { - const newProps = { - ...props, - onAlignmentChange: jest.fn(), - location: 'inside', - } as LegendLocationSettingsProps; - const component = shallow(); - component - .find('[data-test-subj="lens-legend-inside-alignment-btn"]') - .simulate('change', 'xy_location_alignment_top_left'); - expect(newProps.onAlignmentChange).toHaveBeenCalled(); + renderLegendLocationSettings({ location: 'inside' }); + fireEvent.click(screen.getByRole('button', { name: 'Top left' })); + expect(defaultProps.onAlignmentChange).toHaveBeenCalled(); }); - it('should hide the components when is Disabled is true', () => { - const newProps = { - ...props, - location: 'inside', - isDisabled: true, - } as LegendLocationSettingsProps; - const component = shallow(); - expect(component.exists('[data-test-subj="lens-legend-location-btn"]')).toEqual(false); - expect(component.exists('[data-test-subj="lens-legend-inside-alignment-btn"]')).toEqual(false); + it('should hide the component if isDisabled prop is true', () => { + const { container } = renderLegendLocationSettings({ isDisabled: true }); + expect(container).toBeEmptyDOMElement(); }); }); diff --git a/x-pack/plugins/lens/public/shared_components/legend/location/legend_location_settings.tsx b/x-pack/plugins/lens/public/shared_components/legend/location/legend_location_settings.tsx index 5e4ef239b4295..039f778d7439e 100644 --- a/x-pack/plugins/lens/public/shared_components/legend/location/legend_location_settings.tsx +++ b/x-pack/plugins/lens/public/shared_components/legend/location/legend_location_settings.tsx @@ -7,7 +7,7 @@ import React from 'react'; import { i18n } from '@kbn/i18n'; -import { EuiFormRow, EuiButtonGroup } from '@elastic/eui'; +import { EuiFormRow, EuiButtonGroup, EuiFlexItem, EuiFlexGroup } from '@elastic/eui'; import { VerticalAlignment, HorizontalAlignment, Position } from '@elastic/charts'; export interface LegendLocationSettingsProps { @@ -46,33 +46,33 @@ export interface LegendLocationSettingsProps { } const toggleButtonsIcons = [ - { - id: Position.Top, - label: i18n.translate('xpack.lens.shared.legendPositionTop', { - defaultMessage: 'Top', - }), - iconType: 'arrowUp', - }, { id: Position.Right, label: i18n.translate('xpack.lens.shared.legendPositionRight', { defaultMessage: 'Right', }), - iconType: 'arrowRight', - }, - { - id: Position.Bottom, - label: i18n.translate('xpack.lens.shared.legendPositionBottom', { - defaultMessage: 'Bottom', - }), - iconType: 'arrowDown', + iconType: 'sortRight', }, { id: Position.Left, label: i18n.translate('xpack.lens.shared.legendPositionLeft', { defaultMessage: 'Left', }), - iconType: 'arrowLeft', + iconType: 'sortLeft', + }, + { + id: Position.Top, + label: i18n.translate('xpack.lens.shared.legendPositionTop', { + defaultMessage: 'Top', + }), + iconType: 'sortUp', + }, + { + id: Position.Bottom, + label: i18n.translate('xpack.lens.shared.legendPositionBottom', { + defaultMessage: 'Bottom', + }), + iconType: 'sortDown', }, ]; @@ -151,80 +151,78 @@ export const LegendLocationSettings: React.FunctionComponent {location && ( - value === location)!.id} - onChange={(optionId) => { - const newLocation = locationOptions.find(({ id }) => id === optionId)!.value; - onLocationChange(newLocation); - }} - /> + + + value === location)!.id} + onChange={(optionId) => { + const newLocation = locationOptions.find(({ id }) => id === optionId)!.value; + onLocationChange(newLocation); + }} + /> + + + <> + {(!location || location === 'outside') && ( + + )} + {location === 'inside' && ( + value === alignment)!.id + } + onChange={(optionId) => { + const newAlignment = locationAlignmentButtonsIcons.find( + ({ id }) => id === optionId + )!.value; + onAlignmentChange(newAlignment); + }} + isIconOnly + /> + )} + + + )} - - <> - {(!location || location === 'outside') && ( - - )} - {location === 'inside' && ( - value === alignment)!.id - } - onChange={(optionId) => { - const newAlignment = locationAlignmentButtonsIcons.find( - ({ id }) => id === optionId - )!.value; - onAlignmentChange(newAlignment); - }} - isIconOnly - /> - )} - - ); }; diff --git a/x-pack/plugins/lens/public/shared_components/toolbar_popover.tsx b/x-pack/plugins/lens/public/shared_components/toolbar_popover.tsx index 98a0eb609f9a8..f2abfd971463b 100644 --- a/x-pack/plugins/lens/public/shared_components/toolbar_popover.tsx +++ b/x-pack/plugins/lens/public/shared_components/toolbar_popover.tsx @@ -7,7 +7,7 @@ import './toolbar_popover.scss'; import React, { useState } from 'react'; -import { EuiFlexItem, EuiPopover, EuiPopoverTitle, IconType } from '@elastic/eui'; +import { EuiFlexItem, EuiPopover, EuiPopoverProps, EuiPopoverTitle, IconType } from '@elastic/eui'; import { ToolbarButton, ToolbarButtonProps } from '@kbn/shared-ux-button-toolbar'; import { EuiIconLegend } from '@kbn/chart-icons'; @@ -19,7 +19,7 @@ const typeToIconMap: { [type: string]: string | IconType } = { visualOptions: 'brush', }; -export interface ToolbarPopoverProps { +export type ToolbarPopoverProps = Partial & { /** * Determines popover title */ @@ -39,7 +39,7 @@ export interface ToolbarPopoverProps { buttonDataTestSubj?: string; panelClassName?: string; handleClose?: () => void; -} +}; export const ToolbarPopover: React.FunctionComponent = ({ children, @@ -48,10 +48,11 @@ export const ToolbarPopover: React.FunctionComponent = ({ isDisabled = false, groupPosition, buttonDataTestSubj, - panelClassName = 'lnsVisToolbar__popover', handleClose, + panelClassName = 'lnsVisToolbar__popover', + ...euiPopoverProps }) => { - const [open, setOpen] = useState(false); + const [isOpen, setIsOpen] = useState(false); const iconType: string | IconType = typeof type === 'string' ? typeToIconMap[type] : type; @@ -66,7 +67,7 @@ export const ToolbarPopover: React.FunctionComponent = ({ as={'iconButton'} iconType={iconType} onClick={() => { - setOpen(!open); + setIsOpen(!isOpen); }} label={title} aria-label={title} @@ -75,12 +76,13 @@ export const ToolbarPopover: React.FunctionComponent = ({ data-test-subj={buttonDataTestSubj} /> } - isOpen={open} + isOpen={isOpen} closePopover={() => { - setOpen(false); + setIsOpen(false); handleClose?.(); }} anchorPosition="downRight" + {...euiPopoverProps} > {title} {children} diff --git a/x-pack/plugins/lens/public/shared_components/value_labels_settings.tsx b/x-pack/plugins/lens/public/shared_components/value_labels_settings.tsx index 929478a67beb1..63cf76183778a 100644 --- a/x-pack/plugins/lens/public/shared_components/value_labels_settings.tsx +++ b/x-pack/plugins/lens/public/shared_components/value_labels_settings.tsx @@ -78,7 +78,6 @@ export const ValueLabelsSettings: FC = ({ isFullWidth legend={label} data-test-subj="lens-value-labels-visibility-btn" - name="valueLabelsDisplay" buttonSize="compressed" options={valueLabelsOptions} idSelected={isSelected} diff --git a/x-pack/plugins/lens/public/visualizations/datatable/components/dimension_editor.tsx b/x-pack/plugins/lens/public/visualizations/datatable/components/dimension_editor.tsx index f431c757c3c73..2ffe06144ff48 100644 --- a/x-pack/plugins/lens/public/visualizations/datatable/components/dimension_editor.tsx +++ b/x-pack/plugins/lens/public/visualizations/datatable/components/dimension_editor.tsx @@ -98,7 +98,6 @@ export function TableDimensionEditor( defaultMessage: 'Text alignment', })} data-test-subj="lnsDatatable_alignment_groups" - name="alignment" buttonSize="compressed" options={[ { @@ -148,7 +147,6 @@ export function TableDimensionEditor( defaultMessage: 'Color by value', })} data-test-subj="lnsDatatable_dynamicColoring_groups" - name="dynamicColoring" buttonSize="compressed" options={[ { diff --git a/x-pack/plugins/lens/public/visualizations/datatable/components/toolbar.test.tsx b/x-pack/plugins/lens/public/visualizations/datatable/components/toolbar.test.tsx index 8807929360c29..484fff9e6d1bd 100644 --- a/x-pack/plugins/lens/public/visualizations/datatable/components/toolbar.test.tsx +++ b/x-pack/plugins/lens/public/visualizations/datatable/components/toolbar.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; -import { getButtonGroupInputValue } from '@kbn/test-eui-helpers'; +import { getSelectedButtonInGroup } from '@kbn/test-eui-helpers'; import { DataTableToolbar } from './toolbar'; import { DatatableVisualizationState } from '../visualization'; import { FramePublicAPI, VisualizationToolbarProps } from '../../../types'; @@ -72,10 +72,10 @@ describe('datatable toolbar', () => { return { ...rtlRender, togglePopover, - getRowHeightValue: getButtonGroupInputValue(ROW_HEIGHT_SETTINGS_TEST_ID), + getRowHeightValue: getSelectedButtonInGroup(ROW_HEIGHT_SETTINGS_TEST_ID), getRowHeightCustomValue: () => getNumberInput(ROW_HEIGHT_SETTINGS_TEST_ID), selectRowHeightOption: selectOptionFromButtonGroup(ROW_HEIGHT_SETTINGS_TEST_ID), - getHeaderHeightValue: getButtonGroupInputValue(HEADER_HEIGHT_SETTINGS_TEST_ID), + getHeaderHeightValue: getSelectedButtonInGroup(HEADER_HEIGHT_SETTINGS_TEST_ID), getHeaderHeightCustomValue: () => getNumberInput(HEADER_HEIGHT_SETTINGS_TEST_ID), selectHeaderHeightOption: selectOptionFromButtonGroup(HEADER_HEIGHT_SETTINGS_TEST_ID), getPaginationSwitch, diff --git a/x-pack/plugins/lens/public/visualizations/legacy_metric/dimension_editor.tsx b/x-pack/plugins/lens/public/visualizations/legacy_metric/dimension_editor.tsx index 832118a899ae7..4fc69a60a5372 100644 --- a/x-pack/plugins/lens/public/visualizations/legacy_metric/dimension_editor.tsx +++ b/x-pack/plugins/lens/public/visualizations/legacy_metric/dimension_editor.tsx @@ -71,7 +71,6 @@ export function MetricDimensionEditor( defaultMessage: 'Color by value', })} data-test-subj="lnsLegacyMetric_dynamicColoring_groups" - name="dynamicColoring" buttonSize="compressed" options={[ { diff --git a/x-pack/plugins/lens/public/visualizations/metric/dimension_editor.tsx b/x-pack/plugins/lens/public/visualizations/metric/dimension_editor.tsx index f9b9fd9e1b363..43179e9cba51d 100644 --- a/x-pack/plugins/lens/public/visualizations/metric/dimension_editor.tsx +++ b/x-pack/plugins/lens/public/visualizations/metric/dimension_editor.tsx @@ -580,7 +580,6 @@ export function DimensionEditorAdditionalSection({ defaultMessage: 'Bar orientation', })} data-test-subj="lnsMetric_progress_direction_buttons" - name="alignment" options={[ { id: `${idPrefix}vertical`, diff --git a/x-pack/plugins/lens/public/visualizations/partition/toolbar.tsx b/x-pack/plugins/lens/public/visualizations/partition/toolbar.tsx index fddf0280b9539..48a9030097940 100644 --- a/x-pack/plugins/lens/public/visualizations/partition/toolbar.tsx +++ b/x-pack/plugins/lens/public/visualizations/partition/toolbar.tsx @@ -228,7 +228,6 @@ export function PieToolbar(props: VisualizationToolbarProps value === orientation)!.id} diff --git a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/dimension_editor.tsx b/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/dimension_editor.tsx index e2ecac16daee1..2ee2fa6ac2f80 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/dimension_editor.tsx +++ b/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/dimension_editor.tsx @@ -271,7 +271,6 @@ export function DataDimensionEditor( defaultMessage: 'Axis side', })} data-test-subj="lnsXY_axisSide_groups" - name="axisSide" buttonSize="compressed" options={[ { diff --git a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/reference_line_config_panel/reference_line_panel.tsx b/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/reference_line_config_panel/reference_line_panel.tsx index 411d3049699ad..83c28544913b4 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/reference_line_config_panel/reference_line_panel.tsx +++ b/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/reference_line_config_panel/reference_line_panel.tsx @@ -172,7 +172,6 @@ export const FillSetting = ({ defaultMessage: 'Fill', })} data-test-subj="lnsXY_fill" - name="fill" buttonSize="compressed" options={getFillPositionOptions({ isHorizontal, axisMode: currentConfig?.axisMode })} idSelected={`${idPrefix}${currentConfig?.fill || 'none'}`} diff --git a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/shared/marker_decoration_settings.tsx b/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/shared/marker_decoration_settings.tsx index e2b149dfc0eb6..e15434fc5c094 100644 --- a/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/shared/marker_decoration_settings.tsx +++ b/x-pack/plugins/lens/public/visualizations/xy/xy_config_panel/shared/marker_decoration_settings.tsx @@ -119,7 +119,6 @@ export function MarkerDecorationPosition({ defaultMessage: 'Decoration position', })} data-test-subj="lnsXY_markerPosition" - name="markerPosition" isDisabled={!hasIcon(currentConfig?.icon) && !currentConfig?.textVisibility} buttonSize="compressed" options={getIconPositionOptions({ diff --git a/x-pack/plugins/maps/public/classes/sources/esql_source/esql_source.tsx b/x-pack/plugins/maps/public/classes/sources/esql_source/esql_source.tsx index a40e8daf79d4a..af6a60f934e82 100644 --- a/x-pack/plugins/maps/public/classes/sources/esql_source/esql_source.tsx +++ b/x-pack/plugins/maps/public/classes/sources/esql_source/esql_source.tsx @@ -11,7 +11,11 @@ import { lastValueFrom } from 'rxjs'; import { tap } from 'rxjs'; import { v4 as uuidv4 } from 'uuid'; import { Adapters } from '@kbn/inspector-plugin/common/adapters'; -import { getIndexPatternFromESQLQuery, getLimitFromESQLQuery } from '@kbn/esql-utils'; +import { + getIndexPatternFromESQLQuery, + getLimitFromESQLQuery, + ESQL_LATEST_VERSION, +} from '@kbn/esql-utils'; import { buildEsQuery } from '@kbn/es-query'; import type { Filter, Query } from '@kbn/es-query'; import type { ESQLSearchParams, ESQLSearchReponse } from '@kbn/es-types'; @@ -153,6 +157,7 @@ export class ESQLSource const params: ESQLSearchParams = { query: this._descriptor.esql, dropNullColumns: true, + version: ESQL_LATEST_VERSION, }; const query: Query[] = []; diff --git a/x-pack/plugins/ml/public/register_helper/register_search_links/search_deep_links.ts b/x-pack/plugins/ml/public/register_helper/register_search_links/search_deep_links.ts index cb566b95a1aaa..e34766e02f848 100644 --- a/x-pack/plugins/ml/public/register_helper/register_search_links/search_deep_links.ts +++ b/x-pack/plugins/ml/public/register_helper/register_search_links/search_deep_links.ts @@ -240,7 +240,7 @@ function createDeepLinks( getESQLDataVisualizerDeepLink: (): AppDeepLink => { return { - id: 'indexDataVisualizer', + id: 'esqlDataVisualizer', title: i18n.translate('xpack.ml.deepLink.esqlDataVisualizer', { defaultMessage: 'ES|QL Data Visualizer', }), diff --git a/x-pack/plugins/monitoring/public/components/no_data/__snapshots__/no_data.test.js.snap b/x-pack/plugins/monitoring/public/components/no_data/__snapshots__/no_data.test.js.snap index 2217c13f37ed2..be3c40f027935 100644 --- a/x-pack/plugins/monitoring/public/components/no_data/__snapshots__/no_data.test.js.snap +++ b/x-pack/plugins/monitoring/public/components/no_data/__snapshots__/no_data.test.js.snap @@ -81,7 +81,7 @@ exports[`NoData should show a default message if reason is unknown 1`] = `


"`; +exports[`ResetSessionPage renders as expected 1`] = `"ElasticMockedFonts"`; -exports[`ResetSessionPage renders as expected with custom page title 1`] = `"My Company NameMockedFonts"`; +exports[`ResetSessionPage renders as expected with custom page title 1`] = `"My Company NameMockedFonts"`; diff --git a/x-pack/plugins/security/server/authorization/authorization_service.tsx b/x-pack/plugins/security/server/authorization/authorization_service.tsx index 8ce83f433ad21..09a13e310a041 100644 --- a/x-pack/plugins/security/server/authorization/authorization_service.tsx +++ b/x-pack/plugins/security/server/authorization/authorization_service.tsx @@ -194,7 +194,13 @@ export class AuthorizationService { /> ); - return toolkit.render({ body, headers: { 'Content-Security-Policy': http.csp.header } }); + return toolkit.render({ + body, + headers: { + 'Content-Security-Policy': http.csp.header, + 'Content-Security-Policy-Report-Only': http.csp.reportOnlyHeader, + }, + }); } } diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_request_schema.test.ts b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_request_schema.test.ts index 7393d3ad52fa4..ad06065f856bd 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_request_schema.test.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_request_schema.test.ts @@ -10,6 +10,7 @@ import { getListArrayMock } from '../../../../detection_engine/schemas/types/lis import { getCreateEsqlRulesSchemaMock, getCreateMachineLearningRulesSchemaMock, + getCreateNewTermsRulesSchemaMock, getCreateRulesSchemaMock, getCreateRulesSchemaMockWithDataView, getCreateSavedQueryRulesSchemaMock, @@ -1267,6 +1268,7 @@ describe('rules schema', () => { { ruleType: 'threat_match', ruleMock: getCreateThreatMatchRulesSchemaMock() }, { ruleType: 'query', ruleMock: getCreateRulesSchemaMock() }, { ruleType: 'saved_query', ruleMock: getCreateSavedQueryRulesSchemaMock() }, + { ruleType: 'new_terms', ruleMock: getCreateNewTermsRulesSchemaMock() }, ]; cases.forEach(({ ruleType, ruleMock }) => { diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_schemas.gen.ts b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_schemas.gen.ts index d7a8b83ec28f4..68c6a44ea45b1 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_schemas.gen.ts +++ b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_schemas.gen.ts @@ -504,6 +504,7 @@ export const NewTermsRuleOptionalFields = z.object({ index: IndexPatternArray.optional(), data_view_id: DataViewId.optional(), filters: RuleFilterArray.optional(), + alert_suppression: AlertSuppression.optional(), }); export type NewTermsRuleDefaultableFields = z.infer; diff --git a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_schemas.schema.yaml b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_schemas.schema.yaml index d3a09d8355727..d23662ee9791e 100644 --- a/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_schemas.schema.yaml +++ b/x-pack/plugins/security_solution/common/api/detection_engine/model/rule_schema/rule_schemas.schema.yaml @@ -737,6 +737,8 @@ components: $ref: './common_attributes.schema.yaml#/components/schemas/DataViewId' filters: $ref: './common_attributes.schema.yaml#/components/schemas/RuleFilterArray' + alert_suppression: + $ref: './common_attributes.schema.yaml#/components/schemas/AlertSuppression' NewTermsRuleDefaultableFields: type: object diff --git a/x-pack/plugins/security_solution/common/api/entity_analytics/asset_criticality/index.ts b/x-pack/plugins/security_solution/common/api/entity_analytics/asset_criticality/index.ts index d908c931ad1dd..2bfe5dc73938f 100644 --- a/x-pack/plugins/security_solution/common/api/entity_analytics/asset_criticality/index.ts +++ b/x-pack/plugins/security_solution/common/api/entity_analytics/asset_criticality/index.ts @@ -7,3 +7,4 @@ export * from './common.gen'; export * from './get_asset_criticality_status.gen'; +export * from './upload_asset_criticality_csv.gen'; diff --git a/x-pack/plugins/security_solution/common/api/entity_analytics/asset_criticality/upload_asset_criticality_csv.gen.ts b/x-pack/plugins/security_solution/common/api/entity_analytics/asset_criticality/upload_asset_criticality_csv.gen.ts new file mode 100644 index 0000000000000..67bd49bf7b64a --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/entity_analytics/asset_criticality/upload_asset_criticality_csv.gen.ts @@ -0,0 +1,36 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { z } from 'zod'; + +/* + * NOTICE: Do not edit this file manually. + * This file is automatically generated by the OpenAPI Generator, @kbn/openapi-generator. + * + * info: + * title: Asset Criticality Create Record Schema + * version: 1.0.0 + */ + +export type ErrorItem = z.infer; +export const ErrorItem = z.object({ + message: z.string(), + index: z.number().int(), +}); + +export type Stats = z.infer; +export const Stats = z.object({ + successful: z.number().int(), + failed: z.number().int(), + total: z.number().int(), +}); + +export type AssetCriticalityCsvUploadResponse = z.infer; +export const AssetCriticalityCsvUploadResponse = z.object({ + errors: z.array(ErrorItem), + stats: Stats, +}); diff --git a/x-pack/plugins/security_solution/common/api/entity_analytics/asset_criticality/upload_asset_criticality_csv.schema.yaml b/x-pack/plugins/security_solution/common/api/entity_analytics/asset_criticality/upload_asset_criticality_csv.schema.yaml new file mode 100644 index 0000000000000..55689eef3938e --- /dev/null +++ b/x-pack/plugins/security_solution/common/api/entity_analytics/asset_criticality/upload_asset_criticality_csv.schema.yaml @@ -0,0 +1,73 @@ +openapi: 3.0.0 +info: + version: 1.0.0 + title: Asset Criticality Create Record Schema +servers: + - url: 'http://{kibana_host}:{port}' + variables: + kibana_host: + default: localhost + port: + default: '5601' +paths: + /internal/asset_criticality/upload_csv: + post: + summary: Uploads a CSV file containing asset criticality data + requestBody: + content: + multipart/form-data: + schema: + type: object + properties: + file: + type: string + format: binary + description: The CSV file to upload. + required: + - file + responses: + '200': + description: CSV upload successful + content: + application/json: + schema: + $ref: '#/components/schemas/AssetCriticalityCsvUploadResponse' + '413': + description: File too large +components: + schemas: + ErrorItem: + type: object + properties: + message: + type: string + index: + type: integer + required: + - message + - index + Stats: + type: object + properties: + successful: + type: integer + failed: + type: integer + total: + type: integer + required: + - successful + - failed + - total + AssetCriticalityCsvUploadResponse: + type: object + properties: + errors: + type: array + items: + $ref: '#/components/schemas/ErrorItem' + stats: + $ref: '#/components/schemas/Stats' + required: + - errors + - stats diff --git a/x-pack/plugins/security_solution/common/constants.ts b/x-pack/plugins/security_solution/common/constants.ts index 2205a51b5df78..d8feee39e5678 100644 --- a/x-pack/plugins/security_solution/common/constants.ts +++ b/x-pack/plugins/security_solution/common/constants.ts @@ -272,6 +272,7 @@ export const RISK_ENGINE_SETTINGS_URL = `${RISK_ENGINE_URL}/settings`; export const ASSET_CRITICALITY_URL = `/internal/asset_criticality`; export const ASSET_CRITICALITY_PRIVILEGES_URL = `/internal/asset_criticality/privileges`; export const ASSET_CRITICALITY_STATUS_URL = `${ASSET_CRITICALITY_URL}/status`; +export const ASSET_CRITICALITY_CSV_UPLOAD_URL = `${ASSET_CRITICALITY_URL}/upload_csv`; /** * Public Risk Score routes diff --git a/x-pack/plugins/security_solution/common/detection_engine/constants.ts b/x-pack/plugins/security_solution/common/detection_engine/constants.ts index 08af29c8f69c7..7e3d7bac5c0f5 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/constants.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/constants.ts @@ -43,5 +43,6 @@ export const SUPPRESSIBLE_ALERT_RULES: Type[] = [ 'threshold', 'saved_query', 'query', + 'new_terms', 'threat_match', ]; diff --git a/x-pack/plugins/security_solution/common/detection_engine/utils.test.ts b/x-pack/plugins/security_solution/common/detection_engine/utils.test.ts index 1db75db42a7d8..a61858a588838 100644 --- a/x-pack/plugins/security_solution/common/detection_engine/utils.test.ts +++ b/x-pack/plugins/security_solution/common/detection_engine/utils.test.ts @@ -231,11 +231,11 @@ describe('Alert Suppression Rules', () => { expect(isSuppressibleAlertRule('saved_query')).toBe(true); expect(isSuppressibleAlertRule('query')).toBe(true); expect(isSuppressibleAlertRule('threat_match')).toBe(true); + expect(isSuppressibleAlertRule('new_terms')).toBe(true); // Rule types that don't support alert suppression: expect(isSuppressibleAlertRule('eql')).toBe(false); expect(isSuppressibleAlertRule('machine_learning')).toBe(false); - expect(isSuppressibleAlertRule('new_terms')).toBe(false); expect(isSuppressibleAlertRule('esql')).toBe(false); }); @@ -253,11 +253,11 @@ describe('Alert Suppression Rules', () => { expect(isSuppressionRuleConfiguredWithDuration('saved_query')).toBe(true); expect(isSuppressionRuleConfiguredWithDuration('query')).toBe(true); expect(isSuppressionRuleConfiguredWithDuration('threat_match')).toBe(true); + expect(isSuppressionRuleConfiguredWithDuration('new_terms')).toBe(true); // Rule types that don't support alert suppression: expect(isSuppressionRuleConfiguredWithDuration('eql')).toBe(false); expect(isSuppressionRuleConfiguredWithDuration('machine_learning')).toBe(false); - expect(isSuppressionRuleConfiguredWithDuration('new_terms')).toBe(false); expect(isSuppressionRuleConfiguredWithDuration('esql')).toBe(false); }); @@ -274,11 +274,11 @@ describe('Alert Suppression Rules', () => { expect(isSuppressionRuleConfiguredWithGroupBy('saved_query')).toBe(true); expect(isSuppressionRuleConfiguredWithGroupBy('query')).toBe(true); expect(isSuppressionRuleConfiguredWithGroupBy('threat_match')).toBe(true); + expect(isSuppressionRuleConfiguredWithGroupBy('new_terms')).toBe(true); // Rule types that don't support alert suppression: expect(isSuppressionRuleConfiguredWithGroupBy('eql')).toBe(false); expect(isSuppressionRuleConfiguredWithGroupBy('machine_learning')).toBe(false); - expect(isSuppressionRuleConfiguredWithGroupBy('new_terms')).toBe(false); expect(isSuppressionRuleConfiguredWithGroupBy('esql')).toBe(false); }); @@ -300,11 +300,11 @@ describe('Alert Suppression Rules', () => { expect(isSuppressionRuleConfiguredWithMissingFields('saved_query')).toBe(true); expect(isSuppressionRuleConfiguredWithMissingFields('query')).toBe(true); expect(isSuppressionRuleConfiguredWithMissingFields('threat_match')).toBe(true); + expect(isSuppressionRuleConfiguredWithMissingFields('new_terms')).toBe(true); // Rule types that don't support alert suppression: expect(isSuppressionRuleConfiguredWithMissingFields('eql')).toBe(false); expect(isSuppressionRuleConfiguredWithMissingFields('machine_learning')).toBe(false); - expect(isSuppressionRuleConfiguredWithMissingFields('new_terms')).toBe(false); expect(isSuppressionRuleConfiguredWithMissingFields('esql')).toBe(false); }); diff --git a/x-pack/plugins/security_solution/common/endpoint/data_generators/endpoint_action_generator.ts b/x-pack/plugins/security_solution/common/endpoint/data_generators/endpoint_action_generator.ts index f3f9bde438d68..83976ff215e82 100644 --- a/x-pack/plugins/security_solution/common/endpoint/data_generators/endpoint_action_generator.ts +++ b/x-pack/plugins/security_solution/common/endpoint/data_generators/endpoint_action_generator.ts @@ -38,39 +38,47 @@ import { getFileDownloadId } from '../service/response_actions/get_file_download export class EndpointActionGenerator extends BaseDataGenerator { /** Generate a random endpoint Action request (isolate or unisolate) */ - generate(overrides: DeepPartial = {}): LogsEndpointAction { + generate< + TParameters extends EndpointActionDataParameterTypes = EndpointActionDataParameterTypes, + TOutputContent extends EndpointActionResponseDataOutput = EndpointActionResponseDataOutput, + TMeta extends {} = {} + >( + overrides: DeepPartial> = {} + ): LogsEndpointAction { const timeStamp = overrides['@timestamp'] ? new Date(overrides['@timestamp']) : new Date(); - - return merge( - { - '@timestamp': timeStamp.toISOString(), - agent: { - id: [this.seededUUIDv4()], - }, - EndpointActions: { - action_id: this.seededUUIDv4(), - expiration: this.randomFutureDate(timeStamp), - type: 'INPUT_ACTION', - input_type: 'endpoint', - data: { - command: this.randomResponseActionCommand(), - comment: this.randomString(15), - parameters: undefined, - }, - }, - error: undefined, - user: { - id: this.randomUser(), + const doc: LogsEndpointAction = { + '@timestamp': timeStamp.toISOString(), + agent: { + id: [this.seededUUIDv4()], + }, + EndpointActions: { + action_id: this.seededUUIDv4(), + expiration: this.randomFutureDate(timeStamp), + type: 'INPUT_ACTION', + input_type: 'endpoint', + data: { + command: this.randomResponseActionCommand(), + comment: this.randomString(15), + parameters: undefined, }, - rule: undefined, }, - overrides - ); + error: undefined, + user: { + id: this.randomUser(), + }, + rule: undefined, + }; + + return merge(doc, overrides); } - generateActionEsHit( - overrides: DeepPartial = {} - ): estypes.SearchHit { + generateActionEsHit< + TParameters extends EndpointActionDataParameterTypes = EndpointActionDataParameterTypes, + TOutputContent extends EndpointActionResponseDataOutput = EndpointActionResponseDataOutput, + TMeta extends {} = {} + >( + overrides: DeepPartial> = {} + ): estypes.SearchHit> { return Object.assign(this.toEsSearchHit(this.generate(overrides)), { _index: `.ds-${ENDPOINT_ACTIONS_DS}-some_namespace`, }); diff --git a/x-pack/plugins/security_solution/common/endpoint/data_generators/sentinelone_data_generator.ts b/x-pack/plugins/security_solution/common/endpoint/data_generators/sentinelone_data_generator.ts new file mode 100644 index 0000000000000..54862b4a51549 --- /dev/null +++ b/x-pack/plugins/security_solution/common/endpoint/data_generators/sentinelone_data_generator.ts @@ -0,0 +1,82 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { DeepPartial } from 'utility-types'; +import { merge } from 'lodash'; +import type { SearchResponse, SearchHit } from '@elastic/elasticsearch/lib/api/types'; +import { EndpointActionGenerator } from './endpoint_action_generator'; +import { SENTINEL_ONE_ACTIVITY_INDEX } from '../..'; +import type { + LogsEndpointAction, + SentinelOneActivityEsDoc, + EndpointActionDataParameterTypes, + EndpointActionResponseDataOutput, +} from '../types'; + +export class SentinelOneDataGenerator extends EndpointActionGenerator { + generate< + TParameters extends EndpointActionDataParameterTypes = EndpointActionDataParameterTypes, + TOutputContent extends EndpointActionResponseDataOutput = EndpointActionResponseDataOutput, + TMeta extends {} = {} + >( + overrides: DeepPartial> = {} + ): LogsEndpointAction { + return super.generate({ + EndpointActions: { + input_type: 'sentinel_one', + }, + ...overrides, + }) as LogsEndpointAction; + } + + /** Generate a SentinelOne activity index ES doc */ + generateActivityEsDoc( + overrides: DeepPartial = {} + ): SentinelOneActivityEsDoc { + const doc: SentinelOneActivityEsDoc = { + sentinel_one: { + activity: { + agent: { + id: this.seededUUIDv4(), + }, + updated_at: '2024-03-29T13:45:21.723Z', + description: { + primary: 'Some description here', + }, + id: this.seededUUIDv4(), + type: 1001, + }, + }, + }; + + return merge(doc, overrides); + } + + generateActivityEsSearchHit( + overrides: DeepPartial = {} + ): SearchHit { + const hit = this.toEsSearchHit( + this.generateActivityEsDoc(overrides), + SENTINEL_ONE_ACTIVITY_INDEX + ); + + hit.inner_hits = { + first_found: { + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + hits: { hits: [this.toEsSearchHit(hit._source!, hit._index)] }, + }, + }; + + return hit; + } + + generateActivityEsSearchResponse( + docs: Array> = [this.generateActivityEsSearchHit()] + ): SearchResponse { + return this.toEsSearchResponse(docs); + } +} diff --git a/x-pack/plugins/security_solution/common/endpoint/service/response_actions/sentinel_one.ts b/x-pack/plugins/security_solution/common/endpoint/service/response_actions/sentinel_one.ts new file mode 100644 index 0000000000000..761e1de67cd28 --- /dev/null +++ b/x-pack/plugins/security_solution/common/endpoint/service/response_actions/sentinel_one.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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +/** + * Index name where the SentinelOne activity log is written to by the SentinelOne integration + */ +export const SENTINEL_ONE_ACTIVITY_INDEX = 'logs-sentinel_one.activity-default'; diff --git a/x-pack/plugins/security_solution/common/endpoint/types/index.ts b/x-pack/plugins/security_solution/common/endpoint/types/index.ts index 68867e92d7294..9fc98799db962 100644 --- a/x-pack/plugins/security_solution/common/endpoint/types/index.ts +++ b/x-pack/plugins/security_solution/common/endpoint/types/index.ts @@ -14,6 +14,7 @@ export * from './os'; export * from './trusted_apps'; export * from './utility_types'; export * from './agents'; +export * from './sentinel_one'; export type { ConditionEntriesMap, ConditionEntry } from './exception_list_items'; /** diff --git a/x-pack/plugins/security_solution/common/endpoint/types/sentinel_one.ts b/x-pack/plugins/security_solution/common/endpoint/types/sentinel_one.ts new file mode 100644 index 0000000000000..447fc6d037a2b --- /dev/null +++ b/x-pack/plugins/security_solution/common/endpoint/types/sentinel_one.ts @@ -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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +/** + * The `activity` document ingested from SentinelOne via the integration + * + * NOTE: not all properties are currently mapped below. Check the index definition if wanting to + * see what else is available and add it bellow if needed + */ +export interface SentinelOneActivityEsDoc { + sentinel_one: { + activity: { + agent: { + /** This is the internal ID of the host in sentinelOne (NOT the agent's UUID) */ + id: string; + }; + updated_at: string; + description: { + primary: string; + secondary?: string; + }; + id: string; + /** The activity type. Valid values can be retrieved from S1 via API: `/web/api/v2.1/activities/types` */ + type: number; + }; + }; +} + +export interface SentinelOneActionRequestCommonMeta { + /** The S1 agent id */ + agentId: string; + /** The S1 agent assigned UUID */ + agentUUID: string; + /** The host name */ + hostName: string; +} + +/** Metadata capture for the isolation actions (`isolate` and `release`) */ +export type SentinelOneIsolationRequestMeta = SentinelOneActionRequestCommonMeta; + +/** Metadata captured when creating the isolation response document in ES for both `isolate` and `release` */ +export interface SentinelOneIsolationResponseMeta { + /** The document ID in the Elasticsearch S1 activity index that was used to complete the response action */ + elasticDocId: string; + /** The SentinelOne activity log entry ID */ + activityLogEntryId: string; + /** The SentinelOne activity log entry type */ + activityLogEntryType: number; + /** The SentinelOne activity log primary description */ + activityLogEntryDescription: string; +} diff --git a/x-pack/plugins/security_solution/common/endpoint/utils/package_v2.ts b/x-pack/plugins/security_solution/common/endpoint/utils/package_v2.ts index 5717f8d601502..56b23ed956770 100644 --- a/x-pack/plugins/security_solution/common/endpoint/utils/package_v2.ts +++ b/x-pack/plugins/security_solution/common/endpoint/utils/package_v2.ts @@ -5,10 +5,10 @@ * 2.0. */ -import semverLte from 'semver/functions/lte'; +// import semverLte from 'semver/functions/lte'; // switch to "v2" logic -const MIN_ENDPOINT_PACKAGE_V2_VERSION = '8.14.0-prerelease.1'; +// const MIN_ENDPOINT_PACKAGE_V2_VERSION = '8.14.0-prerelease.1'; export function isEndpointPackageV2(version: string) { - return semverLte(MIN_ENDPOINT_PACKAGE_V2_VERSION, version); + return false; } diff --git a/x-pack/plugins/security_solution/common/entity_analytics/asset_criticality/constants.ts b/x-pack/plugins/security_solution/common/entity_analytics/asset_criticality/constants.ts index 261def5656d2c..6e0669c985f5a 100644 --- a/x-pack/plugins/security_solution/common/entity_analytics/asset_criticality/constants.ts +++ b/x-pack/plugins/security_solution/common/entity_analytics/asset_criticality/constants.ts @@ -22,6 +22,8 @@ export enum CriticalityLevels { LOW_IMPACT = 'low_impact', } +export const ValidCriticalityLevels = Object.values(CriticalityLevels); + /** * CriticalityModifiers are used to adjust the risk score based on the criticality of the asset. */ @@ -31,3 +33,8 @@ export const CriticalityModifiers: Record = { [CriticalityLevels.MEDIUM_IMPACT]: 1, [CriticalityLevels.LOW_IMPACT]: 0.5, }; + +export const CRITICALITY_CSV_MAX_SIZE_BYTES = 1024 * 1024; // 1MB +export const CRITICALITY_CSV_SIZE_TOLERANCE_BYTES = 1024 * 50; // ~= 50kb +export const CRITICALITY_CSV_MAX_SIZE_BYTES_WITH_TOLERANCE = + CRITICALITY_CSV_MAX_SIZE_BYTES + CRITICALITY_CSV_SIZE_TOLERANCE_BYTES; diff --git a/x-pack/plugins/security_solution/common/entity_analytics/asset_criticality/index.ts b/x-pack/plugins/security_solution/common/entity_analytics/asset_criticality/index.ts index 4e70ff88d1bae..f63221266f98e 100644 --- a/x-pack/plugins/security_solution/common/entity_analytics/asset_criticality/index.ts +++ b/x-pack/plugins/security_solution/common/entity_analytics/asset_criticality/index.ts @@ -7,3 +7,4 @@ export * from './indices'; export * from './constants'; +export * from './parse_asset_criticality_csv_row'; diff --git a/x-pack/plugins/security_solution/common/entity_analytics/asset_criticality/parse_asset_criticality_csv_row.test.ts b/x-pack/plugins/security_solution/common/entity_analytics/asset_criticality/parse_asset_criticality_csv_row.test.ts new file mode 100644 index 0000000000000..f71f3c14aff40 --- /dev/null +++ b/x-pack/plugins/security_solution/common/entity_analytics/asset_criticality/parse_asset_criticality_csv_row.test.ts @@ -0,0 +1,133 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { parseAssetCriticalityCsvRow } from './parse_asset_criticality_csv_row'; + +describe('parseAssetCriticalityCsvRow', () => { + it('should return valid false if the row has no columns', () => { + const result = parseAssetCriticalityCsvRow([]); + expect(result.valid).toBe(false); + + // @ts-ignore result can now only be InvalidRecord + expect(result.error).toMatchInlineSnapshot(`"Expected 3 columns, got 0"`); + }); + + it('should return valid false if the row has 2 columns', () => { + const result = parseAssetCriticalityCsvRow(['host', 'host-1']); + expect(result.valid).toBe(false); + + // @ts-ignore result can now only be InvalidRecord + expect(result.error).toMatchInlineSnapshot(`"Expected 3 columns, got 2"`); + }); + + it('should return valid false if the row has 4 columns', () => { + const result = parseAssetCriticalityCsvRow(['host', 'host-1', 'low_impact', 'extra']); + expect(result.valid).toBe(false); + + // @ts-ignore result can now only be InvalidRecord + expect(result.error).toMatchInlineSnapshot(`"Expected 3 columns, got 4"`); + }); + + it('should return valid false if the entity type is missing', () => { + const result = parseAssetCriticalityCsvRow(['', 'host-1', 'low_impact']); + expect(result.valid).toBe(false); + + // @ts-ignore result can now only be InvalidRecord + expect(result.error).toMatchInlineSnapshot(`"Missing entity type"`); + }); + + it('should return valid false if the entity type is invalid', () => { + const result = parseAssetCriticalityCsvRow(['invalid', 'host-1', 'low_impact']); + expect(result.valid).toBe(false); + + // @ts-ignore result can now only be InvalidRecord + expect(result.error).toMatchInlineSnapshot( + `"Invalid entity type \\"invalid\\", expected host or user"` + ); + }); + + it('should return valid false if the entity type is invalid and only log 1000 characters', () => { + const invalidEntityType = 'x'.repeat(1001); + const result = parseAssetCriticalityCsvRow([invalidEntityType, 'host-1', 'low_impact']); + expect(result.valid).toBe(false); + + // @ts-ignore result can now only be InvalidRecord + expect(result.error).toMatchInlineSnapshot( + `"Invalid entity type \\"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...\\", expected host or user"` + ); + }); + + it('should return valid false if the ID is missing', () => { + const result = parseAssetCriticalityCsvRow(['host', '', 'low_impact']); + expect(result.valid).toBe(false); + + // @ts-ignore result can now only be InvalidRecord + expect(result.error).toMatchInlineSnapshot(`"Missing identifier"`); + }); + + it('should return valid false if the criticality level is missing', () => { + const result = parseAssetCriticalityCsvRow(['host', 'host-1', '']); + expect(result.valid).toBe(false); + + // @ts-ignore result can now only be InvalidRecord + expect(result.error).toMatchInlineSnapshot(`"Missing criticality level"`); + }); + + it('should return valid false if the criticality level is invalid', () => { + const result = parseAssetCriticalityCsvRow(['host', 'host-1', 'invalid']); + expect(result.valid).toBe(false); + + // @ts-ignore result can now only be InvalidRecord + expect(result.error).toMatchInlineSnapshot( + `"Invalid criticality level \\"invalid\\", expected one of extreme_impact, high_impact, medium_impact, low_impact"` + ); + }); + + it('should return valid false if the criticality level is invalid and only log 1000 characters', () => { + const invalidCriticalityLevel = 'x'.repeat(1001); + const result = parseAssetCriticalityCsvRow(['host', 'host-1', invalidCriticalityLevel]); + expect(result.valid).toBe(false); + + // @ts-ignore result can now only be InvalidRecord + expect(result.error).toMatchInlineSnapshot( + `"Invalid criticality level \\"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...\\", expected one of extreme_impact, high_impact, medium_impact, low_impact"` + ); + }); + + it('should return valid false if the ID is too long', () => { + const idValue = 'x'.repeat(1001); + const result = parseAssetCriticalityCsvRow(['host', idValue, 'low_impact']); + expect(result.valid).toBe(false); + + // @ts-ignore result can now only be InvalidRecord + expect(result.error).toMatchInlineSnapshot( + `"Identifier is too long, expected less than 1000 characters, got 1001"` + ); + }); + + it('should return the parsed row', () => { + expect(parseAssetCriticalityCsvRow(['host', 'host-1', 'low_impact'])).toEqual({ + valid: true, + record: { + idField: 'host.name', + idValue: 'host-1', + criticalityLevel: 'low_impact', + }, + }); + }); + + it('should return the parsed row if criticality level is the wrong case', () => { + expect(parseAssetCriticalityCsvRow(['host', 'host-1', 'LOW_IMPACT'])).toEqual({ + valid: true, + record: { + idField: 'host.name', + idValue: 'host-1', + criticalityLevel: 'low_impact', + }, + }); + }); +}); diff --git a/x-pack/plugins/security_solution/common/entity_analytics/asset_criticality/parse_asset_criticality_csv_row.ts b/x-pack/plugins/security_solution/common/entity_analytics/asset_criticality/parse_asset_criticality_csv_row.ts new file mode 100644 index 0000000000000..0ec045dd71657 --- /dev/null +++ b/x-pack/plugins/security_solution/common/entity_analytics/asset_criticality/parse_asset_criticality_csv_row.ts @@ -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; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { i18n } from '@kbn/i18n'; +import type { CriticalityLevels } from './constants'; +import { ValidCriticalityLevels } from './constants'; +import type { AssetCriticalityUpsert, CriticalityLevel } from './types'; + +const MAX_COLUMN_CHARS = 1000; + +interface ValidRecord { + valid: true; + record: AssetCriticalityUpsert; +} +interface InvalidRecord { + valid: false; + error: string; +} + +const validationErrorWithMessage = (message: string): InvalidRecord => { + return { + valid: false, + error: message, + }; +}; + +type ReturnType = ValidRecord | InvalidRecord; + +export const isErrorResult = (result: ReturnType): result is InvalidRecord => { + return !result.valid; +}; + +const trimColumn = (column: string): string => { + return column.length > MAX_COLUMN_CHARS ? `${column.substring(0, MAX_COLUMN_CHARS)}...` : column; +}; + +export const parseAssetCriticalityCsvRow = (row: string[]): ReturnType => { + if (row.length !== 3) { + return validationErrorWithMessage( + i18n.translate('xpack.securitySolution.assetCriticality.csvUpload.expectedColumnsError', { + defaultMessage: 'Expected 3 columns, got {rowLength}', + values: { rowLength: row.length }, + }) + ); + } + + const [entityType, idValue, criticalityLevel] = row; + + if (!entityType) { + return validationErrorWithMessage( + i18n.translate('xpack.securitySolution.assetCriticality.csvUpload.missingEntityTypeError', { + defaultMessage: 'Missing entity type', + }) + ); + } + + if (!idValue) { + return validationErrorWithMessage( + i18n.translate('xpack.securitySolution.assetCriticality.csvUpload.missingIdError', { + defaultMessage: 'Missing identifier', + }) + ); + } + + if (idValue.length > MAX_COLUMN_CHARS) { + return validationErrorWithMessage( + i18n.translate('xpack.securitySolution.assetCriticality.csvUpload.idTooLongError', { + defaultMessage: + 'Identifier is too long, expected less than {maxChars} characters, got {idLength}', + values: { maxChars: MAX_COLUMN_CHARS, idLength: idValue.length }, + }) + ); + } + + if (!criticalityLevel) { + return validationErrorWithMessage( + i18n.translate('xpack.securitySolution.assetCriticality.csvUpload.missingCriticalityError', { + defaultMessage: 'Missing criticality level', + }) + ); + } + + const lowerCaseCriticalityLevel = criticalityLevel.toLowerCase(); + + if (!isValidCriticalityLevel(lowerCaseCriticalityLevel)) { + return validationErrorWithMessage( + i18n.translate('xpack.securitySolution.assetCriticality.csvUpload.invalidCriticalityError', { + defaultMessage: + 'Invalid criticality level "{criticalityLevel}", expected one of {validLevels}', + values: { + criticalityLevel: trimColumn(criticalityLevel), + validLevels: ValidCriticalityLevels.join(', '), + }, + }) + ); + } + + if (entityType !== 'host' && entityType !== 'user') { + return validationErrorWithMessage( + i18n.translate('xpack.securitySolution.assetCriticality.csvUpload.invalidEntityTypeError', { + defaultMessage: 'Invalid entity type "{entityType}", expected host or user', + values: { entityType: trimColumn(entityType) }, + }) + ); + } + + const idField = entityType === 'host' ? 'host.name' : 'user.name'; + + return { + valid: true, + record: { + idField, + idValue, + criticalityLevel: lowerCaseCriticalityLevel, + }, + }; +}; + +const isValidCriticalityLevel = ( + criticalityLevel: string +): criticalityLevel is CriticalityLevel => { + return ValidCriticalityLevels.includes(criticalityLevel as CriticalityLevels); +}; diff --git a/x-pack/plugins/security_solution/common/entity_analytics/asset_criticality/types.ts b/x-pack/plugins/security_solution/common/entity_analytics/asset_criticality/types.ts index c10bd0013a4a6..a6cea92da53c5 100644 --- a/x-pack/plugins/security_solution/common/entity_analytics/asset_criticality/types.ts +++ b/x-pack/plugins/security_solution/common/entity_analytics/asset_criticality/types.ts @@ -8,3 +8,11 @@ import type { AssetCriticalityRecord } from '../../api/entity_analytics/asset_criticality'; export type CriticalityLevel = AssetCriticalityRecord['criticality_level']; + +export interface AssetCriticalityUpsert { + idField: AssetCriticalityRecord['id_field']; + idValue: AssetCriticalityRecord['id_value']; + criticalityLevel: AssetCriticalityRecord['criticality_level']; +} + +export * from '../../api/entity_analytics/asset_criticality'; diff --git a/x-pack/plugins/security_solution/common/experimental_features.ts b/x-pack/plugins/security_solution/common/experimental_features.ts index afcd9700e4caa..cd98a9ef812e4 100644 --- a/x-pack/plugins/security_solution/common/experimental_features.ts +++ b/x-pack/plugins/security_solution/common/experimental_features.ts @@ -170,6 +170,11 @@ export const allowedExperimentalValues = Object.freeze({ */ riskEnginePrivilegesRouteEnabled: true, + /** + * Enables alerts suppression for new terms rules + */ + alertSuppressionForNewTermsRuleEnabled: false, + /** * Enables experimental Experimental S1 integration data to be available in Analyzer */ diff --git a/x-pack/plugins/security_solution/common/index.ts b/x-pack/plugins/security_solution/common/index.ts index 24181c66f7444..46dfd562ee8a6 100644 --- a/x-pack/plugins/security_solution/common/index.ts +++ b/x-pack/plugins/security_solution/common/index.ts @@ -22,6 +22,7 @@ export { export { ELASTIC_SECURITY_RULE_ID } from './detection_engine/constants'; export { ENABLED_FIELD } from './detection_engine/rule_management/rule_fields'; export { allowedExperimentalValues, type ExperimentalFeatures } from './experimental_features'; +export { SENTINEL_ONE_ACTIVITY_INDEX } from './endpoint/service/response_actions/sentinel_one'; // Careful of exporting anything from this file as any file(s) you export here will cause your page bundle size to increase. // If you're using functions/types/etc... internally it's best to import directly from their paths than expose the functions/types/etc... here. diff --git a/x-pack/plugins/security_solution/public/assistant/comment_actions/index.tsx b/x-pack/plugins/security_solution/public/assistant/comment_actions/index.tsx index 63e320b045595..c17aeaebc4560 100644 --- a/x-pack/plugins/security_solution/public/assistant/comment_actions/index.tsx +++ b/x-pack/plugins/security_solution/public/assistant/comment_actions/index.tsx @@ -7,12 +7,12 @@ import { EuiButtonIcon, EuiCopy, EuiFlexGroup, EuiFlexItem, EuiToolTip } from '@elastic/eui'; import { AttachmentType } from '@kbn/cases-plugin/common'; -import type { Message } from '@kbn/elastic-assistant'; +import type { ClientMessage } from '@kbn/elastic-assistant'; import React, { useCallback } from 'react'; import { useDispatch } from 'react-redux'; import { useAssistantContext } from '@kbn/elastic-assistant/impl/assistant_context'; -import { useBasePath, useKibana, useToasts } from '../../common/lib/kibana'; +import { useKibana, useToasts } from '../../common/lib/kibana'; import type { Note } from '../../common/lib/note'; import { appActions } from '../../common/store/actions'; import { TimelineId } from '../../../common/types'; @@ -22,17 +22,16 @@ import * as i18n from './translations'; import { useIsExperimentalFeatureEnabled } from '../../common/hooks/use_experimental_features'; interface Props { - message: Message; + message: ClientMessage; } const CommentActionsComponent: React.FC = ({ message }) => { const toasts = useToasts(); - const basePath = useBasePath(); const { cases } = useKibana().services; const dispatch = useDispatch(); const isModelEvaluationEnabled = useIsExperimentalFeatureEnabled('assistantModelEvaluation'); - const { showAssistantOverlay } = useAssistantContext(); + const { showAssistantOverlay, traceOptions } = useAssistantContext(); const associateNote = useCallback( (noteId: string) => dispatch(timelineActions.addNote({ id: TimelineId.active, noteId })), @@ -85,7 +84,7 @@ const CommentActionsComponent: React.FC = ({ message }) => { // See: https://github.com/elastic/kibana/issues/171368 const apmTraceLink = message.traceData != null && Object.keys(message.traceData).length > 0 - ? `${basePath}/app/apm/traces/explorer/waterfall?comparisonEnabled=false&detailTab=timeline&environment=ENVIRONMENT_ALL&kuery=&query=transaction.id:%20${message.traceData.transactionId}&rangeFrom=now-1y/d&rangeTo=now&showCriticalPath=false&traceId=${message.traceData.traceId}&transactionId=${message.traceData.transactionId}&type=kql&waterfallItemId=` + ? `${traceOptions.apmUrl}/traces/explorer/waterfall?comparisonEnabled=false&detailTab=timeline&environment=ENVIRONMENT_ALL&kuery=&query=transaction.id:%20${message.traceData.transactionId}&rangeFrom=now-1y/d&rangeTo=now&showCriticalPath=false&traceId=${message.traceData.traceId}&transactionId=${message.traceData.transactionId}&type=kql&waterfallItemId=` : undefined; // Use this link for routing to the services/transactions view which provides a slightly different view diff --git a/x-pack/plugins/security_solution/public/assistant/get_comments/index.test.tsx b/x-pack/plugins/security_solution/public/assistant/get_comments/index.test.tsx index 147cb39ae5600..884af527f4be0 100644 --- a/x-pack/plugins/security_solution/public/assistant/get_comments/index.test.tsx +++ b/x-pack/plugins/security_solution/public/assistant/get_comments/index.test.tsx @@ -5,11 +5,11 @@ * 2.0. */ +import type { MessageRole } from '@kbn/elastic-assistant-common'; import { OpenAiProviderType } from '@kbn/stack-connectors-plugin/public/common'; import { getComments } from '.'; -import type { ConversationRole } from '@kbn/elastic-assistant/impl/assistant_context/types'; -const user: ConversationRole = 'user'; +const user: MessageRole = 'user'; const currentConversation = { apiConfig: { actionTypeId: '.gen-ai', diff --git a/x-pack/plugins/security_solution/public/assistant/get_comments/index.tsx b/x-pack/plugins/security_solution/public/assistant/get_comments/index.tsx index a7d1a00f802c1..837a8d6f772f7 100644 --- a/x-pack/plugins/security_solution/public/assistant/get_comments/index.tsx +++ b/x-pack/plugins/security_solution/public/assistant/get_comments/index.tsx @@ -6,7 +6,7 @@ */ import type { EuiCommentProps } from '@elastic/eui'; -import type { Conversation, Message } from '@kbn/elastic-assistant'; +import type { Conversation, ClientMessage } from '@kbn/elastic-assistant'; import { EuiAvatar, EuiLoadingSpinner } from '@elastic/eui'; import React from 'react'; @@ -17,7 +17,7 @@ import { StreamComment } from './stream'; import { CommentActions } from '../comment_actions'; import * as i18n from './translations'; -export interface ContentMessage extends Message { +export interface ContentMessage extends ClientMessage { content: string; } const transformMessageWithReplacements = ({ @@ -26,7 +26,7 @@ const transformMessageWithReplacements = ({ showAnonymizedValues, replacements, }: { - message: Message; + message: ClientMessage; content: string; showAnonymizedValues: boolean; replacements: Replacements; diff --git a/x-pack/plugins/security_solution/public/assistant/provider.tsx b/x-pack/plugins/security_solution/public/assistant/provider.tsx index d2ad89b8c4318..2f12e02386d25 100644 --- a/x-pack/plugins/security_solution/public/assistant/provider.tsx +++ b/x-pack/plugins/security_solution/public/assistant/provider.tsx @@ -12,7 +12,7 @@ import type { IToasts, NotificationsStart } from '@kbn/core-notifications-browse import type { Conversation } from '@kbn/elastic-assistant'; import { AssistantProvider as ElasticAssistantProvider, - bulkChangeConversations, + bulkUpdateConversations, mergeBaseWithPersistedConversations, useFetchCurrentUserConversations, } from '@kbn/elastic-assistant'; @@ -27,11 +27,9 @@ import { useAssistantTelemetry } from './use_assistant_telemetry'; import { getComments } from './get_comments'; import { LOCAL_STORAGE_KEY, augmentMessageCodeBlocks } from './helpers'; import { useBaseConversations } from './use_conversation_store'; -import { DEFAULT_ALLOW, DEFAULT_ALLOW_REPLACEMENT } from './content/anonymization'; import { PROMPT_CONTEXTS } from './content/prompt_contexts'; import { BASE_SECURITY_QUICK_PROMPTS } from './content/quick_prompts'; import { BASE_SECURITY_SYSTEM_PROMPTS } from './content/prompts/system'; -import { useAnonymizationStore } from './use_anonymization_store'; import { useAssistantAvailability } from './use_assistant_availability'; import { useAppToasts } from '../common/hooks/use_app_toasts'; import { useSignalIndex } from '../detections/containers/detection_engine/alerts/use_signal_index'; @@ -79,7 +77,7 @@ export const createConversations = async ( const connectors = await loadConnectors({ http }); // post bulk create - const bulkResult = await bulkChangeConversations( + const bulkResult = await bulkUpdateConversations( http, { // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -152,10 +150,12 @@ export const AssistantProvider: React.FC = ({ children }) => { migrateConversationsFromLocalStorage, ] ); - useFetchCurrentUserConversations({ http, onFetch: onFetchedConversations }); - - const { defaultAllow, defaultAllowReplacement, setDefaultAllow, setDefaultAllowReplacement } = - useAnonymizationStore(); + useFetchCurrentUserConversations({ + http, + onFetch: onFetchedConversations, + isAssistantEnabled: + assistantAvailability.isAssistantEnabled && assistantAvailability.hasAssistantPrivilege, + }); const { signalIndexName } = useSignalIndex(); const alertsIndexPattern = signalIndexName ?? undefined; @@ -168,11 +168,7 @@ export const AssistantProvider: React.FC = ({ children }) => { augmentMessageCodeBlocks={augmentMessageCodeBlocks} assistantAvailability={assistantAvailability} assistantTelemetry={assistantTelemetry} - defaultAllow={defaultAllow} // to server and plugin start - defaultAllowReplacement={defaultAllowReplacement} // to server and plugin start docLinks={{ ELASTIC_WEBSITE_URL, DOC_LINK_VERSION }} - baseAllow={DEFAULT_ALLOW} // to server and plugin start - baseAllowReplacement={DEFAULT_ALLOW_REPLACEMENT} // to server and plugin start basePath={basePath} basePromptContexts={Object.values(PROMPT_CONTEXTS)} baseQuickPrompts={BASE_SECURITY_QUICK_PROMPTS} // to server and plugin start @@ -180,8 +176,6 @@ export const AssistantProvider: React.FC = ({ children }) => { baseConversations={baseConversations} getComments={getComments} http={http} - setDefaultAllow={setDefaultAllow} // remove - setDefaultAllowReplacement={setDefaultAllowReplacement} // remove title={ASSISTANT_TITLE} toasts={toasts} > diff --git a/x-pack/plugins/security_solution/public/assistant/send_to_timeline/index.tsx b/x-pack/plugins/security_solution/public/assistant/send_to_timeline/index.tsx index c22bf54afbece..5e929312c3da2 100644 --- a/x-pack/plugins/security_solution/public/assistant/send_to_timeline/index.tsx +++ b/x-pack/plugins/security_solution/public/assistant/send_to_timeline/index.tsx @@ -34,8 +34,8 @@ import { import { useDiscoverInTimelineContext } from '../../common/components/discover_in_timeline/use_discover_in_timeline_context'; import { useShowTimeline } from '../../common/utils/timeline/use_show_timeline'; import { useIsExperimentalFeatureEnabled } from '../../common/hooks/use_experimental_features'; -import { useDiscoverState } from '../../timelines/components/timeline/esql_tab_content/use_discover_state'; import { useSourcererDataView } from '../../common/containers/sourcerer'; +import { useDiscoverState } from '../../timelines/components/timeline/tabs/esql/use_discover_state'; export interface SendToTimelineButtonProps { asEmptyButton: boolean; diff --git a/x-pack/plugins/security_solution/public/assistant/use_anonymization_store/index.tsx b/x-pack/plugins/security_solution/public/assistant/use_anonymization_store/index.tsx deleted file mode 100644 index 62ffa72713223..0000000000000 --- a/x-pack/plugins/security_solution/public/assistant/use_anonymization_store/index.tsx +++ /dev/null @@ -1,41 +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 { useLocalStorage } from '../../common/components/local_storage'; -import { DEFAULT_ALLOW, DEFAULT_ALLOW_REPLACEMENT } from '../content/anonymization'; -import { LOCAL_STORAGE_KEY } from '../helpers'; - -export interface UseAnonymizationStore { - defaultAllow: string[]; - defaultAllowReplacement: string[]; - setDefaultAllow: React.Dispatch>; - setDefaultAllowReplacement: React.Dispatch>; -} - -const DEFAULT_ALLOW_KEY = `${LOCAL_STORAGE_KEY}.defaultAllow`; -const DEFAULT_ALLOW_REPLACEMENT_KEY = `${LOCAL_STORAGE_KEY}.defaultAllowReplacement`; - -export const useAnonymizationStore = (): UseAnonymizationStore => { - const [defaultAllow, setDefaultAllow] = useLocalStorage({ - defaultValue: DEFAULT_ALLOW, - key: DEFAULT_ALLOW_KEY, - isInvalidDefault: (valueFromStorage) => !Array.isArray(valueFromStorage), - }); - - const [defaultAllowReplacement, setDefaultAllowReplacement] = useLocalStorage({ - defaultValue: DEFAULT_ALLOW_REPLACEMENT, - key: DEFAULT_ALLOW_REPLACEMENT_KEY, - isInvalidDefault: (valueFromStorage) => !Array.isArray(valueFromStorage), - }); - - return { - defaultAllow, - defaultAllowReplacement, - setDefaultAllow, - setDefaultAllowReplacement, - }; -}; diff --git a/x-pack/plugins/security_solution/public/common/components/charts/common.test.tsx b/x-pack/plugins/security_solution/public/common/components/charts/common.test.tsx index 20dfc140c4138..10234da2fac2f 100644 --- a/x-pack/plugins/security_solution/public/common/components/charts/common.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/charts/common.test.tsx @@ -23,15 +23,6 @@ import { LEGACY_LIGHT_THEME, LEGACY_DARK_THEME } from '@elastic/charts'; jest.mock('../../lib/kibana'); -jest.mock('@elastic/charts', () => { - const original = jest.requireActual('@elastic/charts'); - - return { - ...original, - getSpecId: jest.fn(() => {}), - }; -}); - describe('WrappedByAutoSizer', () => { it('should render correct default height', () => { const wrapper = shallow(); diff --git a/x-pack/plugins/security_solution/public/common/components/discover_in_timeline/use_discover_in_timeline_actions.tsx b/x-pack/plugins/security_solution/public/common/components/discover_in_timeline/use_discover_in_timeline_actions.tsx index 3dcf9760ea11c..c651b039a97cc 100644 --- a/x-pack/plugins/security_solution/public/common/components/discover_in_timeline/use_discover_in_timeline_actions.tsx +++ b/x-pack/plugins/security_solution/public/common/components/discover_in_timeline/use_discover_in_timeline_actions.tsx @@ -15,14 +15,14 @@ import type { SavedSearch } from '@kbn/saved-search-plugin/common'; import type { DiscoverAppState } from '@kbn/discover-plugin/public/application/main/services/discover_app_state_container'; import type { TimeRange } from '@kbn/es-query'; import { useMutation, useQueryClient } from '@tanstack/react-query'; -import { useDiscoverState } from '../../../timelines/components/timeline/esql_tab_content/use_discover_state'; +import { useDiscoverState } from '../../../timelines/components/timeline/tabs/esql/use_discover_state'; import { timelineDefaults } from '../../../timelines/store/defaults'; import { TimelineId } from '../../../../common/types'; import { timelineActions, timelineSelectors } from '../../../timelines/store'; import { useAppToasts } from '../../hooks/use_app_toasts'; import { useShallowEqualSelector } from '../../hooks/use_selector'; import { useKibana } from '../../lib/kibana'; -import { savedSearchComparator } from '../../../timelines/components/timeline/esql_tab_content/utils'; +import { savedSearchComparator } from '../../../timelines/components/timeline/tabs/esql/utils'; import { DISCOVER_SEARCH_SAVE_ERROR_TITLE, DISCOVER_SEARCH_SAVE_ERROR_UNKNOWN, diff --git a/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx b/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx index f89a84ff308fb..fb2fc2a10cc5e 100644 --- a/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/events_viewer/index.tsx @@ -59,7 +59,7 @@ import { useFieldBrowserOptions } from '../../../timelines/components/fields_bro import { useSessionViewNavigation, useSessionView, -} from '../../../timelines/components/timeline/session_tab_content/use_session_view'; +} from '../../../timelines/components/timeline/tabs/session/use_session_view'; import { EventsContainerLoading, FullScreenContainer, diff --git a/x-pack/plugins/security_solution/public/common/components/header_section/__snapshots__/index.test.tsx.snap b/x-pack/plugins/security_solution/public/common/components/header_section/__snapshots__/index.test.tsx.snap index 46c33d5102feb..3ef2ecf88449b 100644 --- a/x-pack/plugins/security_solution/public/common/components/header_section/__snapshots__/index.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/common/components/header_section/__snapshots__/index.test.tsx.snap @@ -39,7 +39,7 @@ exports[`HeaderSection it renders 1`] = ` -

Test title -

+
diff --git a/x-pack/plugins/security_solution/public/common/components/header_section/index.tsx b/x-pack/plugins/security_solution/public/common/components/header_section/index.tsx index 70c6e6778a604..75cd089a87e36 100644 --- a/x-pack/plugins/security_solution/public/common/components/header_section/index.tsx +++ b/x-pack/plugins/security_solution/public/common/components/header_section/index.tsx @@ -169,7 +169,7 @@ const HeaderSectionComponent: React.FC = ({ )} -

+

{title} {tooltip && ( <> @@ -182,7 +182,7 @@ const HeaderSectionComponent: React.FC = ({ /> )} -

+
diff --git a/x-pack/plugins/security_solution/public/common/mock/mock_assistant_provider.tsx b/x-pack/plugins/security_solution/public/common/mock/mock_assistant_provider.tsx index 8ccad2b592b07..0c054b19af0b8 100644 --- a/x-pack/plugins/security_solution/public/common/mock/mock_assistant_provider.tsx +++ b/x-pack/plugins/security_solution/public/common/mock/mock_assistant_provider.tsx @@ -35,18 +35,12 @@ export const MockAssistantProviderComponent: React.FC = ({ children }) => actionTypeRegistry={actionTypeRegistry} assistantAvailability={mockAssistantAvailability} augmentMessageCodeBlocks={jest.fn(() => [])} - baseAllow={[]} - baseAllowReplacement={[]} basePath={'https://localhost:5601/kbn'} - defaultAllow={[]} docLinks={{ ELASTIC_WEBSITE_URL: 'https://www.elastic.co/', DOC_LINK_VERSION: 'current', }} - defaultAllowReplacement={[]} getComments={jest.fn(() => [])} - setDefaultAllow={jest.fn()} - setDefaultAllowReplacement={jest.fn()} http={mockHttp} baseConversations={BASE_SECURITY_CONVERSATIONS} > diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/index.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/index.test.tsx index f341476c4d8f9..d76c86596d1d2 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/description_step/index.test.tsx @@ -575,7 +575,7 @@ describe('description_step', () => { }); describe('alert suppression', () => { - const ruleTypesWithoutSuppression: Type[] = ['eql', 'esql', 'machine_learning', 'new_terms']; + const ruleTypesWithoutSuppression: Type[] = ['eql', 'esql', 'machine_learning']; const suppressionFields = { groupByDuration: { unit: 'm', diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/schema.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/schema.tsx index 49eba2d124d31..fd22c25308a27 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/schema.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/schema.tsx @@ -19,9 +19,9 @@ import { import { isEsqlRule, isNewTermsRule, - isQueryRule, isThreatMatchRule, isThresholdRule, + isSuppressionRuleConfiguredWithGroupBy, } from '../../../../../common/detection_engine/utils'; import { MAX_NUMBER_OF_NEW_TERMS_FIELDS } from '../../../../../common/constants'; import { isMlRule } from '../../../../../common/machine_learning/helpers'; @@ -574,28 +574,18 @@ export const schema: FormSchema = { }, ], }, - groupByFields: { + newTermsFields: { type: FIELD_TYPES.COMBO_BOX, label: i18n.translate( - 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.groupByFieldsLabel', + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.newTermsFieldsLabel', { - defaultMessage: 'Suppress alerts by', + defaultMessage: 'Fields', } ), - labelAppend: ( - - {i18n.translate( - 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.groupByFieldsLabelAppend', - { - defaultMessage: 'Optional (Technical Preview)', - } - )} - - ), helpText: i18n.translate( - 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.fieldGroupByFieldHelpText', + 'xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldNewTermsFieldHelpText', { - defaultMessage: 'Select field(s) to use for suppressing extra alerts', + defaultMessage: 'Select a field to check for new terms.', } ), validations: [ @@ -604,17 +594,36 @@ export const schema: FormSchema = { ...args: Parameters ): ReturnType> | undefined => { const [{ formData }] = args; - const needsValidation = - isQueryRule(formData.ruleType) || isThreatMatchRule(formData.ruleType); + const needsValidation = isNewTermsRule(formData.ruleType); + if (!needsValidation) { + return; + } + + return fieldValidators.emptyField( + i18n.translate( + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.newTermsFieldsMin', + { + defaultMessage: 'A minimum of one field is required.', + } + ) + )(...args); + }, + }, + { + validator: ( + ...args: Parameters + ): ReturnType> | undefined => { + const [{ formData }] = args; + const needsValidation = isNewTermsRule(formData.ruleType); if (!needsValidation) { return; } return fieldValidators.maxLengthField({ - length: 3, + length: MAX_NUMBER_OF_NEW_TERMS_FIELDS, message: i18n.translate( - 'xpack.securitySolution.detectionEngine.validations.stepDefineRule.groupByFieldsMax', + 'xpack.securitySolution.detectionEngine.validations.stepDefineRule.newTermsFieldsMax', { - defaultMessage: 'Number of grouping fields must be at most 3', + defaultMessage: 'Number of fields must be 3 or less.', } ), })(...args); @@ -622,43 +631,42 @@ export const schema: FormSchema = { }, ], }, - groupByRadioSelection: {}, - groupByDuration: { + historyWindowSize: { label: i18n.translate( - 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.groupByDurationValueLabel', + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.historyWindowSizeLabel', { - defaultMessage: 'Suppress alerts for', + defaultMessage: 'History Window Size', } ), helpText: i18n.translate( - 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.fieldGroupByDurationValueHelpText', - { - defaultMessage: 'Suppress alerts for', - } - ), - value: {}, - unit: {}, - }, - suppressionMissingFields: { - label: i18n.translate( - 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.suppressionMissingFieldsLabel', + 'xpack.securitySolution.detectionEngine.createRule.stepScheduleRule.historyWindowSizeHelpText', { - defaultMessage: 'If a suppression field is missing', + defaultMessage: "New terms rules only alert if terms don't appear in historical data.", } ), }, - newTermsFields: { + groupByFields: { type: FIELD_TYPES.COMBO_BOX, label: i18n.translate( - 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.newTermsFieldsLabel', + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.groupByFieldsLabel', { - defaultMessage: 'Fields', + defaultMessage: 'Suppress alerts by', } ), + labelAppend: ( + + {i18n.translate( + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.groupByFieldsLabelAppend', + { + defaultMessage: 'Optional (Technical Preview)', + } + )} + + ), helpText: i18n.translate( - 'xpack.securitySolution.detectionEngine.createRule.stepAboutRule.fieldNewTermsFieldHelpText', + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.fieldGroupByFieldHelpText', { - defaultMessage: 'Select a field to check for new terms.', + defaultMessage: 'Select field(s) to use for suppressing extra alerts', } ), validations: [ @@ -667,36 +675,17 @@ export const schema: FormSchema = { ...args: Parameters ): ReturnType> | undefined => { const [{ formData }] = args; - const needsValidation = isNewTermsRule(formData.ruleType); - if (!needsValidation) { - return; - } + const needsValidation = isSuppressionRuleConfiguredWithGroupBy(formData.ruleType); - return fieldValidators.emptyField( - i18n.translate( - 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.newTermsFieldsMin', - { - defaultMessage: 'A minimum of one field is required.', - } - ) - )(...args); - }, - }, - { - validator: ( - ...args: Parameters - ): ReturnType> | undefined => { - const [{ formData }] = args; - const needsValidation = isNewTermsRule(formData.ruleType); if (!needsValidation) { return; } return fieldValidators.maxLengthField({ - length: MAX_NUMBER_OF_NEW_TERMS_FIELDS, + length: 3, message: i18n.translate( - 'xpack.securitySolution.detectionEngine.validations.stepDefineRule.newTermsFieldsMax', + 'xpack.securitySolution.detectionEngine.validations.stepDefineRule.groupByFieldsMax', { - defaultMessage: 'Number of fields must be 3 or less.', + defaultMessage: 'Number of grouping fields must be at most 3', } ), })(...args); @@ -704,17 +693,28 @@ export const schema: FormSchema = { }, ], }, - historyWindowSize: { + groupByRadioSelection: {}, + groupByDuration: { label: i18n.translate( - 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.historyWindowSizeLabel', + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.groupByDurationValueLabel', { - defaultMessage: 'History Window Size', + defaultMessage: 'Suppress alerts for', } ), helpText: i18n.translate( - 'xpack.securitySolution.detectionEngine.createRule.stepScheduleRule.historyWindowSizeHelpText', + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.fieldGroupByDurationValueHelpText', { - defaultMessage: "New terms rules only alert if terms don't appear in historical data.", + defaultMessage: 'Suppress alerts for', + } + ), + value: {}, + unit: {}, + }, + suppressionMissingFields: { + label: i18n.translate( + 'xpack.securitySolution.detectionEngine.createRule.stepDefineRule.suppressionMissingFieldsLabel', + { + defaultMessage: 'If a suppression field is missing', } ), }, diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/use_experimental_feature_fields_transform.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/use_experimental_feature_fields_transform.ts index c035fef5af6e4..67e55892fd8eb 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/use_experimental_feature_fields_transform.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/components/step_define_rule/use_experimental_feature_fields_transform.ts @@ -7,6 +7,8 @@ import { useCallback } from 'react'; import type { DefineStepRule } from '../../../../detections/pages/detection_engine/rules/types'; +import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; +import { isNewTermsRule } from '../../../../../common/detection_engine/utils'; /** * transforms DefineStepRule fields according to experimental feature flags @@ -14,9 +16,31 @@ import type { DefineStepRule } from '../../../../detections/pages/detection_engi export const useExperimentalFeatureFieldsTransform = >(): (( fields: T ) => T) => { - const transformer = useCallback((fields: T) => { - return fields; - }, []); + const isAlertSuppressionForNewTermsRuleEnabled = useIsExperimentalFeatureEnabled( + 'alertSuppressionForNewTermsRuleEnabled' + ); + + const transformer = useCallback( + (fields: T) => { + const isNewTermsSuppressionDisabled = isNewTermsRule(fields.ruleType) + ? !isAlertSuppressionForNewTermsRuleEnabled + : false; + + // reset any alert suppression values hidden behind feature flag + if (isNewTermsSuppressionDisabled) { + return { + ...fields, + groupByFields: [], + groupByRadioSelection: undefined, + groupByDuration: undefined, + suppressionMissingFields: undefined, + }; + } + + return fields; + }, + [isAlertSuppressionForNewTermsRuleEnabled] + ); return transformer; }; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/pages/rule_creation/helpers.ts b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/pages/rule_creation/helpers.ts index 924dc4a62fd70..fb45ca1efe273 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/pages/rule_creation/helpers.ts +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_creation_ui/pages/rule_creation/helpers.ts @@ -490,6 +490,7 @@ export const formatDefineStepData = (defineStepData: DefineStepRule): DefineStep query: ruleFields.queryBar?.query?.query as string, new_terms_fields: ruleFields.newTermsFields, history_window_start: `now-${ruleFields.historyWindowSize}`, + ...alertSuppressionFields, } : isEsqlFields(ruleFields) && !('index' in ruleFields) ? { diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/exception_item_card/conditions.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/exception_item_card/conditions.tsx index 95e3f7c211888..a75ef577c8c70 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/exception_item_card/conditions.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_exceptions/components/exception_item_card/conditions.tsx @@ -37,6 +37,10 @@ const OS_LABELS = Object.freeze({ windows: i18n.OS_WINDOWS, }); +const EntryValueWrap = styled.span` + white-space: pre-wrap; +`; + const OPERATOR_TYPE_LABELS_INCLUDED = Object.freeze({ [ListOperatorTypeEnum.NESTED]: i18n.CONDITION_OPERATOR_TYPE_NESTED, [ListOperatorTypeEnum.MATCH_ANY]: i18n.CONDITION_OPERATOR_TYPE_MATCH_ANY, @@ -93,9 +97,13 @@ export const ExceptionItemCardConditions = memo( const getEntryValue = (type: string, value: string | string[] | undefined) => { if (type === 'match_any' && Array.isArray(value)) { - return value.map((currentValue) => {currentValue}); + return value.map((currentValue) => ( + + {currentValue} + + )); } - return value ?? ''; + return {value} ?? ''; }; const getEntryOperator = (type: string, operator: string) => { diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_definition_section.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_definition_section.tsx index 780ceaabf9651..4a9f97933b49b 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_definition_section.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/components/rule_details/rule_definition_section.tsx @@ -645,6 +645,28 @@ const prepareDefinitionSectionListItems = ( }); } + if ('new_terms_fields' in rule && rule.new_terms_fields && rule.new_terms_fields.length > 0) { + definitionSectionListItems.push({ + title: ( + + {i18n.NEW_TERMS_FIELDS_FIELD_LABEL} + + ), + description: , + }); + } + + if ('history_window_start' in rule) { + definitionSectionListItems.push({ + title: ( + + {i18n.HISTORY_WINDOW_SIZE_FIELD_LABEL} + + ), + description: , + }); + } + if (isSuppressionEnabled && 'alert_suppression' in rule && rule.alert_suppression) { if ('group_by' in rule.alert_suppression) { definitionSectionListItems.push({ @@ -682,28 +704,6 @@ const prepareDefinitionSectionListItems = ( } } - if ('new_terms_fields' in rule && rule.new_terms_fields && rule.new_terms_fields.length > 0) { - definitionSectionListItems.push({ - title: ( - - {i18n.NEW_TERMS_FIELDS_FIELD_LABEL} - - ), - description: , - }); - } - - if ('history_window_start' in rule) { - definitionSectionListItems.push({ - title: ( - - {i18n.HISTORY_WINDOW_SIZE_FIELD_LABEL} - - ), - description: , - }); - } - return definitionSectionListItems; }; diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_alert_suppression.test.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_alert_suppression.test.tsx index cab113ecd1393..d5c9f1f07d007 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_alert_suppression.test.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_alert_suppression.test.tsx @@ -7,8 +7,28 @@ import { renderHook } from '@testing-library/react-hooks'; import type { Type } from '@kbn/securitysolution-io-ts-alerting-types'; import { useAlertSuppression } from './use_alert_suppression'; +import * as useIsExperimentalFeatureEnabledMock from '../../../common/hooks/use_experimental_features'; + +jest + .spyOn(useIsExperimentalFeatureEnabledMock, 'useIsExperimentalFeatureEnabled') + .mockReturnValue(false); describe('useAlertSuppression', () => { + it('should return isSuppressionEnabled false if rule Type exists in SUPPRESSIBLE_ALERT_RULES and Feature Flag is disabled', () => { + const { result } = renderHook(() => useAlertSuppression('new_terms')); + + expect(result.current.isSuppressionEnabled).toBe(false); + }); + + it('should return isSuppressionEnabled true if rule Type exists in SUPPRESSIBLE_ALERT_RULES and Feature Flag is enabled', () => { + jest + .spyOn(useIsExperimentalFeatureEnabledMock, 'useIsExperimentalFeatureEnabled') + .mockImplementationOnce(() => true); + const { result } = renderHook(() => useAlertSuppression('new_terms')); + + expect(result.current.isSuppressionEnabled).toBe(true); + }); + it('should return the correct isSuppressionEnabled value fot threat_match rule type', () => { const { result } = renderHook(() => useAlertSuppression('threat_match')); diff --git a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_alert_suppression.tsx b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_alert_suppression.tsx index ba1bb94a49ae3..f4d1b3d22e82b 100644 --- a/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_alert_suppression.tsx +++ b/x-pack/plugins/security_solution/public/detection_engine/rule_management/logic/use_alert_suppression.tsx @@ -7,17 +7,29 @@ import { useCallback } from 'react'; import type { Type } from '@kbn/securitysolution-io-ts-alerting-types'; import { isSuppressibleAlertRule } from '../../../../common/detection_engine/utils'; +import { useIsExperimentalFeatureEnabled } from '../../../common/hooks/use_experimental_features'; export interface UseAlertSuppressionReturn { isSuppressionEnabled: boolean; } export const useAlertSuppression = (ruleType: Type | undefined): UseAlertSuppressionReturn => { + const isAlertSuppressionForNewTermsRuleEnabled = useIsExperimentalFeatureEnabled( + 'alertSuppressionForNewTermsRuleEnabled' + ); + const isSuppressionEnabledForRuleType = useCallback(() => { - if (!ruleType) return false; + if (!ruleType) { + return false; + } + + // Remove this condition when the Feature Flag for enabling Suppression in the New terms rule is removed. + if (ruleType === 'new_terms') { + return isSuppressibleAlertRule(ruleType) && isAlertSuppressionForNewTermsRuleEnabled; + } return isSuppressibleAlertRule(ruleType); - }, [ruleType]); + }, [ruleType, isAlertSuppressionForNewTermsRuleEnabled]); return { isSuppressionEnabled: isSuppressionEnabledForRuleType(), diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/index.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/index.tsx index e8ea06867c92a..0ab8ba6a624f1 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/index.tsx @@ -31,7 +31,7 @@ import { GraphOverlay } from '../../../timelines/components/graph_overlay'; import { useSessionView, useSessionViewNavigation, -} from '../../../timelines/components/timeline/session_tab_content/use_session_view'; +} from '../../../timelines/components/timeline/tabs/session/use_session_view'; import { inputsSelectors } from '../../../common/store'; import { combineQueries } from '../../../common/lib/kuery'; import { useInvalidFilterQuery } from '../../../common/hooks/use_invalid_filter_query'; diff --git a/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/rule_status_failed_callout.test.tsx b/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/rule_status_failed_callout.test.tsx index 3f8b9ef5386b2..d6a6e1ccbcbe1 100644 --- a/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/rule_status_failed_callout.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/rules/rule_execution_status/rule_status_failed_callout.test.tsx @@ -52,11 +52,7 @@ const ContextWrapper: React.FC = ({ children }) => ( actionTypeRegistry={actionTypeRegistry} assistantAvailability={mockAssistantAvailability} augmentMessageCodeBlocks={jest.fn()} - baseAllow={[]} - baseAllowReplacement={[]} basePath={'https://localhost:5601/kbn'} - defaultAllow={[]} - defaultAllowReplacement={[]} docLinks={{ ELASTIC_WEBSITE_URL: 'https://www.elastic.co/', DOC_LINK_VERSION: 'current', @@ -64,8 +60,6 @@ const ContextWrapper: React.FC = ({ children }) => ( getComments={mockGetComments} http={mockHttp} baseConversations={BASE_SECURITY_CONVERSATIONS} - setDefaultAllow={jest.fn()} - setDefaultAllowReplacement={jest.fn()} > {children} diff --git a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_signal_index.test.tsx b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_signal_index.test.tsx index a01b4040314d2..eb4860d1d6ef3 100644 --- a/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_signal_index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/containers/detection_engine/alerts/use_signal_index.test.tsx @@ -16,7 +16,7 @@ import { sourcererSelectors } from '../../../../common/store'; jest.mock('./api'); jest.mock('../../../../common/hooks/use_app_toasts'); jest.mock('../../../../common/components/user_privileges/endpoint/use_endpoint_privileges'); -jest.mock('../../../../timelines/components/timeline/esql_tab_content'); +jest.mock('../../../../timelines/components/timeline/tabs/esql'); describe('useSignalIndex', () => { let appToastsMock: jest.Mocked>; diff --git a/x-pack/plugins/security_solution/public/explore/components/authentication/__snapshots__/authentications_host_table.test.tsx.snap b/x-pack/plugins/security_solution/public/explore/components/authentication/__snapshots__/authentications_host_table.test.tsx.snap index b0b2754c24d3b..bf74c41fa303f 100644 --- a/x-pack/plugins/security_solution/public/explore/components/authentication/__snapshots__/authentications_host_table.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/explore/components/authentication/__snapshots__/authentications_host_table.test.tsx.snap @@ -104,7 +104,7 @@ exports[`Authentication Host Table Component rendering it renders the host authe
-

@@ -113,7 +113,7 @@ exports[`Authentication Host Table Component rendering it renders the host authe > Authentications -

+